《计算机应用》唯一官方网站 ›› 2026, Vol. 46 ›› Issue (8): 2691-2698.DOI: 10.11772/j.issn.1001-9081.2025070919

• 前沿与综合应用 • 上一篇    

基于改进带梯度惩罚的Wasserstein生成对抗网络和时频特征融合的窃电检测方法

闫江毓, 王世乾, 王红()   

  1. 华北电力大学 控制与计算机工程学院,北京 102206
  • 收稿日期:2025-08-11 修回日期:2025-10-15 接受日期:2025-10-17 发布日期:2025-11-05 出版日期:2026-08-10
  • 通讯作者: 王红
  • 作者简介:闫江毓(1979—),男,山西吕梁人,副教授,博士,主要研究方向:智能计算、电力大数据
    王世乾(2000—),男,河北石家庄人,硕士研究生,主要研究方向:电力大数据、深度学习
    王红(1978—),女,辽宁铁岭人,副教授,博士,主要研究方向:电力大数据、电能质量智能信息处理。

Electricity theft detection method based on improved Wasserstein generative adversarial network with gradient penalty and time-frequency feature fusion

Jiangyu YAN, Shiqian WANG, Hong WANG()   

  1. School of Control and Computer Engineering,North China Electric Power University,Beijing 102206,China
  • Received:2025-08-11 Revised:2025-10-15 Accepted:2025-10-17 Online:2025-11-05 Published:2026-08-10
  • Contact: Hong WANG
  • About author:YAN Jiangyu, born in 1979, Ph. D., associate professor. His research interests include intelligent computing, electric power big data.
    WANG Shiqian, born in 2000, M. S. candidate. His research interests include electric power big data, deep learning.

摘要:

窃电行为导致的电网非技术性损失日益严重,现有检测方法面临数据类别不平衡和特征表征不足的双重挑战。为此,提出一种基于改进带梯度惩罚的Wasserstein生成对抗网络(WGAN-GP)和时频特征融合的窃电检测方法。首先,结合自适应梯度惩罚与WGAN,建模与增强原始窃电数据,缓解数据样本不平衡的问题;其次,构建时频特征融合窃电检测方法,通过带有注意力机制的特征提取模块,在时域维度中捕捉用户用电行为的全局特征与周期特征,在频域维度中通过傅里叶变换后提取频域特征,得到时频域特征的双重表征;最后,对高维特征进行融合与压缩,以实现精准的窃电检测。使用某电力公司真实用电数据集进行验证的结果表明,与合成少数过采样技术(SMOTE)和自适应合成采样(ADASYN)等传统方法相比,K-近邻(KNN)算法、长短期记忆(LSTM)网络、宽深度卷积神经网络(WDCNN)和Flowformer这4种对比模型经所提方法数据增强后的正确率均达到了90.00%以上,并且曲线下面积(AUC)均超过95.00%。在此基础上,时频特征融合窃电检测方法的正确率和F1分数分别达到95.54%和95.39%,较Flowformer模型分别提升了1.90和1.89个百分点,且在保持92.71%的高检出率的同时,将误检率控制在1.66%的低水平。可见,所提方法在窃电样本生成的真实性和窃电用户识别的准确性方面均优于对比方法,具有良好的适用性。

关键词: 窃电检测, 数据增强, 自适应梯度惩罚, 时频特征融合, 电力数据

Abstract:

Electricity theft has become a growing cause of non-technical losses in power grids, posing significant challenges for the existing detection methods by class imbalance and inadequate feature representation. Therefore, an electricity theft detection method based on improved Wasserstein Generative Adversarial Network with Gradient Penalty (WGAN-GP) and time-frequency feature fusion was proposed. First, an adaptive gradient penalty was integrated with WGAN to model and augment original electricity theft data, thereby mitigating the problem of data sample imbalance. Then, a time-frequency feature fusion method for electricity theft detection was constructed to use a feature extraction module with attention mechanisms to capture global and periodic characteristics of user electricity usage behavior in time-domain dimensionality, while extracting frequency-domain features via Fourier transform in frequency-domain dimensionality, thereby obtaining dual representation of time and frequency domain features. Finally, high-dimensional features were fused and compressed to achieve accurate theft detection. This method was validated on a real electricity usage dataset from a power company. The results show that compared with traditional oversampling methods such as Synthetic Minority Over-sampling TEchnique (SMOTE) and ADAptive SYNthetic sampling (ADASYN), the four comparative models, K-Nearest Neighbors (KNN) algorithm, Long Short-Term Memory (LSTM) network, Wide & Deep Convolutional Neural Network (WDCNN), and Flowformer all achieve an accuracy of over 90.00% and an Area Under the Curve (AUC) exceeding 95.00% after applying the proposed data augmentation. On this basis, the time-frequency feature fusion electricity theft detection method attains an accuracy of 95.54% and an F1-score of 95.39%, representing respective improvements of 1.90 and 1.89 percentage points over the Flowformer model. It maintains a high detection rate of 92.71% while controlling the false alarm rate at a low level of 1.66%. The proposed method outperforms all comparative approaches in both the authenticity of generated electricity theft samples and the accuracy of electricity theft user identification, exhibiting strong practical applicability.

Key words: electricity theft detection, data augmentation, adaptive gradient penalty, time-frequency feature fusion, electric power data

中图分类号: