| As a clean and efficient renewable energy source,natural gas plays an important role in building a modern energy system and addressing global climate change.Illegal gas theft by lawless elements poses a serious threat to the economic efficiency of enterprises and the interests of state-owned assets,as well as a major threat to the safe use of gas in towns and cities.For gas companies,the implementation of accurate gas anomaly detection helps to narrow down the range of users suspected of gas theft,provides a reference for gas theft detection,reduces misjudgements and missed detections,has significant economic benefits,and also helps to protect public life and property.Traditional anomaly detection methods usually have the following problems when applied to the detection of anomalous behavior of gas users:(1)Using only a single gas load as the object of study,it is not possible to take into account the temporal correlation of gas consumption by gas customers in different time dimensions such as daily,weekly and annual,and it is not possible to take into account the influence of other factors such as customers’ own gas consumption properties and weather conditions.(2)Gas series have missing values due to various factors,and simple filling methods are difficult to combine with the characteristics of the data itself,which also reduces the accuracy and robustness of subsequent model anomaly detection.In this paper,by comprehensively considering the impact of multiple sources of data on gas loads,combined with the characteristics of the gas dataset used,the research is specified as follows.1.Gas load data analysis and feature extraction.This paper addresses the problem of unclear feature representation and the need for further extraction in the original gas data.According to the characteristics of the gas data,the limit gradient lifting algorithm is used for the gas consumption features of gas users,with the help of importance evaluation indicators for ranking,and a subset of features suitable for subsequent research is assigned to gas users,providing a basis and guidance for subsequent missing value filling and anomaly detection.2.A data reconstruction interpolation method based on generative adversarial networks is proposed.In order to solve the problem of missing gas sequences and the loss of information due to long input sequences in data processing,this paper uses a long and short-term memory network with a multi-headed attention mechanism based on generative adversarial networks to achieve the weight distribution of gas-related features.The"hint mask" mechanism is used to improve the discriminator performance,and the fusion model is used to improve the reconstructive interpolation effect,and the multi-source features and gas usage patterns are used to make the complete data fill more in line with the real distribution.3.A gas anomaly detection model that fuses multi-scale features is proposed.Due to the difficulty of capturing the correlation between gas time-series features at different scales,the traditional method is less effective in learning gas data with fused multi-source features.In this paper,an improved model based on Wasserstein distance generative adversarial network is designed to capture temporal features at different time scales by designing the network structure of different layers within the multi-scale fusion module.The weight of the influence of historical time points and temporal features on the current detection target is adaptively adjusted to enhance the amount of information conveyed by the features.External factors such as weather are also embedded as fused features,resulting in a richer feature representation for more accurate gas anomaly detection.In this paper,the validity of the model was verified using a real gas user dataset from city B in the northern region.The accuracy of the model reached over 80%on different types of datasets,with a maximum accuracy of 85.3%,and the highest overall index F1 score of 82.9%.The results prove that the model has significant performance advantages over traditional gas anomaly detection methods. |