• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2025, Vol. 47 ›› Issue (5): 843-850.

• Computer Network and Znformation Security • Previous Articles     Next Articles

A WSN data stream anomaly detection algorithm based on GATv2-TCN joint optimization

SU Yuhang1,MA Jun1,2,3,FAN Jinyu1,CHEN Bohang1,ZHOU Jiacheng1,YIN Boran1   

  1. (1.School of Physics and Electronic Information Engineering,Qinghai Normal University,Xining 810016;
    2.Plateau Science and Sustainable Development Research Institute (Key Laboratory of Internet of Things),
    Qinghai Normal University,Xining 810016;
    3.School of Computer Technology and Application,Qinghai University,Xining 810016,China)
  • Received:2023-08-22 Revised:2024-04-23 Online:2025-05-25 Published:2025-05-27

Abstract: In sensor networks, anomaly detection in data streams enables timely fault detection and alerting, ensuring the safe and reliable operation of the system. However, WSN (Wireless Sensor Network) data stream anomaly detection still faces two major challenges: 1) the complex correlations among different time series need to be further explored; 2) anomaly samples in datasets with extremely unbalanced normal/anomaly distributions are difficult to detect. This paper proposes an anomaly detection algorithm based on GATv2-TCN(Graph Attention Network version 2-Temporal Convolutional Network). GATv2 and TCN are used to model complex relationships in both feature and temporal dimensions, and the prediction and reconstruction modules are optimized. Four datasets are employed to validate and analyze the performance of the proposed algorithm. Experiments show that the proposed algorithm achieves high F1 and AUC scores, particularly outperforming baseline models across various metrics for unbalanced datasets, demonstrating its effectiveness in WSN data stream anomaly detection.

Key words: wireless sensor network, data flow anomaly detection, GATv2, TCN