Computer Science ›› 2026, Vol. 53 ›› Issue (10): 113-122.doi: 10.11896/jsjkx.260300072

• Large Models and Multimodal Intelligent Perception • Previous Articles     Next Articles

FlowSem-LLM:TLS Encrypted Traffic Classification Method for Flow Semantic Understanding

CHEN Shuhan1, LI Peng1,2   

  1. 1 College of Computer Science,Nanjing University of Posts and Telecommunications,Nanjing 210023, China
    2 Institute of Network Security and Trusted Computing,Nanjing University of Posts and Telecommunications,Nanjing 210023, China
  • Received:2026-03-16 Revised:2026-06-24 Published:2026-10-13
  • About author:CHEN Shuhan,born in 2002,Ph.D candidate.His main research interests include network traffic classification and large language models.
    LI Peng,born in 1979,Ph.D,professor,Ph.D supervisor,is a member of CCF(No.48573M).His main research interests include computer communication networks,cloud computing and information security.
  • Supported by:
    Six Talent Peaks Project of Jiangsu Province(RJFW-111) and Postgraduate Research and Practice Innovation Program of Jiangsu Province(KYCX23_1048).

Abstract: Large language models(LLMs) have demonstrated strong capabilities in complex semantic understanding.However,their application to network traffic analysis still faces several challenges,including modality discrepancies between traffic data and natural language,the complexity of feature representation,and the high cost of model training.To address these challenges,this paper proposes FlowSem-LLM(Flow Semantic Large Language Model),a TLS-encrypted traffic classification method for semantic understanding of network traffic.Without relying on domain-specific pretraining,the proposed method achieves accurate encrypted traffic classification by task-oriented fine-tuning of a general-purpose LLM.To fully exploit the characteristics of encrypted traffic,a multidimensional feature extraction scheme is designed that integrates statistical features with TLS protocol features.Specifically,statistical features are extracted from the application,transport,and network layers,while the TLS handshake process is further analyzed to obtain both handshake metadata and dynamic behavioral features.On this basis,structured traffic features are transformed into instruction-style corpora,enabling the LLM to process them in a semantic manner.Parameter-efficient supervised instruction tuning is then performed on the Llama 3.1 model using Low-Rank Adaptation(LoRA).Experimental results show that FlowSem-LLM achieves an accuracy of 0.8662 on the 120-class traffic classification task over the CSTNET-TLS1.3 dataset,demonstrating its effectiveness for protocol semantic understanding and encrypted traffic classification.

Key words: Encrypted traffic classification, Large language model, TLS encrypted traffic, Parameter-efficient fine-tuning, Network traffic analysis

CLC Number: 

  • TP393.08
[1] WICKRAMASINGHE N,SHAGHAGHI A,TSUDIK G,et al.SoK:Decoding the Enigma of Encrypted Network Traffic Classifiers[C]//2025 IEEE Symposium on Security and Privacy(SP).IEEE,2025:1825-1843.
[2] CHEN Z H,CHENG G,XU Z H,et al.A Survey on Internet Encrypted Traffic Detection,Classification and Identification [J].Chinese Journal of Computers,2023,46(5):1060-1085.
[3] HOU J,LU H,LIU F A,et al.Detection and Countermeasure of Encrypted Malicious Traffic:A Survey [J].Journal of Software,2024,35(1):333-355.
[4] PAPADOGIANNAKI E,IOANNIDIS S.A Survey on Encrypted Network Traffic Analysis Applications,Techniques,and Countermeasures [J].ACM Computing Surveys,2021,54(6):1-35.
[5] YU F,CHEN Z F,DIAO Y L,et al.Fast and Memory-Efficient Regular Expression Matching for Deep Packet Inspection[C]//Proceedings of the 2006 ACM/IEEE Symposium on Architecture for Networking and Communications Systems.ACM,2006:93-102.
[6] WANG Z H,FOK K W,THING V L L.Machine learning forencrypted malicious traffic detection:Approaches,datasets and comparative study [J].Computers & Security,2022,113:102542.
[7] ACETO G,CIUONZO D,MONTIERI A,et al.Mobile encrypted traffic classification using deep learning:Experimental evaluation,lessons learned,and challenges [J].IEEE Transactions on Network and Service Management,2019,16(2):445-458.
[8] CHEN L C,GAO S,LIU B X,et al.Research Status and Development Trends on Network Encrypted Traffic Identification [J].Netinfo Security,2019,19(3):19-25.
[9] MOORE A W,ZUEV D.Internet Traffic Classification UsingBayesian Analysis Techniques[C]//Proceedings of the 2005 ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems.New York:ACM,2005:50-60.
[10] DONG S,LI R X.Traffic identification method based on multiple probabilistic neural network model [J].Neural Computing and Applications,2019,31(2):473-487.
[11] VAN EDE T,BORTOLAMEOTTI R,CONTINELLA A,et al.FlowPrint:Semi-Supervised Mobile-App Fingerprinting on Encrypted Network Traffic[C]//Network and Distributed System Security Symposium(NDSS).San Diego:Internet Society,2020.
[12] JIANG T T,YIN W X,CAI B,et al.Encrypted Malicious Traffic Identification Based on Hierarchical Spatiotemporal Feature and Multi-Head Attention [J].Computer Engineering,2021,47(7):101-108.
[13] CHEN M H,ZHU Y F,LU B,et al.Classification of Application Type of Encrypted Traffic Based on Attention-CNN [J].Computer Science,2021,48(4):325-332.
[14] SHEN M,ZHANG J P,ZHU L H,et al.Accurate decentralized application identification via encrypted traffic analysis using graph neural networks [J].IEEE Transactions on Information Forensics and Security,2021,16:2367-2380.
[15] CUI S,HAN X Y,HAN D Q,et al.FG-SAT:Efficient FlowGraph for Encrypted Traffic Classification Under Environment Shifts [J].IEEE Transactions on Information Forensics and Security,2025,20:5326-5339.
[16] DONG S,XIA Y J,PENG T.Traffic identification model based on generative adversarial deep convolutional network [J].Annals of Telecommunications,2022,77(9):573-587.
[17] BU Z Y,ZHOU B,CHENG P Y,et al.Encrypted network traffic classification using deep and parallel network-in-network models [J].IEEE Access,2020,8:132950-132959.
[18] ACETO G,CIUONZO D,MONTIERI A,et al.MIMETIC:Mobile encrypted traffic classification using multimodal deep lear-ning [J].Computer Networks,2019,165:106944.
[19] REZAEI S,LIU X.Deep Learning for Encrypted TrafficClassification:An Overview [J].IEEE Communications Magazine,2019,57(5):76-81.
[20] WANG Z X,LI Z Y,FU M Y,et al.Network traffic classification based on federated semi-supervised learning [J].Journal of Systems Architecture,2024,149:103091.
[21] MA Y X,LI Z D,XUE H M,et al.A balanced supervised contrastive learning-based method for encrypted network traffic classification [J].Computers & Security,2024,145:104023.
[22] DONG S,XIA Y J,PENG T.Network abnormal traffic detection model based on semi-supervised deep reinforcement learning [J].IEEE Transactions on Network and Service Management,2021,18(4):4197-4212.
[23] LIN X J,XIONG G,GOU G P,et al.ET-BERT:A Contextualized Datagram Representation with Pre-Training Transformers for Encrypted Traffic Classification[C]//Proceedings of the ACM Web Conference 2022.New York:ACM,2022:633-642.
[24] HE H Y,YANG Z G,CHEN X N.PERT:Payload Encoding Representation from Transformer for Encrypted Traffic Classification[C]//Proceedings of the 2020 ITU Kaleidoscope:Industry-Driven Digital Transformation.IEEE,2020:1-8.
[25] LIANG Y,LI P C,LAI Q N,et al.EM-BERT:A LanguageModel-Based Method to Detect Encrypted Malicious Network Traffic[C]//Proceedings of International Conference on Image,Vision and Intelligent Systems 2023(ICIVIS 2023).Singapore:Springer,2024:580-589.
[26] ZHOU G M,GUO X W,LIU Z T,et al.TrafficFormer:An Efficient Pre-Trained Model for Traffic Data[C]//2025 IEEE Symposium on Security and Privacy(SP).IEEE,2025:1844-1860.
[27] MENG X Y,LIN C G,WANG Y Q,et al.NetGPT:Generative pretrained transformer for network traffic [J].arXiv:2304.09513,2023.
[28] CUI T,LIN X,LI S,et al.TrafficLLM:Enhancing large lan-guage models for network traffic analysis with generic traffic representation [J].arXiv:2504.04222,2025.
[29] WU D,WANG X D,QIAO Y Q,et al.NetLLM:Adapting Large Language Models for Networking[C]//Proceedings of the ACM SIGCOMM 2024 Conference.New York:ACM,2024:661-678.
[30] LIN K D,XU X L,XIAO F.MFFusion:A multi-level features fusion model for malicious traffic detection based on deep lear-ning [J].Computer Networks,2022,202:108658.
[31] LIN P,YE K J,HU Y S,et al.A novel multimodal deep learning framework for encrypted traffic classification [J].IEEE/ACM Transactions on Networking,2022,31(3):1369-1384.
[32] YU L X,TAO J,XU Y F,et al.TLS fingerprint for encrypted malicious traffic detection with attributed graph kernel [J].Computer Networks,2024,247:110475.
[33] LEE H W,KIM D W,KWON Y H.TLS 1.3 in Practice:HowTLS 1.3 Contributes to the Internet[C]//Proceedings of the Web Conference 2021.New York:ACM,2021:70-79.
[34] CHEN J F,SONG L,CAI S H,et al.TLS-MHSA:An efficient detection model for encrypted malicious traffic based on multi-head self-attention mechanism [J].ACM Transactions on Privacy and Security,2023,26(4):1-21.
[35] MA X L,ZHU W B,WEI J L,et al.EETC:An extended en-crypted traffic classification algorithm based on variantResNet network [J].Computers & Security,2023,128:103175.
[36] AL-NAAMI K,CHANDRA S,MUSTAFA A,et al.AdaptiveEncrypted Traffic Fingerprinting with Bi-Directional Depen-dence[C]//Proceedings of the 32nd Annual Conference on Computer Security Applications(ACSAC ’16).New York:ACM,2016:177-188.
[37] SIRINAM P,IMANI M,JUAREZ M,et al.Deep Fingerprin-ting:Undermining Website Fingerprinting Defenses with Deep Learning[C]//Proceedings of the 2018 ACM SIGSAC Confe-rence on Computer and Communications Security.New York:ACM,2018:1928-1943.
[38] ZHENG Y W,ZHANG R C,ZHANG J H,et al.LlamaFactory:Unified Efficient Fine-Tuning of 100+ Language Models[C]//Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics.ACL,2024:400-410.
[1] HE Jiaojun, LI Xin. Review of Graph Learning Based on Large Language Models:Methods,Benchmarks and Advances [J]. Computer Science, 2026, 53(9): 1-15.
[2] LI Luozheng, LI Lingbo, YUAN Quan. Survey of Chinese Datasets for LLM Safety Alignment:Landscape and Prospects [J]. Computer Science, 2026, 53(9): 16-23.
[3] AN Ran, CHENG Kai, SHAO Tianhao, LI Changyuan, CHEN Yan. Framework,Techniques and Challenges of Task Planning Agent Based on Large Language Model [J]. Computer Science, 2026, 53(9): 24-37.
[4] XIA Yi, ZHOU Gang, ZHANG Kaixiang, LAN Mingjing, LI Zhufeng, SU Benrong, HE Haofeng, FENG Shizhong. Survey on Collaborative-driven Knowledge Reasoning Technologies Integrating Large Language Models and Knowledge Graphs [J]. Computer Science, 2026, 53(9): 38-54.
[5] ZHANG Rongjie, PANG Xiongwen, WANG Fengling. Review of Large Language Model-based Time Series Modeling via Fine-tuning and AgentArchitecture [J]. Computer Science, 2026, 53(9): 55-70.
[6] CHEN Hai, FAN Changjun, SUN Boliang, CHENG Jie, KONG Junfeng, YUAN Yuchen. Order-based,LLM-augmented Kill-chain for Time-sensitive Target Engagement [J]. Computer Science, 2026, 53(9): 71-81.
[7] GUO Yuyang, SHI Lei, LIU Huan, DONG Yixiang, LI Rui. Domain-adapted and Dynamically Retrieval-augmented Approach for Large-scale History Discipline Model Construction [J]. Computer Science, 2026, 53(9): 92-100.
[8] LEI Kunhan, TAO Jiuyang, LI Chenyu, ZHONG Qi, YE Linfa. Method for Generating Operational Action Plans Based on Large Language Model Guided byChain-of-Thought [J]. Computer Science, 2026, 53(9): 101-109.
[9] LI Zhennan, QIAN Jiayan, WANG Xinzhi, ZHANG Hui. Technology Risk Structure Recognition Based on Multi-granularity Semantic Dual Reflection [J]. Computer Science, 2026, 53(9): 395-404.
[10] JIA Zishuo, ZHANG Jian’ge, HE Haofeng, FENG Shizhong, LIU Yilin. Survey on Mutually Augmenting Technologies and Applications of Large Models and KnowledgeGraphs [J]. Computer Science, 2026, 53(8): 219-228.
[11] LIU Jing. Review of Music Artificial Intelligence Driven by Large Language Models [J]. Computer Science, 2026, 53(8): 229-244.
[12] ZHANG Haoran, HAO Wenning, JIN Dawei, CHENG Kai, LIU Junyang. Agentic Retrieval Augmented Generation Framework Based on Retrieval Task Planning and Reflection Mechanism [J]. Computer Science, 2026, 53(8): 285-297.
[13] ZHANG Zhonglin, XIA Hang. LSQ-RAG:Retrieval-enhanced Generation Framework Based on LLM-enhanced Ranker [J]. Computer Science, 2026, 53(8): 298-306.
[14] FAN Ruxin, SUN Baicai, GONG Lina, YAO Xiangjuan, GONG Dunwei. Test Case Generation and Prioritization for Program Fault Diagnosis Based on Large LanguageModel [J]. Computer Science, 2026, 53(8): 365-374.
[15] WANG Xinlin, LI Yan, MA Chaofan, LI Shuo. Retrieval-Augmented Generation:Survey of Methods and Applications [J]. Computer Science, 2026, 53(7): 101-117.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!