Electricity theft detection method, system and device based on oversampling and improved random forest

Through the electricity theft detection method based on oversampling and improved random forest, using the SMOTE algorithm and the ant colony algorithm, the problem of low efficiency and accuracy of electricity theft detection is solved, and more efficient identification and location of electricity theft users are achieved.

CN114610706BActive Publication Date: 2024-10-15GUANGDONG POWER GRID CO LTD +1

Patent Information

Application Number
CN202210290055.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-23
Publication Date
2024-10-15
Estimated Expiration
2042-03-23

AI Technical Summary

Technical Problem

Existing electricity theft detection methods are inefficient and have a high false alarm rate, making it difficult to quickly and accurately locate suspected electricity theft users. Traditional hardware methods have a large amount of information but a lot of useless information. Machine learning-based methods require the installation of smart meters and databases, which are less efficient. , difficult to promote on a large scale.

Method used

An electricity theft detection method based on oversampling and improved random forest is used to obtain electricity consumption data, construct a data set, determine typical characteristic indicators of electricity theft detection, use the SMOTE algorithm to perform data balancing processing, build a random forest classifier, and use ants Swarm algorithm optimizes the number of decision trees and improves classification accuracy.

Benefits of technology

The efficiency and accuracy of electricity theft detection are improved. By balancing the data set and optimizing the number of decision trees, the accuracy and effectiveness of the random forest classifier are improved, and electricity theft can be identified more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114610706B_ABST
    Figure CN114610706B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electric power theft detection, and discloses an electric power theft detection method, system and device based on oversampling and improved random forest. The present invention constructs a data set according to user electricity consumption data, determines typical characteristic indicators of electric power theft detection based on the data set, clusters the electric power theft user data in the data set using a fuzzy C-means algorithm, and interpolates each obtained cluster cluster using a SMOTE algorithm to achieve balanced processing of the data set, and constructs a random forest classifier, uses training data of the balanced data set, and trains the random forest classifier based on typical characteristic indicators of electric power theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized using an ant colony algorithm; finally, the data of the test set is substituted into the trained random forest classifier, and the corresponding electric power theft detection result is output. The present invention can improve the efficiency and accuracy of electric power theft detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power theft detection, and in particular to a method, system and device for power theft detection based on oversampling and improved random forest. Background Art

[0002] The increasingly prominent problem of electricity theft has caused huge economic losses to power supply companies, which is likely to endanger the safe operation of the power grid and disrupt the normal electricity use order of users. Therefore, power supply companies need to improve the technical means of anti-electricity theft to increase the intensity of the crackdown on electricity theft.

[0003] The electricity theft detection methods in traditional technologies can be roughly divided into hardware-based and manual inspection methods. Among them, the manual inspection method mainly detects electricity theft through the subjective experience and knowledge of professionals in power companies. It requires power supply companies to regularly dispatch a large number of staff to screen potential electricity theft areas, but the number of electricity users is large, and this method has low screening efficiency, and timeliness and accuracy cannot be guaranteed. The hardware-based inspection method mainly detects electricity theft through special metering cabinets. When the electrical characteristic parameters such as voltage and current recorded by the special metering cabinet are greatly different from the normal data range, the user will be marked as a suspected electricity theft object. However, this method also has certain disadvantages. The amount of information fed back by the special metering cabinet is large, but there is also a lot of useless information, and false alarms often occur, making it difficult to quickly and accurately locate suspected electricity theft users.

[0004] In the existing technology, some scholars have combined deep convolutional neural networks with electricity theft detection to accurately identify the non-periodicity of electricity theft and the periodicity of normal electricity consumption in ordinary electricity consumption data, and then capture the global characteristics of one-dimensional electricity consumption data through wide components to achieve effective feature identification of electricity theft users; and add hardware means to use the information recorded by smart meters to deeply analyze customer consumption behavior, and use additional information on the geographical location and technical characteristics of each smart meter in the auxiliary database to correct the detection results. This method requires the installation of smart meters and auxiliary databases, which is inefficient and difficult to promote on a large scale.

[0005] With the rapid development of machine learning algorithms, more and more research institutions and scholars are using machine learning-based electricity theft detection research. Machine learning enables computers to learn decision-making rules from training sets without explicitly formulating decision rules, and the efficiency is relatively improved. Therefore, in recent years, the field of machine learning has become the main research direction of electricity theft detection. Summary of the invention

[0006] The present invention provides an electricity theft detection method, system and device based on oversampling and improved random forest, which solves the technical problem of how to improve the efficiency and accuracy of electricity theft detection.

[0007] A first aspect of the present invention provides a method for detecting electricity theft based on oversampling and improved random forest, comprising:

[0008] Obtaining electricity consumption data of each user in a detection cycle, constructing a data set, and determining typical characteristic indicators of electricity theft detection based on the data set;

[0009] The data set is divided into a normal user set and an electricity theft user set according to whether there is a record of electricity theft, the electricity theft user set is clustered to obtain a plurality of clusters, each cluster is interpolated using a SMOTE algorithm to generate an interpolated data set, a balanced user electricity usage sample is obtained according to the data set and the interpolated data set, and the user electricity usage sample is divided into a training set and a test set;

[0010] Constructing a random forest classifier, using the training set, and training the random forest classifier based on the typical characteristic indicators of electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized by using an ant colony algorithm;

[0011] Substitute the data of the test set into the trained random forest classifier and output the corresponding electricity theft detection result.

[0012] According to an achievable manner of the first aspect of the present invention, the method further includes:

[0013] Before constructing the data set, the electricity consumption data is corrected, including using a KNN interpolation method to fill in missing values ​​of the electricity consumption data, and / or processing abnormal values ​​of the electricity consumption data based on the Grubbs criterion;

[0014] The corrected electricity consumption data is normalized.

[0015] According to an achievable manner of the first aspect of the present invention, the typical characteristic indicators of electricity theft detection include voltage imbalance, rated voltage deviation, current imbalance, current correlation coefficient and power factor, and determining the typical characteristic indicators of electricity theft detection according to the data set includes:

[0016] Calculate the voltage unbalance according to the following formula:

[0017]

[0018] In the formula, m u is the three-phase voltage unbalance, Mean (V A , V B , V C ) is the average value of the three-phase voltage of the user, V i is the i-th phase voltage, abs(V i-Mean(V A , V B , V C )) is V i and Mean(V A , V B , V C ) is the absolute value of the difference between

[0019] Calculate the rated voltage deviation according to the following formula:

[0020]

[0021] Where V d (V u , V r ) is the voltage V u With rated voltage V r The voltage deviation between

[0022] Calculate the current unbalance according to the following formula:

[0023]

[0024] In the formula, i u is the three-phase current unbalance, Mean(I A , I B , I C ) is the average value of the user's three-phase current, I i is the i-th phase current, abs(I i -Mean(I A , I B , I C )) is I i and Mean(I A , I B , I C ) is the absolute value of the difference between

[0025] The current correlation coefficient is calculated according to the following formula:

[0026]

[0027] in

[0028]

[0029]

[0030]

[0031] Where ρ represents the current correlation coefficient, is the current correlation coefficient between phase A and phase B, is the current correlation coefficient between phase B and phase C, is the current correlation coefficient between phase A and phase C, cov(I A , I B ) is the covariance of the currents of phase A and phase B, cov(I B , I C ) is the covariance of the currents of phase B and phase C, cov(I A , I C ) is the covariance of the currents of phase A and phase C, is the standard deviation of phase A current, is the standard deviation of phase B current, is the standard deviation of phase C current;

[0032] Calculate the power factor as follows:

[0033]

[0034] Where λ is the power factor, P is the active power, and Q is the reactive power.

[0035] According to an achievable manner of the first aspect of the present invention, the interpolation processing of each cluster using the SMOTE algorithm includes:

[0036] Determine the cluster center of each cluster;

[0037] Perform sample interpolation on the clusters where each cluster center is located to obtain the corresponding interpolation sample point set;

[0038] The interpolation sample point sets obtained are merged to generate the interpolation data set.

[0039] According to an achievable manner of the first aspect of the present invention, performing sample interpolation on the clusters where each cluster center is located includes:

[0040] Perform sample interpolation on the clusters where each cluster center is located according to the following formula:

[0041]

[0042] In the formula, μ i represents the cluster center of the i-th cluster, Corresponding to μ i The interpolation dataset, y i is the data in the i-th cluster except the cluster center, and rand(0, 1) represents a random number between 0 and 1.

[0043] According to an achievable manner of the first aspect of the present invention, the training set is used to train the random forest classifier based on the typical characteristic indicators of electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized by using an ant colony algorithm, including:

[0044] Iterate the optimal number of decision trees for the random forest according to the ant colony algorithm, and set the decision tree according to the optimal number of decision trees;

[0045] For each decision tree, a plurality of training samples are extracted from the training set using the Booststrap method, a new decision tree is generated using the training samples, and each of the generated new decision trees is trained separately.

[0046] According to an achievable manner of the first aspect of the present invention, the iterating the optimal number of decision trees of the random forest according to the ant colony algorithm includes:

[0047] Define the root mean square error of the classification effect of the random forest classifier as the fitness function of the ant colony algorithm and initialize the parameters of the ant colony algorithm;

[0048] Construct an ant population, randomly place each ant at a different starting point, and calculate the next city to be visited by each ant until all ants have visited all cities;

[0049] Calculate the length of the path that each ant has taken, record the optimal solution (i.e. the shortest path) in the current iteration, and update the pheromone concentration on the paths connecting each city;

[0050] After each iteration, determine whether the maximum number of iterations has been reached. If not, clear the record table of the ant paths and return to continue the optimization search; otherwise, terminate the calculation and output the current optimal solution as the optimal number of decision trees for the random forest.

[0051] A second aspect of the present invention provides an electricity theft detection system based on oversampling and improved random forest, comprising:

[0052] A data acquisition module is used to acquire the electricity consumption data of each user in a detection cycle, construct a data set, and determine typical characteristic indicators of electricity theft detection based on the data set;

[0053] A sample determination module, for dividing the data set into a normal user set and an electricity theft user set according to whether there is a record of electricity theft, clustering the electricity theft user set to obtain a plurality of clusters, performing interpolation processing on each cluster using a SMOTE algorithm to generate an interpolated data set, obtaining a balanced user electricity usage sample according to the data set and the interpolated data set, and dividing the user electricity usage sample into a training set and a test set;

[0054] A training module, used for constructing a random forest classifier, using the training set to train the random forest classifier based on the typical characteristic indicators of electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized by using an ant colony algorithm;

[0055] The test module is used to substitute the data of the test set into the trained random forest classifier and output the corresponding electricity theft detection result.

[0056] According to an achievable manner of the second aspect of the present invention, the data acquisition module includes a preprocessing unit, and the preprocessing unit is used to:

[0057] Before constructing the data set, the electricity consumption data is corrected, including using a KNN interpolation method to fill in missing values ​​of the electricity consumption data, and / or processing abnormal values ​​of the electricity consumption data based on the Grubbs criterion;

[0058] The corrected electricity consumption data is normalized.

[0059] According to an achievable manner of the second aspect of the present invention, the typical characteristic indicators of electricity theft detection include voltage imbalance, rated voltage deviation, current imbalance, current correlation coefficient and power factor, and the sample determination module includes a typical characteristic indicator determination unit for electricity theft detection, and the typical characteristic indicator determination unit for electricity theft detection is used to:

[0060] Calculate the voltage unbalance according to the following formula:

[0061]

[0062] In the formula, m u is the three-phase voltage unbalance, Mean (V A , V B , V C ) is the average value of the three-phase voltage of the user, V i is the i-th phase voltage, abs(V i -Mean(V A , V B , V C )) is V i and Mean(V A , V B , V C ) is the absolute value of the difference between

[0063] Calculate the rated voltage deviation according to the following formula:

[0064]

[0065] Where Vd (V u , V r ) is the voltage V u With rated voltage V r The voltage deviation between

[0066] Calculate the current unbalance according to the following formula:

[0067]

[0068] In the formula, i u is the three-phase current unbalance, Mean(I A , I B , I C ) is the average value of the user's three-phase current, I i is the i-th phase current, abs(I i -Mean(I A , I B , I C )) is I i and Mean(I A , I B , I C ) is the absolute value of the difference between

[0069] The current correlation coefficient is calculated according to the following formula:

[0070]

[0071] in

[0072]

[0073]

[0074]

[0075] Where ρ represents the current correlation coefficient, is the current correlation coefficient between phase A and phase B, is the current correlation coefficient between phase B and phase C, is the current correlation coefficient between phase A and phase C, cov(I A , I B ) is the covariance of the currents of phase A and phase B, cov(I B , I C ) is the covariance of the currents of phase B and phase C, cov(I A , I C ) is the covariance of the currents of phase A and phase C, is the standard deviation of phase A current, is the standard deviation of phase B current, is the standard deviation of phase C current;

[0076] Calculate the power factor as follows:

[0077]

[0078] Where λ is the power factor, P is the active power, and Q is the reactive power.

[0079] According to an achievable manner of the second aspect of the present invention, the sample determination module includes an oversampling unit, and the oversampling unit is used to:

[0080] Determine the cluster center of each cluster;

[0081] Perform sample interpolation on the clusters where each cluster center is located to obtain the corresponding interpolation sample point set;

[0082] The interpolation sample point sets obtained are merged to generate the interpolation data set.

[0083] According to an achievable manner of the second aspect of the present invention, when the oversampling unit performs sample interpolation on the clusters where each cluster center is located, it is specifically used to:

[0084] Perform sample interpolation on the clusters where each cluster center is located according to the following formula:

[0085]

[0086] In the formula, μ i represents the cluster center of the i-th cluster, Corresponding to μ i The interpolation dataset, y i is the data in the i-th cluster except the cluster center, and rand(0, 1) represents a random number between 0 and 1.

[0087] According to an achievable manner of the second aspect of the present invention, the training module includes a training unit, and the training unit is used to:

[0088] Iterate the optimal number of decision trees for the random forest according to the ant colony algorithm, and set the decision tree according to the optimal number of decision trees;

[0089] For each decision tree, a plurality of training samples are extracted from the training set using the Booststrap system, a new decision tree is generated using the training samples, and each of the generated new decision trees is trained separately.

[0090] According to an achievable manner of the second aspect of the present invention, when the training unit iterates the optimal number of decision trees of the random forest according to the ant colony algorithm, it is specifically used to:

[0091] Define the root mean square error of the classification effect of the random forest classifier as the fitness function of the ant colony algorithm and initialize the parameters of the ant colony algorithm;

[0092] Construct an ant population, randomly place each ant at a different starting point, and calculate the next city to be visited by each ant until all ants have visited all cities;

[0093] Calculate the length of the path that each ant has taken, record the optimal solution (i.e. the shortest path) in the current iteration, and update the pheromone concentration on the paths connecting each city;

[0094] After each iteration, determine whether the maximum number of iterations has been reached. If not, clear the record table of the ant paths and return to continue the optimization search; otherwise, terminate the calculation and output the current optimal solution as the optimal number of decision trees for the random forest.

[0095] The third aspect of the present invention provides an electricity theft detection device based on oversampling and improved random forest, comprising:

[0096] A memory for storing instructions; wherein the instructions are used to implement the electricity theft detection method based on oversampling and improved random forest as described in any of the above implementation methods;

[0097] A processor is used to execute instructions in the memory.

[0098] A fourth aspect of the present invention is a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for detecting electricity theft based on oversampling and improved random forest is implemented as described in any one of the above implementation methods.

[0099] It can be seen from the above technical solutions that the present invention has the following advantages:

[0100] The present invention constructs a data set according to the electricity consumption data of each user in a detection cycle, determines the typical characteristic index of electricity theft detection based on the data set, clusters the electricity theft user data in the data set using a fuzzy C-means algorithm to obtain multiple clusters, and uses the SMOTE algorithm to perform interpolation processing on each cluster to achieve balanced processing of the data set, and constructs a random forest classifier. The training data of the balanced data set is used to train the random forest classifier based on the typical characteristic index of electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized by using an ant colony algorithm; finally, the data of the test set is substituted into the trained random forest classifier to output the corresponding electricity theft detection result; the present invention constructs a balanced user electricity consumption sample set through an improved oversampling method, and provides a data basis for subsequent electricity theft behavior detection to achieve the expected accuracy; the balanced data set is used to train the random forest classifier, and the number of optimal decision trees in the random forest is solved based on the ant colony algorithm in view of the limitation of the existing algorithm on the number of decision trees in the random forest, so that the random forest classifier achieves higher accuracy and effectiveness, and can solve the technical problem of how to improve the efficiency and accuracy of electricity theft detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0102] Figure 1 A flowchart of a method for detecting electricity theft based on oversampling and improved random forest is provided as an optional embodiment of the present invention;

[0103] Figure 2 A principle block diagram of an electricity theft detection system based on oversampling and improved random forest is provided for an optional embodiment of the present invention.

[0104] Reference numerals:

[0105] 1-Data acquisition module; 2-Sample determination module; 3-Training module; 4-Testing module. DETAILED DESCRIPTION

[0106] The embodiments of the present invention provide an electricity theft detection method, system and device based on oversampling and improved random forest, which are used to solve the technical problem of how to improve the efficiency and accuracy of electricity theft detection.

[0107] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0108] The invention provides an electricity theft detection method based on oversampling and improved random forest.

[0109] See also Figure 1 , Figure 1 A flow chart of a method for detecting electricity theft based on oversampling and improved random forests provided by an embodiment of the present invention is shown.

[0110] An embodiment of the present invention provides a method for detecting electricity theft based on oversampling and improved random forest, comprising steps S1-S4.

[0111] Step S1, obtaining electricity consumption data of each user in a detection cycle, constructing a data set, and determining typical characteristic indicators of electricity theft detection according to the data set.

[0112] The specific time range of the detection cycle can be determined according to the actual situation, for example, one month or one quarter is used as a detection cycle. The time of data sampling can be determined according to the actual situation. Preferably, data sampling is performed every 15 minutes.

[0113] In one implementation, the method further includes:

[0114] Before constructing the data set, the electricity consumption data is corrected, including using a KNN interpolation method to fill in missing values ​​of the electricity consumption data, and / or processing abnormal values ​​of the electricity consumption data based on the Grubbs criterion;

[0115] The corrected electricity consumption data is normalized.

[0116] There are usually missing values ​​or abnormal data in the data set. In order to ensure the training accuracy of the subsequent classifier, it is necessary to clean the data in the training set, complete the missing values, correct or delete the abnormal values, and finally obtain a data set that can be directly analyzed.

[0117] In this embodiment, the existing KNN interpolation method is used to interpolate data. This method uses the Euclidean distance to find the observation values ​​in multiple samples that are most similar to the observation values ​​of the missing data based on the correlation between the sample observation values ​​to fill the missing values.

[0118] In the data set, data anomalies caused by measurement or other anomalies will affect the training results of the training set, thereby making the classification inaccurate and affecting the effect of electricity theft detection. Therefore, it is necessary to process such data sets. Since the data set is large in scale and the data conforms to the normal distribution, this embodiment processes the outliers of the electricity consumption data based on the Grubbs criterion, which can obtain better processing results.

[0119] As a specific implementation, when processing the abnormal value of the power consumption data based on the Grubbs criterion, the following is specifically performed:

[0120] Calculate the mean and standard value of the data set, and set the comparison threshold to mean(Ω)+2std(Ω), where mean(Ω) represents the mean value of the data set Ω, and std(Ω) represents the standard value of the data set Ω;

[0121] Compare each data in the data set Ω with the comparison threshold, replace the value of the data greater than mean(Ω)+2std(Ω) with mean(Ω)+2std(Ω), and retain the data not greater than mean(Ω)+2std(Ω).

[0122] The key to identifying electricity theft through data mining is to extract the electrical characteristic information under the electricity theft situation. In the existing electricity consumption information collection system, load data, electricity consumption, meter events and other information have been collected and stored, so electricity consumption data including three-phase voltage and three-phase current can be extracted from it.

[0123] Theoretically, the three-phase voltage values ​​of normal users fluctuate slightly around the rated voltage, and the voltage values ​​of each phase are almost equal. Since electricity theft users use various means to change the single-phase or three-phase voltage, there will be obvious differences between the phase voltage curves. In order to quantitatively describe the abnormality of the voltage of electricity theft users, the rated voltage deviation and voltage imbalance of the users can be analyzed to locate the electricity theft users.

[0124] Theoretically, the three-phase current values ​​of normal users are similar in each phase, and the current curve change trends are also close. Since electricity thieves use various means to change single-phase or three-phase current, there are obvious differences between the phase current curves, and even the situation where the energy meter cannot measure the phase current. In order to quantitatively describe the abnormal degree of the current of electricity thieves, electricity thieves can be located based on the three-phase imbalance and current correlation coefficient.

[0125] When electricity thieves steal electricity based on the phase shift method, the electricity meter will under-measure or even reverse measurement, which will cause an abnormal decrease in the power factor. Therefore, electricity thieves can also be located based on the power factor.

[0126] Based on the above analysis, in one feasible method, typical characteristic indicators of electricity theft detection are set to include voltage imbalance, rated voltage deviation, current imbalance, current correlation coefficient and power factor. The calculation process of each typical characteristic indicator of electricity theft detection is as follows:

[0127] Calculate the voltage unbalance according to the following formula:

[0128]

[0129] In the formula, m u is the three-phase voltage unbalance, Mean (V A ,V B ,V C ) is the average value of the three-phase voltage of the user, V i is the i-th phase voltage, abs(V i -Mean(V A ,V B ,V C )) is V i and Mean(V A ,V B ,V C ) is the absolute value of the difference between

[0130] Calculate the rated voltage deviation according to the following formula:

[0131]

[0132] Where V d (V u ,V r ) is the voltage V u With rated voltage V r The voltage deviation between

[0133] Calculate the current unbalance according to the following formula:

[0134]

[0135] In the formula, i u is the three-phase current unbalance, Mean(I A ,I B ,I C ) is the average value of the user's three-phase current, I i is the i-th phase current, abs(I i -Mean(I A ,I B ,I C )) is I i and Mean(I A ,I B ,I C ) is the absolute value of the difference between

[0136] The current correlation coefficient is calculated according to the following formula:

[0137]

[0138] in

[0139]

[0140]

[0141]

[0142] Where ρ represents the current correlation coefficient, is the current correlation coefficient between phase A and phase B, is the current correlation coefficient between phase B and phase C, is the current correlation coefficient between phase A and phase C, cov(I A ,I B ) is the covariance of the currents of phase A and phase B, cov(I B ,I C ) is the covariance of the currents of phase B and phase C, cov(I A ,I C ) is the covariance of the currents of phase A and phase C, is the standard deviation of phase A current, is the standard deviation of phase B current, is the standard deviation of phase C current;

[0143] Calculate the power factor as follows:

[0144]

[0145] Where λ is the power factor, P is the active power, and Q is the reactive power.

[0146] The above-mentioned embodiment of the present invention calculates five characteristics, namely, voltage imbalance, voltage deviation, current imbalance, current correlation coefficient, and power factor, based on the processed data, which can provide a detection index basis for user electricity theft detection and improve the efficiency of user electricity theft detection.

[0147] Step S2: dividing the data set into a normal user set and an electricity theft user set according to whether there is a record of electricity theft, clustering the electricity theft user set to obtain multiple clusters, using the SMOTE algorithm to interpolate each cluster to generate an interpolated data set, obtaining a balanced user electricity usage sample based on the data set and the interpolated data set, and dividing the user electricity usage sample into a training set and a test set.

[0148] In actual situations, the number of electricity stealing users is far less than the number of normal users, that is, the positive samples (i.e., the normal user set) and the negative samples (i.e., the electricity stealing user set) constitute an unbalanced data set. For unbalanced data sets, intelligent algorithms tend to favor positive samples during training and ignore the important information contained in negative samples, which reduces the detection performance of the method. For unbalanced data sets, the embodiment of the present invention clusters the electricity stealing user set and uses the SMOTE algorithm to interpolate each cluster obtained, which can improve the imbalance of the data set and plays an indispensable role in improving the efficiency and accuracy of the algorithm.

[0149] SMOTE uses linear direct interpolation to generate new minority class samples. Compared with the random oversampling method, it can avoid overfitting to a certain extent, and can also improve the classification performance of the classification algorithm. However, the algorithm has two main shortcomings: when there are noise points in the negative class samples, the artificial negative class samples generated by interpolation based on the noise points will inherit the characteristics of the noise points, resulting in more and more noise points, making the features of the original negative class data more difficult to learn. In addition, SMOTE is prone to data marginalization problems. If there are more positive class samples between negative class samples, the artificial data generated around the negative class samples will cause the boundary between the positive and negative class samples to be blurred, resulting in greater difficulty in classification. This application uses the fuzzy C-means algorithm to optimize SMOTE, which can improve the clarity of the boundary between positive and negative class samples and lay a good data foundation for subsequent electricity theft detection.

[0150] As an implementation manner, the fuzzy C-means algorithm may be used to cluster the electricity stealing user set.

[0151] The fuzzy C-means algorithm obtains the cluster center by minimizing the objective function. The objective function is essentially the sum of the Euclidean distances from each point to each cluster (the sum of the squares of the errors). The clustering process is the process of minimizing the objective function. Through repeated iterative operations, the error value of the objective function is gradually reduced. When the objective function converges, the final clustering result can be obtained.

[0152] Since the fuzzy C-means algorithm is a relatively mature technology, the specific process of clustering the electricity stealing user set using the fuzzy C-means algorithm will not be described in detail in this application.

[0153] In one achievable manner, the interpolation processing of each cluster using the SMOTE algorithm includes:

[0154] Determine the cluster center of each cluster;

[0155] Perform sample interpolation on the clusters where each cluster center is located to obtain the corresponding interpolation sample point set;

[0156] The interpolation sample point sets obtained are merged to generate the interpolation data set.

[0157] In one achievable manner, the performing sample interpolation on the clusters where each cluster center is located includes:

[0158] Perform sample interpolation on the clusters where each cluster center is located according to the following formula:

[0159]

[0160] In the formula, μ i represents the cluster center of the i-th cluster, Corresponding to μ i The interpolation dataset, y i is the data in the i-th cluster except the cluster center, and rand(0,1) represents a random number between 0 and 1.

[0161] Since the cluster center can well represent the sample characteristics of this type of data, the embodiment of the present invention uses the cluster center to perform sample interpolation on the cluster clusters, which can make the generated samples more practical and valuable, and will not cause the boundary blurring of positive and negative class samples.

[0162] Step S3, constructing a random forest classifier, using the training set, and training the random forest classifier based on the typical characteristic indicators of electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized using an ant colony algorithm.

[0163] Step S4, substituting the data of the test set into the trained random forest classifier, and outputting the corresponding electricity theft detection result.

[0164] In one achievable manner, the training set is used to train the random forest classifier based on the typical characteristic indicators of electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized by using an ant colony algorithm, including:

[0165] Iterate the optimal number of decision trees for the random forest according to the ant colony algorithm, and set the decision tree according to the optimal number of decision trees;

[0166] For each decision tree, a plurality of training samples are extracted from the training set using the Booststrap method, a new decision tree is generated using the training samples, and each of the generated new decision trees is trained separately.

[0167] Bootstrap, also known as the bootstrap method, is a sampling method with replacement. In statistics, Bootstrap extracts subsets from the original data multiple times with replacement, then obtains the statistical characteristics of each subset separately, and finally merges the statistical characteristics.

[0168] The decision tree is a supervised machine learning method that represents a mapping relationship between object attributes and object values. From a literal point of view, the output of the algorithm forms a tree structure, so it is called a decision tree. The decision tree is the basic unit of the random forest algorithm, consisting of branches, root nodes, internal nodes, and leaf nodes. In fact, the core idea of ​​the decision tree is to generate a series of rules through node splitting operations, and then perform data analysis or prediction based on the generated rules. The generation process of the decision tree model is essentially a process of recursively selecting the optimal partitioning attribute, dividing the training data set according to the attribute value, and assigning each sub-data set to the intermediate node or leaf node.

[0169] The decision tree is mainly generated by program recursion. Starting from the root node, it is divided into two subtrees. According to each subtree, it starts to split again, generating another root node and left and right subtrees. Each subtree continues to recursively generate a new subtree until it reaches a leaf node. When selecting a node, it is necessary to use a certain algorithm to select a suitable attribute as the decision tree splitting attribute. There are many methods for splitting the nodes of the decision tree. As a preferred embodiment, when the training sample is used to generate a new decision tree, the CART (Classification And Regression Tree) method is used to split the decision tree nodes. The CART algorithm constructs multiple binary tree experimental data classifications so that each node of the generated decision tree has a maximum of two branches.

[0170] The ant colony algorithm is an intelligent optimization algorithm. It sets up multiple ants and searches in parallel. After each ant completes a tour, it releases pheromones on the way, and the amount of pheromones is proportional to the quality of the solution. The choice of ant path is based on the strength of the pheromone (the initial pheromone amount is set to be equal), and at the same time, the distance between two points is considered, and a random local search strategy is adopted. This makes the edge with a shorter distance have a larger amount of pheromones on it, and the probability of later ants choosing this edge is also greater. Each ant can only take a legal route (passing through each city once and only once), and a taboo table is set to control this. When all ants search once, it is an iteration. Each iteration updates the pheromones of all edges, the original ants die, and new ants conduct a new round of search. Updating pheromones includes the evaporation of the original pheromones and the increase of pheromones on the path passed. When the predetermined number of iterations is reached, or stagnation occurs, the algorithm ends, and the current optimal solution is used as the optimal solution to the problem.

[0171] In one achievable manner, the iterating the optimal number of decision trees of the random forest according to the ant colony algorithm includes:

[0172] Define the root mean square error of the classification effect of the random forest classifier as the fitness function of the ant colony algorithm and initialize the parameters of the ant colony algorithm;

[0173] Construct an ant population, randomly place each ant at a different starting point, and calculate the next city to be visited by each ant until all ants have visited all cities;

[0174] Calculate the length of the path that each ant has taken, record the optimal solution (i.e. the shortest path) in the current iteration, and update the pheromone concentration on the paths connecting each city;

[0175] After each iteration, determine whether the maximum number of iterations has been reached. If not, clear the record table of the ant paths and return to continue the optimization search; otherwise, terminate the calculation and output the current optimal solution as the optimal number of decision trees for the random forest.

[0176] The parameters of the ant colony algorithm include the size of the ant colony (number of ants), the pheromone importance factor, the heuristic function importance factor, the pheromone volatility factor, the total amount of pheromone released, and the maximum number of iterations. The pheromone volatility factor represents the amount of pheromone present on the path. More pheromone means more ants passing through the path, and vice versa. The heuristic function importance factor represents the ant's consideration of the importance of the node in the path. The larger its value, the greater the probability of moving to this point.

[0177] The number of decision trees in a random forest needs to be defined manually or selected based on experience. However, in actual situations, due to the many uncertainties in the data set, it is inappropriate to set the number of decision trees based on experience alone. The more decision trees there are, the more tree classifiers there are, which ensures the diversity of the classifiers and is conducive to improving performance, but the time and space costs are high, which may lead to reduced interpretability. If the number of decision trees is too small, performance will deteriorate and classification errors will be large. In actual situations, it is particularly important to optimize the performance of the random forest classifier and obtain the best classification effect, especially in actual electricity theft detection, where the detection accuracy is directly linked to the amount of direct economic losses of the power company, and it is even more necessary to maximize the performance of the random forest classifier. The above embodiment of the present invention uses an ant colony algorithm to optimize the number of decision trees in the random forest classifier, which can maximize the classification accuracy.

[0178] The present invention also provides an electricity theft detection system based on oversampling and improved random forest.

[0179] See also Figure 2 , Figure 2A principle block diagram of an electricity theft detection system based on oversampling and improved random forest provided by an embodiment of the present invention is shown.

[0180] The embodiment of the present invention provides an electricity theft detection system based on oversampling and improved random forest, including:

[0181] Data acquisition module 1, used to acquire the electricity consumption data of each user in a detection cycle, construct a data set, and determine typical characteristic indicators of electricity theft detection based on the data set;

[0182] The sample determination module 2 is used to divide the data set into a normal user set and an electricity theft user set according to whether there is a record of electricity theft, cluster the electricity theft user set to obtain multiple clusters, use the SMOTE algorithm to perform interpolation processing on each cluster to generate an interpolated data set, obtain a balanced user electricity usage sample according to the data set and the interpolated data set, and divide the user electricity usage sample into a training set and a test set;

[0183] A training module 3 is used to construct a random forest classifier, and train the random forest classifier based on the typical characteristic indicators of electricity theft detection using the training set until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized using an ant colony algorithm;

[0184] The test module 4 is used to substitute the data of the test set into the trained random forest classifier and output the corresponding electricity theft detection result.

[0185] In one achievable manner, the data acquisition module 1 includes a preprocessing unit, and the preprocessing unit is used to:

[0186] Before constructing the data set, the electricity consumption data is corrected, including using a KNN interpolation method to fill in missing values ​​of the electricity consumption data, and / or processing abnormal values ​​of the electricity consumption data based on the Grubbs criterion;

[0187] The corrected electricity consumption data is normalized.

[0188] In one achievable manner, the typical characteristic indicators of electricity theft detection include voltage imbalance, rated voltage deviation, current imbalance, current correlation coefficient and power factor, and the sample determination module 2 includes a typical characteristic indicator determination unit for electricity theft detection, and the typical characteristic indicator determination unit for electricity theft detection is used to:

[0189] Calculate the voltage unbalance according to the following formula:

[0190]

[0191] In the formula, m uis the three-phase voltage unbalance, Mean (V A ,V B ,V C ) is the average value of the three-phase voltage of the user, V i is the i-th phase voltage, abs(V i -Mean(V A ,V B ,V C )) is V i and Mean(V A ,V B ,V C ) is the absolute value of the difference between

[0192] Calculate the rated voltage deviation according to the following formula:

[0193]

[0194] Where V d (V u ,V r ) is the voltage V u With rated voltage V r The voltage deviation between

[0195] Calculate the current unbalance according to the following formula:

[0196]

[0197] In the formula, i u is the three-phase current unbalance, Mean(I A ,I B ,I C ) is the average value of the user's three-phase current, I i is the i-th phase current, abs(I i -Mean(I A ,I B ,I C )) is I i and Mean(I A ,I B ,I C ) is the absolute value of the difference between

[0198] The current correlation coefficient is calculated according to the following formula:

[0199]

[0200] in

[0201]

[0202]

[0203]

[0204] Where ρ represents the current correlation coefficient, is the current correlation coefficient between phase A and phase B, is the current correlation coefficient between phase B and phase C, is the current correlation coefficient between phase A and phase C, cov(I A ,I B ) is the covariance of the currents of phase A and phase B, cov(I B ,I C ) is the covariance of the currents of phase B and phase C, cov(I A ,I C ) is the covariance of the currents of phase A and phase C, is the standard deviation of phase A current, is the standard deviation of phase B current, is the standard deviation of phase C current;

[0205] Calculate the power factor as follows:

[0206]

[0207] Where λ is the power factor, P is the active power, and Q is the reactive power.

[0208] In one achievable manner, the sample determination module 2 includes an oversampling unit, and the oversampling unit is used to:

[0209] Determine the cluster center of each cluster;

[0210] Perform sample interpolation on the clusters where each cluster center is located to obtain the corresponding interpolation sample point set;

[0211] The interpolation sample point sets obtained are merged to generate the interpolation data set.

[0212] In one achievable manner, when the oversampling unit performs sample interpolation on the clusters where each cluster center is located, it is specifically used to:

[0213] Perform sample interpolation on the clusters where each cluster center is located according to the following formula:

[0214]

[0215] In the formula, μ i represents the cluster center of the i-th cluster, Corresponding to μ i The interpolation dataset, y i is the data in the i-th cluster except the cluster center, and rand(0,1) represents a random number between 0 and 1.

[0216] In one achievable manner, the training module 3 includes a training unit, and the training unit is used to:

[0217] Iterate the optimal number of decision trees for the random forest according to the ant colony algorithm, and set the decision tree according to the optimal number of decision trees;

[0218] For each decision tree, a plurality of training samples are extracted from the training set using the Booststrap system, a new decision tree is generated using the training samples, and each of the generated new decision trees is trained separately.

[0219] In one achievable manner, when the training unit iterates the optimal number of decision trees of the random forest according to the ant colony algorithm, it is specifically used to:

[0220] Define the root mean square error of the classification effect of the random forest classifier as the fitness function of the ant colony algorithm and initialize the parameters of the ant colony algorithm;

[0221] Construct an ant population, randomly place each ant at a different starting point, and calculate the next city to be visited by each ant until all ants have visited all cities;

[0222] Calculate the length of the path that each ant has taken, record the optimal solution (i.e. the shortest path) in the current iteration, and update the pheromone concentration on the paths connecting each city;

[0223] After each iteration, determine whether the maximum number of iterations has been reached. If not, clear the record table of the ant paths and return to continue the optimization search; otherwise, terminate the calculation and output the current optimal solution as the optimal number of decision trees for the random forest.

[0224] The present invention also provides an electricity theft detection device based on oversampling and improved random forest, comprising:

[0225] A memory, used to store instructions; wherein the instructions are instructions that can implement the electricity theft detection method based on oversampling and improved random forest as described in any one of the above embodiments;

[0226] A processor is used to execute instructions in the memory.

[0227] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for detecting electricity theft based on oversampling and improved random forest as described in any one of the above embodiments is implemented.

[0228] The above-mentioned embodiment of the present invention constructs a balanced user electricity consumption sample set through an improved oversampling method, providing a data basis for subsequent electricity theft detection to achieve the desired accuracy; the balanced data set is used to train the random forest classifier, and the number of optimal decision trees in the random forest is solved based on the ant colony algorithm in view of the limitations of the existing algorithm on the number of decision trees in the random forest, so that the random forest classifier achieves higher accuracy and effectiveness, and can solve the technical problem of how to improve the efficiency and accuracy of electricity theft detection.

[0229] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments, and the specific beneficial effects of the systems, devices and modules described above can refer to the corresponding beneficial effects in the aforementioned method embodiments, which will not be repeated here.

[0230] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0231] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0232] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0233] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0234] As described above, the above embodiments 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 thereof may be replaced by equivalents. However, these 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.

Claims

1. A method for detecting electricity theft based on oversampling and improved random forest, characterized in that: include: Obtaining electricity consumption data of each user in a detection cycle, constructing a data set, and determining typical characteristic indicators of electricity theft detection based on the data set; The data set is divided into a normal user set and an electricity theft user set according to whether there is a record of electricity theft, the electricity theft user set is clustered to obtain a plurality of clusters, each cluster is interpolated using a SMOTE algorithm to generate an interpolated data set, a balanced user electricity usage sample is obtained according to the data set and the interpolated data set, and the user electricity usage sample is divided into a training set and a test set; Constructing a random forest classifier, using the training set, and training the random forest classifier based on the typical characteristic indicators of electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized by using an ant colony algorithm; Substituting the data of the test set into the trained random forest classifier, and outputting the corresponding electricity theft detection result; The typical characteristic indicators of electricity theft detection include voltage imbalance, rated voltage deviation, current imbalance, current correlation coefficient and power factor. The typical characteristic indicators of electricity theft detection are determined according to the data set, including: Calculate the voltage unbalance according to the following formula: ; In the formula, is the three-phase voltage unbalance, is the average value of the user's three-phase voltage, is the i-th phase voltage, for and The absolute value of the difference; Calculate the rated voltage deviation according to the following formula: ; In the formula, For voltage With rated voltage The voltage deviation between Calculate the current unbalance according to the following formula: ; In the formula, is the three-phase current unbalance, is the average value of the user's three-phase current, is the i-th phase current, for and The absolute value of the difference; The current correlation coefficient is calculated according to the following formula: ; in ; ; ; In the formula, represents the current correlation coefficient, is the current correlation coefficient between phase A and phase B, is the current correlation coefficient between phase B and phase C, is the current correlation coefficient between phase A and phase C, is the covariance of the currents of phase A and phase B, is the covariance of the currents of phase B and phase C, is the covariance of the currents of phase A and phase C, is the standard deviation of phase A current, is the standard deviation of phase B current, is the standard deviation of phase C current; Calculate the power factor as follows: ; Where λ is the power factor, is the active power, is the reactive power; The training set is used to train the random forest classifier based on the typical characteristic index of electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized by using an ant colony algorithm, including: Iterate the optimal number of decision trees for the random forest according to the ant colony algorithm, and set the decision tree according to the optimal number of decision trees; For each decision tree, a plurality of training samples are extracted from the training set using the Booststrap method, a new decision tree is generated using the training samples, and each of the generated new decision trees is trained separately.

2. The electricity theft detection method based on oversampling and improved random forest according to claim 1 is characterized in that: The method further comprises: Before constructing the data set, the electricity consumption data is corrected, including using a KNN interpolation method to fill in missing values ​​of the electricity consumption data, and / or processing abnormal values ​​of the electricity consumption data based on the Grubbs criterion; The corrected electricity consumption data is normalized.

3. The electricity theft detection method based on oversampling and improved random forest according to claim 1 is characterized in that: The SMOTE algorithm is used to perform interpolation processing on each cluster, including: Determine the cluster center of each cluster; Perform sample interpolation on the clusters where each cluster center is located to obtain the corresponding interpolation sample point set; The interpolation sample point sets obtained are merged to generate the interpolation data set.

4. The electricity theft detection method based on oversampling and improved random forest according to claim 3 is characterized in that: The sample interpolation of the clusters where the cluster centers are located includes: Perform sample interpolation on the clusters where each cluster center is located according to the following formula: ; In the formula, represents the cluster center of the i-th cluster, For the corresponding The interpolation dataset, is the data in the i-th cluster except the cluster center, Represents a random number between 0 and 1.

5. The electricity theft detection method based on oversampling and improved random forest according to claim 1 is characterized in that: The optimal number of decision trees for the random forest iterated according to the ant colony algorithm includes: Define the root mean square error of the classification effect of the random forest classifier as the fitness function of the ant colony algorithm and initialize the parameters of the ant colony algorithm; Construct an ant population, randomly place each ant at a different starting point, and calculate the next city to be visited by each ant until all ants have visited all cities; Calculate the length of the path that each ant has taken, record the optimal solution (i.e. the shortest path) in the current iteration, and update the pheromone concentration on the paths connecting each city; After each iteration, determine whether the maximum number of iterations has been reached. If not, clear the record table of the ant paths and return to continue the optimization search; otherwise, terminate the calculation and output the current optimal solution as the optimal number of decision trees for the random forest.

6. An electricity theft detection system based on oversampling and improved random forest, characterized in that: include: A data acquisition module is used to acquire the electricity consumption data of each user in a detection cycle, construct a data set, and determine typical characteristic indicators of electricity theft detection based on the data set; A sample determination module, for dividing the data set into a normal user set and an electricity theft user set according to whether there is a record of electricity theft, clustering the electricity theft user set to obtain a plurality of clusters, performing interpolation processing on each cluster using a SMOTE algorithm to generate an interpolated data set, obtaining a balanced user electricity usage sample according to the data set and the interpolated data set, and dividing the user electricity usage sample into a training set and a test set; A training module, used for constructing a random forest classifier, using the training set to train the random forest classifier based on the typical characteristic indicators of electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold, wherein the number of decision trees of the random forest classifier is optimized by using an ant colony algorithm; A testing module, used to substitute the data of the test set into the trained random forest classifier and output the corresponding electricity theft detection result; The typical characteristic indicators of electricity theft detection include voltage imbalance, rated voltage deviation, current imbalance, current correlation coefficient and power factor. The typical characteristic indicators of electricity theft detection are determined according to the data set, including: Calculate the voltage unbalance according to the following formula: ; In the formula, is the three-phase voltage unbalance, is the average value of the user's three-phase voltage, is the i-th phase voltage, for and The absolute value of the difference; Calculate the rated voltage deviation according to the following formula: ; In the formula, For voltage With rated voltage The voltage deviation between Calculate the current unbalance according to the following formula: ; In the formula, is the three-phase current unbalance, is the average value of the user's three-phase current, is the i-th phase current, for and The absolute value of the difference; The current correlation coefficient is calculated according to the following formula: ; in ; ; ; In the formula, represents the current correlation coefficient, is the current correlation coefficient between phase A and phase B, is the current correlation coefficient between phase B and phase C, is the current correlation coefficient between phase A and phase C, is the covariance of the currents of phase A and phase B, is the covariance of the currents of phase B and phase C, is the covariance of the currents of phase A and phase C, is the standard deviation of phase A current, is the standard deviation of phase B current, is the standard deviation of phase C current; Calculate the power factor as follows: ; Where λ is the power factor, is the active power, is the reactive power; The training module is specifically used for: Iterate the optimal number of decision trees for the random forest according to the ant colony algorithm, and set the decision tree according to the optimal number of decision trees; For each decision tree, a plurality of training samples are extracted from the training set using the Booststrap method, a new decision tree is generated using the training samples, and each of the generated new decision trees is trained separately.

7. An electricity theft detection device based on oversampling and improved random forest, characterized in that: include: A memory for storing instructions; wherein the instructions are used to implement the electricity theft detection method based on oversampling and improved random forest according to any one of claims 1 to 5; A processor is used to execute instructions in the memory.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the electricity theft detection method based on oversampling and improved random forest is implemented as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Unbalanced data set-oriented extreme learning machine based transformer fault diagnosis method

    CN108875783A

  • Transformer fault detection method based on ant colony algorithm optimization random forest

    CN109142946A

  • Electricity stealing identification method based on curve similarity and ensemble learning algorithm

    CN113033598A

  • Commercial building energy consumption prediction optimization method and system

    CN113282122A

  • Droop control method for PCS parallel common-mode circulating current

    CN113949304A

Cited By

  • Electricity stealing user identification method based on R-RF model

    CN116522257A

  • Method for identifying electricity stealing users based on R-RF model

    CN116522257B

  • Automatic electricity stealing detection method and electric power metering box

    CN119782755A

  • An automated electricity theft detection method and an electricity metering box

    CN119782755B