Journal of Jilin University(Engineering and Technology Edition) ›› 2026, Vol. 56 ›› Issue (8): 2201-2209.doi: 10.13229/j.cnki.jdxbgxb.20250045

Previous Articles    

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

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

CLC Number: 

  • TP393

Fig.1

ICNN-DPC anomaly detection model"

Fig.2

Schematic diagram of CNN structure"

Table 1

WSNs traffic experimental dataset"

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

Table 2

ISMA optimized CNN hyperparameter configuration results"

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

Fig.3

ISMA function convergence curve"

Fig.4

Influence of different training batch sizes on detection results"

Table 3

Comparison results of evaluation indicators for different models"

模型

评级

指标

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

Table 4

Comparison results of WSNs anomaly detection"

模型指标/%
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] Jiu-yuan HUO,Rui-xiang DOU,Chen CHANG,Feng CHEN,Yao-nan ZHANG. Prediction and reconstruction based anomaly condition detection model for bridges [J]. Journal of Jilin University(Engineering and Technology Edition), 2026, 56(2): 497-508.
[2] Yue HOU,Xin ZHANG,Yue WU. Traffic flow prediction based on spatio-temporal dynamic constraint graph feedback [J]. Journal of Jilin University(Engineering and Technology Edition), 2026, 56(1): 183-198.
[3] Jing TIAN,She-qiang MA,Xian-min SONG,Dan ZHAO,Fa-cheng CHEN. Adaptive convolutional network for traffic state estimation under sparse data [J]. Journal of Jilin University(Engineering and Technology Edition), 2025, 55(8): 2579-2587.
[4] Hong XIAO,Xian-de LIU. Real-time acquisition and dynamic analysis of learning state based on hybrid intelligence [J]. Journal of Jilin University(Engineering and Technology Edition), 2025, 55(7): 2402-2408.
[5] Zhi-gang FENG,Shou-qi WANG,Ming-yue YU. Rolling bearing fault diagnosis based on variational mode extraction and lightweight network [J]. Journal of Jilin University(Engineering and Technology Edition), 2025, 55(6): 1883-1891.
[6] Rui-shan DU,Zi-shan WANG. Multi perspective facial expression recognition algorithm based on spatiotemporal attention [J]. Journal of Jilin University(Engineering and Technology Edition), 2025, 55(6): 2097-2102.
[7] Wei-wei LUO,Chang-long LIU,Qin LEI. Spatial image steganography based on preprocessing layer enhancement and attention mechanism [J]. Journal of Jilin University(Engineering and Technology Edition), 2025, 55(12): 4024-4033.
[8] Jian-po LI,Min HE,Ting-wen YU,Yue-hua YANG. Wireless sensor network routing algorithm based on diffusion of multi⁃component mixtures [J]. Journal of Jilin University(Engineering and Technology Edition), 2025, 55(12): 4072-4082.
[9] Qiu-zhan ZHOU,Yan MU,Hui-nan WU,Xiao CHEN,Feng WANG,Chen LI,Wen ZHANG,Ping-ping LIU,Cong WANG. Fault detection and classification of wind turbine blades based on machine learning [J]. Journal of Jilin University(Engineering and Technology Edition), 2025, 55(10): 3119-3130.
[10] Wei WANG,Yu-jie SUN,Xin WANG. Lightweight frequency and spatial feature fused multi-scale remote sensing scene classification network [J]. Journal of Jilin University(Engineering and Technology Edition), 2025, 55(10): 3361-3371.
[11] Hao WANG,Bin ZHAO,Guo-hua LIU. Temporal and motion enhancement for video action recognition [J]. Journal of Jilin University(Engineering and Technology Edition), 2025, 55(1): 339-346.
[12] Sheng-jie ZHU,Xuan WANG,Fang XU,Jia-qi PENG,Yuan-chao WANG. Multi-scale normalized detection method for airborne wide-area remote sensing images [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(8): 2329-2337.
[13] Xiao-hui WEI,Chen-yang WANG,Qi WU,Xin-yang ZHENG,Hong-mei YU,Heng-shan YUE. Systolic array-based CNN accelerator soft error approximate fault tolerance design [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(6): 1746-1755.
[14] Ming-hui SUN,Hao XUE,Yu-bo JIN,Wei-dong QU,Gui-he QIN. Video saliency prediction with collective spatio-temporal attention [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(6): 1767-1776.
[15] Chao XIA,Meng-jia WANG,Jian-yue Zhu,Zhi-gang YANG. Reduced-order modelling of a bluff body turbulent wake flow field using hierarchical convolutional neural network autoencoder [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(4): 874-882.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!