吉林大学学报(工学版) ›› 2026, Vol. 56 ›› Issue (8): 2201-2209.doi: 10.13229/j.cnki.jdxbgxb.20250045

• 计算机科学与技术 • 上一篇    

基于深度学习的无线传感器网络流量异常检测

刘洲洲1(),金聪1,蒋光毅1,贾楠1,刘超1,张杨梅2   

  1. 1.西安航空学院 计算机学院,西安 710077
    2.西安航空学院 电子工程学院,西安 710077
  • 收稿日期:2025-01-13 出版日期:2026-08-01 发布日期:2026-09-02
  • 作者简介:刘洲洲(1981-),男,教授,博士. 研究方向:无线传感网络与智能计算. E-mail: liuzhouzhou@xaau.edu.cn
  • 基金资助:
    西安市“科学家+工程师”建设项目(2024JH-KGDW-0006);陕西省重点研发计划项目(2026CY-YBXM-91);陕西省教育厅科学研究计划项目(ZX20260008);国家自然科学基金面上项目(42572342);西安航空学院低空经济专项PI团队项目(2025PI03);陕西省教育厅重点科学研究计划项目(25JU023)

Traffic anomaly detection in wireless sensor networks based on deep learning

Zhou-zhou LIU1(),Cong JIN1,Guang-yi JIANG1,Nan JIA1,Chao LIU1,Yang-mei ZHANG2   

  1. 1.College of Computer,Xi'an Aeronautical University,Xi'an 710077,China
    2.College of Electronic Engineering,Xi'an Aeronautical University,Xi'an 710077,China
  • Received:2025-01-13 Online:2026-08-01 Published:2026-09-02

摘要:

针对现有无线传感器网络(WSNs)流量异常检测方法泛化能力较弱、异常检测准确率不高等缺陷,提出一种融合改进卷积神经网络(CNN)和密度峰值聚类(Density peak clustering,DPC)的WSNs流量异常检测模型。该模型由数据处理层、特征提取层和异常判定输出层组成。数据处理层,利用格拉姆角场(GAF)变换技术,将一维WSNs流量时间序列转换生成为二维图像并传输至特征提取层。特征提取层,运用CNN提取WSNs数据高维空间特征;设计改进的黏菌优化算法和引入最小绝对收缩和选择算子(Lasso)回归对CNN进行改进优化,以增强CNN网络泛化能力。异常判定输出层,采用DPC对提取的高维空间特征进行聚类,通过定义异常判定规则最终实现对WSNs流量的异常检测。实验结果表明:相比于其他WSNs流量异常检测方案,所提模型检测准确率提高了约15.33%。

关键词: 计算机科学与技术, 无线传感器网络, 异常检测, 卷积神经网络, 黏菌优化算法, 密度峰值聚类

Abstract:

To address weak generalization and low accuracy in existing detection methods, a WSNs traffic anomaly detection model based on an improved convolutional neural network (CNN) and density peak clustering (DPC) is proposed. This model consists of a data processing layer, a feature extraction layer, and an anomaly detection output layer. In the data processing Layer, the gramian angular fields (GAF) is used to transform one-dimensional WSNs traffic time series into two-dimensional images. In the feature extraction layer, CNN is used to extract high-dimensional spatial features of WSNs data. An improved slime mold optimization algorithm is designed and the least absolute shrinkage and selection operator (Lasso) is introduced to enhance the generalization ability of CNN network. In the traffic anomaly detection output layer, DPC is used to cluster the extracted high-dimensional spatial features, and anomaly detection of WSNs data is ultimately achieved by defining anomaly detection rules. The experimental results show that compared to other WSNs traffic anomaly detection schemes, the detection accuracy of the proposed detection model has increased by 15.33%.

Key words: computer science and technology, wireless sensor networks, anomaly detection, convolutional neural network, slime mold optimization algorithm, density peak clustering

中图分类号: 

  • TP393

图1

ICNN-DPC 异常检测模型"

图2

CNN结构示意图"

表1

WSNs流量实验数据集"

数据集合攻击类型代号标签训练集/个测试集/个
WSN-DSBlackholeB101 000200
GrayholeG111 000200
FloodingF121 000200
SchedulingS131 000200
正常数据N141 000200
KDD CUP'99DoSD251 000200
R2LR261 000200
U2RU271 000200
ProbeP281 000200
正常数据N291 000200

表2

ISMA优化CNN超参数配置结果"

数据集超参数
m1m2m3m4Δ
WSN-DS14511243039
KDD CUP'9922671444351

图3

ISMA函数收敛曲线"

图4

不同训练批量大小对检测结果的影响"

表3

不同模型评价指标对比结果 (%)"

模型

评级

指标

WSN-DSKDD CUP'99
N1B1G1F1S1N2D2R2U2P2
ICNN-DPCAC99.498.797.489.398.898.997.496.297.397.9
FA0.030.050.040.160.040.050.040.060.030.04
R/10098.987.2100/98.210099.6100
Λ197.197.696.486.698.398.196.696.096.997.3
ICNN-SoftmaxAC90.289.389.187.290.689.590.488.790.191.4
FA0.120.140.110.190.090.110.080.150.120.10
R/90.291.186.291.1/93.292.791.093.3
Λ190.490.791.680.390.791,492.291.990.592.4
CNN-SoftmaxAC87.186.288.177.188.387.284.482.785.584.1
FA0.220.210.160.270.150.190.160.220.160.15
R/85.488.179.389.8/85.284.186.492.3
Λ180.281.183.276.485.384.182.283.384.690.5
GCN-GRUAC98.697.296.993.297.798.396.195.896.497.0
FA0.040.060.050.070.060.060.050.080.070.06
R/98.997.294.1100/97.999.499.199.6
Λ196.395.295.593.197.498.295.495.396.296.8
BIRCHAC88.687.089.479.289.188.485.283.186.085.4
FA0.190.180.140.220.130.160.150.190.140.13
R/88.390.480.791.5/86.685.487.686.2
Λ188.387.489.578.290.488.786.482.386.284.1

表4

WSNs异常检测对别结果"

模型指标/%
ACFARΛ1
ICNN-DPC98.210.0799.2798.38
ICNN-Softmax90.340.1192.3695.29
CNN-Softmax85.150.2289.4288.41
GCN-GRU97.130.0998.9697.23
BIRCH89.240.1893.4591.62
[1] 刘景美, 闫义博. 人工鱼群特征选择的网络入侵检测系统[J]. 西安电子科技大学学报, 2023, 50(4): 132-138.
Liu Jing-mei, Yan Yi-bo. Artificial fish feature selection network intrusion detection system [J]. Journal of Xidian University, 2023, 50(4): 132-138.
[2] 金明, 丁蓉. 一种联合时域和空域残差的网络异常检测与节点定位方法[J]. 电子学报, 2023, 51(5): 1172-1178.
Jin Ming, Ding Rong. Detection and localization of outlier nodes in wireless sensor networks via jointing temporal and spatial residuals [J]. Acta Electronica Sinica, 2023, 51(5): 1172-1178.
[3] 朱梦圆, 陈卓, 刘鹏飞, 等. 基于雾计算的无线传感器网络联合入侵检测算法[J]. 北京航空航天大学学报,2022, 48(10): 1943-1950.
Zhu Meng-yuan, Chen Zhuo, Liu Peng-fei, et al. Fog computing-based federated intrusion detection algorithm for wireless sensor networks [J]. Journal of Beijing University of Aeronautics and Astronautics, 2022, 48(10): 1943-1950.
[4] 陈俊杰, 邓洪高, 马谋, 等. GCN-GRU: 一种无线传感器网络故障检测模型[J]. 西安电子科技大学学报, 2022, 49(5): 60-67.
Chen Jun-jie, Deng Hong-gao, Ma Mou, et al. GRN-GRU: a fault detection model for wireless sensor networks[J]. Journal of Xidian University, 2022, 49(5): 60-67.
[5] 特木尔朝鲁,张亚萍. 基于卷积神经网络的无线传感器网络链路异常检测算法[J]. 吉林大学学报: 工学版, 2024, 54(8): 2295-2300.
Chao-lu Temur, Zhang Ya-ping. Link anomaly detection algorithm for wireless sensor networks based on convolutional neural networks[J]. Journal of Jilin University (Engineering and Technology Edition), 2024, 54(8): 2295-2300.
[6] Kumar G S, Kumar S, Tyagi S. Energy efficient and effective node deployment for wireless sensor network[J]. International Journal of Communication Systems, 2022, 35(9): 21535139.
[7] Subramani S, Selvi M. Multi-objective PSO based feature selection for intrusion detection in iot based wireless sensor networks[J]. Optik, 2023, 273: 1-15.
[8] Wei M, Rong C M, Liang E X, et al. An intrusion detection mechanism for Ipv6-based wireless sensor networks[J]. International Journal of Distributed Sensor Networks, 2022, 18(3): 1-15.
[9] 佘锋, 杨贵永, 刘建虎, 等. 路侧多传感器融合中的联合标定优化设计 [J]. 同济大学学报: 自然科学版, 2024, 52(11): 1750-1757.
She Feng, Yang Gui-yong, Liu Jian-hu, et al. Optimization design of joint calibration for roadside multi-sensor fusion [J]. Journal of Tongji University (Natural Science), 2024, 52(11): 1750-1757.
[10] Gautami A, Shanthini J, Karthik J. A Quasi-newton neural network based efficient intrusion detection systemfor wireless sensor network[J]. Computer Systems Science and Engineering, 2023, 45(1): 427-443.
[11] 蔡玲如, 朱理, 黄瑞崧, 等. 基于强化学习的无线传感器网络入侵检测攻防博弈研究 [J]. 计算机应用研究, 2022, 39(12): 3786-3790.
Cai Ling-ru, Zhu Li, Huang Rui-song, et al. Research on attack-defence game based on reinforcement learning for wireless sensor network intrusion detection[J]. Application Research of Computers, 2022, 39(12): 3786-3790.
[12] Hussain K, Xia Y, Onaizah A N, et al. Hybrid of WOA-ABC and proposed CNN for intrusion detection system in wireless sensor networks[J]. Optik, 2022, 271: 1-16.
[13] Zhou J J, Yang T Y, Zhang J L, et al. Intrusion detection model for wireless sensor networks based on MC-GRU[J]. Wireless Communications and Mobile Computing, 2022: 1(1): 1-11.
[14] Liu Z, Ghulam M, Zheng J, et al. Intrusion detection in wireless sensor network using enhanced empirical based component analysis[J]. Future Generation Computer Systems, 2022, 135: 181-193.
[15] Lu X, Han D Z, Duan L T, et al. Intrusion detection of wireless sensor networks based on IPSO algorithm and BP neural network[J]. International Journal of Computational Science and Engineering, 2020, 22(2/3): 221-232.
[16] 郁滨, 熊俊. 基于平衡迭代规约层次聚类的无线传感器网络流量异常检测方案 [J].电子与信息学报, 2022, 44(1): 305-313.
Yu Bin, Xiong Jun. A novel WSN traffic anomaly detection scheme based on BIRCH[J]. Journal of Electronics & Information Technology, 2022, 44(1): 305-313.
[17] Rodriguez, A, Laio A. Clustering by fast search and find of density peaks[J]. Science, 2014, 344: 1492-1496.
[18] 仝钰, 庞新宇, 魏子涵. 基于 GADF-CNN的滚动轴承故障诊断方法[J]. 振动与冲击, 2021, 40(5): 247-260.
Tong Yu, Pang Xin-yu, Wei Zi-han. Fault diagnosis method of rolling bearing based on GADF-CNN [J]. Journal of Vibration and Shock, 2021, 40(5): 247-260.
[19] 亓慧敏, 陈昂, 杨秀春. 基于无人机高光谱的内蒙古天然牧草氮磷钾含量的反演[J]. 草地学报, 2024, 32(5): 1500-1512.
Qi Hui-min, Chen Ang, Yang Xiu-chun. Inversion of nitrogen, phosphorus and potassium content in natural grassland in Inner Mongolia based on UAV hyperspectral data[J]. Acta Agrestia Sinica, 2024, 32(5): 1500-1512.
[20] Li S, Chen H, Wang M, et al. Slime mould algorithm: a new method for stochastic optimization[J]. Future Generation Computer Systems, 2020, 111: 300-323.
[1] 邬鹏坤,吴星辰. 基于神经面元融合溅射学习的实时真实场景重建算法[J]. 吉林大学学报(工学版), 2026, 56(7): 2020-2025.
[2] 谢坤,董宏辉,卢玲玉,耿庆桥,李鹏辉,董春娇. 基于CFSFDP-BP的车辆出行群体分类及识别方法[J]. 吉林大学学报(工学版), 2026, 56(3): 725-733.
[3] 侯越,张鑫,武月. 基于时空动态约束图反馈的交通流预测[J]. 吉林大学学报(工学版), 2026, 56(1): 183-198.
[4] 田婧,马社强,宋现敏,赵丹,陈发城. 稀疏数据下的交通状态估计自适应卷积网络[J]. 吉林大学学报(工学版), 2025, 55(8): 2579-2587.
[5] 肖红,刘显德. 基于混合智能的学习状态实时采集与动态分析方法[J]. 吉林大学学报(工学版), 2025, 55(7): 2402-2408.
[6] 滕志军,于沥博,李明哲,苗润升,王继红. 融合交互信誉度与RSSR的WSNs女巫攻击检测策略[J]. 吉林大学学报(工学版), 2025, 55(7): 2455-2463.
[7] 冯志刚,王首起,于明月. 基于变分模态提取及轻量级网络的滚动轴承故障诊断[J]. 吉林大学学报(工学版), 2025, 55(6): 1883-1891.
[8] 杜睿山,王紫珊. 基于时空注意力的多视角人脸表情识别算法[J]. 吉林大学学报(工学版), 2025, 55(6): 2097-2102.
[9] 罗维薇,刘长龙,雷琴. 基于预处理层增强和注意力机制的空域图像隐写分析[J]. 吉林大学学报(工学版), 2025, 55(12): 4024-4033.
[10] 李建坡,何敏,于廷文,杨月华. 基于多组分混合物扩散的无线传感器网络路由算法[J]. 吉林大学学报(工学版), 2025, 55(12): 4072-4082.
[11] 周求湛,牟岩,武慧南,陈霄,汪锋,李琛,张雯,刘萍萍,王聪. 基于RBVS和CBCNN的风机叶片故障检测和分类方法[J]. 吉林大学学报(工学版), 2025, 55(10): 3119-3130.
[12] 王威,孙钰洁,王新. 频率和空间特征融合的轻量级多尺度遥感图像场景分类网络[J]. 吉林大学学报(工学版), 2025, 55(10): 3361-3371.
[13] 汪豪,赵彬,刘国华. 基于时间和运动增强的视频动作识别[J]. 吉林大学学报(工学版), 2025, 55(1): 339-346.
[14] 胡宏宇,张争光,曲优,蔡沐雨,高菲,高镇海. 基于双分支和可变形卷积网络的驾驶员行为识别方法[J]. 吉林大学学报(工学版), 2025, 55(1): 93-104.
[15] 李建坡,刘琨,朱伟华. 基于链路质量优化的无线传感器网络数据传输算法[J]. 吉林大学学报(工学版), 2024, 54(9): 2668-2675.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!