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

Hao-yao TANG , Xin CUI , Yi-wei ZHANG , Qing-hui ZHAO

Science Technology and Engineering ›› 2025, Vol. 25 ›› Issue (15) : 6419 -6430.

PDF
Science Technology and Engineering ›› 2025, Vol. 25 ›› Issue (15) : 6419-6430 DOI: 10.12404/j.issn.1671-1815.2404568
research-article
Network Traffic Classification Method Improved Based on Data Augmentation and CNN-Optuna-Attention
Author information +
History +
PDF

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.

Keywords

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

Cite this article

Download citation ▾
Hao-yao TANG, Xin CUI, Yi-wei ZHANG, Qing-hui ZHAO. Network Traffic Classification Method Improved Based on Data Augmentation and CNN-Optuna-Attention. Science Technology and Engineering, 2025, 25(15): 6419-6430 DOI:10.12404/j.issn.1671-1815.2404568

登录浏览全文

4963

注册一个新账户 忘记密码

References

Funding

PDF (11911KB)

18

Accesses

0

Citation

Detail

Sections
Recommended

/

〈 〉