Method for identifying electricity stealing users based on R-RF model
By combining the R-RF model with the multiple correlation coefficient and the random forest algorithm, the problems of missing data and insufficient correlation analysis of line loss in electricity theft detection are solved, achieving efficient and accurate identification of electricity theft users and improving the economy and security of power grid operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHANG COUNTY POWER SUPPLY CO OF STATE GRID FUJIAN ELECTRIC POWER CO LTD
- Filing Date
- 2023-03-06
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies lack data preprocessing and line loss correlation analysis in electricity theft detection, resulting in large model errors, high false judgment rates, and difficulty in accurately identifying electricity theft users.
Using an R-RF model-based approach, the multiple correlation coefficient is calculated through real-time line loss fluctuation anomalies and canonical correlation analysis. Combined with the random forest algorithm, voting classification is performed to identify electricity theft users.
This improved the accuracy and efficiency of identifying electricity theft users, reduced errors, and ensured the economy and security of power grid operation.
Smart Images

Figure CN116522257B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for identifying electricity theft users based on the R-RF model. Background Technology
[0002] Electricity theft by users not only causes huge revenue losses for power companies, but also leads to a surge in electricity demand, overloading of the power system, and threats to public safety (such as fires and electric shocks).
[0003] Existing technologies, such as the method, system, and apparatus for detecting electricity theft based on oversampling and improved random forest disclosed in CN202210290055.5, construct a dataset based on user electricity consumption data, determine typical feature indicators for electricity theft detection based on this dataset, cluster the electricity theft user data in the dataset using the fuzzy C-means algorithm, perform interpolation processing on each obtained cluster using the SMOTE algorithm to achieve dataset balancing, and construct a random forest classifier. The random forest classifier is trained using the balanced dataset training data based on the typical feature indicators for electricity theft detection until the classification accuracy of the random forest classifier reaches a threshold. Ant colony optimization is used to optimize the number of decision trees in the random forest classifier. Finally, the test set data is substituted into the trained random forest classifier to output the corresponding electricity theft detection results.
[0004] Existing technologies have drawbacks:
[0005] 1. The existing technical model lacks data for preprocessing. If the data is missing, it can easily lead to an increase in model error, thereby affecting the accuracy of the judgment of electricity theft users;
[0006] 2. The electricity theft detection methods, systems and devices based on oversampling and improved random forests lack correlation analysis with actual line loss. Line loss is an important indicator reflecting electricity theft by users. Adding some indicators to the analysis of the causes of wire detachment can improve the detection rate of electricity theft users, thereby reducing the false positives of disconnected wiring. Summary of the Invention
[0007] The purpose of this invention is to reduce the negative impact of electricity theft on power grid operations, improve the detection capability of electricity theft, and increase the accuracy of identifying electricity theft users. It provides a method for identifying electricity theft users based on the R-RF model. This method uses a real-time line loss fluctuation anomaly-based anti-theft approach. Canonical correlation analysis is used to calculate the multiple correlation coefficient between actual user electricity consumption and line loss rate to first identify suspected electricity theft users. Then, a random forest algorithm is used to further classify the users through voting. This model can more accurately identify electricity theft users and reduce errors.
[0008] To achieve the above objectives, the technical solution of the present invention is: a method for identifying electricity theft users based on the R-RF model. This method uses an anti-electricity theft method based on real-time line loss fluctuation anomalies. It first uses canonical correlation analysis to calculate the multiple correlation coefficient between actual user electricity consumption and line loss rate to determine suspected electricity theft users. Then, it uses a random forest algorithm to vote and classify the electricity theft users again, thereby achieving the identification of electricity theft users.
[0009] In one embodiment of the present invention, the multiple correlation coefficient is the coefficient used to measure the correlation between a variable y and multiple variables x1, x2, ..., xn. k The correlation coefficient between x1, x2, ..., x is constructed. k The linear combination of x1, x2, ..., x3 is used as the variable y, and the correlation coefficient between the linear combination and y is calculated. k The multiple correlation coefficient between them; the specific calculation process is as follows:
[0010] Let y be the relationship between x1, x2, ..., x k By regression, we get:
[0011]
[0012] Calculate y and The multiple correlation coefficient is obtained as follows:
[0013]
[0014] Through derivation, we obtain:
[0015]
[0016] The range of the multiple correlation coefficient is [0,1].
[0017] In one embodiment of the present invention, the method establishes an R-RF electricity theft user identification model based on the complex correlation coefficient R combined with the random forest algorithm RF. The calculated complex correlation coefficient between actual user electricity consumption and line loss rate is used to first determine suspected electricity theft users. Then, the random forest algorithm is used to further classify and identify electricity theft users through voting. The specific implementation is as follows:
[0018] (1) Collect user electricity consumption data and line loss rate data of the transformer area to form raw data;
[0019] (2) Preprocess the raw data and remove users with missing electricity consumption data;
[0020] (3) Calculate the original data using the multiple correlation coefficient, and retain users whose multiple correlation coefficient meets 0.995 in the initial dataset;
[0021] (4) Randomly select k training sets with replacement from the initial dataset;
[0022] (5) For each training set selected in step (4), randomly find m features and build a decision tree based on the randomly selected samples with replacement and the randomly selected features.
[0023] (6) Repeat steps (4) and (5) to generate n decision trees, and each decision tree grows to the maximum extent possible without cutting off branches;
[0024] (7) By summing up all the decision trees to make predictions, the majority voting strategy is used to classify and decide which users steal electricity.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] 1. Work efficiency: Data models can quickly locate electricity theft users and specifically identify users who have engaged in electricity theft, significantly increasing the efficiency and accuracy of anti-electricity theft work.
[0027] 2. Economic benefits: Electricity theft by users not only causes a huge waste of electricity, but also causes considerable economic losses to power grid companies. Anti-theft measures can provide benefits and security for residents' electricity use, and also ensure the economic interests of power companies. Attached Figure Description
[0028] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0029] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.
[0030] This invention discloses a method for identifying electricity theft users based on the R-RF model. The method uses an anti-theft approach based on real-time line loss fluctuation anomalies. It first uses canonical correlation analysis to calculate the multiple correlation coefficient between actual user electricity consumption and line loss rate to identify suspected electricity theft users. Then, it uses a random forest algorithm to classify the users into electricity theft users through voting, thus achieving the identification of electricity theft users.
[0031] The following is a detailed implementation process of the present invention.
[0032] 1. Data Preprocessing
[0033] To reduce the impact of data on the proposed model, the raw data of user electricity consumption was preprocessed, and users with missing electricity consumption data were processed separately and removed first.
[0034] 2. Establish a recognition model
[0035] This paper proposes an R-RF (Related Concordance Coefficient - Random Forest) model for identifying electricity theft users, based on real-time line loss fluctuation anomalies. The model uses canonical correlation analysis to calculate the R-RF correlation coefficient between actual user electricity consumption and line loss rate to initially identify suspected electricity theft users. Then, the Random Forest algorithm is used for a second voting classification to definitively identify the actual users. This model can more accurately identify electricity theft users and reduce errors. The model includes data preprocessing, R-RF discrimination of the original dataset using the R-RF correlation coefficient, and classification decision using the Random Forest model. The flowchart of the R-RF electricity theft user identification model is shown below. Figure 1 As shown.
[0036] The R-RF electricity theft user identification model preprocesses the raw data, then uses a decision tree as a classifier. Building upon random sampling with replacement, it further incorporates random feature selection, resulting in more accurate identification of electricity theft users. The model steps are as follows:
[0037] (1) Collect user electricity consumption and line loss rate data of the transformer area.
[0038] (2) Preprocess the raw data.
[0039] (3) Use the multiple correlation coefficient to calculate the original data. Users whose multiple correlation coefficient is 0.995 are retained in the initial dataset.
[0040] (4) Randomly select k training sets with replacement from the initial dataset.
[0041] (5) For each training set, randomly select m features and build a decision tree based on the randomly selected samples with replacement and the randomly selected features.
[0042] (6) Repeat steps (4) and (5) to generate n decision trees, and each decision tree grows to the maximum extent possible without cutting off branches.
[0043] (7) By summing up all the decision trees to make predictions, the majority voting strategy is used to classify and decide which users steal electricity.
[0044] The above are preferred embodiments of the present invention. Any changes made to the technical solution of the present invention that do not exceed the scope of the technical solution of the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for identifying electricity theft users based on the R-RF model, characterized in that, This method is an anti-electricity theft method based on real-time line loss fluctuation anomalies. It establishes an R-RF electricity theft user identification model based on the complex correlation coefficient (R) combined with the random forest algorithm (RF). First, the calculated complex correlation coefficient between actual user electricity consumption and line loss rate is used to identify suspected electricity theft users. Then, the random forest algorithm is used to further classify and categorize users into those suspected of theft. The specific implementation is as follows: (1) Collect user electricity consumption data and line loss rate data of the transformer area to form raw data; (2) Preprocess the raw data and remove users with missing electricity consumption data; (3) Calculate the original data using the multiple correlation coefficient, and retain users whose multiple correlation coefficient meets 0.995 in the initial dataset; (4) Randomly select k training sets with replacement from the initial dataset; (5) For each training set selected in step (4), randomly find m features and build a decision tree based on the randomly selected samples with replacement and the randomly selected features. (6) Repeat steps (4) and (5) to generate n decision trees, and each decision tree grows to the maximum extent possible without cutting off branches; (7) By summing up all the decision trees to make predictions, the majority voting strategy is used to classify and decide which users steal electricity.
2. The method for identifying electricity theft users based on the R-RF model according to claim 1, characterized in that, The multiple correlation coefficient, which measures the correlation between a variable y and multiple variables x1, x2, ..., xc, is used to determine the correlation between a variable y and multiple variables x1, x2, ..., xc. k The correlation coefficient between x1, x2, ..., x is constructed. k The linear combination of x1, x2, ..., x3 is used as the variable y, and the correlation coefficient between the linear combination and y is calculated. k The multiple correlation coefficient between them; the specific calculation process is as follows: Let y be the ratio of x1, x2, ..., x k By regression, we get: Calculate y and The multiple correlation coefficient is obtained as follows: Through derivation, we obtain: The range of the multiple correlation coefficient is [0,1].
Citation Information
Patent Citations
Electricity theft detection method, system and device based on oversampling and improved random forest
CN114610706B
System and method for diagnosing electricity stealing on basis of decision tree algorithms
CN106355209A
Discovering method for electricity stealing behavior based on random forest
CN107862347A