
科学技术与工程

中国技术经济学会
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.
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.
deep learning / traffic classification / attention mechanisms / convolutional neural networks / hyperparameter optimization / five-fold cross-validation
/
| 〈 |
|
〉 |