Electricity stealing positioning method and device, measurement switch and readable storage medium

By calculating the apparent line loss of the transformer area and the correlation index of the electricity meter in the measurement switch, and combining the residual iterative stripping mechanism, the error in electricity theft location caused by multiple abnormal signals is solved, and efficient and low false alarm electricity theft location is achieved in resource-constrained environments.

CN122171862APending Publication Date: 2026-06-09SHENZHEN CLOU ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610315381.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-13
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies have significant errors in locating electricity theft in distribution areas, especially when multiple electricity meters are stealing electricity simultaneously. Multiple abnormal signals mask each other, causing the coefficient matrix of the traditional equation system to fall into multicollinearity, making it impossible to effectively separate and locate specific abnormal electricity theft units, resulting in missed detections.

Method used

The method for locating electricity theft involves acquiring the total power increment of the measuring switch and the power increment data of each electricity meter, calculating the apparent line loss of the distribution area, determining the correlation index based on multi-cycle rolling cumulative statistics, eliminating interference signals layer by layer, and using a residual iterative stripping mechanism to locate abnormal electricity meters. This includes introducing state variables and calculating correlation indices.

Benefits of technology

In scenarios where multiple meters are simultaneously used for electricity theft, it effectively exposes the concealed secondary electricity theft characteristics, reduces the false alarm rate, and enables accurate location and investigation of complex abnormal electricity usage, adapting to resource-constrained embedded environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122171862A_ABST
    Figure CN122171862A_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a method, apparatus, measuring switch, and readable storage medium for locating electricity theft. The method includes: acquiring the total electricity increment corresponding to the measuring switch and the electricity increment data of each electricity meter; determining the apparent line loss of the transformer area based on the total electricity increment and multiple electricity increment data; determining the correlation index corresponding to each electricity meter based on the apparent line loss of the transformer area and the electricity increment data; identifying a first abnormal electricity meter from all electricity meters based on the correlation index; determining the undercount ratio of the first abnormal electricity meter based on the electricity increment data corresponding to the first abnormal electricity meter and the apparent line loss of the transformer area; determining the residual line loss based on the undercount ratio; identifying at least one second abnormal electricity meter from multiple sub-electricity meters based on the residual line loss; and identifying the electricity theft meter corresponding to the measuring switch based on the first abnormal electricity meter and at least one second abnormal electricity meter. The solution of the present invention reduces the false alarm rate of electricity theft location.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic power technology, and more specifically, to a method, apparatus, measuring switch, and readable storage medium for locating electricity theft. Background Technology

[0002] Methods for locating electricity theft in transformer substations typically rely on solving a system of multivariate linear equations representing the energy increments of the main meter and each sub-meter. However, in engineering practice, the inherent communication delays caused by the half-duplex polling method of meter reading by the measuring switches result in asynchronous data, making direct calculation prone to distortion or spurious solutions. More importantly, when multiple meters are simultaneously stealing electricity within a transformer substation, the superposition and masking of multiple abnormal signals cause the coefficient matrix of the traditional equation system to fall into multicollinearity, making it impossible to effectively separate and locate each specific abnormal electricity theft unit. This leads to serious missed detections and significant errors in locating electricity theft in transformer substations. Summary of the Invention

[0003] The purpose of this invention is to provide a method, device, measuring switch, and readable storage medium for locating electricity theft, which can solve the problem of large errors in electricity theft location.

[0004] In view of this, an embodiment of the first aspect of the present invention provides a method for locating electricity theft.

[0005] A second aspect of the present invention provides an electricity theft location device.

[0006] A third aspect of the present invention provides a measurement switch.

[0007] An embodiment of the fourth aspect of the present invention provides a readable storage medium.

[0008] To achieve the above objectives, an embodiment of the first aspect of the present invention provides a method for locating electricity theft, applied to a measuring switch connected to multiple electricity meters. The method includes: acquiring the total electricity increment corresponding to the measuring switch and the electricity increment data of each electricity meter within a preset period; determining the apparent line loss of the transformer area based on the total electricity increment and the multiple electricity increment data; determining the correlation index corresponding to each electricity meter based on the apparent line loss of the transformer area and the electricity increment data; identifying a first abnormal electricity meter from all electricity meters based on the correlation index; determining the under-counting ratio of the first abnormal electricity meter based on the electricity increment data corresponding to the first abnormal electricity meter and the apparent line loss of the transformer area; determining the residual line loss based on the under-counting ratio, the residual line loss corresponding to multiple sub-electricity meters other than the first abnormal electricity meter; identifying at least one second abnormal electricity meter from the multiple sub-electricity meters based on the residual line loss; and identifying the electricity theft meter corresponding to the measuring switch based on the first abnormal electricity meter and at least one second abnormal electricity meter.

[0009] This invention provides a method for locating electricity theft in a half-duplex polling communication environment. By acquiring periodic total electricity consumption and sub-meter electricity consumption increment data, the apparent line loss of the distribution area is calculated. Based on this, the correlation index between each sub-meter and the line loss is determined through multi-period rolling cumulative statistics, thereby identifying the first abnormal electricity meter. By estimating its leakage ratio and generating residual line loss after removing the influence of the first abnormal electricity meter, the remaining sub-meters are iteratively re-analyzed and located using the residual line loss, ultimately outputting a set of all identified abnormal electricity meters.

[0010] Understandably, by introducing a residual iterative stripping mechanism, the strongest interference signal can be eliminated layer by layer in the scenario of multiple meters stealing electricity at the same time, effectively exposing the masked secondary electricity theft characteristics, overcoming the problem of missed detection caused by multiple anomalies covering each other, realizing the investigation of complex abnormal electricity use, and reducing the false alarm rate of electricity theft location in resource-constrained embedded environments.

[0011] In some technical solutions, optionally, the correlation index corresponding to each electricity meter is determined based on the apparent line loss of the transformer area and the incremental electricity data. This includes: obtaining a set of state variables assigned to each electricity meter; after each preset cycle, determining rolling state variables for the corresponding electricity meter based on the incremental electricity data and the apparent line loss of the transformer area; obtaining the number of cycles corresponding to the rolling state variables; when the number of cycles reaches a preset threshold, determining the incremental electricity sequence based on the rolling state variables of each electricity meter; and determining the correlation index based on the incremental electricity sequence and the apparent line loss of the transformer area.

[0012] In this scheme, a set of dynamically updatable state variables is maintained for each energy meter. After each data collection cycle, the system only updates these variables with new energy increments and line loss data in an accumulative manner. This allows for the continuous accumulation of various sums, sums of squares, and sums of products required for statistical calculations without storing any historical detailed data. Once the accumulation cycle reaches a preset number, the correlation index is calculated directly based on this final set of state variables and the number of cycles using a preset formula.

[0013] Understandably, firstly, by using a simplified data structure of rolling accumulation and in-situ updates, the memory overhead is reduced from being proportional to the amount of historical data to a constant level proportional to the number of electricity meters. This perfectly adapts to the resource-constrained bare-metal system of microcontrollers, fundamentally avoiding the risk of memory overflow and program crashes caused by storing large amounts of data, and ensuring the accuracy and stability of correlation analysis.

[0014] In some technical solutions, optionally, the state variables include, but are not limited to: a first accumulated value corresponding to the incremental power data, a second accumulated value corresponding to the apparent line loss of the transformer area, a third accumulated value corresponding to the product of the incremental power data and the apparent line loss of the transformer area, a fourth accumulated value corresponding to the square of the incremental power data, and a fifth accumulated value corresponding to the square of the apparent line loss of the transformer area. The correlation index is determined by the following formula:

[0015] ;

[0016] in, Here, N is the correlation index, and N is the statistical threshold. This is the first accumulated value. This is the second accumulated value. This is the third accumulated value. This is the fourth accumulated value. This is the fifth accumulated value. Y represents incremental electricity consumption data, and Y represents the apparent line loss of the transformer area.

[0017] This solution clarifies the specific mathematical formula used to calculate the correlation index, directly applying the standardized Pearson correlation coefficient calculation formula to the scenario described in this invention. Through a fractional structure, the cumulative amount of the coordinated changes in electricity meter increments and transformer area line losses over multiple periods is divided by the geometric mean of their respective fluctuation amplitudes. This eliminates the influence of absolute dimensions and their own fluctuations, ultimately outputting a standardized correlation coefficient between -1 and +1 as the correlation index.

[0018] The state variables are five carefully designed cumulative values: the cumulative sum of the meter's own electricity increment, the cumulative sum of the overall apparent line loss of the transformer area, the cumulative sum of the product of the two, and the cumulative sum of the square of the electricity increment and the square of the line loss.

[0019] The state variables together constitute the minimum complete dataset for implementing rolling statistics in a microcontroller.

[0020] Understandably, calculating the correlation index is a feature extraction process from raw rolling statistics to standardized indicators of suspected electricity theft. By fully utilizing several fixed cumulative values ​​maintained for each table, and through a single combination of operations including multiplication, subtraction, square root, and division, the core criteria for precise location are directly generated within a resource-constrained microcontroller. This achieves efficient mining and quantification of complex correlation patterns behind massive amounts of asynchronous time-series data with extremely low computational cost.

[0021] In some technical solutions, the residual line loss can optionally be determined based on the omission rate, including:

[0022] The residual line loss is determined using the following formula:

[0023] ;

[0024] in, Y represents residual line loss, K represents apparent line loss of the transformer area, and K represents the omission rate. This is the incremental energy data corresponding to the first abnormal energy meter.

[0025] In this scheme, the estimated amount of electricity stolen in the current cycle is calculated by multiplying the unreported proportion of the first abnormal electricity meter with its corresponding electricity increment data, and then deducting it from the original apparent line loss of the transformer area to obtain the residual line loss.

[0026] Understandably, by actively purifying the total abnormal loss signal, the greatest interference caused by the primary suspected meter was effectively eliminated, allowing the electricity consumption characteristics of the remaining meters to stand out against a purer residual line loss background. This creates key conditions for subsequent iterative analysis and locating other hidden electricity theft meters layer by layer.

[0027] In some technical solutions, optionally, the first abnormal energy meter is determined from all energy meters based on a correlation index, including: obtaining a preset safety threshold; traversing the correlation indices of all energy meters, and determining the energy meter corresponding to the correlation index with the largest value that exceeds the preset safety threshold as the first abnormal energy meter.

[0028] In this scheme, a preset safety threshold is introduced as a judgment criterion. The electricity meter with the highest correlation index value and the correlation index value exceeding the preset safety threshold is identified as the primary abnormal target, i.e., the first abnormal electricity meter.

[0029] Understandably, by using threshold filtering and extreme value locking as dual judgments, continuous correlation measurements are transformed into clear and unique abnormal object outputs, enabling the algorithm to automatically identify and make decisions without human intervention. This significantly reduces the risk of misjudgment caused by random fluctuations and improves the reliability of the positioning results.

[0030] In some technical solutions, optionally, at least one second abnormal energy meter is determined from multiple sub-energy meters based on residual line loss, including: determining the apparent line loss of the iterative distribution area based on the residual line loss; determining the iterative correlation index corresponding to each sub-energy meter based on the apparent line loss of the iterative distribution area and the energy increment data corresponding to the multiple sub-energy meters; determining the second abnormal energy meter based on the iterative correlation index and a preset safety threshold, wherein the iterative correlation index of the second abnormal energy meter is higher than the preset safety threshold.

[0031] In this scheme, the residual line loss calculated in the previous round is established as the new benchmark for this round of analysis, namely the apparent line loss of the iterative transformer area. Based on the apparent line loss of the iterative transformer area and the incremental data of the remaining sub-meters, the corresponding iterative correlation index is recalculated for each sub-meter. By applying the same threshold comparison and extreme value screening logic as in the first round of judgment, the next suspect target, namely the second abnormal meter, is identified from the sub-meters.

[0032] Understandably, by using the purified residual line loss as a new input, the system can refocus its analysis on the remaining electricity meter in the context of eliminating the largest source of interference, thus highlighting the secondary electricity theft characteristics that were previously concealed, and achieving layer-by-layer analysis and localization of multiple, mutually concealing electricity theft behaviors.

[0033] In some technical solutions, optionally, after determining the second abnormal energy meter based on the iterative correlation index and the preset safety threshold, the method further includes: determining the iterative residual line loss based on the omission ratio corresponding to the second abnormal energy meter, wherein the iterative residual line loss corresponds to multiple sub-energy meters other than the first and second abnormal energy meters; determining a new second abnormal energy meter from the multiple sub-energy meters other than the first and second abnormal energy meters based on the iterative residual line loss, until the iterative correlation index is lower than or equal to the preset safety threshold; when the correlation index of all remaining energy meters is lower than or equal to the preset safety threshold, clearing the state variables assigned to the energy meters and entering the next statistical cycle.

[0034] In this scheme, based on the latest locked abnormal energy meters and their under-meter ratio, a purer iterative residual line loss is continuously generated as the analysis benchmark for the next round. On this benchmark, the correlation of the remaining energy meters is recalculated and the threshold is judged, thereby cyclically locking new abnormal targets.

[0035] The iterative process will continue until the correlation index of all remaining energy meters is no higher than the preset safety threshold, indicating that there are no more significant anomalies.

[0036] Understandably, by constructing a closed-loop iterative process of locking, stripping, and reanalyzing, it is possible to autonomously strip and locate all abnormal electricity meters with statistically significant electricity theft characteristics layer by layer without relying on prior knowledge, thereby achieving comprehensive monitoring and precise location of electricity theft behavior in the distribution area.

[0037] An embodiment of the second aspect of the present invention provides an electricity theft location device, comprising: a data acquisition module for acquiring the total electricity increment corresponding to a measuring switch and the electricity increment data of each electricity meter within a preset period; a transformer area line loss module for determining the apparent line loss of the transformer area based on the total electricity increment and multiple electricity increment data; a correlation determination module for determining the correlation index corresponding to each electricity meter based on the apparent line loss of the transformer area and the electricity increment data; a first anomaly module for determining a first abnormal electricity meter from all electricity meters based on the correlation index; a proportion determination module for determining the undercount proportion of the first abnormal electricity meter based on the electricity increment data corresponding to the first abnormal electricity meter and the apparent line loss of the transformer area; a residual determination module for determining the residual line loss based on the undercount proportion, the residual line loss corresponding to multiple sub-electricity meters other than the first abnormal electricity meter; a second anomaly module for determining at least one second abnormal electricity meter from multiple sub-electricity meters based on the residual line loss; and an electricity theft location module for determining the electricity theft meter corresponding to the measuring switch based on the first abnormal electricity meter and at least one second abnormal electricity meter.

[0038] An embodiment of the third aspect of this application provides a measuring switch that is connected to a plurality of electricity meters; the measuring switch includes an electricity theft location device as described in the second aspect.

[0039] An embodiment of the fourth aspect of this application provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the electricity theft location method as described in the first aspect.

[0040] Additional aspects and advantages of the technical solutions of the present invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description

[0041] Figure 1 One of the flowcharts of the electricity theft location method according to this application is shown;

[0042] Figure 2 A second flowchart illustrating the electricity theft location method according to this application is shown;

[0043] Figure 3 A third flowchart illustrating the electricity theft location method according to this application is shown;

[0044] Figure 4 A fourth flowchart illustrating the electricity theft location method according to this application is shown;

[0045] Figure 5 Fifth of the flowcharts illustrating the electricity theft location method according to this application is shown;

[0046] Figure 6 A schematic block diagram of the structure of the electricity theft locator according to this application is shown;

[0047] Figure 7 A schematic block diagram of the measuring switch according to this application is shown;

[0048] Figure 8 A flowchart of the anti-electricity theft method based on correlation coefficient and residual stripping according to this application is shown;

[0049] Figure 9 The data trend diagram is shown according to the principle of mutual masking of multi-epitope anomaly features and residual iterative stripping based on this application.

[0050] Among them, 900: Electricity theft location device; 902: Data acquisition module; 904: Transformer area line loss module; 906: Correlation determination module; 908: First anomaly module; 910: Proportion determination module; 912: Residual determination module; 914: Second anomaly module; 916: Electricity theft location module; 1000: Measuring switch; 2000: Electricity meter. Detailed Implementation

[0051] To better understand the above-described objectives, features, and advantages of the embodiments of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0052] Currently, the determination of inaccurate energy measurement or electricity theft by the measurement switch for connected energy meters typically relies on extracting the incremental energy data from the main meter and each sub-meter. When attempting to precisely locate a specific faulty sub-meter, existing technologies often employ matrix solutions by constructing a system of linear equations. However, these existing technologies suffer from the following serious shortcomings:

[0053] First, in actual engineering, measurement switches typically poll and read sub-meters via an industrial serial bus (RS485), resulting in asynchronous communication delays on the order of seconds. Since the power grid load fluctuates in real time, this physical "asynchrony" can cause time misalignment in the data on both sides of the constructed equations, easily leading to unsolvable matrices or distorted errors.

[0054] Second, when multiple meters in a distribution area are simultaneously committing electricity theft or exceeding tolerances, the anomalies of multiple meters can cause features to mask each other, and the incremental matrix can fall into multicollinearity. The threshold of the traditional difference comparison method is difficult to set, and it is very easy to miss the detection.

[0055] Third, in resource-constrained microcontrollers without a real-time operating system, running complex floating-point matrix operations or storing large historical meter reading arrays not only consumes a large amount of extremely limited random access memory (RAM) resources, but is also prone to memory overflow and program crashes due to harsh field conditions or communication anomalies.

[0056] For example, the meanings of the terms in the specific implementation are explained as follows:

[0057] Apparent line loss: The difference between the increase in energy consumption recorded by the main meter and the sum of the increases in energy consumption recorded by all sub-meters within a single measurement period. It includes physical line loss, meter error, and electricity theft / miscalculation.

[0058] Pearson correlation coefficient: a statistical indicator used to measure the degree of linear correlation between two variables, with a value between -1 and 1. This invention is used to measure the frequency consistency between the waveform of a single meter's electricity consumption and the overall line loss waveform of the distribution area.

[0059] Residual stripping algorithm: After detecting the main anomaly, it estimates the interference weights through univariate linear regression and removes some interference from the global variables, thereby revealing the masked secondary anomaly features.

[0060] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, embodiments of the invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below.

[0061] The following detailed description of the electricity theft location method, device, measuring switch, and readable storage medium provided in this application embodiment, through specific embodiments and application scenarios, is provided in detail.

[0062] This embodiment provides a method for locating electricity theft, applied to a measuring switch. The measuring switch is connected to multiple electricity meters, such as... Figure 1 As shown, the methods for locating electricity theft include:

[0063] Step S100: Obtain the total power increment corresponding to the measuring switch and the power increment data of each energy meter within the preset period;

[0064] Step S102: Determine the apparent line loss of the transformer area based on the total power increment and multiple power increment data;

[0065] Step S104: Determine the correlation index corresponding to each electricity meter based on the apparent line loss and electricity increment data of the transformer area;

[0066] Step S106: Identify the first abnormal energy meter from all energy meters based on the correlation index;

[0067] Step S108: Determine the under-metering ratio of the first abnormal energy meter based on the energy increment data corresponding to the first abnormal energy meter and the apparent line loss of the transformer area;

[0068] Step S110: Determine the residual line loss based on the omission ratio. The residual line loss corresponds to multiple sub-energy meters other than the first abnormal energy meter.

[0069] Step S112: Determine at least one second abnormal energy meter from multiple sub-energy meters based on the residual line loss;

[0070] Step S114: Determine the electricity theft meter corresponding to the measuring switch based on the first abnormal electricity meter and at least one second abnormal electricity meter.

[0071] This invention provides a method for locating electricity theft in a half-duplex polling communication environment. By acquiring periodic total electricity consumption and sub-meter electricity consumption increment data, the apparent line loss of the distribution area is calculated. Based on this, the correlation index between each sub-meter and the line loss is determined through multi-period rolling cumulative statistics, thereby identifying the first abnormal electricity meter. By estimating its leakage ratio and generating residual line loss after removing the influence of the first abnormal electricity meter, the remaining sub-meters are iteratively re-analyzed and located using the residual line loss, ultimately outputting a set of all identified abnormal electricity meters.

[0072] Understandably, by introducing a residual iterative stripping mechanism, the strongest interference signals can be eliminated layer by layer in scenarios where multiple meters are simultaneously stealing electricity, effectively exposing the masked secondary electricity theft characteristics. This overcomes the problem of missed detection caused by multiple anomalies covering each other, enabling the investigation of complex abnormal electricity use and reducing the false alarm rate of electricity theft location in resource-constrained embedded environments.

[0073] For example, the electricity theft location method relies on a typical low-voltage distribution transformer substation metering architecture. The core hardware of the low-voltage distribution transformer substation metering architecture is a measuring switch, which is an embedded terminal device that integrates metering, communication, and control functions. It is usually installed at the low-voltage side outlet of the distribution transformer, serving as the master meter for the entire substation.

[0074] The core of the measurement switch is a microcontroller, and this invention is designed specifically for bare-metal systems that run on such microcontrollers.

[0075] The system has limited memory and needs to operate stably in harsh outdoor environments for extended periods. Under these constraints, traditional algorithms that rely on storing large queues of historical data or performing complex floating-point matrix operations are not applicable.

[0076] To this end, the present invention maintains only a few static state variables for each connected energy meter, and updates statistical information by "rolling accumulation" in each collection cycle (e.g., 15 minutes). Thus, with extremely low memory usage, it achieves the memorization and statistics of historical data characteristics for several days, perfectly adapting to the bare-metal programming model.

[0077] The electricity theft location method provided by this invention is not only perfectly compatible with low-voltage distribution area measurement switches, but can also be directly applied to metering verification scenarios with asynchronous communication delays, such as charging pile group management systems and distributed photovoltaic multi-inverter power grid connection verification.

[0078] At electric vehicle charging stations, a main charging pile controller connects to multiple sub-charging piles. The controller needs to periodically read the charging power of each sub-pile and compare it with the total incoming power to verify metering accuracy and detect faulty or stolen sub-pile charging.

[0079] In a distributed photovoltaic (PV) power station, the electricity generated by multiple PV inverters is collected and connected to the grid via a master meter. The grid operator needs to monitor the consistency between the power generation reported by each inverter and the total grid-connected power to verify the authenticity of the data and detect equipment failures or communication anomalies.

[0080] Specifically, the preset period is a pre-set, fixed data collection time window.

[0081] At the end of each cycle, the measuring switch asynchronously reads its own total energy value and the partial energy value of each connected energy meter through polling.

[0082] Because of the second-level delay in communication, the obtained value is not the instantaneous value at the same physical moment.

[0083] Therefore, this invention abandons the demand for precise synchronization of instantaneous values ​​and instead calculates the change in power consumption within each cycle, i.e., incremental data.

[0084] By subtracting the reading from the previous cycle from the current reading, we obtain the total energy increment of the measuring switches and the energy increment data for each energy meter within the current cycle. Subsequent analysis using this incremental data transforms the absolute time synchronization problem into a periodic statistical correlation problem, fundamentally avoiding data misalignment caused by asynchronous communication.

[0085] The apparent line loss of a transformer substation is determined based on the total electricity consumption increment and multiple electricity consumption increment data. Apparent line loss includes unavoidable and relatively stable physical losses in the power supply line (such as conductor heating), but more importantly, it also includes all electricity losses that are not correctly measured due to meter malfunctions, errors, and electricity theft. Therefore, a persistently abnormally high apparent line loss is the core indicator of abnormal electricity consumption (especially electricity theft) in the transformer substation.

[0086] To identify the most suspicious electricity meter among numerous electricity meters that shows the strongest correlation between electricity usage behavior and abnormal losses, correlation analysis from statistics is introduced.

[0087] For example, correlation metrics include, but are not limited to, the Pearson correlation coefficient.

[0088] The process of determining the correlation index is not based on a single point of data, but on the calculation of historical data sequences acquired continuously over multiple preset periods.

[0089] The correlation index measures the degree of synchronization in statistical trend between the electricity increment sequence of each electricity meter and the apparent line loss sequence of the distribution area.

[0090] For example, if a certain electricity meter is a normal user, its electricity consumption fluctuations should not be significantly related to the total loss fluctuations in the distribution area, and the correlation coefficient should be close to 0.

[0091] Conversely, if an electricity meter is involved in electricity theft, the greater its electricity consumption (including normal consumption and theft), the greater the overall abnormal loss in the distribution area. The data sequences of both will show a trend of rising and falling together, causing their correlation index to be significantly biased towards +1. Through this long-term trend correlation analysis, the dependence on the instantaneous synchronization of the underlying data is completely eliminated.

[0092] The system iterates through and compares the correlation indices of all electricity meters.

[0093] First, obtain a preset security threshold.

[0094] Next, based on the values ​​corresponding to the correlation indicators of all electricity meters, find the maximum value among them.

[0095] Then, determine whether the maximum value corresponding to the relevance index is greater than the safety threshold.

[0096] If the conditions are met, the electricity meter corresponding to the maximum value will be identified as the first abnormal electricity meter. This identifies the primary target that is most closely related to abnormal line loss and is most suspected of electricity theft.

[0097] If the maximum value does not exceed the threshold, it is considered that no significant electricity theft characteristics were detected in the current statistical period.

[0098] After identifying the first abnormal electricity meter, it is also necessary to quantify the severity of its electricity theft.

[0099] The underreporting ratio represents the proportion of electricity that is actually underreported (stolen) for every kilowatt-hour measured by the first abnormal energy meter.

[0100] The underreporting ratio is determined based on the principle of least squares. The relationship between the increment of the first abnormal energy meter and the apparent line loss of the transformer area is fitted by univariate linear regression, and the slope is the underreporting ratio.

[0101] Based on the underreporting rate and the increment of the first abnormal energy meter in the current cycle, the apparent line loss of the original transformer area for the current cycle is corrected. The estimated amount of stolen electricity from the first abnormal energy meter in this cycle is deducted from the total abnormal loss, and the resulting residual line loss is a cleaner line loss signal.

[0102] The residual line loss corresponds to the set of multiple sub-meters other than the first abnormal meter. The residual line loss mainly reflects other possible abnormalities in the remaining meters because the influence of the largest interference source has been removed.

[0103] Based on the residual line loss, at least one second abnormal energy meter is identified from multiple sub-energy meters, i.e., a new round of analysis is carried out based on the new signal after stripping.

[0104] Based on the residual line loss, it is determined as a new basic line loss signal for analyzing the remaining energy meter.

[0105] The original apparent line loss of the transformer area is replaced by this residual line loss. Based on the energy increment data of each of the multiple sub-meters, the correlation index between each sub-meter and this new line loss signal is re-determined.

[0106] With the removal of the primary suspect meter's significant interference, the characteristics of other electricity theft meters that were previously concealed by it will become prominent in the new relevance index.

[0107] Subsequently, based on the redefined correlation index, the maximum value is found again and compared with the safety threshold. This allows the next electricity meter with the highest suspicion of electricity theft to be identified from the sub-electricity meters, which will then be designated as the second abnormal electricity meter.

[0108] This process can be iterated, that is, using the second abnormal energy meter to generate a new residual line loss, then analyzing the remaining meters, and so on, thereby exposing all hidden abnormal meters layer by layer.

[0109] By summing up all the abnormal energy meters identified during the iteration process, namely the first abnormal energy meter, and at least one second abnormal energy meter identified through one or more iterations, the final electricity theft meter is determined.

[0110] The electricity theft meter precisely corresponds to one or more specific power sources that cause the measurement switch to exceed the tolerance.

[0111] Subsequently, the system can generate alarm information and clear all state variables used for rolling calculations, preparing for the next complete statistical and positioning cycle.

[0112] In some embodiments, the state variables on which the rolling cumulative statistics depend are optionally persisted in the microcontroller’s non-volatile memory.

[0113] After each preset cycle, the updated state variable set is saved. In the event of a system reset due to an abnormality, the most recently saved state variables can be restored from non-volatile memory to continue the accumulation and calculation, thereby ensuring the continuity of the statistical cycle and avoiding data zeroing and statistical failure caused by unexpected power outages or interference. This enhances the long-term robustness of the algorithm in industrial environments.

[0114] In some embodiments, the preset safety threshold is optionally not a fixed value. The preset safety threshold is dynamically and adaptively adjusted based on the ambient temperature data measured by the measuring switch and the historical average total power to cope with the changes in basic physical line loss under different wire diameters and ambient temperatures, thereby further reducing the false alarm rate.

[0115] In some embodiments, optionally, the final output of the electricity theft meter includes not only the identifier of the abnormal meter, but also the under-metering rate of each abnormal meter, the estimated cumulative under-metered electricity, and the confidence level determined based on the iterative convergence. By integrating multi-dimensional diagnostic information, quantitative data support is provided for subsequent on-site verification, electricity recovery, and processing priority determination, thereby enhancing the decision-making support value of the method.

[0116] In some embodiments, optionally, the process of processing incremental electricity data also includes identifying and handling cycles with communication anomalies or invalid data. When acquiring incremental data from one or more electricity meters fails within a preset cycle, the update of invalid cycle state variables is skipped, or interpolation estimation is used to fill in the missing data, to ensure the sequence length and data quality used for correlation analysis, maintain the stable operation of the positioning algorithm, and avoid misjudgments caused by single-point data anomalies.

[0117] In some embodiments, optionally, the final set of electricity meters identified for theft is traced back to the point in time when their correlation indices began to rise significantly. By analyzing the correlation index curves over time, the start time and evolution trend of suspected electricity theft can be determined, thereby providing crucial time clues for investigation and evidence collection, and helping to distinguish between long-term electricity theft and short-term temporary anomalies.

[0118] In summary, this method solves the communication delay problem by replacing instantaneous synchronization matching with periodic incremental statistics. It locates the primary suspect target through rolling correlation analysis and uses a residual iterative stripping algorithm to break through the mutual cover-ups of multiple electricity theft schemes, achieving high-precision, low-false-alarm localization of complex electricity theft activities in resource-constrained embedded environments.

[0119] In some embodiments, optionally, such as Figure 2 As shown, step S104: Determine the correlation index corresponding to each electricity meter based on the apparent line loss and electricity increment data of the transformer area, including:

[0120] Step S1040: Obtain a set of state variables assigned to each electricity meter;

[0121] Step S1042: After each preset cycle ends, determine the rolling state variable for the corresponding energy meter based on the incremental energy data and the apparent line loss of the transformer area;

[0122] Step S1044: Obtain the number of cycles corresponding to the rolling state variable;

[0123] Step S1046: When the number of cycles reaches a preset threshold, determine the energy increment sequence based on the rolling state variable of each energy meter;

[0124] Step S1048: Determine the correlation index based on the power increment sequence and the apparent line loss of the transformer area.

[0125] In this embodiment, a set of dynamically updatable state variables is maintained for each energy meter. After each data collection cycle, the system only updates these variables with new energy increments and line loss data in an accumulative manner. This allows for the continuous accumulation of various sums, sums of squares, and sums of products required for statistical calculations without storing any historical detailed data. Once the accumulation cycle reaches a preset number, the correlation index is calculated directly based on this final set of state variables and the number of cycles using a preset formula.

[0126] Understandably, by using a simplified data structure that features rolling accumulation and in-situ updates, memory overhead is reduced from being proportional to the amount of historical data to a constant level proportional to the number of electricity meters. This perfectly adapts to the resource-constrained bare-metal system of microcontrollers, fundamentally avoiding the risk of memory overflow and program crashes caused by storing large amounts of data, and ensuring the accuracy and stability of correlation analysis.

[0127] During the initialization phase, a set of dedicated storage units, called state variables, are pre-allocated in the limited memory of the microcontroller for each energy meter in the connected distribution area.

[0128] This set of state variables is not used to record raw data at each point in time, but is designed as a series of accumulators whose function is to continuously accumulate specific statistics over long periods of operation. Assigning such a set of variables independently to each electricity meter ensures that the system can track the long-term statistical characteristics of all objects in parallel.

[0129] At the end of each fixed, preset cycle, the system has obtained the latest electricity consumption change of each electricity meter within the preset cycle, i.e., the electricity increment data, as well as the total abnormal loss of the entire distribution area, i.e., the apparent line loss of the distribution area.

[0130] At this point, the system immediately iterates through all the electricity meters and performs an update operation on the state variables of each meter.

[0131] For the electricity meter currently being processed, the system will read the electricity consumption increment data of the electricity meter for this period and the apparent line loss of the transformer area calculated for this period.

[0132] Combine this new data with the currently stored accumulated value in the corresponding state variable.

[0133] Specifically, a series of addition and multiplication accumulation operations are performed, including but not limited to adding the incremental electricity consumption value to the total incremental electricity consumption value; adding the apparent line loss value of the transformer area to the total line loss value; adding the product of the two to the cross-multiplication accumulation value; and adding the square of the incremental electricity consumption value to the square of the incremental electricity consumption value.

[0134] After completing the above calculations, this set of state variables is assigned new content, representing the summarized statistical results of all historical data from the beginning of the statistics to the current latest period. This process is called rolling update, and the result is a set of rolling state variables. It is not necessary to save the independent original data of any past period. By only maintaining these continuously updated cumulative values, the core statistical characteristics of the entire historical data sequence can be grasped.

[0135] To determine how many sample data points (i.e., how many preset cycles) all current rolling state variables are based on, the system also maintains a cycle counter. This counter increments by one each time a complete update of all electricity meter state variables is finished.

[0136] Therefore, the counter value is strictly synchronized with the rolling state variables of all electricity meters, and the counter value represents the total number of valid data periods on which the current statistical calculation is based.

[0137] When the number of cycles reaches a preset threshold, the energy increment sequence is determined based on the rolling state variables of each energy meter.

[0138] It continues to run and update state variables until the accumulated number of cycles reaches a preset threshold.

[0139] Based on the state variables that have been continuously updated, key mathematical features describing the entire historical electricity consumption increment sequence of the electricity meter are extracted. These features, such as the sum of all data in the sequence and the sum of squares of all data, are directly contained in state variables such as "total electricity consumption increment cumulative value" and "electricity consumption increment square cumulative value".

[0140] After meeting the data volume requirements, the statistical characteristics prepared in the previous step from the specific energy meter (obtained from the rolling state variable), the overall statistical characteristics of the corresponding transformer area apparent line loss (obtained from the global cumulative value), and the accumulated number of cycles are used to perform a series of arithmetic operations.

[0141] For example, these calculations follow the mathematical definition of the Pearson correlation coefficient. By combining the above-mentioned cumulative values ​​and the number of cycles, the linear correlation between the electricity consumption trend of the electricity meter and the loss trend of the entire distribution area can be directly calculated.

[0142] The specific values ​​obtained through calculation are determined as the correlation index corresponding to the electricity meter.

[0143] The correlation index quantitatively reflects the strength of the consistency between the fluctuations of the two data points. The entire calculation process relies entirely on several continuously updated cumulative values ​​and a count value, without needing to query any historical records. This achieves accurate measurement of long-term data correlation with extremely low computational and storage overhead. Under the resource constraints of embedded systems, continuous online calculation of the correlation index between each energy meter and the line loss of the distribution area is realized. The algorithm, which replaces the need for massive historical data storage and complex offline analysis with constant, minimal memory consumption and simple arithmetic operations, is the core technological guarantee for its stable deployment and operation in field measurement and switching terminals.

[0144] In some embodiments, optionally, the state variables can be initialized based on a predefined learning phase after the system's initial operation or reset. During the learning phase, the system collects data and updates the state variables normally, but does not execute the step of determining the correlation index until the accumulated number of periods reaches an initialization threshold indicating that the system has entered a stable statistical state. In this way, it is ensured that the correlation index used for the first formal calculation is derived from sufficient and stable historical data, avoiding statistical fluctuations and misjudgments caused by insufficient initial data, and improving the reliability of the algorithm startup phase.

[0145] In some embodiments, the calculation results of the correlation index are optionally associated with the cumulative number of periods on which the calculation is based, and the range of data fluctuation of the state variable within the corresponding period. By associating this metadata, contextual information characterizing the statistical significance and computational basis quality is added to each correlation index, enabling subsequent judgments on the level of the index to be made in conjunction with its confidence level, thereby improving the rigor of the analytical conclusions.

[0146] In some embodiments, optionally, the state variables include, but are not limited to: a first accumulated value corresponding to the incremental power data, a second accumulated value corresponding to the apparent line loss of the transformer area, a third accumulated value corresponding to the product of the incremental power data and the apparent line loss of the transformer area, a fourth accumulated value corresponding to the square of the incremental power data, and a fifth accumulated value corresponding to the square of the apparent line loss of the transformer area. The correlation index is determined by the following formula:

[0147] ;

[0148] in, Here, N is the correlation index, and N is the statistical threshold. This is the first accumulated value. This is the second accumulated value. This is the third accumulated value. This is the fourth accumulated value. This is the fifth accumulated value. Y represents incremental electricity consumption data, and Y represents the apparent line loss of the transformer area.

[0149] In this embodiment, the specific mathematical formula for calculating the correlation index is clarified, which is a direct application of the standardized Pearson correlation coefficient calculation formula in the scenario of this invention. Through a fractional structure, the cumulative amount of the coordinated changes of the electricity meter increment and the transformer area line loss over multiple periods is divided by the geometric mean of their respective fluctuation amplitudes, thereby eliminating the influence of absolute dimensions and their own fluctuations. Finally, a standardized correlation coefficient between -1 and +1 is output as the correlation index.

[0150] All input variables of the formula, including the number of statistical cycles, the sum of the increase in energy and the line loss, the sum of squares, and the sum of the product of the two, are directly derived from the rolling state variables and cycle counters maintained in the preceding steps. This makes the entire calculation process efficient within the microcontroller without having to backtrack any historical detailed data. It only requires a few multiplication, addition, and square root operations, providing a reliable mathematical criterion for subsequently locking abnormal energy meters.

[0151] Specifically, the first accumulated value is obtained by adding the incremental energy data read from the corresponding energy meter in the current cycle to the total value of the previous cycle after the end of each preset cycle.

[0152] The initial value of the first accumulated value is usually zero. For example, after the first cycle, its value is the increment data of the cycle itself; after the second cycle, its value is equal to the sum of the increment data of the first cycle and the increment data of the second cycle, and so on.

[0153] The first cumulative value represents the total increase in electricity consumption of the meter over all periods since the start of the statistics.

[0154] The second accumulated value is obtained by adding the difference between the apparent line loss of the transformer area calculated in the current cycle (i.e., the total meter increment and the sum of all sub-meter increments) to the total value of the previous cycle after the end of each preset cycle. This is a global accumulated value shared by all energy meters for status calculation, or a separate copy can be maintained for each energy meter to ensure calculation independence.

[0155] The second cumulative value represents the total apparent line loss of the entire transformer area across all periods since the start of the statistics. It is used to calculate the arithmetic mean of the apparent line loss series for the transformer area.

[0156] The third accumulated value is used to perform correlation analysis. After each preset cycle, the current energy increment data of the current energy meter is multiplied by the apparent line loss of the transformer area in the current cycle to obtain the product, and then this product is accumulated and added to the total value of the previous cycle.

[0157] The third cumulative value represents the sum of the products of the electricity meter increment and the transformer area line loss over all periods. This third cumulative value directly reflects the degree of synergy between the changes in the two variables and is the core calculation basis for the numerator of the Pearson correlation coefficient.

[0158] The fourth accumulated value is obtained by multiplying the current energy increment data of the energy meter by itself and squaring it after the end of each preset cycle, and then accumulating the squared result to the total value of the previous cycle.

[0159] The fourth accumulated value represents the sum of squares of all values ​​in the energy meter increment sequence.

[0160] The fourth accumulated value is used to calculate the variance or standard deviation of the series, which is a key statistic for measuring the magnitude of the fluctuation in electricity consumption of the electricity meter itself.

[0161] The fifth accumulated value is similar to the fourth accumulated value. The fifth accumulated value is obtained by multiplying the apparent line loss of the transformer area in the current period by itself and squaring it after the end of each period, and then accumulating the squared results.

[0162] The fifth accumulated value represents the sum of squares of all values ​​in the apparent line loss sequence of the transformer area. It is used to calculate the variance or standard deviation of the line loss sequence and to measure the magnitude of the loss fluctuation in the entire transformer area.

[0163] By using these five fixed-dimensional floating-point numbers, the system can continuously and accurately maintain all the first and second moments necessary for calculating correlation indicators during long-term operation without storing any historical detailed data. This fundamentally solves the problems of high memory consumption and inability to run stably in bare-metal systems for a long time.

[0164] The Pearson correlation coefficient calculation formula is directly reflected in the specific application scenario of this invention. Its purpose is to quantitatively calculate the linear correlation between the change in electricity consumption of each electricity meter and the change in abnormal losses of the entire distribution area, based on state variables and period counts.

[0165] For example, the value calculated by the formula is the relevance index, and its value ranges from -1 to +1.

[0166] Specifically, by using a fractional structure, the degree of coordinated change between the electricity meter increment and the transformer area line loss (characterized by the numerator) is divided by the geometric mean of their respective fluctuations (characterized by the denominator), thus obtaining a standardized correlation measure that excludes the influence of their respective absolute dimensions and fluctuation amplitudes.

[0167] The closer the correlation index is to +1, the more synchronous and positively correlated the trends of the two are, and the greater the suspicion of electricity theft.

[0168] The closer the correlation index is to 0, the less obvious the linear relationship between the two.

[0169] A correlation index value close to -1 indicates a negative correlation.

[0170] The numerator is the total amount of the combined change in electrical energy increment and line loss, after removing the influence of their respective average values, thus obtaining a value that reflects the net effect of their combined fluctuation.

[0171] The denominator consists of the product of two square root terms. The first square root term represents the fluctuation range of the incremental electricity data itself. The second square root term represents the fluctuation range of the apparent line loss of the transformer substation itself.

[0172] The calculation process first uses the third accumulated value to capture the total amount of the same direction of change in electricity meter increment and line loss over time.

[0173] However, this total correlation may contain spurious associations simply because both have high long-term averages.

[0174] In order to obtain a pure, consistent signal that reflects the fluctuation trend, a background correction term is constructed by introducing a first and a second accumulated value in the calculation.

[0175] Subtracting this background term from the total product is equivalent to removing the static correlation component contributed by the long-term average level from the original coordinated signal. This results in the final signal used for judgment being a pure reflection of the degree of consistency between the fluctuations in electricity consumption around its average value and the fluctuations in line loss around its average value.

[0176] Different electricity meters naturally exhibit different fluctuations in normal electricity consumption; different transformer substations also have varying levels of natural fluctuation in physical line losses. If the purified coordinated signal is used directly for comparison, a meter with drastic fluctuations in its own electricity consumption, even if it is functioning normally, may generate a large signal value, leading to misjudgment.

[0177] To address this issue, a fourth and fifth accumulated value are introduced into the calculation process. By combining these values ​​with their respective accumulated values, the intensity of the electricity consumption fluctuations of the electricity meter itself and the intensity of the line loss fluctuations of the distribution area can be calculated separately.

[0178] The pure co-signal is divided by the product of the two fluctuation intensities, and the co-signal strength is scaled according to the activity or noise level of the two sequences themselves.

[0179] After this processing, the resulting correlation index becomes a standardized coefficient, whose value only represents the strength of trend synchronization and is unrelated to specific user types, network area size, etc.

[0180] Understandably, calculating the correlation index is a feature extraction process from raw rolling statistics to standardized indicators of suspected electricity theft. By fully utilizing several fixed cumulative values ​​maintained for each table, and through a single combination of operations including multiplication, subtraction, square root, and division, the core criteria for precise location are directly generated within a resource-constrained microcontroller. This achieves efficient mining and quantification of complex correlation patterns behind massive amounts of asynchronous time-series data with extremely low computational cost.

[0181] In some embodiments, optionally, determining the residual line loss based on the omission ratio includes:

[0182] The residual line loss is determined using the following formula:

[0183] ;

[0184] in, Y represents residual line loss, K represents apparent line loss of the transformer area, and K represents the omission rate. This is the incremental energy data corresponding to the first abnormal energy meter.

[0185] In this embodiment, the estimated amount of electricity stolen in the current cycle is calculated by multiplying the unreported proportion of the first abnormal electricity meter with its corresponding electricity increment data, and then deducting it from the original apparent line loss of the transformer area to obtain the residual line loss.

[0186] Understandably, by actively purifying the total abnormal loss signal, the greatest interference caused by the primary suspected meter was effectively eliminated, allowing the electricity consumption characteristics of the remaining meters to stand out against a purer residual line loss background. This creates key conditions for subsequent iterative analysis and locating other hidden electricity theft meters layer by layer.

[0187] The specific calculation of residual line loss realizes iterative stripping, marking the transition of the analysis from locking onto a single target to gradually removing interference and exposing hidden targets.

[0188] The essence of the technology lies in purifying the original, mixed, abnormal loss signals.

[0189] Specifically, based on the identified first abnormal energy meter and the calculated underreporting rate.

[0190] The leakage rate quantitatively characterizes the behavioral pattern of how much electricity is stolen for every kilowatt-hour used by the first abnormal energy meter. The estimated electricity theft impact caused by the first abnormal energy meter in this cycle is actively deducted from the total abnormal loss of the current cycle, i.e., the apparent line loss of the distribution area. This deduction generates a new, cleaner loss observation, the residual line loss.

[0191] The product of the underreporting rate and the incremental energy data corresponding to the first abnormal energy meter represents the estimated contribution of the first abnormal energy meter to the amount of electricity stolen in this cycle, based on its electricity consumption behavior and theft pattern. It is the largest known source of interference that needs to be removed from the total anomalies.

[0192] The apparent line loss of a transformer area is the original total anomaly that includes all unknown factors (including other potential electricity theft, physical line loss, measurement noise, etc.).

[0193] Residual line loss is the portion of the original transformer area loss that should remain after theoretically eliminating the impact of electricity theft from the first abnormal meter. Therefore, residual line loss mainly corresponds to and reflects the abnormal electricity consumption situation of the set of multiple sub-meters other than the first abnormal meter, as well as the remaining physical line loss.

[0194] Generating residual line loss is the foundation for this method to perform iterative analysis, which is equivalent to preparing a set of input data with the maximum noise removed for the next round of analysis.

[0195] In the next round of analysis, the original, heavily contaminated apparent line loss of the transformer area will no longer be used. Instead, the purified residual line loss will be used as a new benchmark to recalculate the correlation with the remaining electricity meters. In this way, the weak characteristics of other electricity theft meters that were originally masked or diluted by the strong electricity theft characteristics of the first abnormal meter may be highlighted in a new, cleaner context, thereby achieving layer-by-layer stripping and individual location.

[0196] The calculation of residual line loss is extremely lightweight, involving only one multiplication and one subtraction. All required input parameters are available instantly in the current period, without any historical data backtracking or complex iterative solutions. This perfectly meets the stringent requirements of microcontroller bare-metal systems for computational efficiency and memory usage. Through a single, concise calculation, the analytical perspective is switched from a mixed population to a pure remainder, laying an indispensable data foundation for the subsequent precise location of other anomalous targets within the remainder population. This is the core technical step that enables this method to systematically solve the engineering challenge of multiple forms of electricity theft mutually concealing each other.

[0197] In some embodiments, optionally, such as Figure 3 As shown, step S106: Determine the first abnormal energy meter from all energy meters based on the correlation index, including:

[0198] Step S1062: Obtain the preset security threshold;

[0199] Step S1064: Traverse all the correlation indices of the electricity meters, and identify the electricity meter with the highest correlation index that exceeds the preset safety threshold as the first abnormal electricity meter.

[0200] In this embodiment, a preset safety threshold is introduced as a judgment criterion. The electricity meter with the largest correlation index value and the correlation index value exceeding the preset safety threshold is identified as the primary abnormal target, i.e., the first abnormal electricity meter.

[0201] Understandably, by using threshold filtering and extreme value locking as dual judgments, continuous correlation measurements are transformed into clear and unique abnormal object outputs, enabling the algorithm to automatically identify and make decisions without human intervention. This significantly reduces the risk of misjudgment caused by random fluctuations and improves the reliability of the positioning results.

[0202] The preset safety threshold is a pre-set or dynamically configurable numerical criterion.

[0203] The preset safety threshold can be an empirical value (e.g., 0.7) obtained from statistical analysis of a large amount of historical normal data, or it can be a dynamic threshold that the system adaptively calculates based on the current load characteristics of the transformer area and the level of physical line loss.

[0204] In some embodiments, the preset safety threshold is optionally not a fixed value. The preset safety threshold is dynamically and adaptively adjusted based on the ambient temperature data measured by the measuring switch and the historical average total power to cope with the changes in basic physical line loss under different wire diameters and ambient temperatures, thereby further reducing the false alarm rate.

[0205] The correlation index of all electricity meters is iterated through, and the electricity meter corresponding to the correlation index with the largest value that exceeds the preset safety threshold is identified as the first abnormal electricity meter.

[0206] The system sequentially accesses the relevance indicators calculated for each electricity meter. During the traversal, the system executes a two-stage filtering logic:

[0207] First, it is determined whether the correlation index of the current electricity meter exceeds a preset safety threshold. This operation filters out all electricity meters with insignificant correlation, regardless of their index values, and these meters are considered to have no suspicious electricity theft behavior in the current cycle. This step solves the qualitative problem of the strength of correlation.

[0208] Among all the electricity meters that passed the first stage screening, the system compares their index values ​​and locks the one with the largest value.

[0209] In areas where electricity theft is prevalent, the anomaly table with the largest amount of stolen electricity and the most significant theft behavior should exhibit the strongest correlation (i.e., synchronicity) between its electricity consumption trend and the overall abnormal loss trend in the area. Therefore, identifying the maximum value means identifying the most significant source of abnormal interference.

[0210] Electricity meters that simultaneously meet both the conditions of exceeding the threshold and reaching the maximum value are identified as the primary abnormal electricity meters. These primary abnormal electricity meters are the ones most closely associated with abnormal losses in the transformer area and are the most suspected of electricity theft within the current statistical period.

[0211] If no electricity meter correlation index exceeds the preset safety threshold after the traversal is completed, the system determines that there is no significant suspicion of electricity theft and can end the current location process or enter the next statistical cycle.

[0212] In some embodiments, optionally, the step of identifying the electricity meter corresponding to the correlation index with the largest value exceeding a preset safety threshold as the first abnormal electricity meter outputs not only the electricity meter's identifier but also records the specific value of the correlation index when it was locked and the preset safety threshold used for the determination. By recording this determination context information, a quantitative basis is provided for subsequent audit traceability and decision confidence assessment.

[0213] In some embodiments, the system may optionally statistically analyze the correlation indices of all electricity meters that do not exceed a preset safety threshold, calculating their average and standard deviation. If the correlation index of the first abnormal electricity meter is not only the largest in value but also significantly higher than the average of the correlation indices of the remaining electricity meters (e.g., exceeding the average by several standard deviations), the system may assign a high-confidence label to it. By introducing a statistical significance test, the scientific rigor and credibility of identifying the primary suspect are enhanced.

[0214] In some embodiments, optionally, after the traversal is completed, if the correlation indicators of all electricity meters do not exceed a preset safety threshold, it is determined that there are no abnormal electricity theft characteristics in the current distribution area, a no-abnormality result is output, and data accumulation and analysis continue for the next statistical cycle. By clearly defining the processing flow under no-abnormality conditions, the integrity of the method logic is ensured, and unnecessary idling or false alarms can be effectively avoided under normal operating conditions.

[0215] In some embodiments, optionally, such as Figure 4 As shown, step S112: Determine at least one second abnormal energy meter from multiple sub-energy meters based on residual line loss, including:

[0216] Step S1120: Determine the apparent line loss of the iterative station area based on the residual line loss;

[0217] Step S1122: Determine the iteration correlation index corresponding to each sub-electricity meter based on the apparent line loss of the iterative transformer area and the incremental electricity data corresponding to multiple sub-electricity meters;

[0218] Step S1124: Determine the second abnormal energy meter based on the iterative correlation index and the preset safety threshold. The iterative correlation index of the second abnormal energy meter is higher than the preset safety threshold.

[0219] In this embodiment, the residual line loss calculated in the previous round is established as the new benchmark for this round of analysis, namely, the apparent line loss of the iterative transformer area. Based on the apparent line loss of the iterative transformer area and the incremental data of the remaining sub-meters, the corresponding iterative correlation index is recalculated for each sub-meter. By applying the same threshold comparison and extreme value screening logic as in the first round of judgment, the next suspect target, namely the second abnormal meter, is identified from the sub-meters.

[0220] Understandably, by using the purified residual line loss as a new input, the system can refocus its analysis on the remaining electricity meter in the context of eliminating the largest source of interference, thus highlighting the secondary electricity theft characteristics that were previously concealed, and achieving layer-by-layer analysis and localization of multiple, mutually concealing electricity theft behaviors.

[0221] The residual line loss is the transformer area loss signal after deducting the estimated impact of electricity theft from the first abnormal energy meter.

[0222] The residual line loss is directly used as the baseline signal for the next round of correlation analysis, and the apparent line loss of the transformer area is determined for the iterative analysis. Instead of using the original first-round apparent line loss of the transformer area, the purified residual line loss is used as the new input. This ensures that subsequent analyses are conducted in a less distorted context, giving a greater chance to highlight masked minor anomalies.

[0223] The new line loss sequence uses the apparent line loss of the transformer area in the current cycle as the latest data point, combined with its historical values ​​(under the rolling accumulation framework, its historical statistical characteristics are already contained in the updated state variables) to form a new line loss analysis sequence.

[0224] Multiple sub-meters refer to all the remaining meters after the first faulty meter is removed from the initial set of meters.

[0225] For each sub-meter, the same rolling accumulation and standardization formula as used in calculating the first round of correlation index is applied, but the line loss component in the calculation is entirely replaced with statistics derived from the apparent line loss of the transformer area and its historical values. The recalculated correlation coefficient is called the iterative correlation index.

[0226] Since the line loss signal has been purified, if a certain sub-meter does indeed have electricity theft, the positive correlation between its electricity consumption change and this new line loss signal will be stronger and more significant than in the first round of analysis, which may significantly improve the value of its iterative correlation index.

[0227] Obtain the same preset safety threshold, or a threshold adjusted after iteration rounds, and iterate through the iterative correlation indicators of all sub-meters. From these indicators, find the one with the largest value that exceeds the preset safety threshold. Identify the sub-meter corresponding to the indicator that meets the condition as the second abnormal meter. This signifies that the second suspected electricity theft target has been successfully identified.

[0228] If a second abnormal energy meter is found in this round, it can be used as a basis to calculate the underreporting ratio again, generate a new residual line loss, and continue the next round of iteration, thereby achieving layer-by-layer stripping.

[0229] In some embodiments, optionally, the first correlation index of the first abnormal energy meter not only exceeds a preset safety threshold, but also the difference between its value and the preset safety threshold reaches a minimum significant interval. By setting this activation condition, it is ensured that subsequent iterative analysis is triggered only when the target locked in the first round has a sufficiently high confidence level, thereby avoiding the amplification of subsequent iteration errors caused by the large uncertainty in the first round of judgment itself, and improving the stability of the entire iteration process.

[0230] In some embodiments, the preset safety threshold is optionally dynamically adjustable during the iteration process. When determining the second abnormal energy meter based on the iteration correlation index, the preset safety threshold used is an adaptively adjusted value based on the current iteration round and / or the historical fluctuation level of the apparent line loss of the iteration area. By dynamically adjusting the safety threshold as the iteration progresses and the environment changes, the judgment criteria can adapt to changes in signal purity and noise levels in different rounds, maintaining effective detection sensitivity for weak abnormal features even in the later stages of iteration.

[0231] In some embodiments, optionally, the output of the second abnormal energy meter includes not only the identifier of the second abnormal energy meter, but also the corresponding iterative correlation index and the statistical characteristics (e.g., its mean or variance) of the apparent line loss of the iterative transformer area on which the index is based. By associating and recording intermediate data and context during the iterative process, complete data support is provided for the verification of the location results, the analysis of abnormal behavior patterns, and the traceability of the entire iterative chain.

[0232] In some embodiments, optionally, after iterating through the correlation indices of all sub-meters, if no index is found to exceed a preset safety threshold, the current iteration process is terminated, it is determined that there are no other abnormal targets besides the identified abnormal meters, and the final set of electricity theft meters is output. By explicitly defining the termination condition of the iteration, it is ensured that the algorithm can end in a timely manner after exhausting all significant abnormal targets, thus improving execution efficiency.

[0233] In some embodiments, optionally, such as Figure 5 As shown, after determining the second abnormal energy meter based on the iterative correlation index and the preset safety threshold in step S112, the method further includes:

[0234] Step S1130: Determine the iterative residual line loss based on the omission ratio corresponding to the second abnormal energy meter. The iterative residual line loss corresponds to multiple sub-energy meters other than the first and second abnormal energy meters.

[0235] Step S1132: Based on the iterative residual line loss, determine a new second abnormal energy meter from multiple sub-energy meters other than the first and second abnormal energy meters, until the iterative correlation index is lower than or equal to the preset safety threshold.

[0236] Step S1134: When the correlation index of all remaining electricity meters is lower than or equal to the preset safety threshold, clear the state variables assigned to the electricity meters and enter the next statistical cycle.

[0237] In this embodiment, based on the latest locked abnormal energy meters and their under-count ratio, a purer iterative residual line loss is continuously generated as the analysis benchmark for the next round. On this benchmark, the correlation of the remaining energy meters is recalculated and the threshold is judged, thereby cyclically locking new abnormal targets.

[0238] The iterative process will continue until the correlation index of all remaining energy meters is no higher than the preset safety threshold, indicating that there are no more significant anomalies.

[0239] Understandably, by constructing a closed-loop iterative process of locking, stripping, and reanalyzing, it is possible to autonomously strip and locate all abnormal electricity meters with statistically significant electricity theft characteristics layer by layer without relying on prior knowledge, thereby achieving comprehensive monitoring and precise location of electricity theft behavior in the distribution area.

[0240] The underreporting rate is calculated using the same modified formula based on the rolling state variable and statistical cycle number corresponding to the second abnormal energy meter.

[0241] Then, using the apparent line loss of the iterative transformer area currently used for analysis, the calculated omission rate of the second abnormal energy meter, and the energy increment data of the second abnormal energy meter in the current cycle, the residual line loss is calculated. To distinguish it from the result of the first round, it can be called the iterative residual line loss.

[0242] From the current line loss signal (apparent line loss of the iterative transformer area), the estimated electricity theft impact of the newly identified second abnormal energy meter is subtracted. The resulting iterative residual line loss corresponds physically to the further purified transformer area loss. The iterative residual line loss mainly reflects the abnormal electricity consumption of multiple sub-energy meters (i.e., remaining energy meters) other than the first and second abnormal energy meters, which prepares cleaner analytical data for the next iteration.

[0243] The iterative residual line loss obtained in the previous step is used as the new baseline for line loss analysis.

[0244] Based on the new line loss analysis benchmark, the correlation index is recalculated for the remaining sub-electricity meters (i.e., the abnormal meters from the first two rounds have been excluded).

[0245] Applying the same threshold judgment logic, using a preset safety threshold, find the meter with the largest index that exceeds the threshold from the current remaining energy meters, and identify it as the new second abnormal energy meter.

[0246] Repeat the sub-process of updating the baseline, recalculating, and re-evaluating.

[0247] In each round of judgment, if the maximum correlation index exceeding the threshold is found in the current remaining energy meter, a new abnormal table is locked, and the next round of stripping continues.

[0248] If, in a given round of evaluation, the (recalculated) relevance index of all remaining electricity meters is lower than or equal to a preset safety threshold, it means that no statistically significant anomalies can be detected, and the iteration loop terminates. This condition ensures that the algorithm continues to mine until all anomalies with significant electricity theft characteristics are identified.

[0249] When the iteration ends due to the above termination condition, the output is the final set consisting of all abnormal energy meters locked by the previous iterations.

[0250] Subsequently, all state variables maintained for each electricity meter are cleared, and the common cycle counter is reset. This operation is necessary to prevent the unlimited accumulation of historical statistical data. If not cleared periodically, state variables will contain very old historical information that may not reflect the latest operating status and electricity consumption patterns of the distribution area, thus diluting the sensitivity to detect recent electricity theft. The clearing operation allows the system to periodically refresh the statistical perspective, focusing on electricity consumption behavior analysis within the next time window.

[0251] After the data is cleared, the system automatically enters the next statistical cycle. The cycle counter restarts counting from 1, and the status variable starts rolling accumulation from its initial value (usually zero), initiating a new round of data collection, statistical analysis, and electricity theft location processes. This ensures that the method can run continuously for a long time, enabling periodic monitoring of the power consumption status of the transformer substation.

[0252] In some embodiments, optionally, the process of iteratively determining a new second abnormal energy meter has a maximum upper limit on the number of iteration rounds. When the upper limit is reached, the iteration is forcibly terminated regardless of whether the correlation index of the remaining energy meters is lower than or equal to a preset safety threshold, and the currently determined set of abnormal energy meters is output. By introducing an iteration round limit, excessive looping that may occur under extreme data conditions (such as multiple energy meters having highly similar characteristics) is prevented, ensuring the real-time and deterministic nature of the system response and avoiding meaningless consumption of computing resources.

[0253] In some embodiments, optionally, a consistency check is performed on each energy meter in the final determined set of abnormal energy meters. The check includes comparing the correlation index values ​​when the meter was locked in each iteration. If the correlation index of a certain energy meter shows a monotonically increasing trend in multiple consecutive iterations (including the first iteration), a high-confidence label is added to the anomaly determination result. By introducing trend analysis across iterations as auxiliary verification, the credibility and reliability of the final location result are improved.

[0254] In one specific embodiment, optionally, the present invention relates to an anti-electricity theft method based on correlation coefficient and residual stripping, wherein the main data flow and processing flow rely on the execution of the main control microcontroller unit (MCU) of the measuring switch, and the specific steps are as follows: Figure 8 As shown, it includes:

[0255] Step S200: Periodic data copying and incremental calculation;

[0256] Step S202: Calculate the apparent line loss of the transformer area;

[0257] Step S204: Rolling accumulation of state variables based on bare metal;

[0258] Step S206: Initial correlation coefficient calculation and maximum suspect identification;

[0259] Step S208: Does it exist? > ;

[0260] If the judgment in step S208 is negative, then proceed to step S214: clear all accumulated variables;

[0261] If the judgment in step S208 is yes, then step S210 is executed: core residual iterative stripping calculation;

[0262] Step S212: Cyclic clearing and multiple abnormal alarms.

[0263] in, The maximum value among all the Pearson correlation coefficients (i.e., correlation indices) corresponding to all electricity meters. This is the safety threshold.

[0264] Specifically, step one: periodic data reading and incremental calculation:

[0265] The measurement switch module polls and reads the total frozen power of all connected sub-meters every set period T (e.g., 15 minutes) via RS485 bus. This data is then combined with the calculation of the total power increment of the measurement switch within the current period. And the power increment of the i-th sub-table. .

[0266] Step 2: Calculate the apparent line loss of the transformer area:

[0267] Within the same period T, calculate the apparent line loss Y of the current transformer area system, including physical losses and omission errors:

[0268] ;

[0269] Where Y is the apparent line loss, For the power increment of the i-th sub-table, This represents the total electrical increment of the measured switch within the cycle.

[0270] Step 3: Rolling accumulation of state variables based on bare metal:

[0271] Instead of allocating a large storage array for historical meter reading data, the system maintains only 5 static accumulators for each sub-table i.

[0272] After each meter reading cycle ends, perform the following rolling update:

[0273] Sub-meter power accumulation: ;

[0274] Line loss power accumulation: ;

[0275] Multiplication and accumulation: ;

[0276] Sub-table square accumulation: ;

[0277] Accumulated squared line loss: ;

[0278] The sample counter N increments: ;

[0279] Where N is the statistical threshold.

[0280] Step 4: Initial Correlation Coefficient Calculation and Maximum Suspicion Identification:

[0281] When the sample size reaches the statistical threshold N (e.g., N=288), the MCU calculates the Pearson correlation coefficient between each sub-table and the apparent line loss using the following formula. :

[0282] ;

[0283] Where Y is the apparent line loss, Let N be the power increment of the i-th sub-table, and N be the statistical threshold.

[0284] Traverse all sub-tables Value, find the maximum value The corresponding sub-table k. If Greater than the set safety threshold If (e.g., 0.70), then sub-table k is locked as the first suspected anomaly table.

[0285] Step 5: Iterative stripping calculation of core residuals:

[0286] To eliminate the significant interference of sub-meter k's leakage current on the apparent line loss waveform of the entire transformer area, and to expose other protected nodes, a stripping calculation is performed:

[0287] 1. Estimating the undercount rate K (based on the least squares method derived without average value transformation): In the traditional least squares slope formula... In this case, the solution depends on the average value calculated after the fact. This would require the microcontroller to store all historical raw data.

[0288] Therefore, this invention expands the original formula using a polynomial and substitutes the definition of the average value (e.g., ...). By combining like terms and eliminating the average variable, a modified formula that depends only on the static cumulative value in step three is derived:

[0289] ;

[0290] Where K is the underreporting rate and N is the statistical threshold. Y represents the apparent line loss, representing the increase in electricity consumption for the first suspected anomaly table at the statistical threshold.

[0291] Using the modified formula, the MCU can directly calculate the precise proportion K of the unreported electricity in sub-table k to its reported electricity, without having to backtrack to the historical array.

[0292] 2. Generate residual line loss: Correct the total apparent line loss Y of the transformer area to the residual line loss after removing the influence of sub-table k. :

[0293] ;

[0294] 3. Secondary eigenre resonance matching: Mark sub-table k as "investigated" and trigger an alarm. The system uses the stripped residual line loss. Then, perform rolling accumulation and correlation coefficient calculation again with the remaining sub-tables.

[0295] Step Six: Cyclic Reset and Multiple Anomaly Alarms:

[0296] After removing the largest source of interference, other electricity meters that were previously concealed, along with residual line loss, were revealed. The correlation coefficient will spike significantly. If, after recalculation, the remaining sub-tables still contain the largest correlation coefficient... If so, the second abnormal suspect list is locked, and the stripping action in step five is repeated again.

[0297] This process is repeated iteratively, peeling away the disguised abnormal features layer by layer, until the correlation coefficients of all remaining sub-tables fall back to the low-noise range near 0. Then, all accumulated variables are cleared, and the next statistical cycle begins.

[0298] In one specific embodiment, optionally, relying on the bare-metal front-end and back-end architecture of the microcontroller of the measurement switch module, the core implementation of this solution is extremely lightweight data structured management.

[0299] In the system's Random Access Memory (RAM), a structure array containing members sum_X, sum_Y, sum_XY, sum_X2, sum_Y2, and count is defined to create an independent status record for each sub-table. In the while(1) main loop (without a real-time operating system), meter reading and data processing tasks are performed every 15 minutes.

[0300] The data trend chart shows the mutual masking of multiple epitope anomalies and the principle of residual iterative stripping. Figure 9 As shown, through the three-stage data curve changes, residual iterative peeling demonstrates the dynamic working principle and excellent effect in handling scenarios where multiple energy meters are simultaneously stealing electricity.

[0301] The horizontal axis represents the statistical sample N, which indicates the statistical cycle number in which the algorithm has been executed consecutively (e.g., the 1st to the 288th 15-minute cycle); the left vertical axis represents the correlation coefficient. It is used to measure the correlation strength between the electricity consumption of each sub-meter and the total abnormal loss of the transformer area; line loss (kWh) represents the difference between the total electricity consumption of the transformer area's main meter and the sum of the electricity consumption of all sub-meters.

[0302] Phase 1: Mutual Covering of Anomalies Across Multiple Tables:

[0303] The first stage corresponds to the state when the algorithm first calculates the correlation coefficients of all sub-meters. The curve of apparent line loss Y (usually a curve with large fluctuations) represents the total abnormal electricity volume, including all physical line losses and unknown electricity theft losses. At this time, due to the existence of multiple electricity theft meters, such as sub-meter 1 (k) and sub-meter 2, their electricity theft behavior contributes to and is mixed in the apparent line loss Y, resulting in mutual interference and feature overlap of signals.

[0304] Therefore, the correlation coefficient curves of sub-table 1 and sub-table 2 are both at a high level in the initial stage, and the values ​​are close and fluctuate intertwined, making it difficult to clearly distinguish which is the main source of anomalies.

[0305] Safety threshold (e.g., 0.70) The horizontal dashed line indicates the benchmark for judging abnormalities.

[0306] Phase Two: Identifying the First Suspect List and Residual Stripping:

[0307] The effect of the second stage corresponding to the algorithm locking the first abnormal energy meter (e.g., sub-meter 1) and performing the first stripping.

[0308] Based on principles such as the maximum correlation coefficient, sub-table 1 (marked as k) is identified as the first suspected table, and its underreporting rate K is estimated according to the formula.

[0309] The algorithm performs calculations, subtracting the estimated electricity theft impact from sub-table 1 from the original apparent line loss Y, generating a new residual line loss curve. The amplitude of is significantly lower than that of Y.

[0310] Characteristic resonance manifestation: using residual line loss Replace Y and recalculate the correlation coefficients of the remaining sub-tables (mainly sub-table 2 at this point).

[0311] The correlation coefficient curve in sub-table 2 spiked sharply in the second stage, significantly exceeding the safety threshold. And it may be close to 1. This is because after the largest source of interference, Sub-Table 1, is removed, the correlation between the electricity theft characteristics of Sub-Table 2 and the purified loss signal becomes exceptionally clear and strong; this phenomenon is called secondary eigenre resonance matching. Marking Sub-Table 1 as detected means that it has been identified and removed from the subsequent analysis set.

[0312] Phase Three: Locking in the Second Suspect List and Further Stripping:

[0313] Based on the soaring correlation coefficient, the algorithm then identifies sub-table 2 as the next suspected target.

[0314] The stripping process was repeated, the undercount rate in sub-table 2 was estimated, and the residual line loss was updated again. After this stripping, the magnitude of the residual line loss decreased further.

[0315] The correlation coefficients of all remaining sub-meters were recalculated using the new residual line loss. Ultimately, the correlation coefficients of all meters returned to the safe threshold. The following low-level range (noise floor range) indicates that all significant abnormal electricity theft characteristics have been identified and eliminated in sequence. The remaining line loss fluctuations mainly originate from physical line loss and random noise, and the algorithm has successfully completed this round of investigation. The system then clears the state variables and enters the next statistical cycle.

[0316] In one specific embodiment, optionally, a threshold is determined. Based on the ambient temperature data and historical average total power measured by the measuring switch, dynamic adaptive floating adjustment can be performed to cope with changes in basic physical line loss under different wire diameters and ambient temperatures, further reducing the false alarm rate.

[0317] In one specific embodiment, optionally, the present invention can not only be perfectly adapted to low-voltage distribution area measurement switches, but can also be directly applied to metering and verification scenarios with asynchronous communication delays, such as charging pile group management systems and distributed photovoltaic multi-inverter power grid connection verification.

[0318] The task processing function only needs to iterate through the structure array using a simple for loop and execute single-precision floating-point addition and multiplication instructions to complete the state update. The execution time is in the microsecond range, avoiding program blocking. When the settlement logic is triggered to calculate the Pearson coefficient and slope K, the code directly calls the five accumulated constants in the structure and substitutes them into the transformation formula. Combined with the software interception protection mechanism to prevent zero denominator exceptions, the program security in industrial settings under data loss or extreme interference conditions is ensured.

[0319] like Figure 6As shown in the figure, this application embodiment also provides an electricity theft location device 900, which includes: a data acquisition module 902, used to acquire the total power increment corresponding to the measuring switch and the power increment data of each electricity meter within a preset period; a transformer area line loss module 904, used to determine the apparent line loss of the transformer area based on the total power increment and multiple power increment data; a correlation determination module 906, used to determine the correlation index corresponding to each electricity meter based on the apparent line loss of the transformer area and the power increment data; and a first anomaly module 908, used to determine a first anomaly from all electricity meters based on the correlation index. The system includes: an electricity meter; a ratio determination module 910, used to determine the underreporting ratio of the first abnormal electricity meter based on the electricity increment data corresponding to the first abnormal electricity meter and the apparent line loss of the transformer area; a residual determination module 912, used to determine the residual line loss based on the underreporting ratio, the residual line loss corresponding to multiple sub-electricity meters other than the first abnormal electricity meter; a second abnormality module 914, used to determine at least one second abnormal electricity meter from multiple sub-electricity meters based on the residual line loss; and an electricity theft location module 916, used to determine the electricity theft meter corresponding to the measuring switch based on the first abnormal electricity meter and at least one second abnormal electricity meter.

[0320] In some embodiments, the electricity theft location device 900 may optionally be a microcontroller.

[0321] like Figure 7 As shown in the figure, this application embodiment also provides a measuring switch 1000, which is connected to multiple electricity meters 2000; the measuring switch 1000 includes an electricity theft location device 900.

[0322] For example, the measuring switch 1000 polls and reads multiple energy meters 2000 via an industrial serial bus.

[0323] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described electricity theft location method embodiments and achieve the same technical effects. To avoid repetition, these will not be described again here. Furthermore, the readable storage medium improves the data storage capacity and data processing speed of the electricity theft location method in this application.

[0324] A computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A computer-readable storage medium can be an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing, but is not limited thereto. A non-exhaustive list of more specific examples of computer-readable storage media includes: portable computer floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital universal disk (DVD), memory cards, floppy disks, encoding mechanical devices (e.g., punched cards or grooves with raised structures for recording instructions), and any suitable combination of the foregoing. The computer-readable storage medium used herein should not be construed as the transmission of signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media, or electrical signals transmitted through wires.

[0325] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0326] In this invention, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance; the term "multiple" refers to two or more unless otherwise explicitly defined. The terms "install," "connect," "link," and "fix" should be interpreted broadly. For example, "connect" can be a fixed connection, a detachable connection, or an integral connection; "link" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0327] In the description of this invention, it should be understood that the terms "upper," "lower," "left," "right," "front," "rear," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or unit referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0328] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to specific features, structures, materials, or characteristics described in connection with an embodiment or example that are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0329] The above are merely preferred embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for locating electricity theft, characterized in that, The method for locating electricity theft includes: (The method is applied to a measuring switch connected to multiple electricity meters.) Obtain the total power increment corresponding to the measuring switch and the power increment data of each of the energy meters within a preset period; The apparent line loss of the transformer area is determined based on the total power increment and multiple power increment data. The correlation index corresponding to each of the energy meters is determined based on the apparent line loss of the transformer area and the incremental energy data. The first abnormal energy meter is determined from all the energy meters according to the correlation index; The under-metering ratio of the first abnormal energy meter is determined based on the energy increment data corresponding to the first abnormal energy meter and the apparent line loss of the transformer area. The residual line loss is determined based on the omission ratio, and the residual line loss corresponds to multiple sub-energy meters other than the first abnormal energy meter. Based on the residual line loss, at least one second abnormal energy meter is determined from among the plurality of said sub-energy meters; The electricity theft meter corresponding to the measuring switch is determined based on the first abnormal electricity meter and at least one second abnormal electricity meter.

2. The method for locating electricity theft according to claim 1, characterized in that, The step of determining the correlation index corresponding to each electricity meter based on the apparent line loss of the transformer area and the incremental electricity data includes: Obtain a set of state variables assigned to each of the energy meters; After each preset cycle ends, a rolling state variable is determined for the state variable of the corresponding energy meter based on the incremental energy data and the apparent line loss of the transformer area. Get the number of cycles corresponding to the rolling state variable; When the number of cycles reaches a preset threshold, the energy increment sequence is determined based on the rolling state variable of each energy meter; The correlation index is determined based on the power increment sequence and the apparent line loss of the transformer area.

3. The method for locating electricity theft according to claim 2, characterized in that, The state variables include, but are not limited to: a first accumulated value corresponding to the incremental power data, a second accumulated value corresponding to the apparent line loss of the transformer area, a third accumulated value corresponding to the product of the incremental power data and the apparent line loss of the transformer area, a fourth accumulated value corresponding to the square of the incremental power data, and a fifth accumulated value corresponding to the square of the apparent line loss of the transformer area. The correlation index is determined by the following formula: ; in, Here, N is the correlation index, and N is the statistical threshold. This is the first accumulated value. This is the second accumulated value. This is the third accumulated value. This is the fourth accumulated value. This is the fifth accumulated value. Y represents incremental electricity consumption data, and Y represents the apparent line loss of the transformer area.

4. The method for locating electricity theft according to claim 1, characterized in that, The determination of residual line loss based on the omission ratio includes: The residual line loss is determined according to the following formula: ; in, Y represents residual line loss, K represents apparent line loss of the transformer area, and K represents the omission rate. This is the incremental energy data corresponding to the first abnormal energy meter.

5. The method for locating electricity theft according to claim 1, characterized in that, The step of determining the first abnormal energy meter from all the energy meters based on the correlation index includes: Obtain the preset security threshold; The correlation index of all electricity meters is traversed, and the electricity meter corresponding to the correlation index with the largest value that exceeds the preset safety threshold is identified as the first abnormal electricity meter.

6. The method for locating electricity theft according to claim 5, characterized in that, The step of determining at least one second abnormal energy meter from among the multiple sub-energy meters based on the residual line loss includes: Determine the apparent line loss of the iterative transformer area based on the residual line loss; The iteration correlation index corresponding to each of the sub-electricity meters is determined based on the apparent line loss of the iterative transformer area and the incremental electricity data corresponding to the multiple sub-electricity meters. The second abnormal energy meter is determined based on the iterative correlation index and the preset safety threshold, wherein the iterative correlation index of the second abnormal energy meter is higher than the preset safety threshold.

7. The method for locating electricity theft according to claim 6, characterized in that, After determining the second abnormal energy meter based on the iterative correlation index and the preset safety threshold, the method further includes: The iterative residual line loss is determined based on the omission ratio corresponding to the second abnormal energy meter, and the iterative residual line loss corresponds to multiple sub-energy meters other than the first abnormal energy meter and the second abnormal energy meter. Based on the iterative residual line loss, a new second abnormal energy meter is determined from multiple sub-energy meters other than the first and second abnormal energy meters, until the iterative correlation index is lower than or equal to the preset safety threshold. When the correlation index of all remaining electricity meters is lower than or equal to the preset safety threshold, the state variables assigned to the electricity meters are cleared, and the next statistical cycle begins.

8. A device for locating electricity theft, characterized in that, include: The data acquisition module is used to acquire the total power increment corresponding to the measuring switch and the power increment data of each energy meter within a preset period; The transformer area line loss module is used to determine the apparent line loss of the transformer area based on the total power increment and multiple power increment data; The relevant determination module is used to determine the correlation index corresponding to each of the electricity meters based on the apparent line loss of the transformer area and the incremental power data; The first anomaly module is used to determine the first abnormal energy meter from all the energy meters according to the correlation index; The ratio determination module is used to determine the under-metering ratio of the first abnormal energy meter based on the energy increment data corresponding to the first abnormal energy meter and the apparent line loss of the transformer area. The residual determination module is used to determine the residual line loss based on the omission ratio, wherein the residual line loss corresponds to multiple sub-energy meters other than the first abnormal energy meter. The second anomaly module is used to determine at least one second abnormal energy meter from among the multiple sub-energy meters based on the residual line loss; The electricity theft location module is used to determine the electricity theft meter corresponding to the measuring switch based on the first abnormal electricity meter and at least one second abnormal electricity meter.

9. A measuring switch, characterized in that, The measuring switch is connected to multiple energy meters; The measuring switch includes the electricity theft location device as described in claim 8.

10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the electricity theft location method as described in any one of claims 1 to 7.