Electricity stealing user detection method, device and equipment based on hybrid meta-heuristic optimization

Through the hybrid element heuristic optimization algorithm and the cascading regional convolutional neural network model, the problems of low detection accuracy and high false alarm rate of power theft are solved, and more accurate identification of power theft user is achieved and the false alarm rate is reduced.

CN119106386AInactive Publication Date: 2024-12-10STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411321747.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing power stolen detection technology has low accuracy and high false alarm rate, so it is impossible to effectively identify power stolen users, especially in the case of unbalanced data, which is difficult to accurately identify power stolen characteristics.

Method used

Using a method based on hybrid element heuristic optimization, the user's original power consumption data is obtained, interpolation and normalization is performed, and features are extracted using whale optimization algorithm and chicken flock optimization algorithm, and the cascaded area convolution neural network model is iterated. Training, generate a Cascade R-CNN classification detector model, which is used to determine whether the user is a power stolen user.

Benefits of technology

It improves the accuracy of power stolen detection, reduces the false alarm rate, enhances the ability to identify power stolen behavior, and effectively improves the performance of the model in the case of data imbalance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106386A_ABST
    Figure CN119106386A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power detection, and discloses a hybrid meta-heuristic optimization-based electricity stealing user detection method, device and equipment, and the method comprises the steps: obtaining an original power consumption data set of a user, carrying out the preprocessing of the original power consumption data set, carrying out the feature extraction of the preprocessed original power consumption data set through a hybrid meta-heuristic optimization algorithm, and carrying out the detection of an electricity stealing user. The method comprises the following steps: extracting a power consumption data set of a cascade region to generate a power consumption data set, performing iterative training on a cascade region convolutional neural network Cascade R-CNN model by using the power consumption data set after feature extraction to generate a Cascade R-CNN classification detector model, and finally inputting original power consumption data of a user to be detected into the Cascade R-CNN classification detector model to judge whether the user is an electricity stealing user or not. And abnormal marking is carried out. The accuracy of electricity stealing detection is effectively improved, and the false alarm rate is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric power detection, and in particular to a method, a device and equipment for detecting electricity theft users based on hybrid meta-heuristic optimization. Background Art

[0002] With the development of the market economy, the demand for electricity is increasing. Driven by economic interests, electricity theft is emerging in an endless stream, and the means of electricity theft are becoming more and more technical and concealed, which has brought great challenges to anti-electricity theft work. In practice, most of the electricity theft methods are jumpering in front of the meter, and the electricity meter does not measure a sudden change in the amount of electricity. The electricity comparison in the substation area cannot identify the electricity theft users, and can only conduct a household check on many users in the substation area. What's more, the user's electricity theft is small, and the line loss rate of the substation area may still be below 7%. The substation area will be regarded as a qualified substation area and will not be included in the on-site electricity inspection. The electricity theft users have always been within the qualified range of the line loss rate of the substation area without being detected.

[0003] Accordingly, most traditional anti-electricity theft methods are to update and upgrade the power measurement equipment to increase the difficulty of electricity theft for users, such as shutting down the measurement circuit, adding a password function to the smart energy meter programmer, selecting special measurement equipment, regularly calibrating and updating the power meter and measuring voltage transformer. However, these methods have great limitations, low real-time performance, accuracy and security, and cannot actively identify electricity theft. With the development of deep learning, machine learning-based detection schemes have emerged, using some existing models to analyze the historical load curves of each user in the neighborhood network, aiming to find abnormal electricity usage patterns that are highly correlated with electricity theft. However, most users will not steal electricity, resulting in a small sample of electricity theft users in the data set and unbalanced data. If the electricity theft behavior is identified for all users, the electricity theft characteristics will be submerged in the massive data, making it difficult to accurately identify. Most algorithms have low detection accuracy and high false alarm rates. Summary of the invention

[0004] In view of this, the present invention provides a method for detecting electricity theft users based on hybrid meta-heuristic optimization, which solves the technical problems of low electricity theft detection accuracy and high false alarm rate in the prior art.

[0005] According to a first aspect of the present invention, a method for detecting electricity theft users based on hybrid meta-heuristic optimization is provided, comprising:

[0006] Obtain the user's original electricity consumption dataset;

[0007] Performing interpolation processing on the original power consumption data set, removing outliers using a standard deviation method, and performing normalization processing;

[0008] By using a hybrid meta-heuristic optimization algorithm, feature extraction is performed on the pre-processed original power consumption data set to generate a power consumption data set, wherein the hybrid meta-heuristic optimization algorithm includes a whale optimization algorithm and a chicken swarm optimization algorithm;

[0009] Iteratively training a Cascade R-CNN model using the power consumption dataset after feature extraction to generate a Cascade R-CNN classification detector model;

[0010] The original power consumption data of the user to be detected is input into the Cascade R-CNN classification detector model to determine whether the user is an electricity theft user and mark the abnormality.

[0011] According to a second aspect of the present invention, there is provided a device for detecting electricity theft users based on hybrid meta-heuristic optimization, comprising:

[0012] A data acquisition module, used to acquire the user's original power consumption data set and the user's original power consumption data to be detected;

[0013] A model training module is used to perform interpolation processing on the original power consumption data set, remove outliers using a standard deviation method, and perform normalization processing; perform feature extraction on the pre-processed original power consumption data set through a hybrid meta-heuristic optimization algorithm to generate a power consumption data set, wherein the hybrid meta-heuristic optimization algorithm includes a whale optimization algorithm and a chicken swarm optimization algorithm; and perform iterative training on a cascaded regional convolutional neural network Cascade R-CNN model using the power consumption data set after feature extraction to generate a Cascade R-CNN classification detector model;

[0014] The electricity theft detection module is used to input the original electricity consumption data of the user to be detected into the Cascade R-CNN classification detector model, determine whether the user is an electricity theft user, and mark the abnormality.

[0015] According to a third aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for detecting electricity theft users based on hybrid meta-heuristic optimization when executing the computer program.

[0016] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for detecting electricity theft users based on hybrid meta-heuristic optimization are implemented.

[0017] By means of the above technical scheme, the present invention provides a method, device, equipment and medium for detecting electricity theft users based on hybrid meta-heuristic optimization, which obtains the original electricity consumption data set of the user, pre-processes the original data, extracts features from the pre-processed original electricity consumption data set through a hybrid meta-heuristic optimization algorithm to generate an electricity consumption data set, and then uses the electricity consumption data set after feature extraction to iteratively train the Cascade R-CNN model of the Cascade Regional Convolutional Neural Network to generate a Cascade R-CNN classification detector model, and finally inputs the original electricity consumption data of the user to be detected into the Cascade R-CNN classification detector model to determine whether the user is an electricity theft user and mark the abnormality. The accuracy of electricity theft detection is effectively improved and the false alarm rate is reduced.

[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, and to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0020] Figure 1 A schematic diagram of an application scenario of a method for detecting electricity theft users based on hybrid meta-heuristic optimization provided in an embodiment of the present invention is shown;

[0021] Figure 2 A schematic flow chart of a method for detecting electricity theft users based on hybrid meta-heuristic optimization provided in an embodiment of the present invention is shown;

[0022] Figure 3 A schematic flow chart of another method for detecting electricity theft users based on hybrid meta-heuristic optimization provided in an embodiment of the present invention is shown;

[0023] Figure 4 A schematic diagram of a process of feature extraction based on a hybrid meta-heuristic optimization algorithm in an embodiment of the present invention is shown;

[0024] Figure 5 A schematic diagram of the training process of a cascaded convolutional neural network Cascaded RCNN provided in an embodiment of the present invention is shown;

[0025] Figure 6 The overall architecture of a Cascaded R-CNN classifier provided in the fourth embodiment of the present invention is shown;

[0026] Figure 7 A schematic structural diagram of a power theft user detection device based on hybrid meta-heuristic optimization provided in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0027] The specific implementation of the present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.

[0028] The embodiment of the present invention provides a method for detecting electricity theft users based on hybrid meta-heuristic optimization, which can be applied to Figure 1 In the scenario, the smart meter acts as a status data collection device for each household or industrial user. The smart meter and status data collection device are responsible for collecting power usage data in real time, including voltage, current and other status information. The operation terminal acts as a status data collection device, and collects on-site operation data and equipment status through the status data collection device. All collected data are transmitted to the power supply section or management center through a wireless communication network (such as 5G communication, 4G communication, NB-IoT communication, LoRa communication, Zigbee communication, micro-power wireless communication, Bluetooth, WiFi, etc., and different wireless communication methods can be selected according to specific project requirements). The data server stores all the original data, and the analysis server processes and analyzes these data, generates reports and alarms, so as to detect abnormal situations, such as power theft, etc. The analysis server runs a method for detecting power theft users based on hybrid meta-heuristic optimization provided in an embodiment of the present invention to detect power theft users. The smart meter and the operation terminal collect real-time power data through the status data collection device. The collected original data include the user's power consumption, voltage and current fluctuations, equipment operation status, etc. In this way, power supply companies can monitor electricity usage in real time, detect and handle anomalies in a timely manner, and effectively improve the operating efficiency and safety of the power grid.

[0029] The embodiment of the present invention obtains the user's original power consumption data set, pre-processes the original data, and extracts features from the pre-processed original power consumption data set through a hybrid meta-heuristic optimization algorithm to generate a power consumption data set. The power consumption data set after feature extraction is then used to iteratively train the Cascaded Region Convolutional Neural Network Cascade R-CNN model to generate a Cascade R-CNN classification detector model. Finally, the original power consumption data of the user to be detected is input into the Cascade R-CNN classification detector model to determine whether the user is an electricity theft user and mark the abnormality. The accuracy of electricity theft detection is effectively improved and the false alarm rate is reduced. The embodiment of the present invention combines the Cascaded Region Convolutional Neural Network (Cascaded R-CNN, Cascaded Region-based CNN or Cascaded Regions with CNN features) and the hybrid meta-heuristic optimization algorithm to provide high-quality detection results and effectively reduce the false alarm rate. The improved Whale Optimization Algorithm (WOA) and Chicken Swarm Optimization (CSO) were used for feature extraction, which improved the accuracy, reduced overfitting, and improved the classification efficiency of subsequent Cascaded R-CNN model training.

[0030] The present invention is described in detail below through specific embodiments.

[0031] Embodiment 1:

[0032] like Figure 2 As shown, a method for detecting electricity theft users based on hybrid meta-heuristic optimization is provided in an embodiment of the present invention, comprising:

[0033] Step 201: Obtaining a user's original power consumption data set;

[0034] Step 202: interpolate the original power consumption data set, remove outliers using the standard deviation method, and perform normalization;

[0035] Wherein, step 202 specifically includes:

[0036] Step 202-1, linearly interpolate the missing values ​​and fill in the missing values ​​with the power consumption values ​​of adjacent days;

[0037] Step 202-2: Use the 3sigma principle to remove abnormal samples in the initial power consumption data, calculate the mean value and standard deviation, and remove abnormal samples that exceed two times the standard deviation of the mean value;

[0038] Step 202-3: normalize the original power consumption data.

[0039] In the embodiment of the present invention, data preprocessing is performed through interpolation and the three sigma principle to solve the problems of missing data and outliers.

[0040] Step 203: extracting features from the preprocessed original power consumption data set by using a hybrid meta-heuristic optimization algorithm to generate a power consumption data set;

[0041] Among them, the hybrid meta-heuristic optimization algorithms include Whale Optimization Algorithm (WOA) and Chicken Swarm Optimization (CSO);

[0042] Step 204: iteratively train a Cascade R-CNN model using the power consumption dataset after feature extraction to generate a Cascade R-CNN classification detector model;

[0043] Step 205: Input the original power consumption data of the user to be detected into the Cascade R-CNN classification detector model to determine whether the user is an electricity theft user and mark it as abnormal.

[0044] The invention provides a method for detecting electricity theft users based on hybrid meta-heuristic optimization, which obtains the original electricity consumption data set of the user, pre-processes the original data, extracts features from the pre-processed original electricity consumption data set through a hybrid meta-heuristic optimization algorithm to generate an electricity consumption data set, and then iteratively trains the Cascade R-CNN model using the electricity consumption data set after feature extraction to generate a Cascade R-CNN classification detector model, and finally inputs the original electricity consumption data of the user to be detected into the Cascade R-CNN classification detector model to determine whether the user is an electricity theft user and mark the abnormality. The accuracy of electricity theft detection is effectively improved and the false alarm rate is reduced.

[0045] Embodiment 2:

[0046] In the embodiment of the present invention, electricity theft detection is a binary classification task for detecting whether a user has committed electricity theft. A single accuracy evaluation index cannot objectively evaluate the quality of the model when the data is unbalanced, especially when there is extremely biased data. In order to solve the data imbalance problem caused by a small number of samples and improve the quality of training data, in the embodiment of the present invention, adaptive synthetic sampling technology (ADASYN) is used to balance the data before step 203 in the implementation to improve the performance of the classifier, such as Figure 3 As shown, including:

[0047] Step 301, calculating the ratio of the number of normal user samples to the number of electricity theft user samples in the original power consumption data set;

[0048] Among them, the ratio of the number of normal user samples to the number of electricity theft user samples is N maj is the number of normal user samples, N min is the number of samples of electricity stealing users;

[0049] Step 302: Calculate the number of electricity stealing user samples that need to be generated in order to balance the data set;

[0050] Among them, the total number of electricity stealing user samples G that needs to be generated = (N maj -N min )*β, β is a random number between 0 and 1, which is used to determine the proportion of generated samples;

[0051] Step 303: Use K-nearest neighbor KNN to calculate the normal user neighbor sample density around each electricity theft user sample j;

[0052] Among them, the normal user neighbor sample density is k is the number of nearest neighbors, is the number of normal user neighbor samples;

[0053] Step 304: Calculate the normalized value of the density of normal user neighbor samples around each electricity theft user sample j;

[0054] Among them, the normalized value of the normal user neighbor sample density is N min is the number of samples of electricity stealing users;

[0055] Step 305: Calculate the number of synthetic samples that need to be generated corresponding to each electricity theft user sample j;

[0056] Among them, the number of synthetic samples that need to be generated is G is the total number of electricity stealing user samples that need to be generated, is the normalized value of the density of normal user neighbor samples around the electricity theft user sample j;

[0057] Step 306: According to each electricity stealing user sample x in the original electricity consumption data set j , generate new synthetic electricity stealing user samples;

[0058] Among them, the new synthetic electricity stealing user sample is s j,g =x j +ε*(x j -x g,rand ), g=1,2,…,G j , x j is the jth electricity stealing user sample, ε is a random number from 0 to 1 used to determine the disturbance degree of the synthetic sample, and the K adjacent neighbors of the electricity stealing user sample j summarize the randomly selected samples.

[0059] The invention provides a method for detecting electricity theft users based on hybrid metaheuristic optimization. It uses Adaptive Synthetic Sampling (ADASYN) to balance data, solves the problem of data imbalance, and improves the detection ability of the model for electricity theft by increasing the number of samples of minority classes (electricity theft user samples).

[0060] Embodiment three:

[0061] In order to achieve data dimensionality reduction processing, realize efficient feature extraction, and thus improve the generalization ability of the model, a hybrid metaheuristic optimization algorithm is introduced in the third embodiment of the present invention, and the whale optimization algorithm (WOA) and the chicken swarm optimization algorithm (CSO) are deeply integrated and improved. Preliminary feature extraction is performed by the whale optimization algorithm (WOA), and the predation behavior of whales is simulated, including surrounding prey, spiral predation and random search to determine the position of the rooster. Then, the parameters of WOA (such as the a parameter shrinkage coefficient in the WOA algorithm) are optimized using the chicken swarm optimization algorithm (CSO). The parameters are adjusted by simulating the foraging behavior of the chicken swarm to improve the accuracy of feature extraction, corresponding to the specific steps of step 203 in the first embodiment of the present invention, such as Figure 4 As shown, including:

[0062] Step 401, initializing the first initial parameter of the whale optimization WOA algorithm;

[0063] The first initial parameters include the population size N, the maximum number of iterations T, and the initial feature number D of the original power consumption data set;

[0064] Step 402, initializing the second initial parameter of the flock optimization CSO algorithm;

[0065] The second initial parameters include the number of roosters, hens, and chicks and the coefficient F of chick movement. L , used to control the step length of the chick moving towards the hen;

[0066] Step 403: Initialize the range of search coefficients of the whale optimization WOA algorithm;

[0067] The search coefficient range is [a min ,a max ],a max is the maximum value a min is the minimum value;

[0068] Step 404, assign roles to the chickens according to the importance of the features in the original power consumption data set, and divide the chickens into multiple subgroups according to the maximum number of iterations T;

[0069] Among them, the important features in the original electricity consumption dataset correspond to roosters, the secondary features correspond to hens, and the general features correspond to chicks;

[0070] Step 405: During each iteration, the positions of the roosters in each subgroup are updated by simulating the foraging behavior of whales according to the WOA algorithm combined with the first fitness function, and the positions of the hens and chicks are updated by simulating the foraging behavior of chickens according to the CSO algorithm combined with the second fitness function;

[0071] Step 406, determining whether the number of iterations reaches the maximum number of iterations T;

[0072] Step 407: When the number of iterations reaches the maximum number of iterations T, the subgroups corresponding to the first maximum fitness value and the second maximum fitness value are output as extracted features, and feature extraction is performed on the preprocessed original power consumption data set to generate a power consumption data set.

[0073] Among them, the first fitness function is Among them, is the weight coefficient, which is used to measure the degree of discrimination of the selected features in distinguishing abnormal electricity theft users from normal users in the training data, is the number of selected features, and is the training time of the current iteration process. The second fitness function is Among them, is the weight coefficient, which is used to measure the degree of discrimination of the selected features in distinguishing abnormal electricity theft users from normal users in the training data, is the diversity of the values ​​of each feature in the selected features, and is the training time of the current iteration process.

[0074] The combination of WOA and CSO optimizes the feature extraction process and makes it more efficient. WOA is used for preliminary feature extraction and performs global search by simulating whale predation behavior (surrounding prey, spiral predation and random search). CSO optimizes the parameters of WOA by simulating the foraging behavior of chickens to improve the accuracy of feature extraction. WOA is responsible for global search and CSO optimizes local search. The combination of the two balances exploration and development and improves search accuracy. By optimizing feature selection, the combination of WOA and CSO improves the model training accuracy and generalization ability of the classifier, thereby improving the detection accuracy in power theft detection applications.

[0075] Embodiment 4

[0076] A cascaded regional convolutional neural network (cascaded R-CNN) is used for multi-stage classification, and a new detector is trained in each stage to gradually improve the detection accuracy. The output of each stage is used to train the detector of the next stage to improve the robustness and accuracy of the model, corresponding to the specific steps of step 204 in the first embodiment of the present invention, such as Figure 5 As shown, including:

[0077] Step 501: construct a training set, a validation set, and a test set for electricity theft detection based on the preprocessed original electricity consumption data;

[0078] Step 502: Use ResNet101 as the backbone network to build a cascade R-CNN model, extract the feature map of the input training set data sample through deep convolution, and generate an initial bounding box based on the feature map;

[0079] Step 503: Perform detection at each detection stage through a cascaded bounding box regressor, and use the detection result of the previous stage as the input of the next stage for iterative optimization to optimize the position and size of the detection box at each stage;

[0080] Step 504: Input the test set into the trained cascade R-CNN model to detect electricity theft users, test the model accuracy, calculate whether the accuracy and recall rate of the test results meet the requirements, and output the cascade R-CNN classification detector, otherwise retrain the model to optimize the parameters.

[0081] The traditional anchor-based target detection method (a set of reference boxes, namely anchor boxes) uses an IOU (intersection-over-union) threshold to determine positive and negative samples, and the threshold is usually 0.5. However, this simple threshold setting may lead to noise interference and low-accuracy detection frames. In the fourth embodiment of the present invention, Cascade R-CNN is used to solve this problem by setting multiple detectors with different IOU thresholds. Each detector further optimizes the output of the previous detector, thereby gradually improving the accuracy of the detection frame. During the training process, Cascade R-CNN uses a cascade approach, and different IOU thresholds are set for the detectors in each stage. For example, three stages can be set, corresponding to IOU thresholds of 0.5, 0.6, and 0.7 respectively. The detector at each stage optimizes the input proposal (region proposal) and then uses it as the input for the next stage. The loss function includes classification loss and regression loss. The position loss function is used to optimize the position loss function of the bounding box regression, and the classification loss function is used to optimize the classification loss function of the classification result. The classification adopts softmax, and the regression loss function adopts the Smooth L1 Loss loss function (SmoothL1Loss loss function is a smooth L1 loss function, which combines the square loss and the absolute loss to reduce the numerical instability when it is close to zero. It belongs to the general loss function in the prior art and will not be repeated here). When the true bounding box is known, it is relatively simple to generate high-quality prediction results during training, for example, by sampling the area around the true boundary. Since there is no true value bounding box to refer to in the embodiment of the present invention, it becomes difficult to generate high-quality prediction results during reasoning. In the fourth embodiment of the present invention, a cascaded bounding box regression is proposed to solve this problem. A cascaded regressor is used to implement the concept in the cascaded R-CNN detector. It consists of a series of regressors, and the formula is as follows:

[0082] f(x,b)=f T of T-1 o…of1(x,b)

[0083] Where T represents the total number of cascade stages, x is the input feature map, and b is the bounding box coordinate. Each regressor f t The bounding box distribution b generated by the previous regressor t Optimize instead of the starting distribution b1. In this way, it is gradually strengthened. Cascade regression is equivalent to a resampling method in Cascade R-CNN to solve the above problem. In practical applications, bounding box regressors for specific situations tend to produce bounding boxes with higher IoU. Therefore, from a set of examples (x i ,b i ), the cascaded regression iteratively resamples the higher IoU scene distribution (xi ′,b i ′). Even while increasing the detector IoU threshold, the set of positive samples in subsequent stages remains roughly constant in size. At each stage t of R-CNN, a classifier h is used. t and the regressor f t Train the corresponding IoU threshold, where ut>ut-1, and use the loss function for training:

[0084] L(x t ,g)=L cls (h t (x t ),y t )+λ[y t ≥1]L los (f t (x t ,b t ),g)

[0085] Among them, the loss function combines the classification loss function L cls (h t (x t ),y t ) and the bounding box regression loss function L los (f t (x t ,b t ),g), g specifies x t The real object, b t =f t-1 (x t-1 ,b t-1 ), [y t ≥1] is the indicator function, when y t When it is greater than or equal to 1, that is, when the sample is a positive sample (normal power consumption in Honghu), the item is 1; otherwise, it is 0. Weight coefficient λ = 1, x t The IoU threshold standard under the label is determined by y t In the bounding box regression, the IoU threshold is regarded as the same as the classification threshold. From the loss function, we can see that due to the abundant positive samples in all stages, the risk of overfitting at a high IoU threshold is reduced. Secondly, the detectors in deeper stages perform better at a larger IoU threshold. Third, as the IoU threshold increases, some outliers are eliminated, which increases the learning efficiency of bounding box regression in the later stages.

[0086] In order to explain the principle of the classifier more clearly, Figure 6 As shown, the overall architecture of the Cascaded R-CNN classifier in the fourth embodiment of the present invention is shown, including input data, convolution layer, pooling layer, cascade detector and classifier. The following is a specific analysis:

[0087] Input data: The raw electricity consumption data is taken as input and processed through the feature extraction network.

[0088] Convolutional layer: Use multiple convolutional layers to extract features from input data and generate feature maps. Convolutional layers are used to extract local features in data.

[0089] Pooling layer: The feature map is downsampled through the pooling layer to reduce the data dimension and retain important features.

[0090] Cascade detector: The cascade detector consists of multiple stages, each of which gradually optimizes the detection box. The bounding box (B1, B2, B3) generated by each detection stage is used as the input of the next stage, and each detection stage also generates the corresponding classification result (C1, C2, C3).

[0091] Bounding box regression and classification: In each stage, the bounding box position is optimized by the regression network and the classification network is used for classification. In each detection stage, the bounding box regressor is optimized based on the detection results of the previous stage to gradually improve the detection accuracy. The classifier and regressor of each stage are optimized using the classification loss function and the position loss function respectively to ensure the classification accuracy and bounding box positioning accuracy. The detection results of each stage are used to train the detector of the next stage, and the false positives and false negatives are reduced through layer-by-layer optimization.

[0092] Through this multi-stage cascade structure, the Cascaded R-CNN classifier is able to provide efficient and accurate detection results in power theft detection. Each stage gradually optimizes feature extraction and classification, making the model have better performance when processing complex data.

[0093] Further, as Figures 2 to 5 The specific implementation of the method, the embodiment of the present invention provides a device for detecting electricity theft users based on hybrid meta-heuristic optimization, such as Figure 7 As shown, the device comprises:

[0094] The data acquisition module 710 is used to acquire the user's original power consumption data set and the user's original power consumption data to be detected;

[0095] The model training module 720 is used to perform interpolation processing on the original power consumption data set, remove outliers using the standard deviation method, and perform normalization processing; perform feature extraction on the pre-processed original power consumption data set through a hybrid meta-heuristic optimization algorithm to generate a power consumption data set, wherein the hybrid meta-heuristic optimization algorithm includes a whale optimization algorithm and a chicken swarm optimization algorithm; and perform iterative training on a cascaded regional convolutional neural network Cascade R-CNN model using the power consumption data set after feature extraction to generate a Cascade R-CNN classification detector model;

[0096] The electricity theft detection module 730 is used to input the original electricity consumption data of the user to be detected into the Cascade R-CNN classification detector model, determine whether the user is an electricity theft user, and mark it as abnormal.

[0097] In an embodiment of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of implementing a method for detecting electricity theft users based on hybrid meta-heuristic optimization include:

[0098] Obtain the user's original electricity consumption dataset;

[0099] Performing interpolation processing on the original power consumption data set, removing outliers using a standard deviation method, and performing normalization processing;

[0100] By using a hybrid meta-heuristic optimization algorithm, feature extraction is performed on the pre-processed original power consumption data set to generate a power consumption data set, wherein the hybrid meta-heuristic optimization algorithm includes a whale optimization algorithm and a chicken swarm optimization algorithm;

[0101] Iteratively training a Cascade R-CNN model using the power consumption dataset after feature extraction to generate a Cascade R-CNN classification detector model;

[0102] The original power consumption data of the user to be detected is input into the Cascade R-CNN classification detector model to determine whether the user is an electricity theft user and mark the abnormality.

[0103] It should be noted that in the above embodiments, only residential areas are used as examples to illustrate the principles and implementation steps of the embodiments of the present invention, and no specific limitation is made to the actual application scenarios. For example, commercial areas, industrial areas, agricultural areas, low-voltage areas (active / passive), high-voltage areas, etc. can all be used to distinguish different application scenarios. The technical solution of the present invention can also be applied to extended scenarios of different areas. Regarding the functions or steps that can be implemented by computer-readable storage media or computer devices, please refer to the aforementioned method embodiments. In order to avoid repetition, they will not be described one by one here.

[0104] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0105] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0106] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for detecting electricity theft users based on hybrid meta-heuristic optimization. It is characterized in that include: Obtain the user's original electricity consumption dataset; Performing interpolation processing on the original power consumption data set, removing outliers using a standard deviation method, and performing normalization processing; By using a hybrid meta-heuristic optimization algorithm, feature extraction is performed on the pre-processed original power consumption data set to generate a power consumption data set, wherein the hybrid meta-heuristic optimization algorithm includes a whale optimization algorithm and a chicken swarm optimization algorithm; Iteratively training a Cascade R-CNN model using the power consumption dataset after feature extraction to generate a Cascade R-CNN classification detector model; The original power consumption data of the user to be detected is input into the Cascade R-CNN classification detector model to determine whether the user is an electricity theft user and mark the abnormality.

2. According to claim 1, the method for detecting electricity theft users based on hybrid meta-heuristic optimization, It is characterized in that Before the step of extracting features from the pre-processed raw power consumption data by using a hybrid meta-heuristic optimization algorithm, the method includes: Calculate the ratio of the number of normal user samples to the number of electricity theft user samples in the original electricity consumption data set Among them, N maj is the number of normal user samples, N min is the number of samples of electricity stealing users; Calculate the number of electricity stealing user samples G that needs to be generated to balance the data set = (N maj -N min )*β, where β is a random number between 0 and 1, used to determine the proportion of generated samples; Use K-nearest KNN to calculate the normal user neighbor sample density around each electricity theft user sample j Among them, k is the number of nearest neighbors, is the number of normal user neighbor samples; Calculate the normalized value of the density of normal user neighbor samples around each electricity theft user sample j Among them, N min is the number of samples of electricity stealing users; Calculate the number of synthetic samples that need to be generated for each electricity theft user sample j Among them, G is the number of electricity stealing user samples that need to be generated, is the normalized value of the density of normal user neighbor samples around the electricity theft user sample j; According to each electricity stealing user sample x in the original electricity consumption dataset j , generate new synthetic electricity stealing user samples s j,g =x j +ε*(x j -x g,rand ), where g = 1, 2, ..., G j , x j is the jth electricity stealing user sample, ε is a random number from 0 to 1 used to determine the disturbance degree of the synthetic sample, and the K adjacent neighbors of the electricity stealing user sample j summarize the randomly selected samples.

3. According to claim 1, the method for detecting electricity theft users based on hybrid meta-heuristic optimization, It is characterized in that The steps of interpolating the original power consumption data set, removing outliers using a standard deviation method, and normalizing the data set include: Linear interpolation is performed on the missing values, using the electricity consumption values ​​of adjacent days to fill the missing values; Use the 3sigma principle to remove abnormal samples in the original power consumption data, calculate the mean value and standard deviation, and remove abnormal samples that exceed two times the standard deviation of the mean value; The original power consumption data is normalized.

4. According to claim 1, the method for detecting electricity theft users based on hybrid meta-heuristic optimization, It is characterized in that The step of extracting features from the preprocessed original power consumption data set by using a hybrid meta-heuristic optimization algorithm to generate a power consumption data set includes: Initialize the first initial parameters of the whale optimization WOA algorithm, wherein the first initial parameters include the population size N, the maximum number of iterations T, and the initial feature number D of the original power consumption data set; Initialize the second initial parameters of the CSO algorithm, where the second initial parameters include the number of roosters, hens, and chicks and the coefficient F of chick movement L , used to control the step length of the chick moving towards the hen; Initialize the range of search coefficients for the WOA algorithm and determine the maximum value a max and the minimum value a min ; Assign roles to the chickens according to the importance of the features in the original electricity consumption dataset. Important features correspond to roosters, minor features correspond to hens, and general features correspond to chicks. The chickens are divided into multiple subgroups according to the maximum number of iterations T. In each iteration, the positions of the roosters in each subgroup are updated by simulating the foraging behavior of whales according to the WOA algorithm combined with the first fitness function, and the positions of the hens and chicks are updated by simulating the foraging behavior of chickens according to the CSO algorithm combined with the second fitness function; Determine whether the number of iterations reaches the maximum number of iterations T; When the number of iterations reaches the maximum number of iterations T, the subgroups corresponding to the first maximum fitness value and the second maximum fitness value are output as extracted features, and feature extraction is performed on the preprocessed original power consumption data set to generate a power consumption data set.

5. According to claim 4, the method for detecting electricity theft users based on hybrid meta-heuristic optimization, It is characterized in that The first fitness function is Among them, is the weight coefficient, which is used to measure the degree of discrimination of the selected features in distinguishing abnormal electricity theft users from normal users in the training data, is the number of selected features, and is the training time of the current iteration process.

6. According to claim 4, the method for detecting electricity theft users based on hybrid meta-heuristic optimization, Features The second fitness function is Among them, is the weight coefficient, which is used to measure the degree of discrimination of the selected features in distinguishing abnormal electricity theft users from normal users in the training data, is the diversity of the values ​​of each feature in the selected features, and is the training time of the current iteration process.

7. The electricity theft user detection method based on hybrid meta-heuristic optimization according to claim 1, It is characterized in that The step of iteratively training the Cascade R-CNN model using the power consumption dataset after feature extraction to generate a Cascade R-CNN classification detector model includes: Based on the preprocessed raw power consumption data, the power theft detection training set, validation set and test set are constructed; The Cascade R-CNN model is constructed using ResNet101 as the backbone network. The feature map of the input training set data sample is extracted through deep convolution, and the initial bounding box is generated based on the feature map. Each detection stage is detected through a cascaded bounding box regressor, and the detection results of the previous stage are used as the input of the next stage for iterative optimization to optimize the position and size of the detection box at each stage; The test set is input into the trained Cascade R-CNN model to detect electricity theft users, and the model accuracy is tested. If the accuracy and recall of the test results meet the requirements, the Cascade R-CNN classification detector is output. Otherwise, the model is retrained to optimize the parameters.

8. A device for detecting electricity theft users based on hybrid meta-heuristic optimization. It is characterized in that include: A data acquisition module, used to acquire the user's original power consumption data set and the user's original power consumption data to be detected; A model training module, used for performing interpolation processing on the original power consumption data set, removing outliers using a standard deviation method, and performing normalization processing; By using a hybrid meta-heuristic optimization algorithm, feature extraction is performed on the pre-processed original power consumption data set to generate a power consumption data set, wherein the hybrid meta-heuristic optimization algorithm includes a whale optimization algorithm and a chicken swarm optimization algorithm; Iteratively training a Cascade R-CNN model using the power consumption dataset after feature extraction to generate a Cascade R-CNN classification detector model; The electricity theft detection module is used to input the original electricity consumption data of the user to be detected into the Cascade R-CNN classification detector model, determine whether the user is an electricity theft user, and mark the abnormality.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method for detecting electricity theft users based on hybrid meta-heuristic optimization as claimed in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the method for detecting electricity theft users based on hybrid meta-heuristic optimization as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Intelligent low-voltage electricity stealing behavior identification control system

    CN114758462A

  • Low-voltage transformer area electricity stealing user identification method based on improved whale optimization algorithm

    CN115239077A

  • Electricity stealing behavior detection method for optimizing BP neural network based on novel algorithm

    CN117113138A

  • Method for identifying microorganisms in soil and analyzing interaction of microorganisms in soil

    CN118072825A