Automatic electricity stealing detection method and electric power metering box

Through the improved selection coefficient of power stolen data and SMOTE algorithm, combined with the random forest classifier, the problem of power stolen data is solved, and the recognition accuracy of power stolen data and the ability to identify different power stolen methods are improved.

CN119782755AActive Publication Date: 2025-04-08广东佰林电气设备厂有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510278947.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-04-08
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

The existing detection methods for power theft detection are low due to the imbalance of power theft data, making it difficult to effectively distinguish the power theft data generated by different power theft methods.

Method used

By obtaining the user's historical electricity consumption data, calculating typical characteristic indicators of power theft detection, using support vector machines for binary classification, counting the overlapping area distance and local power theft density of power theft data, constructing the selection coefficient of power theft data, and improving the SMOTE algorithm for balancing processing, and finally using a random forest classifier for power theft detection.

Benefits of technology

Effectively evaluate the overlap area distance between the power stolen data and normal data in the power consumption data set, improve the identification accuracy of the power stolen data, avoid the distribution of the synthetic power stolen data at the boundary of positive and negative samples, and enhance the identification ability of different power stolen methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782755A_ABST
    Figure CN119782755A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electricity larceny detection, in particular to an automatic electricity larceny detection method and an electric power metering box, and the method comprises the steps: obtaining all electricity consumption data of each user in a historical detection period, and forming an electricity consumption data set; calculating all electricity larceny detection typical characteristic indexes of each piece of electricity consumption data; electricity stealing data are screened out from the electricity utilization data set by using the electricity stealing records; constructing a selection coefficient of the electricity stealing data based on the electricity utilization data set; improving a method for calculating a sample distance in an SMOTE algorithm by using a selection coefficient so as to carry out balance processing on the power utilization data set; and training a random forest classifier based on the balanced user electricity consumption sample, and carrying out electricity stealing detection on the user electricity consumption data. The invention aims to improve the recognition precision of the electricity stealing data in the obtained electricity consumption data by the subsequently used electricity stealing detection method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of power theft detection, and in particular to an automated power theft detection method and a power meter box. Background Art

[0002] The electricity meter box is an electrical device used to measure electric energy. By combining the automated electricity theft detection method with the electricity meter box, the safety and reliability of the power system can be effectively improved and the economic losses caused by electricity theft can be reduced.

[0003] Since the number of electricity theft users is relatively small compared to all users and the workload of searching for electricity theft users one by one is large, it is difficult to collect electricity theft data, which will cause the imbalance of electricity theft data in the electricity consumption data set used by the existing electricity theft detection methods based on machine learning and neural networks, thereby affecting the accuracy of these methods. In order to solve this imbalance of electricity theft data, oversampling technology is usually used to balance the electricity consumption data set, such as the electricity theft detection method, system and device based on oversampling and improved random forest disclosed in publication number CN114610706B, which uses the SMOTE algorithm to oversample the electricity theft data in the data set used in the electricity theft detection method based on random forest.

[0004] However, the traditional SMOTE algorithm does not take into account that the electricity theft data in the acquired electricity consumption data set may be prone to uneven sample distribution due to different electricity theft methods. This will cause the synthesized new electricity theft data samples to be easily distributed at the boundary of positive and negative samples and problems with the distribution of a few samples, making it impossible for the balanced electricity consumption data set to effectively distinguish the electricity theft data generated by different electricity theft methods in the electricity consumption data set, thereby affecting the recognition accuracy of the electricity theft detection method based on random forest for the electricity theft data generated by each electricity theft method in the electricity consumption data. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides an automated electricity theft detection method and an electricity meter box, and the technical solutions adopted are as follows: In a first aspect, an embodiment of the present application provides an automated electricity theft detection method, the method comprising the following steps: Step 1: Obtain all electricity consumption data of each user in a historical detection cycle and form an electricity consumption data set; calculate all typical characteristic indicators of electricity theft detection for each electricity consumption data; and use the electricity theft records to filter out the electricity theft data from the electricity consumption data set; Step 2: Construct the selection coefficient of electricity theft data based on the electricity consumption data set; specifically including: S1, using all typical characteristic indicators of electricity theft detection, maps all electricity consumption data in the electricity consumption data set to the data space; uses support vector machine to perform binary classification on all electricity consumption data in the data space according to whether it is electricity theft data, and outputs the linear equation of the separating hyperplane; S2, counting the number of positive and negative values ​​in the result after all the electricity theft data are brought into the linear equation, so as to determine the overlapping set of electricity theft data; and judging whether each electricity theft data in the data space belongs to the overlapping set of electricity theft data, so as to determine the overlapping area distance of each electricity theft data; S3, clustering all electricity theft data in the data space; setting a hypersphere with a preset radius with any electricity theft data that is not the cluster center in any cluster as the center; recording the number of all electricity theft data belonging to the cluster where the electricity theft data is located within the hypersphere as the local electricity theft density of the electricity theft data; S4, determining the importance of the electricity theft feature of the electricity theft data by using the distance between the electricity theft data and the cluster center of the cluster to which it belongs and the local electricity theft density of the electricity theft data; S5, determining the selection coefficient of the electricity theft data by using the overlapping area distance and the importance of the electricity theft feature; Step 3: Use the selection coefficient to improve the method of calculating sample distance in the SMOTE algorithm to balance the electricity consumption data set; and train a random forest classifier based on the balanced user electricity consumption samples to detect electricity theft on the user electricity consumption data.

[0006] Preferably, the electricity consumption data includes three-phase current and three-phase voltage; the typical characteristic indicators of electricity theft detection include voltage imbalance, rated voltage deviation, current imbalance and power factor.

[0007] Preferably, the method of mapping all electricity usage data in the electricity usage data set into the data space by using all kinds of typical characteristic indicators for electricity theft detection is: Each electricity theft detection characteristic index of the electricity consumption data in the electricity consumption data set is taken as a dimension to construct the data space of the electricity consumption data set, and all electricity consumption data in the electricity consumption data set are mapped to the data space.

[0008] Preferably, the method for determining the overlapping set of electricity theft data is: The coordinates of each electricity theft data in the data space are substituted into the linear equation of the separating hyperplane respectively, and the result of the equation is recorded as the signed distance of the corresponding electricity theft data; the electricity theft data sets consisting of all the electricity theft data with signed distances greater than 0 and less than 0 in the data space are obtained respectively, and the electricity theft data set with the smallest number of elements in the set is recorded as the electricity theft data overlapping set.

[0009] Preferably, the method for determining the overlapping area distance of each electricity theft data is: When the electricity theft data belongs to the electricity theft data overlapping set, the overlapping area distance of the electricity theft data is assigned a value of 0; Otherwise, the value assigned is the absolute value of the sign distance corresponding to the electricity theft data.

[0010] Preferably, the method for determining the importance of the electricity theft feature of the electricity theft data is: The ratio of the distance between the electricity theft data and the cluster center of the cluster in which it is located to the local electricity theft density of the electricity theft data is used as the electricity theft feature importance of the electricity theft data.

[0011] Preferably, the selection coefficient of the electricity theft data is determined by the product of the overlapping area distance of the electricity theft data and the importance of electricity theft characteristics.

[0012] Preferably, the method of calculating the sample distance in the SMOTE algorithm by using the selection coefficient to perform a balancing process on the electricity consumption data set includes: The SMOTE algorithm is used to perform interpolation processing on each cluster in the data space to generate an interpolation data set for each cluster; The union of the interpolation data sets of all clusters and the power consumption data set is used as the balanced power consumption data set after the power consumption data set is balanced; When the SMOTE algorithm is used to interpolate each cluster in the data space, the cluster center of the cluster is used as the root sample in the SMOTE algorithm, and the Euclidean distance between the electricity theft data in the cluster and the root sample is replaced by the inverse of the selection coefficient of the electricity theft data.

[0013] Preferably, the method of training a random forest classifier based on the user electricity usage samples after balancing processing and performing electricity theft detection on the user electricity usage data includes: The balanced electricity consumption dataset is divided into a training set E1 and a test set E2; Construct a random forest classifier, and use the training set E1 and the test set E2 as the training set and test set of the random forest classifier respectively; The user's electricity consumption data collected in real time by the power meter box is substituted into the trained random forest classifier to output the user's electricity theft detection result.

[0014] In a second aspect, another embodiment of the present application provides an electricity meter box, 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 automated electricity theft detection method when executing the computer program.

[0015] The embodiments of the present application have at least the following beneficial effects: The present application obtains the distance of the overlapping area of ​​the indicator, and can accurately evaluate the distance between the electricity theft data in the data space of the acquired electricity consumption data set and the overlapping areas between the electricity theft data and the normal electricity consumption data; the present application obtains the importance of the indicator electricity theft feature, and can accurately evaluate whether the electricity theft data in the data space of the electricity consumption data set contains the special data distribution characteristics of the electricity theft data distribution characteristics of the corresponding electricity theft method that are difficult to be identified by the subsequent electricity theft detection method; the present application selects the neighboring samples of the root sample in the SMOTE algorithm by constructing a selection coefficient in combination with the overlapping area distance and the importance of the electricity theft feature, which can effectively avoid the situation where the synthesized new electricity theft data samples are distributed at the boundary of the positive and negative samples, and avoid the situation where the new electricity theft data samples are difficult to be distributed in the electricity theft data area where a certain electricity theft method in the acquired electricity consumption data set is located, and in the sparse area containing its special data distribution characteristics, thereby improving the recognition accuracy of the electricity theft detection method used subsequently for the electricity theft data in the acquired electricity consumption data. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A flowchart of the steps of an automated electricity theft detection method provided in one embodiment of the present application; Figure 2 A flowchart of a process for constructing selection coefficients for electricity theft data provided by one embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of an automated electricity theft detection method and an electricity meter box proposed in accordance with the present application in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0019] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0020] The following is a detailed description of an automated electricity theft detection method and a specific solution of an electricity meter box provided by the present application in conjunction with the accompanying drawings.

[0021] See also Figure 1 , which shows a flowchart of an automated electricity theft detection method provided by an embodiment of the present application, the method comprising the following steps: Step 1: Obtain all electricity consumption data of each user in a historical detection cycle and form an electricity consumption data set; calculate all typical characteristic indicators of electricity theft detection for each electricity consumption data; and use the electricity theft records to filter out the electricity theft data from the electricity consumption data set.

[0022] This application utilizes the power load management terminal in the power meter box to obtain the power consumption data of each user within a historical detection cycle. The power consumption data includes three-phase current and three-phase voltage. The detection cycle and sampling time interval of the power consumption data are set to 1 month and 15 minutes respectively, which can be set by the implementer.

[0023] The acquired electricity consumption data is preprocessed, and the preprocessing includes using the KNN interpolation method to fill in the missing values ​​of the electricity consumption data, using the Grubbs criterion to process the abnormal values ​​in the electricity consumption data, and using the Min-Max normalization method to normalize the electricity consumption data. The methods used in the preprocessing process are all well-known technologies, and the specific process will not be repeated here.

[0024] The data set constructed from all the preprocessed electricity consumption data is recorded as electricity consumption data set A, and the electricity consumption data in the electricity consumption data set A are marked as electricity theft data and normal electricity consumption data according to whether there is electricity theft record.

[0025] Furthermore, all electricity theft detection characteristic indicators of each electricity consumption data in the electricity consumption data set A are calculated respectively. The typical characteristic indicators of electricity theft detection in this embodiment include voltage imbalance, rated voltage deviation, current imbalance and power factor. The calculation of typical characteristic indicators of electricity theft detection is a well-known technology, and the specific process will not be repeated here.

[0026] Step 2: Construct the selection coefficient of electricity theft data based on the electricity consumption dataset.

[0027] In this application, the construction process flow chart of the selection coefficient of electricity theft data is as shown in the attached Figure 2 As shown, specifically including: S1, using all kinds of typical characteristic indicators of electricity theft detection, all electricity consumption data in the electricity consumption data set are mapped to the data space; using support vector machine to classify all electricity consumption data in the data space according to whether it is electricity theft data, and output the linear equation of the separating hyperplane.

[0028] The synthesis of new samples in the SMOTE algorithm depends on the selection of root samples and neighbor samples. The traditional SMOTE algorithm takes all minority samples as root samples and uses Euclidean distance to select the K nearest neighbor samples of the root samples as neighbor samples. Although the existing method uses the cluster center of the cluster as the root sample to alleviate the situation where the new samples of electricity theft data synthesized in the SMOTE algorithm are distributed at the boundary of positive and negative samples, it does not consider that the selection of neighbor samples will also cause the new samples of electricity theft data synthesized to be distributed at the boundary of positive and negative samples.

[0029] Therefore, in order to avoid the situation where the synthesized new samples of electricity theft data are distributed at the boundary between positive and negative samples, the following processing is performed.

[0030] S11, specifically, taking each electricity theft detection characteristic index of the electricity data in the electricity data set A as a dimension, constructing a data space V of the electricity data set A, and mapping all electricity data in the electricity data set A to the data space V.

[0031] S12, further, using a support vector machine (SVM) algorithm to perform binary classification processing on all electricity usage data in the data space V, wherein the labels of electricity theft data and normal electricity usage data in the electricity usage data are set to 1 and 0 respectively, and the linear equation P of the separating hyperplane is output. The SVM algorithm is a well-known technology, and the specific process will not be repeated here.

[0032] S2, counting the number of positive and negative values ​​in the result after all electricity theft data are brought into the linear equation to determine the overlapping set of electricity theft data; and judging whether each electricity theft data in the data space belongs to the overlapping set of electricity theft data, so as to determine the overlapping area distance of each electricity theft data.

[0033] Since the data distribution characteristics between electricity theft data and normal electricity consumption data are usually quite different, only a few electricity theft data have relatively similar electricity consumption data distribution characteristics with normal electricity consumption data, so that most of the electricity theft data in the data space V are on one side of the separation hyperplane, and a small number of electricity theft data are on the other side.

[0034] Therefore, in order to accurately evaluate the distance between the electricity theft data in the data space V and the overlapping area between the electricity theft data and the normal electricity usage data, and to prevent the SMOTE algorithm from synthesizing too many new samples of electricity theft data in the overlapping area, the following processing is performed.

[0035] S21, specifically, the coordinates of each electricity theft data in the data space V are respectively substituted into the linear equation P of the separating hyperplane, and the result of the substituted equation is recorded as the signed distance of each electricity theft data, wherein the smaller the absolute value of the signed distance is, the smaller the distance from the electricity theft data to the separating hyperplane is, and when the signed distance is greater than 0, the electricity theft data is on the positive normal vector direction side of the separating hyperplane, and when the signed distance is less than 0, the electricity theft data is on the negative normal vector direction side of the separating hyperplane, and when the signed distance is equal to 0, the electricity theft data is on the separating hyperplane.

[0036] A set of electricity theft data consisting of all electricity theft data with a symbol distance greater than 0 and less than 0 in the data space V is obtained respectively, and the set of electricity theft data with the smallest number of set elements is recorded as the electricity theft data overlapping set B, which is used to characterize the set consisting of all electricity theft data in the overlapping area between the electricity theft data and the normal electricity usage data in all the electricity theft data in the data space V.

[0037] S22, further, taking the electricity theft data a in the data space V as an example, the overlapping area distance D(a) of the electricity theft data a is obtained, which is used to characterize the distance between the overlapping area between the electricity theft data a and the electricity theft data and the normal electricity consumption data in the data space V: , where D1(a) represents the signed distance of electricity theft data a; B represents the overlapping set of electricity theft data.

[0038] It should be understood that the smaller the distance between the electricity theft data a and the overlapping area between the electricity theft data and the normal electricity usage data in the data space V, that is, the smaller the overlapping area distance D(a), the less likely the electricity theft data a will be used as a neighboring sample of the root sample in the SMOTE algorithm in order to avoid the SMOTE algorithm synthesizing too many new samples of electricity theft data in the overlapping area.

[0039] S3, clustering all electricity theft data in the data space; setting a hypersphere with a preset radius with any electricity theft data that is not the cluster center in any cluster as the center; recording the number of all electricity theft data belonging to the cluster where the electricity theft data is located within the hypersphere as the local electricity theft density of the electricity theft data.

[0040] Secondly, since the collected electricity theft data will have different data distribution characteristics due to the different electricity theft methods used by the electricity theft users, the electricity theft data in the acquired electricity consumption data set will easily have uneven sample distribution due to the different electricity theft methods. This will cause the new electricity theft data samples synthesized by the SMOTE algorithm using nearest neighbor samples to be mainly distributed in the dense area where the cluster center of the cluster is located, but it is difficult to synthesize more new electricity theft data samples in the sparse area containing the special data distribution characteristics of a certain electricity theft method in the electricity consumption data set. As a result, it is difficult for the subsequent electricity theft detection method based on random forest to effectively extract the special data distribution characteristics of the electricity theft method in its sparse electricity theft data area, thereby affecting the recognition accuracy of the electricity theft detection method for the electricity theft data generated by the electricity theft method.

[0041] Therefore, in order to avoid the situation where the synthesized new electricity theft data samples are difficult to be distributed in the sparse area containing the special data distribution characteristics of a certain electricity theft method in the acquired electricity usage data, the following processing is performed.

[0042] S31. Specifically, in this embodiment, the neighbor propagation clustering algorithm (AP) is used to classify all electricity theft data in the data space V to obtain multiple clusters in the data space V and the cluster center of each cluster. Each cluster corresponds to an electricity theft data area in the data space V corresponding to an electricity theft method in the applied electricity data set A. The damping factor, preference parameter, number of clustering iterations, and maximum number of iterations in the AP clustering algorithm all take default values. The AP clustering algorithm is a well-known technology, and the specific process will not be repeated here.

[0043] S32. Further, taking the j-th electricity theft data C(i,j) in the i-th cluster C(i) in the data space V (excluding the electricity consumption data corresponding to the cluster center in the cluster C(i)) as an example, a hypersphere g(i,j) is set with the electricity theft data C(i,j) as the center, and the radius of the hypersphere is set to 3 unit lengths, which is a preset radius in this embodiment and can be set by the implementer.

[0044] The number of all electricity theft data belonging to the cluster C(i) within the hypersphere g(i,j) is recorded as the local electricity theft density of the electricity theft data C(i,j), which is used to characterize the number of electricity theft data in the cluster C(i,j) in the local space where the electricity theft data C(i,j) is located.

[0045] S4, determining the importance of the electricity theft feature of the electricity theft data by using the distance between the electricity theft data and the cluster center of the cluster to which it belongs and the local electricity theft density of the electricity theft data.

[0046] Furthermore, the distance between the electricity theft data C(i,j) and the cluster center of the cluster C(i) to which it belongs and the local electricity theft density of the electricity theft data C(i) are used to obtain the electricity theft feature importance U(i,j) of the electricity theft data C(i,j), which is used to characterize the possibility that the electricity theft data distribution features carried in the local area where the electricity theft data C(i,j) is located belong to the special data distribution features of the electricity theft data distribution features of the electricity theft method corresponding to the cluster C(i) and are difficult to be identified by the subsequent electricity theft detection method: , where d(i,j) represents the Euclidean distance between the electricity theft data C(i,j) and the cluster center of its cluster C(i); (i, j) represents the local electricity theft density of the electricity theft data C(i, j).

[0047] It should be understood that the farther the distance between the electricity theft data C(i,j) and the regional center of the cluster C(i) to which it belongs, that is, the larger d(i,j), the greater the difference between the electricity theft data distribution characteristics carried by the local area where the electricity theft data C(i,j) is located and the main electricity theft data distribution characteristics of the electricity theft method corresponding to the cluster C(i), and the smaller the number of electricity theft data in the local space where the electricity theft data C(i,j) is located, that is, The smaller (i, j), the more likely the local area where the electricity theft data C(i, j) is located will carry the special data distribution characteristics of the electricity theft method corresponding to the cluster C(i) that are difficult to be identified by the subsequent electricity theft detection method. That is, the greater the importance of the electricity theft feature U(i, j), the more likely the electricity theft data C(i, j) will be used as the neighboring sample of the root sample in the SMOTE algorithm in order to reduce the situation where the new synthesized sample distribution is difficult to be distributed in the sparse area containing the special data distribution characteristics of the electricity theft data area where a certain electricity theft method is located in the acquired electricity consumption data due to improper selection of neighboring samples.

[0048] S5, determining a selection coefficient of the electricity theft data by using the overlapping area distance and the importance of the electricity theft feature.

[0049] Furthermore, the overlapping area distance D(i,j) and the importance of electricity theft features U(i,j) of the electricity theft data C(i,j) are used to obtain the selection coefficient W(i,j) of the electricity theft data C(i,j), which is used to characterize the possibility of the electricity theft data C(i,j) being selected as the neighboring sample when the electricity theft data in the cluster C(i) is synthesized into new electricity theft data samples using the SMOTE algorithm: W(i,j)=D(i,j)*U(i,j), where D(i,j) and U(i,j) represent the overlapping area distance and the importance of electricity theft features of the electricity theft data C(i,j), respectively.

[0050] Step 3: Use the selection coefficient to improve the method of calculating sample distance in the SMOTE algorithm to balance the electricity consumption data set; and train a random forest classifier based on the balanced user electricity consumption samples to detect electricity theft on the user electricity consumption data.

[0051] Furthermore, taking cluster C(i) as an example, the SMOTE algorithm is used to interpolate cluster C(i) to generate an interpolated data set , wherein the cluster center of cluster C(i) is used as the root sample in the SMOTE algorithm, and the Euclidean distance between the electricity theft data and the root sample in cluster C(i) is replaced by the inverse of the selection coefficient of the electricity theft data. The SMOTE algorithm is a well-known technology, and the specific process is not repeated here.

[0052] Using and interpolating datasets The same method is used to generate interpolation data sets for each cluster in the data space V, and the union of all the interpolation data sets obtained and the power consumption data set A is recombined as the balanced power consumption data set E after balancing the power consumption data set A, and the balanced power consumption data set is divided into a training set E1 and a test set E2.

[0053] Furthermore, a random forest classifier is constructed, wherein the training set E1 and the test set E2 are used as the training set and the test set of the random forest classifier respectively. The specific training process is a well-known technology and will not be described in detail.

[0054] The electricity consumption data of a certain user collected in real time by the power meter box is substituted into the trained random forest classifier, and the electricity theft detection result of the user is output to complete the automated electricity theft detection.

[0055] The embodiment of the present application also proposes an electric power meter box, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the steps of the above-mentioned automatic electricity theft detection method when executing the computer program. Since an automatic electricity theft detection method has been described in detail above, it will not be repeated here.

[0056] The various embodiments in the present application are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0057] It should be noted that, unless otherwise specified and limited, terms such as "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such article or device. In the absence of further restrictions, an element defined by the sentence "including one..." does not exclude the existence of other identical elements in the article or device including the element. In addition, the term "and\or" used herein includes any and all combinations of one or more related listed items.

[0058] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not invented by the present application.

[0059] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. An automated electricity theft detection method, characterized in that: The method comprises the following steps: Step 1: Obtain all electricity consumption data of each user in a historical detection cycle and form an electricity consumption data set; calculate all typical characteristic indicators of electricity theft detection for each electricity consumption data; and use the electricity theft records to filter out the electricity theft data from the electricity consumption data set; Step 2: Construct the selection coefficient of electricity theft data based on the electricity consumption data set; specifically including: S1, using all typical characteristic indicators of electricity theft detection, maps all electricity consumption data in the electricity consumption data set to the data space; uses support vector machine to perform binary classification on all electricity consumption data in the data space according to whether it is electricity theft data, and outputs the linear equation of the separating hyperplane; S2, counting the number of positive and negative values ​​in the result after all the electricity theft data are brought into the linear equation, so as to determine the overlapping set of electricity theft data; and judging whether each electricity theft data in the data space belongs to the overlapping set of electricity theft data, so as to determine the overlapping area distance of each electricity theft data; S3, clustering all electricity theft data in the data space; setting a hypersphere with a preset radius with any electricity theft data that is not the cluster center in any cluster as the center; recording the number of all electricity theft data belonging to the cluster where the electricity theft data is located within the hypersphere as the local electricity theft density of the electricity theft data; S4, determining the importance of the electricity theft feature of the electricity theft data by using the distance between the electricity theft data and the cluster center of the cluster to which it belongs and the local electricity theft density of the electricity theft data; S5, determining the selection coefficient of the electricity theft data by using the overlapping area distance and the importance of the electricity theft feature; Step 3: Use the selection coefficient to improve the method of calculating sample distance in the SMOTE algorithm to balance the electricity consumption data set; and train a random forest classifier based on the balanced user electricity consumption samples to detect electricity theft on the user electricity consumption data.

2. The automatic electricity theft detection method according to claim 1, characterized in that: The electricity consumption data includes three-phase current and three-phase voltage; the typical characteristic indicators of electricity theft detection include voltage imbalance, rated voltage deviation, current imbalance and power factor.

3. The automatic electricity theft detection method according to claim 1, characterized in that: The method of mapping all electricity consumption data in the electricity consumption data set into the data space by using all kinds of typical characteristic indicators of electricity theft detection is as follows: Each electricity theft detection characteristic index of the electricity consumption data in the electricity consumption data set is taken as a dimension to construct the data space of the electricity consumption data set, and all electricity consumption data in the electricity consumption data set are mapped to the data space.

4. The automatic electricity theft detection method according to claim 1, characterized in that: The method for determining the overlapping set of electricity theft data is as follows: The coordinates of each electricity theft data in the data space are substituted into the linear equation of the separating hyperplane respectively, and the result of the equation is recorded as the signed distance of the corresponding electricity theft data; the electricity theft data sets consisting of all the electricity theft data with signed distances greater than 0 and less than 0 in the data space are obtained respectively, and the electricity theft data set with the smallest number of elements in the set is recorded as the electricity theft data overlapping set.

5. The automatic electricity theft detection method according to claim 4, characterized in that: The method for determining the overlapping area distance of each electricity theft data is as follows: When the electricity theft data belongs to the electricity theft data overlapping set, the overlapping area distance of the electricity theft data is assigned a value of 0; Otherwise, the value assigned is the absolute value of the sign distance corresponding to the electricity theft data.

6. The automatic electricity theft detection method according to claim 1, characterized in that: The method for determining the importance of the electricity theft feature of the electricity theft data is as follows: The ratio of the distance between the electricity theft data and the cluster center of the cluster in which it is located to the local electricity theft density of the electricity theft data is used as the electricity theft feature importance of the electricity theft data.

7. The automatic electricity theft detection method according to claim 1, characterized in that: The selection coefficient of the electricity theft data is determined by the product of the overlapping area distance of the electricity theft data and the importance of the electricity theft feature.

8. The automatic electricity theft detection method according to claim 1, characterized in that: The method of using the selection coefficient to improve the method of calculating the sample distance in the SMOTE algorithm to balance the electricity consumption data set includes: The SMOTE algorithm is used to perform interpolation processing on each cluster in the data space to generate an interpolation data set for each cluster; The union of the interpolation data sets of all clusters and the power consumption data set is used as the balanced power consumption data set after the power consumption data set is balanced; When the SMOTE algorithm is used to interpolate each cluster in the data space, the cluster center of the cluster is used as the root sample in the SMOTE algorithm, and the Euclidean distance between the electricity theft data in the cluster and the root sample is replaced by the inverse of the selection coefficient of the electricity theft data.

9. An automated electricity theft detection method according to claim 8, characterized in that: The method of training a random forest classifier based on the user electricity usage samples after balancing to detect electricity theft on the user electricity usage data includes: The balanced electricity consumption dataset is divided into a training set E1 and a test set E2; Construct a random forest classifier, and use the training set E1 and the test set E2 as the training set and test set of the random forest classifier respectively; The user's electricity consumption data collected in real time by the power meter box is substituted into the trained random forest classifier to output the user's electricity theft detection result.

10. An electric power meter box, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of an automated electricity theft detection method as claimed in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

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

    CN114610706B

  • Unbalanced data processing method based on clustering and boundary points

    CN112633337A

  • Power consumer electricity stealing identification method and system based on deep learning

    CN113901977A

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

    CN114610706A

  • Software defect prediction method based on improved SMOTE

    CN114706751A