Processing method of electric anomaly algorithm model for scattered pollution based on ensemble learning

By performing time-frequency conversion and feature extraction on electricity consumption data, and combining it with an integrated learning model for detecting abnormal electricity consumption, the problem of low efficiency in traditional manual inspections has been solved, and efficient online monitoring of scattered and polluting sites has been achieved.

CN115730264BActive Publication Date: 2026-07-03GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
Filing Date
2022-11-29
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Traditional methods are slow to identify scattered and polluting sites in cities, requiring a large amount of manpower and physical inspections.

Method used

By performing time-frequency conversion and feature extraction on the electricity consumption data of the monitored sites, and by integrating and learning at least two trained electricity anomaly detection models, it can be determined whether the site is a scattered and polluting site.

Benefits of technology

It enables online monitoring of scattered and polluting sites, improving monitoring efficiency and reducing the consumption of human resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115730264B_ABST
    Figure CN115730264B_ABST
Patent Text Reader

Abstract

The application relates to a processing method and device of an electric anomaly algorithm model for scattered pollution based on ensemble learning, computer equipment, a storage medium and a computer program product. The method comprises the following steps: performing time-frequency conversion processing on electric data of a place to be monitored to obtain target electric data in a time-frequency format; performing feature extraction processing on the target electric data to obtain electric features of the target electric data; inputting the electric features into at least two trained electric anomaly detection models respectively to obtain at least two electric anomaly detection results of the electric features; and determining a scattered pollution monitoring result of the place to be monitored according to the at least two electric anomaly detection results. The method can improve the investigation efficiency of a scattered pollution place.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for processing a scattered and disordered power consumption anomaly algorithm model based on ensemble learning. Background Technology

[0002] Illegal emissions from scattered, disorganized, and polluting sites can cause serious pollution to the surrounding environment and even affect the health of residents. Therefore, it is necessary to focus on the supervision and management of these sites.

[0003] Traditional methods for identifying scattered, disorganized, and polluting sites in cities require on-site inspections by relevant departments to understand their specific circumstances. However, cities have numerous industrial enterprises, and relying solely on manual inspections consumes significant manpower and resources. Therefore, the current efficiency of identifying scattered, disorganized, and polluting sites is relatively slow. Summary of the Invention

[0004] Based on this, it is necessary to provide a processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product for an algorithm model of abnormal electricity use in scattered and polluting sites based on ensemble learning, which can improve the efficiency of investigation of such sites.

[0005] Firstly, this application provides a method for processing scattered and polluting power consumption anomaly algorithm models based on ensemble learning. The method includes:

[0006] The electricity consumption data of the monitoring site is processed by time-frequency conversion to obtain the target electricity consumption data in time-frequency format;

[0007] The target electricity consumption data is subjected to feature extraction processing to obtain the electricity consumption characteristics of the target electricity consumption data;

[0008] The electricity consumption characteristics are input into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption characteristics.

[0009] Based on the at least two abnormal power consumption detection results, the monitoring results of scattered pollution at the site to be monitored are determined.

[0010] In one embodiment, the electricity consumption data of the location to be monitored is subjected to time-frequency conversion processing to obtain target electricity consumption data in time-frequency format, including:

[0011] The electricity consumption data of the location to be monitored is subjected to a short-time Fourier transform to obtain the target electricity consumption data in the time-frequency format.

[0012] In one embodiment, feature extraction processing is performed on the target electricity consumption data to obtain the electricity consumption features of the target electricity consumption data, including:

[0013] The target electricity consumption data is subjected to statistical processing to obtain the statistical characteristics of the target electricity consumption data;

[0014] The target electricity consumption data is subjected to glitch extraction processing to obtain the glitch features of the target electricity consumption data;

[0015] The target electricity consumption data is subjected to frequency domain extraction processing to obtain the frequency domain features of the target electricity consumption data;

[0016] Autocorrelation processing and bucket entropy processing are performed on the target electricity consumption data to obtain the time-series characteristics of the target electricity consumption data;

[0017] The target electricity consumption data is processed by tree model construction to obtain the tree model features of the target electricity consumption data;

[0018] The statistical features, the glitch features, the frequency domain features, the time series features, and the tree model features are used as the electricity consumption features of the target electricity consumption data.

[0019] In one embodiment, at least two trained power consumption anomaly detection models are obtained by training them in the following manner:

[0020] Obtain the electricity consumption characteristics of the sample, and the actual electricity consumption anomaly detection results of the sample electricity consumption characteristics;

[0021] The sample electricity consumption characteristics are input into at least two electricity consumption anomaly detection models to be trained, respectively, to obtain at least two predicted electricity consumption anomaly detection results of the sample electricity consumption characteristics;

[0022] Based on the differences between the at least two predicted electricity anomaly detection results and the actual electricity anomaly detection results of the sample electricity characteristics, the two electricity anomaly detection models to be trained are iteratively trained to obtain the at least two trained electricity anomaly detection models.

[0023] In one embodiment, obtaining the sample's electricity consumption characteristics includes:

[0024] Obtain negative sample electricity consumption data from scattered and polluting sites, and positive sample electricity consumption data from normal sites;

[0025] The negative sample electricity consumption data is subjected to data augmentation processing to obtain augmented negative sample electricity consumption data;

[0026] Feature extraction processing is performed on the enhanced negative sample electricity consumption data and the positive sample electricity consumption data to obtain the corresponding sample electricity consumption features.

[0027] In one embodiment, acquiring negative sample electricity consumption data from scattered and polluting sites, and positive sample electricity consumption data from normal sites, includes:

[0028] The initial electricity consumption data is converted to time and frequency to obtain sample electricity consumption data in time and frequency format;

[0029] The sample electricity consumption data is visualized to obtain a time-frequency image of the sample electricity consumption data;

[0030] Based on the time-frequency image of the sample electricity consumption data, the sample electricity consumption data is classified to obtain negative sample electricity consumption data of the scattered and polluting sites and positive sample electricity consumption data of the normal sites.

[0031] Secondly, this application also provides a processing device for an algorithm model of scattered and polluting electricity consumption anomalies based on ensemble learning. The device includes:

[0032] The data conversion module is used to perform time-frequency conversion processing on the electricity consumption data of the monitored site to obtain the target electricity consumption data in time-frequency format;

[0033] The feature extraction module is used to perform feature extraction processing on the target electricity consumption data to obtain the electricity consumption characteristics of the target electricity consumption data;

[0034] An anomaly detection module is used to input the electricity consumption characteristics into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption characteristics.

[0035] The result determination module is used to determine the monitoring results of scattered pollution at the site to be monitored based on the at least two abnormal power consumption detection results.

[0036] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0037] The electricity consumption data of the monitoring site is processed by time-frequency conversion to obtain the target electricity consumption data in time-frequency format;

[0038] The target electricity consumption data is subjected to feature extraction processing to obtain the electricity consumption characteristics of the target electricity consumption data;

[0039] The electricity consumption characteristics are input into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption characteristics.

[0040] Based on the at least two abnormal power consumption detection results, the monitoring results of scattered pollution at the site to be monitored are determined.

[0041] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0042] The electricity consumption data of the monitoring site is processed by time-frequency conversion to obtain the target electricity consumption data in time-frequency format;

[0043] The target electricity consumption data is subjected to feature extraction processing to obtain the electricity consumption characteristics of the target electricity consumption data;

[0044] The electricity consumption characteristics are input into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption characteristics.

[0045] Based on the at least two abnormal power consumption detection results, the monitoring results of scattered pollution at the site to be monitored are determined.

[0046] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0047] The electricity consumption data of the monitoring site is processed by time-frequency conversion to obtain the target electricity consumption data in time-frequency format;

[0048] The target electricity consumption data is subjected to feature extraction processing to obtain the electricity consumption characteristics of the target electricity consumption data;

[0049] The electricity consumption characteristics are input into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption characteristics.

[0050] Based on the at least two abnormal power consumption detection results, the monitoring results of scattered pollution at the site to be monitored are determined.

[0051] The aforementioned processing method, apparatus, computer equipment, storage medium, and computer program product based on the ensemble learning-based algorithm model for abnormal electricity consumption in scattered and polluting locations involve: performing time-frequency conversion processing on the electricity consumption data of the site to be monitored to obtain target electricity consumption data in time-frequency format; performing feature extraction processing on the target electricity consumption data to obtain electricity consumption features; inputting the electricity consumption features into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results; and determining the monitoring result of the site as a scattered and polluting location based on the at least two electricity consumption anomaly detection results. This method converts the electricity consumption data of the site to be monitored into a time-frequency format to extract frequency information from the electricity consumption data, and uses an electricity consumption anomaly detection model to detect electricity consumption anomalies in the electricity consumption features extracted from the target electricity consumption data, thereby determining whether the site to be monitored is a scattered and polluting location, thus achieving online monitoring of scattered and polluting locations and greatly improving the monitoring efficiency of such locations. Attached Figure Description

[0052] Figure 1 This is a flowchart illustrating a method for processing scattered and polluting power consumption anomalies based on an ensemble learning algorithm model in one embodiment.

[0053] Figure 2 This is a schematic diagram illustrating the principle of a processing method for an abnormal power consumption algorithm model based on ensemble learning in one embodiment.

[0054] Figure 3 This is a flowchart illustrating the steps for obtaining negative sample electricity consumption data from scattered and polluted locations and positive sample electricity consumption data from normal locations in one embodiment.

[0055] Figure 4 This is a schematic diagram of a time-frequency image of sample power consumption data in a normal location in one embodiment;

[0056] Figure 5 This is a schematic diagram of a time-frequency image of sample electricity consumption data from a scattered and polluted site in one embodiment;

[0057] Figure 6 This is a flowchart illustrating the processing method of the scattered and polluting power consumption anomaly algorithm model based on ensemble learning in another embodiment.

[0058] Figure 7 This is an application environment diagram of a method for processing scattered and polluting power consumption anomalies based on an ensemble learning algorithm model, as shown in one embodiment.

[0059] Figure 8 This is a structural block diagram of a processing device for a scattered and polluting power consumption anomaly algorithm model based on ensemble learning in one embodiment.

[0060] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0062] In one embodiment, such as Figure 1 As shown in the figure, a method for processing scattered and polluting power consumption anomalies based on an ensemble learning algorithm model is provided. This embodiment illustrates the application of this method to a server. It is understood that this method can also be applied to terminals, and can also be applied to systems including terminals and servers, and can be implemented through the interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. The server can be implemented using a standalone server or a server cluster composed of multiple servers. In this embodiment, the method includes the following steps:

[0063] Step S101: Perform time-frequency conversion processing on the power consumption data of the site to be monitored to obtain the target power consumption data in time-frequency format.

[0064] Among them, the sites to be monitored refer to sites that need to be investigated for being scattered, disorderly, and polluting. These sites are those that do not comply with industrial policies or local industrial layout plans, have not obtained relevant approvals from the Ministry of Industry and Information Technology, the Development and Reform Commission, the Land Administration Bureau, the Planning Bureau, the Environmental Protection Bureau, the Industry and Commerce Bureau, the Quality and Technical Supervision Bureau, the Safety Supervision Bureau, and the Power Supply Bureau, and cannot consistently meet emission standards. For example, enterprises that illegally discharge pollutants near densely populated residential areas are considered scattered, disorderly, and polluting enterprises.

[0065] Electricity consumption data refers to data used to describe the active electrical energy consumed by an object. Time-frequency format target electricity consumption data refers to data used to describe the frequency variation of electricity consumption data over time. For example, audio data often uses time-frequency to reflect the frequency variation of the audio signal in the time domain; similarly, target electricity consumption data uses time-frequency format to reflect the frequency variation of the electricity consumption data in the time domain.

[0066] Specifically, the server can obtain the electricity consumption data of the locations to be monitored from the power system, and then perform time transformation processing on the electricity data of the locations to be monitored according to the time-frequency format, so that the server obtains the target electricity consumption data of the locations to be monitored in the time-frequency format.

[0067] Step S102: Perform feature extraction processing on the target electricity consumption data to obtain the electricity consumption characteristics of the target electricity consumption data.

[0068] Specifically, the server performs feature extraction processing on the target electricity consumption data in different ways to obtain multiple electricity consumption characteristics of the target electricity consumption data. Among them, electricity consumption characteristics refer to information that can characterize the statistical characteristics, spikes, frequency domain, tree structure, and other prominent features of the electricity consumption of the monitored location.

[0069] Step S103: Input the electricity consumption features into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption features.

[0070] Among them, the abnormal electricity consumption detection results refer to information describing whether the electricity consumption characteristics of the monitored site conform to the abnormal electricity consumption type of scattered and polluting sites.

[0071] Specifically, the terminal pre-trains at least two electricity anomaly detection models to be trained using sample electricity consumption characteristics, so as to obtain at least two trained electricity anomaly detection models. After the terminal obtains the electricity consumption characteristics of the location to be monitored, it can input them into the at least two trained electricity anomaly detection models respectively to obtain the electricity anomaly detection results output by each trained electricity anomaly detection model.

[0072] Step S104: Based on at least two abnormal power consumption detection results, determine the monitoring results of scattered and polluting facilities at the site to be monitored.

[0073] Among them, the monitoring results of scattered and polluting sites refer to information describing whether the monitored sites meet the criteria for scattered and polluting sites.

[0074] Specifically, the server performs union processing on at least two abnormal power consumption detection results to obtain the target abnormal power consumption detection result for the location to be monitored; if at least one of the target abnormal power consumption detection results indicates an abnormal power consumption, the monitoring result for the location to be monitored is confirmed as a location with scattered and disorderly pollution; if all the target abnormal power consumption detection results indicate normal power consumption, the monitoring result for the location to be monitored is confirmed as a normal location.

[0075] In practical applications, at least two trained power consumption anomaly detection models can be ResNet and Light Gradient Boosting Machine (lightgbm), respectively. That is, trained power consumption anomaly detection models are constructed using ResNet and Light Gradient Boosting Machine, respectively. Figure 2This is a schematic diagram illustrating the principle of the processing method for the scattered and polluting electricity consumption anomaly algorithm model based on ensemble learning. The terminal performs time-frequency conversion processing on the electricity consumption data of the site to be monitored to obtain target electricity consumption data in time-frequency format. Then, feature extraction processing is performed on the target electricity consumption data to obtain statistical features, glitch features, frequency domain features, time series features, and tree model features. Subsequently, the terminal inputs the statistical features, glitch features, frequency domain features, time series features, and tree model features into a residual neural network and a lightweight gradient booster, respectively, to obtain the target electricity consumption anomaly detection results output by the residual neural network and the target electricity consumption anomaly detection results output by the lightweight gradient booster. If both target electricity consumption anomaly detection results are normal, the scattered and polluting monitoring result of the site to be monitored is confirmed as a normal site. If at least one of the two target electricity consumption anomaly detection results is an abnormal electricity consumption, the scattered and polluting monitoring result of the site to be monitored is confirmed as a scattered and polluting site.

[0076] In the above-mentioned processing method of the scattered and polluting electricity consumption anomaly algorithm model based on ensemble learning, the electricity consumption data of the site to be monitored is converted from time to frequency to obtain target electricity consumption data in time-frequency format; feature extraction processing is performed on the target electricity consumption data to obtain the electricity consumption features of the target electricity consumption data; the electricity consumption features are input into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results; based on the at least two electricity consumption anomaly detection results, the scattered and polluting monitoring result of the site to be monitored is determined. This method converts the electricity consumption data of the site to be monitored into time-frequency format to extract frequency information from the electricity consumption data, and uses an electricity consumption anomaly detection model to detect electricity consumption anomalies in the electricity consumption features extracted from the target electricity consumption data, thereby determining whether the site to be monitored is a scattered and polluting site, thus realizing online monitoring of scattered and polluting sites and greatly improving the monitoring efficiency of scattered and polluting sites.

[0077] In one embodiment, step S101 above, which involves performing time-frequency conversion processing on the electricity consumption data of the location to be monitored to obtain target electricity consumption data in time-frequency format, specifically includes the following: performing a short-time Fourier transform on the electricity consumption data of the location to be monitored to obtain target electricity consumption data in time-frequency format.

[0078] Specifically, the server uses the Short Time Fourier Transform (STFT) algorithm to perform time transformation processing on the electricity consumption data of the monitored site, obtaining the target electricity consumption data in time-frequency format. Furthermore, the server can also perform visualization processing on the target electricity consumption data, obtaining a time-frequency image of the target electricity consumption data, and send this image to the terminal for display by inspectors of scattered and polluting sites.

[0079] In this embodiment, by performing a short-time Fourier transform on the electricity consumption data of the site to be monitored, target electricity consumption data in time-frequency format is obtained. Frequency information in the electricity consumption data can be extracted, and the frequency information in the electricity consumption data can be used to monitor whether the site to be monitored conforms to the frequency information in the electricity consumption data of scattered and polluting sites.

[0080] In one embodiment, step S102 above, which involves feature extraction processing of the target electricity consumption data to obtain the electricity consumption features of the target electricity consumption data, specifically includes the following: performing data statistical processing on the target electricity consumption data to obtain the statistical features of the target electricity consumption data; performing glitch extraction processing on the target electricity consumption data to obtain the glitch features of the target electricity consumption data; performing frequency domain extraction processing on the target electricity consumption data to obtain the frequency domain features of the target electricity consumption data; performing autocorrelation processing and bucket entropy processing on the target electricity consumption data to obtain the time series features of the target electricity consumption data; performing tree model construction processing on the target electricity consumption data to obtain the tree model features of the target electricity consumption data; and using the statistical features, glitch features, frequency domain features, time series features, and tree model features as the electricity consumption features of the target electricity consumption data.

[0081] Among them, statistical features refer to information that can characterize the prominent properties of the target electricity consumption data in terms of mathematical statistics, such as maximum value, minimum value, range, mean, and variance. Spike features refer to information that can characterize the relevant characteristics of spike data in the target electricity consumption data. Frequency domain features refer to information that can characterize the frequency characteristics of the target electricity consumption data. Time series features refer to information that can characterize the time series characteristics of the target electricity consumption data. Tree model features refer to information that can characterize the data characteristics of the target electricity consumption data in a tree model.

[0082] Specifically, the server performs statistical processing on the target electricity consumption data, which may involve extracting the maximum, minimum, range, mean, variance, skewness, and kurtosis information from the data. The server can then use these parameters as statistical features of the target electricity consumption data. The server also performs glitch extraction processing on the target electricity consumption data, which may involve determining the number, proportion, and periodicity of glitch data. These parameters can then be used as glitch features. Furthermore, the server performs frequency domain extraction processing on the target electricity consumption data, which may involve performing a Sparse Fast Fourier Transform (SFFT) to obtain a spectrum of the data. This spectrum can then be used as a frequency domain feature of the target electricity consumption data. Finally, the server performs autocorrelation and bucket entropy processing on the target electricity consumption data to obtain its time-series features. The server constructs a tree model of the target electricity consumption data. The values ​​of the leaf nodes in this tree model are then used as the tree model features of the target electricity consumption data. Finally, the server combines statistical features, spike features, frequency domain features, time-series features, and tree model features to form the overall electricity consumption characteristics of the target electricity consumption data.

[0083] In this embodiment, the server performs statistical processing on the target electricity consumption data to obtain statistical features; it performs glitch extraction processing on the target electricity consumption data to obtain glitch features; it performs frequency domain extraction processing on the target electricity consumption data to obtain frequency domain features; it performs autocorrelation processing and bucket entropy processing on the target electricity consumption data to obtain time-series features; and it performs tree model construction processing on the target electricity consumption data to obtain tree model features. Finally, the statistical features, glitch features, frequency domain features, time-series features, and tree model features are used as the electricity consumption features of the target electricity consumption data. This achieves the extraction of electricity consumption features from different aspects, making the obtained electricity consumption features richer and improving the monitoring accuracy of the electricity anomaly detection model for the monitored locations.

[0084] In one embodiment, at least two trained electricity anomaly detection models are trained as follows: obtaining sample electricity consumption features and actual electricity anomaly detection results of the sample electricity consumption features; inputting the sample electricity consumption features into at least two electricity anomaly detection models to be trained to obtain at least two predicted electricity anomaly detection results of the sample electricity consumption features; and iteratively training the two electricity anomaly detection models to be trained based on the differences between the at least two predicted electricity anomaly detection results and the actual electricity anomaly detection results of the sample electricity consumption features to obtain at least two trained electricity anomaly detection models.

[0085] Here, "sample electricity consumption features" refers to the feature set used to train the electricity consumption anomaly detection model. "Predicted electricity consumption anomaly detection result" refers to the electricity consumption anomaly detection result predicted by the electricity consumption anomaly detection model. "Actual electricity consumption anomaly detection result" refers to the actual electricity consumption anomaly detection result based on the sample electricity consumption features.

[0086] Specifically, the terminal processes initial electricity consumption data from the power system to obtain sample electricity consumption characteristics and acquires actual electricity consumption anomaly detection results based on these characteristics. Then, the terminal inputs these sample electricity consumption characteristics into at least two electricity consumption anomaly detection models to be trained. This can involve inputting statistical features, spike features, frequency domain features, time-series features, and tree model features into the at least two models respectively. Subsequently, the terminal uses each of the training models to detect electricity consumption anomalies in the sample characteristics, obtaining at least two predicted electricity consumption anomaly detection results.

[0087] The terminal iteratively trains two electricity anomaly detection models based on the differences between at least two predicted electricity anomaly detection results and the actual electricity anomaly detection results of the sample electricity characteristics. Alternatively, it can obtain the loss function of each electricity anomaly detection model based on the difference between each predicted electricity anomaly detection result and the actual electricity anomaly detection result, and then iteratively train the corresponding electricity anomaly detection model based on the loss function of each model, thus obtaining the trained electricity anomaly detection model.

[0088] In practical applications, at least two power consumption anomaly detection models to be trained can be a residual neural network and a lightweight gradient booster, respectively. The terminal can then concatenate statistical features, glitch features, frequency domain features, time-series features, and tree model features through feature channels. The concatenated features are then input into the power consumption anomaly detection model built on the residual neural network to obtain the predicted power consumption anomaly detection result output by the residual neural network. For the power consumption anomaly detection model built on the lightweight gradient booster, the pre-set model parameters are not updated during training to ensure the generalization ability of the model. Furthermore, 5-fold cross-validation can be set in the power consumption anomaly detection model built on the lightweight gradient booster to ensure the accuracy of the output predicted power consumption anomaly detection result.

[0089] In this embodiment, the obtained sample electricity consumption characteristics are input into at least two electricity consumption anomaly detection models to be trained, respectively, to obtain at least two predicted electricity consumption anomaly detection results of the sample electricity consumption characteristics. Based on the difference between the at least two predicted electricity consumption anomaly detection results and the actual electricity consumption anomaly detection results of the sample electricity consumption characteristics, the two electricity consumption anomaly detection models to be trained are iteratively trained to obtain at least two trained electricity consumption anomaly detection models. This allows the anomaly detection models to learn with the actual electricity consumption anomaly detection results as the target, continuously improving the electricity consumption anomaly detection performance of the models, thereby effectively improving the monitoring accuracy of the trained electricity consumption anomaly detection models for the monitored locations.

[0090] In one embodiment, obtaining sample electricity consumption characteristics specifically includes the following: obtaining negative sample electricity consumption data from scattered and polluting sites, and positive sample electricity consumption data from normal sites; performing data augmentation processing on the negative sample electricity consumption data to obtain augmented negative sample electricity consumption data; and performing feature extraction processing on the augmented negative sample electricity consumption data and the positive sample electricity consumption data to obtain corresponding sample electricity consumption characteristics.

[0091] The enhanced negative sample electricity consumption data refers to the negative sample electricity consumption data obtained by expanding the original negative sample electricity consumption data to include a larger number of samples. For example, before data enhancement, the negative sample electricity consumption data had a data volume of 1000, and after data enhancement, the enhanced negative sample electricity consumption data had a data volume of 7000.

[0092] Specifically, the terminal extracts positive sample electricity consumption data from normal locations and negative sample electricity consumption data from scattered and polluted locations from the sample electricity consumption data. Since scattered and polluted locations are often fewer than normal locations in real-world scenarios, the negative sample electricity consumption data from scattered and polluted locations is also much less than the positive sample electricity consumption data from normal locations. For example, assuming the amount of positive sample electricity consumption data is 7000 and the amount of negative sample electricity consumption data is 1000, there will be a significant difference in the amount of different types of data in the sample electricity consumption data used to train the electricity anomaly detection model. This data imbalance will cause the electricity anomaly detection model to favor the positive sample electricity consumption data with more training samples during the training process. As a result, the trained electricity anomaly detection model has a high prediction accuracy for electricity anomaly detection in normal locations, but a low prediction accuracy for electricity anomaly detection in scattered and polluted locations. Therefore, the terminal can perform data augmentation on the negative sample electricity consumption data to obtain augmented negative sample electricity consumption data with a data volume that is balanced with or even greater than that of the positive sample electricity consumption data. The terminal performs data augmentation on the negative sample electricity consumption data. This can be achieved by using Gaussian noise to augment the negative sample electricity consumption data, resulting in enhanced negative sample electricity consumption data. The method of using Gaussian noise to augment the negative sample electricity consumption data can be expressed by the following formula:

[0093] f aug (x)=λ*max(f(x))*random()

[0094] Among them, f aug (x) represents the augmented negative sample electricity consumption data; λ represents the proportion of negative sample electricity consumption data that needs data augmentation; f(x) represents the negative sample electricity consumption data that needs data augmentation, and f(x) can also be a partial sample electricity consumption feature in the negative sample electricity consumption data; random() represents the random number generation function, and the generated random numbers are Gaussian distributions of 0-1.

[0095] Furthermore, the terminal performs feature extraction processing on the enhanced negative sample electricity consumption data and the positive sample electricity consumption data respectively, to obtain the sample electricity consumption features corresponding to the enhanced negative sample electricity consumption data and the sample electricity consumption features corresponding to the positive sample electricity consumption data. Then, the terminal uses the sample electricity consumption features corresponding to the enhanced negative sample electricity consumption data and the sample electricity consumption features corresponding to the positive sample electricity consumption data to train at least two electricity consumption anomaly detection models to be trained, to obtain at least two trained electricity consumption anomaly detection models.

[0096] In this embodiment, data augmentation processing is performed on the negative sample electricity consumption data of scattered and polluting sites to obtain augmented negative sample electricity consumption data. Then, feature extraction processing is performed on the augmented negative sample electricity consumption data of scattered and polluting sites and the positive sample electricity consumption data of normal sites to obtain corresponding sample electricity consumption features. This ensures that the number of sample electricity consumption features obtained from scattered and polluting sites and normal sites is balanced, avoiding the performance degradation of the electricity anomaly detection model due to the imbalance of sample electricity consumption feature categories. This effectively improves the monitoring accuracy of the trained electricity anomaly detection model for the sites to be monitored.

[0097] In one embodiment, such as Figure 3 As shown, negative sample electricity consumption data of scattered and polluting sites and positive sample electricity consumption data of normal sites were obtained, specifically including the following:

[0098] Step S301: Perform time-frequency conversion processing on the initial power consumption data to obtain sample power consumption data in time-frequency format.

[0099] Step S302: Visualize the sample electricity consumption data to obtain a time-frequency image of the sample electricity consumption data.

[0100] Step S303: Based on the time-frequency image of the sample electricity consumption data, classify the sample electricity consumption data to obtain negative sample electricity consumption data of scattered and polluting sites and positive sample electricity consumption data of normal sites.

[0101] Specifically, the server obtains initial electricity consumption data from the power system, then uses a short-time Fourier transform algorithm to perform time transformation processing on the initial electricity consumption data to obtain sample electricity consumption data in time-frequency format corresponding to the initial electricity consumption data. The server then performs visualization processing on the sample electricity consumption data to obtain a time-frequency image of the sample electricity consumption data. Figure 4 This is a schematic diagram of the time-frequency image of sample electricity consumption data in a normal location. Figure 5 A schematic diagram of the time-frequency image of electricity consumption data for scattered and polluted sites, from... Figure 4 and Figure 5 It can be seen that there are significant differences in the time-frequency images of the sample electricity consumption data between normal locations and scattered and polluted locations. The two have significant differences in the time sequence of electricity consumption frequency. Therefore, the terminal can classify the sample electricity consumption data according to the time-frequency images of the sample electricity consumption data to obtain negative sample electricity consumption data of scattered and polluted locations and positive sample electricity consumption data of normal locations.

[0102] In this embodiment, the initial power consumption data is converted to time-frequency data to obtain sample power consumption data in time-frequency format. The sample power consumption data in time-frequency format is visualized as a time-frequency image, so that the sample power consumption data can be classified according to the time-frequency image of the sample power consumption data. This distinguishes between negative sample power consumption data from scattered and polluting sites and positive sample power consumption data from normal sites. This is beneficial for subsequent detection of the small sample size of negative sample power consumption data from scattered and polluting sites, thus enabling the execution of subsequent data augmentation steps.

[0103] In one embodiment, such as Figure 6 As shown, another method for processing scattered and polluting power consumption anomalies based on ensemble learning algorithm models is provided. Taking the application of this method to a server as an example, the method includes the following steps:

[0104] Step S601: Perform a short-time Fourier transform on the power consumption data of the site to be monitored to obtain the target power consumption data in time-frequency format.

[0105] Step S602: Perform statistical processing on the target electricity consumption data to obtain the statistical characteristics of the target electricity consumption data.

[0106] Step S603: Perform glitch extraction processing on the target power consumption data to obtain the glitch features of the target power consumption data.

[0107] Step S604: Perform frequency domain extraction processing on the target electricity consumption data to obtain the frequency domain features of the target electricity consumption data.

[0108] Step S605: Perform autocorrelation processing and bucket entropy processing on the target electricity consumption data to obtain the time series characteristics of the target electricity consumption data.

[0109] Step S606: Perform tree model construction processing on the target electricity consumption data to obtain the tree model features of the target electricity consumption data.

[0110] Step S607: Statistical features, glitch features, frequency domain features, time series features, and tree model features are used as the electricity consumption features of the target electricity consumption data.

[0111] Step S608: Input the electricity consumption features into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption features.

[0112] Step S609: Based on at least two abnormal power consumption detection results, determine the monitoring results of scattered and polluting facilities at the site to be monitored.

[0113] The above-mentioned processing method of the scattered and polluting electricity consumption anomaly algorithm model based on ensemble learning can achieve the following beneficial effects: by converting the electricity consumption data of the site to be monitored into a time-frequency format, the frequency information in the electricity consumption data is extracted, and the electricity consumption anomaly detection model is used to detect the electricity consumption features extracted from the target electricity consumption data, thereby determining whether the site to be monitored is a scattered and polluting site, thus realizing online monitoring of scattered and polluting sites and greatly improving the monitoring efficiency of scattered and polluting sites.

[0114] To more clearly illustrate the processing method of the scattered and polluting power consumption anomaly algorithm model based on ensemble learning provided in this disclosure, a specific embodiment is given below to describe the above-mentioned processing method of the scattered and polluting power consumption anomaly algorithm model based on ensemble learning. Another processing method of the scattered and polluting power consumption anomaly algorithm model based on ensemble learning is provided, which can be applied to a server, and specifically includes the following:

[0115] Figure 7 This is an application environment diagram for the processing method of scattered and polluting power consumption anomaly algorithm model based on ensemble learning, such as... Figure 7 As shown, the server obtains electricity consumption data from various locations to be monitored in the city from the power system. Then, it performs time-frequency conversion on this data to obtain target electricity consumption data in time-frequency format for each location. Next, the server performs feature extraction on each target electricity consumption data point to obtain its respective electricity consumption characteristics. The server then inputs each electricity consumption characteristic into at least two trained electricity anomaly detection models to obtain at least two anomaly detection results for each characteristic. Finally, based on these at least two anomaly detection results for each characteristic, the server determines the monitoring results for scattered pollution at each location to be monitored. If a site is detected as a "scattered and polluting" site in the monitoring results, the server can generate an anomaly warning and send it to the relevant regulatory department. The department then generates an inspection work order based on the received warning and sends it to the street / township work app. This allows staff to review the order and organize on-site inspections of the sites. After the inspections, the staff reports the results to the relevant regulatory department. The department can also feed the inspection results back to the server, allowing it to further optimize the processing method of the ensemble learning-based algorithm model for abnormal electricity use in scattered and polluting sites, thereby improving the monitoring accuracy.

[0116] In this embodiment, the server monitors online whether the location to be monitored is a scattered and polluting site, thus realizing online monitoring of scattered and polluting sites. After the server detects that the location to be monitored is a scattered and polluting site, the relevant regulatory departments and staff conduct on-site inspections of the location to be monitored, eliminating the need for staff to inspect every location in the city one by one, thereby greatly improving the monitoring efficiency of scattered and polluting sites.

[0117] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0118] Based on the same inventive concept, this application also provides a processing device for the ensemble learning-based scattered and disordered power consumption anomaly algorithm model, used to implement the processing method for the above-mentioned scattered and disordered power consumption anomaly algorithm model based on ensemble learning. The solution provided by this device is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more processing device embodiments for the scattered and disordered power consumption anomaly algorithm model based on ensemble learning provided below can be found in the limitations of the processing method for the scattered and disordered power consumption anomaly algorithm model based on ensemble learning described above, and will not be repeated here.

[0119] In one embodiment, such as Figure 8 As shown, a processing device 800 for a scattered and polluting power consumption anomaly algorithm model based on ensemble learning is provided, including: a data conversion module 801, a feature extraction module 802, an anomaly detection module 803, and a result determination module 804, wherein:

[0120] The data conversion module 801 is used to perform time-frequency conversion processing on the electricity consumption data of the site to be monitored to obtain the target electricity consumption data in time-frequency format;

[0121] The feature extraction module 802 is used to perform feature extraction processing on the target electricity consumption data to obtain the electricity consumption characteristics of the target electricity consumption data;

[0122] Anomaly detection module 803 is used to input the electricity consumption characteristics into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption characteristics.

[0123] The result determination module 804 is used to determine the monitoring results of scattered pollution sources at the site to be monitored based on at least two abnormal power consumption detection results.

[0124] In one embodiment, the data conversion module 801 is further configured to perform a short-time Fourier transform on the electricity consumption data of the site to be monitored to obtain target electricity consumption data in time-frequency format.

[0125] In one embodiment, the feature extraction module 802 is further configured to perform data statistical processing on the target electricity consumption data to obtain statistical features of the target electricity consumption data; perform glitch extraction processing on the target electricity consumption data to obtain glitch features of the target electricity consumption data; perform frequency domain extraction processing on the target electricity consumption data to obtain frequency domain features of the target electricity consumption data; perform autocorrelation processing and bucket entropy processing on the target electricity consumption data to obtain time-series features of the target electricity consumption data; perform tree model construction processing on the target electricity consumption data to obtain tree model features of the target electricity consumption data; and use the statistical features, glitch features, frequency domain features, time-series features, and tree model features as the electricity consumption features of the target electricity consumption data.

[0126] In one embodiment, the processing device 800 for the scattered and polluting power consumption anomaly algorithm model based on ensemble learning further includes a model training module for acquiring sample power consumption features and actual power consumption anomaly detection results of the sample power consumption features; inputting the sample power consumption features into at least two power consumption anomaly detection models to be trained respectively to obtain at least two predicted power consumption anomaly detection results of the sample power consumption features; and iteratively training the two power consumption anomaly detection models to be trained respectively based on the difference between the at least two predicted power consumption anomaly detection results and the actual power consumption anomaly detection results of the sample power consumption features to obtain at least two trained power consumption anomaly detection models.

[0127] In one embodiment, the processing device 800 for the abnormal electricity consumption algorithm model based on ensemble learning for scattered and polluting sites further includes a sample acquisition module for acquiring negative sample electricity consumption data of scattered and polluting sites and positive sample electricity consumption data of normal sites; performing data augmentation processing on the negative sample electricity consumption data to obtain augmented negative sample electricity consumption data; and performing feature extraction processing on the augmented negative sample electricity consumption data and positive sample electricity consumption data to obtain corresponding sample electricity consumption features.

[0128] In one embodiment, the processing device 800 for the abnormal electricity consumption algorithm model based on ensemble learning for scattered and polluting sites further includes a data classification module, which performs time-frequency conversion processing on the initial electricity consumption data to obtain sample electricity consumption data in time-frequency format; performs visualization processing on the sample electricity consumption data to obtain a time-frequency image of the sample electricity consumption data; and performs classification processing on the sample electricity consumption data according to the time-frequency image of the sample electricity consumption data to obtain negative sample electricity consumption data of scattered and polluting sites and positive sample electricity consumption data of normal sites.

[0129] The modules in the processing device for the scattered and disorderly power consumption anomaly algorithm model based on ensemble learning can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0130] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as electricity consumption data, target electricity consumption data, electricity consumption characteristics, electricity consumption anomaly detection results, and scattered pollution monitoring results. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a processing method for a scattered pollution electricity consumption anomaly algorithm model based on ensemble learning.

[0131] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0132] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0133] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0134] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0135] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0136] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0137] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0138] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for processing scattered and polluting power consumption anomalies based on ensemble learning algorithm models, characterized in that, The method includes: The electricity consumption data of the monitoring site is processed by time-frequency conversion to obtain the target electricity consumption data in time-frequency format; The target electricity consumption data is subjected to statistical processing to obtain statistical features; glitch extraction processing is performed on the target electricity consumption data to obtain glitch features; frequency domain extraction processing is performed on the target electricity consumption data to obtain frequency domain features; autocorrelation processing and bucket entropy processing are performed on the target electricity consumption data to obtain time-series features; tree model construction processing is performed on the target electricity consumption data to obtain tree model features; the statistical features, glitch features, frequency domain features, time-series features, and tree model features are used as the electricity consumption features of the target electricity consumption data. The electricity consumption characteristics are input into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption characteristics. Based on the at least two abnormal power consumption detection results, the monitoring results of scattered pollution at the site to be monitored are determined.

2. The method according to claim 1, characterized in that, The electricity consumption data of the monitored location undergoes time-frequency conversion processing to obtain target electricity consumption data in time-frequency format, including: The electricity consumption data of the location to be monitored is subjected to a short-time Fourier transform to obtain the target electricity consumption data in the time-frequency format.

3. The method according to claim 1, characterized in that, The at least two trained power consumption anomaly detection models are obtained through the following method: Obtain the electricity consumption characteristics of the sample, and the actual electricity consumption anomaly detection results of the sample electricity consumption characteristics; The sample electricity consumption characteristics are input into at least two electricity consumption anomaly detection models to be trained, respectively, to obtain at least two predicted electricity consumption anomaly detection results of the sample electricity consumption characteristics; Based on the differences between the at least two predicted electricity anomaly detection results and the actual electricity anomaly detection results of the sample electricity characteristics, the two electricity anomaly detection models to be trained are iteratively trained to obtain the at least two trained electricity anomaly detection models.

4. The method according to claim 3, characterized in that, The acquisition of sample electricity consumption characteristics includes: Obtain negative sample electricity consumption data from scattered and polluting sites, and positive sample electricity consumption data from normal sites; The negative sample electricity consumption data is subjected to data augmentation processing to obtain augmented negative sample electricity consumption data; Feature extraction processing is performed on the enhanced negative sample electricity consumption data and the positive sample electricity consumption data to obtain the corresponding sample electricity consumption features.

5. The method according to claim 4, characterized in that, The acquisition of negative sample electricity consumption data from scattered and polluting sites, and positive sample electricity consumption data from normal sites, includes: The initial electricity consumption data is converted to time and frequency to obtain sample electricity consumption data in time and frequency format; The sample electricity consumption data is visualized to obtain a time-frequency image of the sample electricity consumption data; Based on the time-frequency image of the sample electricity consumption data, the sample electricity consumption data is classified to obtain negative sample electricity consumption data of the scattered and polluting sites and positive sample electricity consumption data of the normal sites.

6. A processing device for a scattered and polluting power consumption anomaly algorithm model based on ensemble learning, characterized in that, The device includes: The data conversion module is used to perform time-frequency conversion processing on the electricity consumption data of the monitored site to obtain the target electricity consumption data in time-frequency format; The feature extraction module is used to perform data statistical processing on the target electricity consumption data to obtain the statistical features of the target electricity consumption data; to perform glitch extraction processing on the target electricity consumption data to obtain the glitch features of the target electricity consumption data; to perform frequency domain extraction processing on the target electricity consumption data to obtain the frequency domain features of the target electricity consumption data; to perform autocorrelation processing and bucket entropy processing on the target electricity consumption data to obtain the time series features of the target electricity consumption data; to perform tree model construction processing on the target electricity consumption data to obtain the tree model features of the target electricity consumption data; and to use the statistical features, the glitch features, the frequency domain features, the time series features, and the tree model features as the electricity consumption features of the target electricity consumption data. An anomaly detection module is used to input the electricity consumption characteristics into at least two trained electricity consumption anomaly detection models to obtain at least two electricity consumption anomaly detection results for the electricity consumption characteristics. The result determination module is used to determine the monitoring results of scattered pollution at the site to be monitored based on the at least two abnormal power consumption detection results.

7. The apparatus according to claim 6, characterized in that, The data conversion module is also used to perform a short-time Fourier transform on the electricity consumption data of the location to be monitored to obtain the target electricity consumption data in the time-frequency format.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.