基于数据增强与CNN-Optuna-Attention改进的网络流量分类方法

唐浩耀 ,  崔鑫 ,  张艺炜 ,  赵庆慧

科学技术与工程 ›› 2025, Vol. 25 ›› Issue (15) :6419-6430

PDF (11911KB)
科学技术与工程 ›› 2025, Vol. 25 ›› Issue (15) :6419-6430 DOI: 10.12404/j.issn.1671-1815.2404568
自动化技术、计算机技术

基于数据增强与CNN-Optuna-Attention改进的网络流量分类方法

作者信息 +

Network Traffic Classification Method Improved Based on Data Augmentation and CNN-Optuna-Attention

Author information +
文章历史 +

摘要

针对基于卷积神经网络的流量分类方法难以捕捉序列中不同部分的重要性、特征提取不足的问题,为提升网络流量分类精度,提出一种注意力机制与卷积神经网络相结合的流量分类方法,在卷积神经网络模型的基础上设计实现一种注意力机制层,通过接收全连接层的输出作为输入,计算输入特征的权重并乘以原始特征,实现对关键特征的加强,进而有助于提高模型对关键信息的捕捉能力。其次针对网络流量类别样本数不均衡导致模型过拟合于高比例类别,难以识别分类小比例类别的问题,提出了一种对数据集进行数据增强的方法。并且考虑到超参数组合优化的角度,提出一种基于贝叶斯优化的超参数搜索策略和五折交叉验证的方式对模型的超参数组合进行优化。通过上述方法研究确定模型的超参数组合。使用公开数据集进行上述实验与模型测试,结果表明:与其他方法相比,总体准确率、精确率以及F1分数都有明显的提升,验证了本文所提方法具有更好的分类性能。

Abstract

In order to improve the accuracy of network traffic classification, a traffic classification method combining an attention mechanism and a convolutional neural network was proposed. An attention mechanism layer was designed and implemented on the basis of the convolutional neural network model, which received the output of the fully connected layer as input, calculated the weight of the input features, and multiplied it by the original features to strengthen the key features. This, in turn, helped to improve the model's ability to capture key information. Secondly, in order to solve the problem that the model was overfitting to the high-proportion category due to the unbalanced sample number of network traffic categories, and it was difficult to identify the small-proportion categories, a method to augment the dataset was proposed. Considering the perspective of hyperparameter combination optimization, a hyperparameter search strategy based on Bayesian optimization and five-fold cross-validation was proposed to optimize the hyperparameter combination of the model. The combination of hyperparameters of the model was determined by the above methods. The public dataset was used for the above experiments and model tests. The results show that compared with other methods, the overall accuracy, precision, and F1 score are significantly improved, which verifies that the proposed method has better classification performance.

关键词

深度学习 / 流量分类 / 注意力机制 / 卷积神经网络 / 超参数优化 / 五折交叉验证

Key words

deep learning / traffic classification / attention mechanisms / convolutional neural networks / hyperparameter optimization / five-fold cross-validation

引用本文

引用格式 ▾
唐浩耀, 崔鑫, 张艺炜, 赵庆慧. 基于数据增强与CNN-Optuna-Attention改进的网络流量分类方法[J]. 科学技术与工程, 2025, 25(15): 6419-6430 DOI:10.12404/j.issn.1671-1815.2404568
TANG Hao-yao, CUI Xin, ZHANG Yi-wei, ZHAO Qing-hui. Network Traffic Classification Method Improved Based on Data Augmentation and CNN-Optuna-Attention[J]. Science Technology and Engineering, 2025, 25(15): 6419-6430 DOI:10.12404/j.issn.1671-1815.2404568

登录浏览全文

4963

注册一个新账户 忘记密码

参考文献

基金资助

山东理工大学科技博士项目(4041422007)

PDF (11911KB)

36

访问

0

被引

详细

导航
相关文章

/

〈 〉