Electric quantity correlation anomaly detection optimization method and device, equipment and medium

Through cleaning and interpolation of daily electricity quantity data, combining global and local correlation analysis, Pearson correlation coefficient and outlier detection algorithm are used to optimize the screening of suspected users of power theft, solving the problem of low accuracy of power theft detection, and achieving more efficient power theft identification and power system management.

CN120067929APending Publication Date: 2025-05-30GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510031855.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When the existing power stolen detection method faces a large number of users in the station area, the accuracy of abnormally suspected users is low. Due to the limitations of data collection, correlation analysis of different time dimensions will draw different conclusions, resulting in insufficient accuracy of power stolen detection.

Method used

By obtaining daily electricity data, cleaning and missing value interpolation, global and local correlations are calculated, outlier users are identified using Pearson correlation coefficient and outlier point detection algorithm, and combined with case set verification, the sorting and filtering of suspected users of power theft are optimized.

Benefits of technology

It improves the accuracy and efficiency of power stolen detection, reduces power loss, improves the accuracy of line loss identification, and optimizes the operating efficiency of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067929A_ABST
    Figure CN120067929A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of line loss management, and discloses an electric quantity correlation anomaly detection optimization method, which comprises the following steps: acquiring daily electric quantity data based on a preset data acquisition instruction, and performing cleaning and missing value interpolation on the daily electric quantity data to obtain standard daily electric quantity data; global correlation and local correlation are calculated according to the standard daily electric quantity data, and outlier users are obtained according to the local correlation; acquiring priorities of outlier users according to the global correlation and the local interval correlation, and sorting suspicion degrees according to the priorities to obtain suspicion users of electricity stealing; and obtaining a case set, verifying the electricity stealing suspected user through the case set, and obtaining a verification result. The accuracy of line loss identification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of line loss management, and in particular to an optimization method, device, equipment and medium for abnormal detection of electricity quantity correlation. Background Technique

[0002] Since the development of electricity to date, it has become an important energy source indispensable in social and economic development and residents' daily lives. With the rapid economic development and the continuous advancement of the urbanization process, the electricity consumption has increased rapidly. The safe and stable supply of electric power resources is closely related to the living standards of the people and national security and stability. The development of electricity plays a crucial role in the national economy.

[0003] In the process of the development of electricity, the non-technical losses caused by electricity theft behavior to power grid companies have always been a difficult problem that power grid companies urgently need to solve. The existing electricity theft detection methods can be roughly divided into three categories: based on game theory, based on electricity consumption behavior patterns, and based on system state methods. And the most effective method of traditional anti-electricity theft is the method based on correlation analysis. However, due to the limitations of data collection, different correlations in different time dimensions will lead to different conclusions. And when performing correlation tests, it usually passes the test. When facing a large number of users in the substation area, a large number of abnormal suspected users will be output, and the accuracy of abnormal suspicion is relatively low. Summary of the Invention

[0004] The present invention provides an optimization method, device, equipment and medium for abnormal detection of electricity quantity correlation, and its main purpose is to improve the accuracy of line loss identification.

[0005] To achieve the above object, an optimization method for abnormal detection of electricity quantity correlation provided by the present invention includes:

[0006] Based on a preset data acquisition instruction, obtain daily electricity quantity data, and clean and impute missing values for the daily electricity quantity data to obtain standard daily electricity quantity data;

[0007] Calculate the global correlation and local correlation according to the standard daily electricity quantity data, and obtain outlier users according to the local correlation;

[0008] Obtain the priority of outlier users according to the global correlation and local interval correlation, and sort the suspicion degree according to the priority to obtain electricity theft suspected users;

[0009] Obtain a case set, and verify the electricity theft suspected users through the case set to obtain a verification result.

[0010] Optionally, the cleaning and missing value imputation of the daily electricity quantity data to obtain standard daily electricity quantity data includes:

[0011] Obtain the line loss rate and the substation area line loss rate in the daily power consumption data, and eliminate the data with the substation area line loss rate less than the preset first threshold and the daily power consumption data with the line loss rate greater than the preset second threshold to obtain the screened daily power consumption data;

[0012] Interpolate and supplement the users with the number of missing power consumption days less than the preset number of days in the screened daily power consumption data, and eliminate the users with constant power consumption. Eliminate the users with the number of missing power consumption days greater than or equal to the preset number of days, and eliminate the users with power consumption less than 1 within the preset event to obtain the standard daily power consumption data.

[0013] Optionally, the calculating the global correlation and the local correlation according to the standard daily power consumption data includes:

[0014] Obtain the user daily power consumption data according to the standard daily power consumption data;

[0015] Obtain the user daily power consumption data in a preset time period to obtain the time period user power consumption data;

[0016] Obtain the substation area line loss power, calculate the Pearson correlation coefficient according to the time period user power consumption and the substation area line loss power, and obtain the global correlation through the Pearson correlation coefficient;

[0017] Obtain the sliding interval power consumption data by setting the sliding interval of the user daily power consumption data;

[0018] Calculate the Pearson correlation coefficient between the sliding interval power consumption data and the substation area line loss power to obtain the sliding correlation coefficient, and obtain the local correlation according to the sliding correlation coefficient.

[0019] Optionally, the obtaining the outlier users according to the local correlation includes:

[0020] Obtain the sliding correlation coefficient in the local correlation, and find outlier users with a large difference from the normal user power consumption behavior through the distance-based outlier detection algorithm and the density-based local outlier factor detection algorithm, and use the outlier users with a large difference from the normal user power consumption behavior as suspected users.

[0021] Optionally, the obtaining the sliding correlation coefficient in the local correlation, and finding outlier users with a large difference from the normal user power consumption behavior through the distance-based outlier detection algorithm and the density-based local outlier factor detection algorithm includes:

[0022] Take the absolute value of the sliding correlation coefficient to obtain the absolute value of the coefficient, and calculate the Euclidean distance between the absolute value of the coefficient and the 0 axis;

[0023] Calculate the Euclidean distance of the sliding correlation coefficients between every two users in the calculation area, calculate the outlier factor of each user through the local reachability density, output the outlier users with the third preset number, and obtain the outlier users with a large difference in electricity consumption behavior from normal users.

[0024] Optionally, the obtaining the priority of the outlier users according to the global correlation and the local interval correlation, and sorting the degree of suspicion according to the priority to obtain the electricity theft suspect users includes:

[0025] Obtain the user set of the global correlation to obtain the global user set, and obtain the intersection of the global user set and the suspect users corresponding to the local interval correlation to obtain the standard screening set;

[0026] Sort the users in the standard screening set according to the priority to obtain the electricity theft suspect users.

[0027] Optionally, the obtaining the case set includes:

[0028] Extract the historical electricity consumption data from the metering automation system and the marketing system of the power company, where the historical electricity consumption data includes the electricity consumption records of normal users and known electricity theft users;

[0029] By sorting out the historical electricity consumption data, label each case as normal electricity consumption or electricity theft behavior to obtain the labeled data;

[0030] Summarize the labeled data into a structured data set to obtain the case set.

[0031] To solve the above problems, the present invention also provides an optimized device for detecting abnormal electricity quantity correlation, and the device includes:

[0032] A data acquisition module, configured to acquire daily electricity quantity data based on a preset data acquisition instruction, and clean and impute missing values for the daily electricity quantity data to obtain standard daily electricity quantity data;

[0033] A user identification module, configured to calculate the global correlation and the local correlation according to the standard daily electricity quantity data, and obtain outlier users according to the local correlation;

[0034] A user screening module, configured to obtain the priority of the outlier users according to the global correlation and the local interval correlation, and sort the degree of suspicion according to the priority to obtain the electricity theft suspect users;

[0035] A result verification module, configured to obtain a case set, verify the electricity theft suspect users through the case set, and obtain a verification result.

[0036] To solve the above problems, the present invention also provides an electronic device, and the electronic device includes:

[0037] At least one processor; and,

[0038] A memory communicatively connected to the at least one processor; wherein,

[0039] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the power correlation anomaly detection optimization method as described above.

[0040] To solve the above problems, the present invention further provides a computer-readable storage medium, including a storage data area and a storage program area. The storage data area stores created data, and the storage program area stores a computer program; wherein, when the computer program is executed by a processor, the power correlation anomaly detection optimization method as described above is implemented.

[0041] Based on a preset data acquisition instruction, the embodiments of the present invention acquire daily power data, clean and impute missing values of the daily power data to obtain standard daily power data; calculate global correlation and local correlation based on the standard daily power data, and obtain outlier users based on the local correlation; obtain the priority of outlier users according to the global correlation and local interval correlation, and perform a suspicion degree ranking according to the priority to obtain electricity theft suspect users; obtain a case set, and verify the electricity theft suspect users through the case set to obtain a verification result. Therefore, the power correlation anomaly detection optimization method, device, electronic device and computer-readable storage medium proposed by the present invention overcome the subjectivity of time dimension parameter selection, and at the same time break through the restriction of the acquisition granularity of the collected data, providing a better method for the management of substation line loss and improving the accuracy of line loss identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic flowchart of a power correlation anomaly detection optimization method provided by an embodiment of the present invention;

[0043] Figure 2 It is a schematic block diagram of a power correlation anomaly detection optimization device provided by an embodiment of the present invention;

[0044] Figure 3 It is a schematic internal structure diagram of an electronic device for implementing the power correlation anomaly detection optimization method provided by an embodiment of the present invention.

[0045] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0047] An embodiment of the present application provides an optimization method for detecting anomalies in power correlation. The execution subject of the optimization method for detecting anomalies in power correlation includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. Among them, the server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. In other words, the optimization method for detecting anomalies in power correlation can be executed by software or hardware installed on a remote device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc.

[0048] Refer to Figure 1 As shown, it is a schematic flowchart of an optimization method for detecting anomalies in power correlation provided by an embodiment of the present invention. In this embodiment, the optimization method for detecting anomalies in power correlation includes the following steps S1 - S4:

[0049] S1. Based on a preset data acquisition instruction, obtain daily power data, and clean and impute missing values for the daily power data to obtain standard daily power data.

[0050] It can be understood that by cleaning dirty data and noise data and imputing missing values, the quality and integrity of the data are ensured, thereby improving the accuracy, effectiveness, and generalization ability of the algorithm, making the anomaly detection results more reliable.

[0051] In an embodiment of the present invention, the data acquisition instruction refers to a set of predefined rules or programs for automatically extracting daily power data within a specific time range and format from a power system database to ensure the accuracy and integrity of the data for subsequent anomaly detection analysis.

[0052] Furthermore, the daily electricity consumption data refers to the record of the electrical energy consumed by a substation area in the power system within one day. The daily electricity consumption data is usually automatically recorded and reported by electricity meters, reflecting the daily electricity consumption patterns and behaviors of the substation area. Specifically, the daily electricity consumption data includes the daily electricity consumption of the substation area, timestamps, electricity meter readings, etc. The daily electricity consumption data is the basic data for the operation and maintenance of the power system and is crucial for aspects such as electricity billing, electricity consumption analysis, load forecasting, power grid planning, and anomaly detection (such as electricity theft detection) of power companies. By analyzing the daily electricity consumption data, abnormal electricity consumption patterns can be identified, such as sudden increases or decreases in electricity consumption, which may indicate electricity theft behavior or other power system problems.

[0053] Among them, the daily electricity consumption data can be obtained through official channels such as directly contacting power companies, participating in cooperation projects, using the State Grid Power Acquisition Application, accessing the download address summary of relevant datasets in the electrical field of the power industry, using the patented method for obtaining grid data, or referring to the data files of the node distribution network system.

[0054] In the embodiment of the present invention, cleaning and missing value imputation are performed on the daily electricity consumption data to obtain standard daily electricity consumption data, including:

[0055] Obtain the line loss rate and the substation area line loss rate in the daily electricity consumption data, and eliminate the data with a substation area line loss rate less than a preset first threshold and the daily electricity consumption data with a line loss rate greater than a preset second threshold to obtain the screened daily electricity consumption data;

[0056] Interpolate and supplement the users with the number of missing electricity days less than the preset number of days in the screened daily electricity consumption data, eliminate the users with constant electricity consumption, eliminate the users with the number of missing electricity days greater than or equal to the preset number of days, and eliminate the users with electricity consumption less than 1 within the preset time to obtain the standard daily electricity consumption data.

[0057] Furthermore, the detailed steps are as follows:

[0058] Obtain the line loss rate and the substation area line loss rate of the daily electricity consumption data, and eliminate the data with a substation area line loss rate less than -2% or the daily electricity consumption data with a line loss rate greater than 30% to obtain the screened daily electricity consumption data;

[0059] Perform interpolation on the users with the number of missing electricity days less than 7 days in the screened daily electricity consumption data using the cubic spline interpolation method, eliminate the users with constant electricity consumption, eliminate the users with the number of missing electricity days greater than or equal to 7 days, and eliminate the users with electricity consumption less than 1 within the preset time to obtain the standard daily electricity consumption data.

[0060] S2. Calculate the global correlation and the local correlation according to the standard daily electricity consumption data, and obtain the outlier users according to the local correlation.

[0061] It is understandable that by analyzing the standard daily power consumption data to calculate the global and local correlations and identifying outlier users, the accuracy of anomaly detection can be improved, and the users who may have power theft or metering anomalies can be accurately located, thereby optimizing the operation efficiency of the power system and reducing power losses.

[0062] In the embodiments of the present invention, the global correlation refers to the correlation between the standard daily power consumption data and the line loss power of the transformer substation area, and the local correlation is the correlation between the standard daily power consumption data and the line loss power of the transformer substation area within a set interval. Among them, the set interval can be a sliding interval that slides within the interval of the entire standard daily power consumption data, or a fixed interval.

[0063] Further, calculating the global correlation and the local correlation according to the standard daily power consumption data includes:

[0064] Obtaining the user daily power consumption data according to the standard daily power consumption data;

[0065] Obtaining the user daily power consumption data of a preset time period to obtain the power consumption data of the time period users;

[0066] Obtaining the line loss power of the transformer substation area, calculating the Pearson correlation coefficient according to the power consumption of the time period users and the line loss power of the transformer substation area, and obtaining the global correlation through the Pearson correlation coefficient;

[0067] Obtaining the sliding interval power consumption data by setting the sliding interval of the user daily power consumption data;

[0068] Calculating the Pearson correlation coefficient between the sliding interval power consumption data and the line loss power of the transformer substation area to obtain the sliding correlation coefficient, and obtaining the local correlation according to the sliding correlation coefficient.

[0069] Further, the Pearson correlation coefficient is a statistic for measuring the degree of linear correlation between two variables. The value range of the Pearson correlation coefficient is [-1, 1]. Among them, 1 indicates a perfect positive correlation between the two variables, -1 indicates a perfect negative correlation between the two variables, and 0 indicates no linear correlation, that is, there is no any linear relationship between the two variables.

[0070] In the embodiments of the present invention, the calculation function for calculating the Pearson correlation coefficient according to the power consumption of the time period users and the line loss power of the transformer substation area is as follows:

[0071]

[0072] cov(X,Y)=E[(X-E[X])(Y-E[Y])]

[0073] = E[XY] - 2E[Y]E[X] + E[X]E[Y]

[0074] = E[XY] - E[X]E[Y]

[0075] Among them, X is the power consumption of users in a time period, Y is the line loss power of the transformer substation area, E is the expected value, and μx and μy are respectively the expected value of the power consumption of users in a time period and the expected value of the line loss power of the transformer substation area.

[0076] Furthermore, take | ρ X,Y | > 0.85 for users to conduct a significance test. If the p-value of the correlation coefficient ρ X,Y is less than the significance level (such as 0.05), then this user is determined to be a suspected abnormal user.

[0077] Furthermore, ρ X,Y > 0 indicates a positive correlation. The higher the suspicion degree that this user has less electricity metering due to abnormal metering such as under-voltage and under-current, ρ X,Y < 0 indicates a negative correlation. The higher the suspicion degree that this user steals electricity or has an abnormal household-transformer relationship.

[0078] Furthermore, obtaining the outlier users according to the local correlation includes:

[0079] Obtain the sliding correlation coefficient in the local correlation, and through the distance-based outlier detection algorithm and the density-based local outlier factor detection algorithm, find outlier users with a large difference from the electricity consumption behavior of normal users, and regard the outlier users as suspected users.

[0080] Furthermore, the method further includes:

[0081] According to the sliding correlation coefficient, output the first preset number of users through the distance-based outlier detection algorithm;

[0082] According to the sliding correlation coefficient, output the first second preset number of users through the local outlier factor detection algorithm;

[0083] Take the intersection of the users of the first preset number and the users of the second preset number to obtain outlier users with a large difference from the normal electricity consumption behavior.

[0084] Furthermore, obtaining the sliding correlation coefficient in the local correlation, and through the distance-based outlier detection algorithm and the density-based local outlier factor detection algorithm, finding outlier users with a large difference from the electricity consumption behavior of normal users includes:

[0085] Take the absolute value of the sliding correlation coefficient to obtain the absolute value of the coefficient, and calculate the Euclidean distance between the absolute value of the coefficient and the 0 axis;

[0086] Calculate the Euclidean distance of the sliding correlation coefficients between every two users in the calculation area, and obtain the outlier factor of each user by calculating the local reachability density. Output the outlier users with the third preset number, and obtain the outlier users with a large difference in electricity consumption behavior from normal users.

[0087] Among them, the outlier factor represents the degree of user outlier, and the larger the factor, the higher the degree of outlier; Local reachability density: The local reachability density of user x is the derivative of the average reachable distance of its kth nearest neighbor; Reachable distance: It refers to the larger value between the distance between user x and adjacent user y and the distance to the kth nearest neighbor of user x; Local outlier factor (LOF): The local outlier factor of user x is the ratio of its local reachability density to the average reachability density of its adjacent users. The larger the LOF value, the higher the degree of outlier of this user. This outlier factor represents the degree of user outlier, and the larger the factor, the higher the degree of outlier.

[0088] Specifically, the calculation formula for calculating the Euclidean distance between the absolute value of the coefficient and the 0-axis is as follows:

[0089]

[0090] Among them, X represents the sliding correlation coefficient, and m represents the number of sliding correlation coefficients.

[0091] S3. Obtain the priority of outlier users according to the global correlation and local interval correlation, and sort the degree of suspicion according to the priority to obtain suspected electricity theft users.

[0092] It can be understood that by combining the analysis of global correlation and local interval correlation, suspected electricity theft users can be identified more accurately, the accuracy of electricity theft detection can be improved, which helps to discover and handle electricity theft behaviors in a timely manner, reduce power loss, and improve the economic operation rate and stability of the power grid.

[0093] Further, the obtaining the priority of outlier users according to the global correlation and local interval correlation, and sorting the degree of suspicion according to the priority to obtain suspected electricity theft users includes:

[0094] Obtain the user set of global correlation to obtain the global user set, and obtain the intersection of the global user set and the suspected users corresponding to the local interval correlation to obtain the standard screening set;

[0095] Sort the users in the standard screening set according to the priority to obtain suspected electricity theft users.

[0096] In the embodiments of the present invention, the suspected electricity - stealing users refer to those users in the power system who are considered likely to engage in electricity - stealing behavior based on certain indicators or data analysis results. These users may use electricity without authorization through illegal means, such as bypassing the electricity meter, tampering with the electricity meter reading, or using other methods, resulting in power loss for the power company. In an actual power system, electricity - stealing behavior not only violates laws and regulations but also reduces the operating efficiency of the power grid and causes economic losses.

[0097] S4. Obtain a case set, verify the suspected electricity - stealing users through the case set, and obtain a verification result.

[0098] In the embodiments of the present invention, the case set refers to a set of data with labels, which is used to verify and test the accuracy and effectiveness of the electricity - stealing detection model. The case set may include data on historical electricity - stealing events and data on normal electricity - using behaviors.

[0099] Furthermore, the case set is usually obtained by collecting and sorting historical electricity - stealing event records, normal electricity - using data, and known abnormal electricity - using behavior data. These data can be extracted from the power company's metering automation system, marketing system, historical electricity - stealing and leakage user information, and on - site investigation results to construct a comprehensive data set containing normal and abnormal electricity - using patterns.

[0100] In the embodiments of the present invention, the verification result indicates that through the verification of the case set, the true situation of the suspected electricity - stealing users can be determined, and the real electricity - stealing users and normal users can be identified.

[0101] In the embodiments of the present invention, the obtaining of the case set includes:

[0102] Extract historical electricity - using data from the power company's metering automation system and marketing system, where the historical electricity - using data includes electricity - using records of normal users and known electricity - stealing users;

[0103] By sorting out the historical electricity - using data, label each case as normal electricity - using or electricity - stealing behavior to obtain labeled data;

[0104] Summarize the labeled data into a structured data set to obtain the case set.

[0105] Furthermore, the verification of the suspected electricity - stealing users through the case set and obtaining the verification result includes:

[0106] Determine the judgment criteria and verification rules for electricity - stealing, and these rules are based on the characteristics of electricity - stealing events in historical data;

[0107] Apply the global correlation and local interval correlation analysis methods to the data in the case set to identify suspected electricity - stealing users;

[0108] Compare the list of suspected electricity theft users obtained by the analysis method with the actual electricity theft labels in the case set;

[0109] Evaluate the accuracy of the analysis method based on the comparison results, including the proportion of correctly identified electricity theft users and the proportion of wrongly identified normal users as electricity theft;

[0110] Calculate verification metrics such as accuracy, recall, precision, and F1-score to quantify the performance of the analysis method;

[0111] Analyze the verification results, identify the advantages and disadvantages of the analysis method, and possible improvement directions.

[0112] Further, after verifying the suspected electricity theft users through the case set and obtaining the verification results, the method further includes:

[0113] Adjust the parameters in the analysis method according to the verification results, such as the correlation threshold, parameters of the outlier detection algorithm, etc., to optimize the analysis method, and re-verify the case set using the adjusted analysis method to check whether the performance has improved.

[0114] Based on a preset data acquisition instruction, the embodiment of the present invention acquires daily electricity consumption data, cleans and imputes missing values of the daily electricity consumption data to obtain standard daily electricity consumption data; calculates global correlation and local correlation based on the standard daily electricity consumption data, and obtains outlier users based on the local correlation; obtains the priority of outlier users according to the global correlation and local interval correlation, and sorts the degree of suspicion according to the priority to obtain suspected electricity theft users; obtains a case set, and verifies the suspected electricity theft users through the case set to obtain verification results. Therefore, the electricity consumption correlation anomaly detection optimization method, device, electronic device, and computer-readable storage medium proposed by the present invention overcome the subjectivity of time dimension parameter selection, and at the same time break through the restriction of the acquisition data in the acquisition granularity, providing a better method for the governance work of substation line loss and improving the accuracy of line loss identification.

[0115] As Figure 2 shown, it is a schematic diagram of the modules of the electricity consumption correlation anomaly detection optimization device of the present invention.

[0116] The electricity consumption correlation anomaly detection optimization device 100 of the present invention can be installed in an electronic device. According to the functions achieved, the electricity consumption correlation anomaly detection optimization device may include a data acquisition module 101, a user identification module 102, a user screening module 103, and a result verification module 104. The modules of the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, and are stored in the memory of the electronic device.

[0117] In this embodiment, the functions of each module / unit are as follows:

[0118] The data acquisition module 101 is configured to acquire daily power consumption data based on a preset data acquisition instruction, clean and impute missing values of the daily power consumption data to obtain standard daily power consumption data;

[0119] The user identification module 102 is configured to calculate global correlation and local correlation according to the standard daily power consumption data, and obtain outlier users according to the local correlation;

[0120] The user screening module 103 is configured to obtain the priority of outlier users according to the global correlation and local interval correlation, and sort the degree of suspicion according to the priority to obtain electricity theft suspect users;

[0121] The result verification module 104 is configured to obtain a case set, verify the electricity theft suspect users through the case set, and obtain a verification result.

[0122] Specifically, each module in the power consumption correlation anomaly detection optimization device 100 in the embodiment of the present invention adopts the same technical means as the above Figure 1 The power consumption correlation anomaly detection optimization method can produce the same technical effects, which will not be elaborated here.

[0123] As Figure 3 shown, it is a schematic structural diagram of an electronic device for implementing the power consumption correlation anomaly detection optimization method of the present invention.

[0124] The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program stored in the memory 11 and executable on the processor 10, such as a power consumption correlation anomaly detection optimization program.

[0125] Among them, in some embodiments, the processor 10 may be composed of an integrated circuit. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. By running or executing programs or modules stored in the memory 11 (such as executing the power-related anomaly detection optimization program, etc.), and calling the data stored in the memory 11, it performs various functions of the electronic device and processes data.

[0126] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device, such as the mobile hard disk of the electronic device. In some other embodiments, the memory 11 may also be an external storage device of the electronic device, such as a plug-in mobile hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the electronic device. Further, the memory 11 may also include both the internal storage unit and the external storage device of the electronic device. The memory 11 can not only be used to store application software installed on the electronic device and various types of data, such as the code of the power-related anomaly detection optimization program, etc., but also be used to temporarily store the data that has been output or will be output.

[0127] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is set to realize the connection and communication between the memory 11 and at least one processor 10, etc.

[0128] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), and is generally used to establish a communication connection between this electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, and is used to display the information processed in the electronic device and to display a visual user interface.

[0129] Figure 3 Only the electronic device with components is shown. Those skilled in the art can understand that Figure 3 the shown structure does not constitute a limitation on the electronic device, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0130] For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charging management, discharging management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or an inverter, and a power status indicator. The electronic device may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0131] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.

[0132] The power consumption correlation anomaly detection and optimization program stored in the memory 11 of the electronic device is a combination of multiple computer programs. When running in the processor 10, it can implement:

[0133] Based on a preset data acquisition instruction, acquire daily power consumption data, and clean and impute missing values for the daily power consumption data to obtain standard daily power consumption data;

[0134] Calculate the global correlation and the local correlation according to the standard daily power consumption data, and obtain outlier users according to the local correlation;

[0135] Obtain the priority of the outlier users based on the global correlation and local interval correlation, and sort the degree of suspicion according to the priority to obtain the electricity theft suspect users;

[0136] Obtain a case set, and verify the electricity theft suspect users through the case set to obtain a verification result.

[0137] Specifically, for the specific implementation method of the above computer program by the processor 10, reference can be made to Figure 1 the description of the relevant steps in the corresponding embodiment, which will not be elaborated here.

[0138] Further, if the modules / units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory).

[0139] The present invention also provides a computer-readable storage medium, and the readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, it can implement:

[0140] Based on a preset data acquisition instruction, obtain daily electricity consumption data, and clean and impute missing values for the daily electricity consumption data to obtain standard daily electricity consumption data;

[0141] Calculate the global correlation and local correlation according to the standard daily electricity consumption data, and obtain outlier users according to the local correlation;

[0142] Obtain the priority of the outlier users based on the global correlation and local interval correlation, and sort the degree of suspicion according to the priority to obtain the electricity theft suspect users;

[0143] Obtain a case set, and verify the electricity theft suspect users through the case set to obtain a verification result.

[0144] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.

[0145] The module described as a separation component may or may not be physically separated. The component shown as a module may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0146] In addition, in each embodiment of the present invention, each functional module can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a hardware plus a software functional module.

[0147] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-mentioned exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.

[0148] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any associated drawing marks in the claims should not be regarded as limiting the claims involved.

[0149] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, an application service layer, etc.

[0150] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use the knowledge to obtain the best results in theory, methods, technologies, and application systems.

[0151] In addition, obviously, the word "including" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. Words such as second are used to represent names and do not represent any specific order.

[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for optimizing power correlation anomaly detection, characterized in that: The method comprises: Based on the preset data acquisition instruction, daily electricity data is acquired, and the daily electricity data is cleaned and missing values ​​are interpolated to obtain standard daily electricity data; Calculating global correlation and local correlation according to the standard daily power data, and obtaining outlier users according to the local correlation; Obtaining priorities of outlier users according to the global correlation and the local interval correlation, and sorting the suspicion levels according to the priorities to obtain suspected electricity theft users; A case set is obtained, and the suspected electricity theft user is verified through the case set to obtain a verification result.

2. The method for optimizing power correlation anomaly detection according to claim 1, characterized in that: The daily electricity data is cleaned and missing value interpolated to obtain standard daily electricity data, including: Obtaining the line loss rate and the substation line loss rate in the daily electricity data, and eliminating the data with the substation line loss rate less than a preset first threshold and the daily electricity data with the line loss rate greater than a preset second threshold, to obtain the filtered daily electricity data; Interpolate and supplement the users whose missing electricity days in the filtered daily electricity data are less than the preset number of days, and eliminate users with constant electricity. Eliminate users whose missing electricity days are greater than or equal to the preset days, and eliminate users whose electricity volume is less than 1 within the preset time, to obtain standard daily electricity volume data.

3. The method for optimizing power correlation anomaly detection according to claim 1, characterized in that: The calculating of global correlation and local correlation according to the standard daily electricity quantity data includes: Obtaining user daily power data according to the standard daily power data; Obtain the user's daily power consumption data for a preset period, and obtain the user's power consumption data for that period; Obtaining the line loss power in the substation area, and calculating the Pearson correlation coefficient according to the user power and the line loss power in the substation area during the period, and obtaining the global correlation through the Pearson correlation coefficient; By setting the sliding interval of the user's daily power data, the sliding interval power data is obtained; The Pearson correlation coefficient of the sliding interval electricity data and the area line loss electricity is calculated to obtain a sliding correlation coefficient, and the local correlation is obtained according to the sliding correlation coefficient.

4. The method for optimizing power correlation anomaly detection according to claim 1, characterized in that: The obtaining of outlier users according to the local correlation comprises: The sliding correlation coefficient in the local correlation is obtained, and the outlier users whose electricity usage behaviors are significantly different from those of normal users are found through the distance-based outlier detection algorithm and the density-based local outlier factor detection algorithm, and the outlier users whose electricity usage behaviors are significantly different from those of normal users are regarded as suspected users.

5. The method for optimizing power correlation anomaly detection according to claim 4, characterized in that: The step of obtaining the sliding correlation coefficient in the local correlation and finding outlier users whose electricity consumption behaviors are greatly different from those of normal users by using a distance-based outlier point detection algorithm and a density-based local outlier factor detection algorithm includes: Taking the absolute value of the sliding correlation coefficient to obtain the absolute value of the coefficient, and calculating the Euclidean distance between the absolute value of the coefficient and the 0 axis; The Euclidean distance of the sliding correlation coefficients of two users in the substation area is calculated, and the outlier factor of each user is obtained by local reachable density calculation. The first third preset number of outlier users are output, and outlier users with significant differences in electricity consumption behavior from normal users are obtained.

6. The method for optimizing power correlation anomaly detection according to claim 1, characterized in that: The step of obtaining the priority of the outlier user according to the global correlation and the local interval correlation, and sorting the suspicion levels according to the priority to obtain the suspected electricity theft user includes: Obtaining a user set with global correlation to obtain a global user set, and obtaining an intersection of the global user set and the suspected users corresponding to the local interval correlation to obtain a standard screening set; The users in the standard screening set are sorted according to priorities to obtain suspected electricity theft users.

7. The method for optimizing power correlation anomaly detection according to any one of claims 1 to 6, characterized in that: The acquisition case set includes: Extracting historical electricity consumption data from the metering automation system and marketing system of the power company, wherein the historical electricity consumption data includes electricity consumption records of normal users and known electricity theft users; By sorting out the historical electricity consumption data, marking each case as normal electricity consumption or electricity theft behavior, and obtaining marked data; The labeled data are aggregated into a structured data set to obtain a case set.

8. A device for optimizing power correlation anomaly detection, characterized in that: The device comprises: A data acquisition module is used to acquire daily electricity data based on a preset data acquisition instruction, and to clean and interpolate missing values ​​of the daily electricity data to obtain standard daily electricity data; A user identification module, used to calculate global correlation and local correlation according to the standard daily power data, and obtain outlier users according to the local correlation; A user screening module, used to obtain the priority of outlier users according to the global correlation and the local interval correlation, and sort the suspicion levels according to the priority to obtain the suspected electricity theft users; The result verification module is used to obtain a case set, verify the suspected electricity theft user through the case set, and obtain a verification result.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power correlation anomaly detection optimization method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, comprising a data storage area and a program storage area, wherein the data storage area stores created data and the program storage area stores a computer program; wherein: When the computer program is executed by a processor, the method for optimizing detection of anomaly in correlation with electric quantity according to any one of claims 1 to 7 is implemented.