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

计算机工程与科学 ›› 2025, Vol. 47 ›› Issue (5): 843-850.

• 计算机网络与信息安全 • 上一篇    下一篇

基于GATv2-TCN联合优化的WSN数据流异常检测算法

苏宇杭1,马俊1,2,3,樊津瑜1,陈博行1,周家城1,尹博然1   

  1. (1.青海师范大学物理与电子信息工程学院,青海 西宁 810016;
    2.青海师范大学高原科学与可持续发展研究院(物联网重点实验室),青海 西宁 810016;
    3.青海大学计算机技术与应用学院,青海 西宁 810016)

  • 收稿日期:2023-08-22 修回日期:2024-04-23 出版日期:2025-05-25 发布日期:2025-05-27
  • 基金资助:
    青海省自然科学基金(2021-ZJ-916)

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

摘要: 在传感器网络中,通过对数据流进行异常检测能够及时发现故障并报警,以确保系统安全可靠运行。然而WSN数据流异常检测仍面临2大难题:1)不同时间序列间复杂的相关性有待深入挖掘;2)在正常/异常样本分布极度不平衡的数据集中异常样本不易检出。提出一种基于GATv2-TCN的异常检测算法。采用GATv2和TCN来建模特征和时间维度的复杂关系,并优化预测和重构模块。采用4个数据集对所提算法进行性能验证与分析。实验结果表明,所提算法获得了较高的F1和AUC,特别是在不平衡的数据集中各项指标均高于基线模型,具有较好的WSN数据流异常检测效果。

关键词: 无线传感器网络, 数据流异常检测, GATv2, TCN

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