信息网络安全 ›› 2026, Vol. 26 ›› Issue (7): 1044-1057.doi: 10.3969/j.issn.1671-1122.2026.07.004

• AI安全防御 • 上一篇    下一篇

融合半字节二阶马尔可夫链与卷积增强Transformer的加密流量分类方法

冯景瑜, 罗晨(), 杨帅毅, 樊雨   

  1. 西安邮电大学无线网络安全技术国家工程研究中心西安 710121
  • 收稿日期:2025-12-03 出版日期:2026-07-10 发布日期:2026-09-03
  • 通讯作者: 罗晨 E-mail:948372629@qq.com
  • 作者简介:冯景瑜(1984—),男,甘肃,教授,博士,CCF会员,主要研究方向为物联网安全、区块链、网络攻防|罗晨(2002—),男,湖南,硕士研究生,主要研究方向为网络异常流量检测|杨帅毅(2001—),男,河南,硕士研究生,主要研究方向为网络异常流量检测|樊雨(2001—),女,陕西,硕士研究生,主要研究方向为网络异常流量检测
  • 基金资助:
    国家自然科学基金(62572392);陕西省重点研发计划(2024GX-YBXM-076)

A semi-byte second-order Markov chain and convolution-enhanced Transformer-based method for encrypted traffic classification

Feng Jingyu, Luo Chen(), Yang Shuaiyi, Fan Yu   

  1. National Engineering Research Center for Wireless Security, Xi’an University of Posts and Telecommunications, Xi’an 710121, China
  • Received:2025-12-03 Online:2026-07-10 Published:2026-09-03
  • Contact: Luo Chen E-mail:948372629@qq.com

摘要:

针对加密流量分类中特征表达受限、深层时序依赖建模能力不足以及卷积神经网络与Transformer结构融合不充分的问题,文章提出一种融合半字节二阶马尔可夫链与卷积增强Transformer(ConvFormer)的加密流量分类方法NSOM-CF。通过对原始流量字节序列进行半字节级建模,NSOM-CF构建出可反映字节转移规律的二阶马尔可夫转移概率矩阵,可有效缓解矩阵稀疏性,并充分保留捕获流量的动态变化规律和时序依赖关系。进一步映射转移矩阵为多通道特征图,NSOM-CF利用ConvFormer捕获局部空间特征和全局上下文依赖关系,得到特征图向量表示,以此实现加密流量的精准分类。实验结果表明,NSOM-CF在ISCX-VPN和USTC-TFC数据集上分别取得0.9967和0.9968的准确率,验证了该方法在加密流量分类任务中的有效性。

关键词: 加密流量分类, 马尔可夫链, 稀疏性缓解, ConvFormer

Abstract:

To address the limitations in feature representation and insufficient modeling of deep temporal dependencies in encrypted traffic classification, as well as the inadequate integration of convolutional neural networks and Transformer architectures, this paper proposed NSOM-CF, an encrypted traffic classification method that combines a semi-byte second-order Markov chain with a convolution-enhanced Transformer (ConvFormer). By modeling the original traffic byte sequences at the semi-byte level, NSOM-CF constructed a second-order Markov transition probability matrix that reflected byte transition patterns, effectively alleviating matrix sparsity while preserving the dynamic variations and temporal dependencies of traffic. By further mapping the transition matrix into multi-channel feature maps, NSOM-CF leveraged ConvFormer to capture both local spatial features and global contextual dependencies, generating vector representations of the feature maps to achieve accurate encrypted traffic classification. Experimental results show that the proposed method achieves accuracies of 0.9967 and 0.9968 on the ISCX-VPN and USTC-TFC datasets, respectively, demonstrating the effectiveness of NSOM-CF in encrypted traffic classification tasks.

Key words: encrypted traffic classification, Markov chain, sparse reduction, ConvFormer

中图分类号: