Automatic Risk Identification Method and System for Electricity Meters Based on Big Data

By using a method based on big data from electricity meters, combined with the isolated forest model and theoretical physics model, and correcting the anomaly score, the problem of misjudgment and missed judgment in electricity meter anomaly detection methods under dynamic and changing environments is solved, and the accurate identification and reliability of electricity meter anomalies are achieved.

CN121502619BActive Publication Date: 2026-04-03JIANGYIN CHANGYI GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing methods for detecting anomalies in electricity meters have weak generalization capabilities when faced with dynamic changes in different users, seasons, and electricity consumption patterns. They struggle to accurately extract abnormal features from massive, multi-dimensional, and time-series electricity meter data, leading to frequent misjudgments and missed judgments, which affects the reliability of anomaly identification.

Method used

A big data approach based on electricity meters is adopted. By collecting multi-dimensional operational data in real time, feature vectors are constructed and input into an isolated forest model to calculate the original anomaly score. Combined with theoretical physical models and time series pattern analysis, the anomaly score is corrected and anomaly thresholds are constructed to identify the anomaly risk of electricity meters.

Benefits of technology

It can effectively identify normal electricity consumption behavior that conforms to electromagnetic transient laws, avoid misjudgment, capture the slow trend and irreversible degradation characteristics in current changes, significantly improve the accuracy and reliability of risk identification of electricity meters, and reduce false alarms and missed alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502619B_ABST
    Figure CN121502619B_ABST
Patent Text Reader

Abstract

This invention relates to the field of data processing, and more particularly to an automatic risk identification method and system for electricity meters based on big data from electricity meters. The method includes: collecting operational data from multiple dimensions of the electricity meter and segmenting it according to fixed-duration time windows to obtain data blocks containing the time sequence of operational data for each dimension; extracting features from the current data block and constructing a feature vector; inputting the feature vector into a trained isolated forest model and calculating the original anomaly score; correcting the original anomaly score to obtain a corrected anomaly score; constructing an anomaly threshold; and determining that the current data block of the electricity meter has an anomaly risk when the corrected anomaly score is greater than the anomaly threshold. This invention deeply integrates the anomaly detection capability of isolated forest with physical laws and time-series pattern analysis, so that the corrected anomaly score contains both static feature anomaly information and dynamic evolution pattern information, comprehensively improving the accuracy and reliability of electricity meter risk identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing. In particular, it relates to a method and system for automatic risk identification of electricity meters based on big data from electricity meters. Background Technology

[0002] With the rapid development of smart grids, electricity meters, as key terminal devices for monitoring grid operation status and analyzing user electricity consumption behavior, directly affect grid safety, metering accuracy, and user electricity reliability. Currently, electricity meters generally have data acquisition and communication functions, enabling them to upload multi-dimensional operational data such as voltage, current, power, and power factor in real time, forming massive amounts of electricity meter operation big data.

[0003] However, traditional electricity meter anomaly detection methods are mostly based on threshold judgment or simple statistical rules, relying on fixed thresholds or manual experience to set parameters. They are difficult to adapt to dynamic changes in different users, different seasons, and different electricity consumption patterns. The system has weak generalization ability and is difficult to accurately extract abnormal features from massive, multi-dimensional, and time-series electricity meter data. It is easily affected by normal electricity consumption fluctuations and load changes, resulting in frequent misjudgments and missed judgments, a large number of invalid alarms, and affecting the reliability of anomaly identification.

[0004] Therefore, existing methods for detecting anomalies in electricity meters suffer from low reliability in anomaly identification. Summary of the Invention

[0005] To address the technical problem of low reliability in anomaly identification in the aforementioned electricity meter anomaly detection methods, this invention provides solutions in the following aspects.

[0006] In the first aspect, the automatic risk identification method for electricity meters based on big data of electricity meters includes:

[0007] Real-time acquisition of multiple dimensions of operational data from electricity meters is performed and segmented according to fixed-duration time windows to obtain data blocks containing the time sequence of operational data for each dimension. Feature extraction is performed on the current data block and a feature vector is constructed.

[0008] The feature vectors are input into the trained isolated forest model, and the original outlier scores are calculated.

[0009] The original anomaly score is corrected to obtain a corrected anomaly score. An anomaly threshold is constructed. When the corrected anomaly score is greater than the anomaly threshold, the current data block of the electricity meter is determined to have an anomaly risk.

[0010] The method for correcting the original anomaly score includes: for the current time series in the current data block, constructing a theoretical physical model, and calculating a physical consistency index based on the current time series and the predicted current value of the theoretical physical model; determining the electricity consumption cycle, and calculating the mode consistency component based on the physical consistency index of a preset number of historical cycles; obtaining the maximum current change rate based on the current time series, and calculating the trend change rate component based on the maximum current change rate, the current time series, and the sampling interval; calculating the mode discrimination index based on the mode consistency component and the trend change rate component; calculating the moving average and moving standard deviation of the mode discrimination index, calculating the correction coefficient based on the moving standard deviation, calculating the correction factor based on the correction coefficient, the mode discrimination index, and the moving average, and multiplying the correction factor by the original anomaly score to obtain the corrected anomaly score.

[0011] Preferably, the process of constructing the theoretical physical model includes: based on the transient response model of a first-order RL circuit, using the current time series data of the current data block as the fitting target, solving the model parameters of the transient response model of the first-order RL circuit by minimizing the prediction error, and obtaining the theoretical physical model.

[0012] Preferably, the calculation of the physical consistency index of the predicted current value based on the current time series and the theoretical physical model includes: obtaining the predicted current value corresponding to each sampling point in the current time series based on the theoretical physical model; calculating the residual value between the measured current value and the corresponding predicted current value at each sampling point in the current time series; and summing the squares of all residual values ​​to obtain the residual sum of squares; calculating the average value of all measured current values ​​in the current time series and the difference between each measured current value and the average value; and summing the squares of all differences to obtain the total sum of squares; and taking the square root of the ratio of the residual sum of squares to the total sum of squares, and subtracting the square root from 1 to obtain the physical consistency index.

[0013] Preferably, the calculation of the pattern consistency component based on the physical consistency index of a preset number of historical periods includes: determining the historical similar time period corresponding to the current data block in the most recent preset number of historical periods based on the electricity consumption cycle; obtaining the physical consistency index corresponding to each historical similar time period, and averaging all physical consistency indices to obtain the pattern consistency component.

[0014] Preferably, the calculation of the trend rate of change component based on the maximum current change rate, current time series, and sampling interval includes: obtaining the difference between each measured current value and the average value of all measured current values ​​in the current time series, and selecting the difference with the largest absolute value; calculating the ratio between the current change rate with the largest absolute value and the difference with the largest absolute value, and calculating the product of this ratio and the sampling time interval to obtain the trend rate of change component.

[0015] Preferably, the calculation of the pattern discrimination index based on the pattern consistency component and the trend rate of change component includes: calculating the sum of the pattern consistency component and the trend rate of change component, and using the ratio of the pattern consistency component to the sum as the pattern discrimination index.

[0016] Preferably, the calculation of the correction coefficient based on the sliding standard deviation includes: setting a zero-prevention constant, selecting the maximum value between the sliding standard deviation and the zero-prevention constant of the current data block, and using the reciprocal of the maximum value as the correction coefficient.

[0017] Preferably, the calculation of the correction factor based on the correction coefficient, the mode discrimination index, and the moving average includes: calculating the difference between the mode discrimination index and the moving average of the current data block, using the product of the difference and the correction coefficient as the exponent, calculating the exponential function value with the natural constant e as the base, adding 1 to the exponential function value and taking the reciprocal to obtain the correction factor.

[0018] Preferably, the method for constructing the anomaly threshold includes: obtaining the corrected anomaly scores of all data blocks that were judged to be normal within the most recent preset number of days of the current data block, forming an anomaly score sequence; calculating the mean and standard deviation of the anomaly score sequence, and using the sum of the mean of the anomaly score sequence and three times the standard deviation as the anomaly threshold of the current data block.

[0019] Secondly, an automatic risk identification system for electricity meters based on big data of electricity meters includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned automatic risk identification method for electricity meters based on big data of electricity meters is implemented.

[0020] The present invention has the following effects:

[0021] 1. This invention can effectively identify normal power consumption behaviors (such as motor starting) that conform to electromagnetic transient laws by calculating physical consistency index, and avoid misjudging them as abnormal; combined with pattern consistency component, it can further identify periodic normal power consumption patterns, thereby significantly suppressing false alarms for normal power consumption behaviors.

[0022] 2. This invention, through the trend change rate component and the pattern discrimination index, can capture the slow trend and irreversible degradation characteristics in current changes, enabling early identification of progressive faults such as metering chip aging and sensor drift, and avoiding missed reports.

[0023] 3. By deeply integrating the anomaly detection capabilities of isolated forests with physical laws and time-series pattern analysis, the final output corrected anomaly score includes both static feature anomaly information and dynamic evolution pattern information, thus comprehensively improving the accuracy and reliability of electricity meter risk identification. Attached Figure Description

[0024] Figure 1This is a flowchart of steps S1-S3 in the automatic risk identification method for electricity meters based on big data of electricity meters according to an embodiment of the present invention.

[0025] Figure 2 This is a schematic diagram of steps S30-S34 in the automatic risk identification method for electricity meters based on big data of electricity meters according to an embodiment of the present invention. Detailed Implementation

[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0027] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0028] Reference Figure 1 The automatic risk identification method for electricity meters based on big data of electricity meters includes steps S1-S3, as follows:

[0029] S1: Real-time acquisition of multiple dimensions of operation data from the electricity meter and segmentation according to a fixed time window to obtain a data block containing the time sequence of operation data for each dimension. Feature extraction is performed on the current data block and a feature vector is constructed.

[0030] Multi-dimensional operational data is collected in real time from smart meters deployed in the regional power grid, with a collection frequency of once per minute. The collected data dimensions include: voltage, current, active power, reactive power, power factor, and total harmonic distortion.

[0031] Data acquisition is transmitted to edge computing nodes via power line carrier communication or wireless network to ensure data integrity and real-time performance. Data streams from each electricity meter are stored independently and tagged with device ID, location information, and acquisition time to form a raw dataset. The raw dataset is then segmented into 15-minute time windows to form data blocks, each containing the time sequence of operational data across the aforementioned dimensions. The most recently formed data block is designated as the current data block.

[0032] To transform the raw measurement data into reliable, comparable, and analyzable standard data, preprocessing of the operational data within the data block is necessary. The preprocessing process includes: outlier identification and repair, employing verification rules based on physical constraints (e.g., voltage range 220V ± 10%, power factor range 0~1). For data points exceeding the constraint range, linear interpolation of adjacent time points is used for repair; noise filtering, using a median filtering algorithm with a 5-minute window size. Since the data block contains 15 sampling points (15 minutes, 1 sampling point per minute), the 5-minute window size effectively filters noise without excessively smoothing data details, while also meeting the technical constraint that the median filtering window size must be odd; and data standardization: employing a global range standardization method, mapping each dimension of data to the [0, 1] interval using the Min-Max standardization method, where the minimum and maximum values ​​are obtained from the initial normal operating data of the electricity meter. Specifically, during the system initialization phase, the operating data of the electricity meter for the first 30 days after commissioning is used as a benchmark. Minimum and maximum values ​​are calculated for the voltage, current, active power, reactive power, power factor, and total harmonic distortion (THD) sequences over the entire 30 days. These extreme values ​​represent the normal operating range of the electricity meter in its new state and fully reflect the data distribution characteristics of the equipment in good working order.

[0033] Statistical features (mean, variance, kurtosis, skewness) and frequency domain features (magnitude of major harmonic components) are extracted from the preprocessed data block to construct a feature vector. This yields the preprocessed current data block and its feature vector.

[0034] S2: Input the feature vectors into the trained isolated forest model and calculate the original outlier scores.

[0035] The feature vectors of data blocks from the first 30 days after the electricity meter is put into operation are used as the training sample set to construct an isolated forest model containing 100 isolated trees. During this period, the electricity meter is in a brand new state, without any degradation phenomena such as metering chip aging, sensor drift, or connector oxidation, ensuring the authenticity and reliability of the training data.

[0036] The calculation method for the original outlier score includes: calculating the average path length of the feature vector of the current data block in the isolated forest model; obtaining the average path length of the binary search tree of the total sample size when constructing the isolated forest and using it as a normalization factor; calculating the ratio of the average path length of the current data block to the normalization factor; and calculating the original outlier score by raising the power of the negative of the aforementioned ratio to base 2. The specific formula is as follows:

[0037]

[0038] In the formula, Indicates the first The raw anomaly score of each data block; Representing the eigenvector Average path length in the isolated forest model; Representing the eigenvector Path length in a single tree; This represents the normalization factor, used when constructing the Isolation Forest model. The average path length of the binary search tree for each sample; the negative exponential function with base 2 is constructed to map the original anomaly scores to the [0,1] interval.

[0039] This characterizes the relative relationship between the average path length of the current feature vector samples and the theoretically expected average path length. When the ratio is approximately equal to 1, A ratio of approximately 0.5 indicates that the feature distribution of this sample is highly consistent with the overall feature distribution of the normal dataset established during the training phase, and it belongs to a typical normal sample; when the ratio is significantly less than 1, A ratio approaching 1 indicates that the sample is located in a sparse or marginal region in the feature space, easily isolated by a small number of partitions, suggesting that its behavior pattern deviates from the main distribution of the normal dataset and is suspected of being abnormal. The smaller the ratio, the greater the degree of deviation; when the ratio is significantly greater than 1... A value close to 0 indicates that the sample is located in a dense core region in the feature space and is difficult to isolate. This suggests that its behavior pattern highly conforms to the typical characteristics of a normal dataset and is a highly normal sample.

[0040] The original anomaly score only reflects the degree of anomaly in the static feature space and cannot distinguish the anomaly type and temporal evolution pattern. In particular, it cannot identify instantaneous power consumption changes that conform to physical laws and gradual equipment degradation. Therefore, it is necessary to dynamically correct the original anomaly score.

[0041] S3: Correct the original anomaly score to obtain the corrected anomaly score, construct the anomaly threshold, and determine that the current operating data of the electricity meter has an anomaly risk when the corrected anomaly score is greater than the anomaly threshold.

[0042] Reference Figure 2 The process of correcting the original outlier scores includes steps S30-S34, as follows:

[0043] S30: For the current timing sequence in the current data block, construct a theoretical physical model, and calculate the physical consistency index based on the current timing sequence and the predicted current value of the theoretical physical model.

[0044] In complex electrical environments, different types of abnormal behaviors exhibit drastically different physical evolution characteristics. Instantaneous power surges (such as motor starting and large equipment start-up and shutdown) follow electromagnetic transient physics laws, and their current changes can be described by a first-order RL circuit transient response model, exhibiting typical exponential decay characteristics. In contrast, gradual equipment degradation (such as metering chip aging, sensor drift, and connector oxidation) manifests as long-term, slow, and irreversible linear or polynomial trend changes, severely violating normal electromagnetic physics models. Therefore, a first-order RL circuit transient response model is used as the theoretical physical model to quantify the degree of agreement between measured current timing and theoretical physical laws.

[0045] For the current timing sequence in the current data block, a first-order RL circuit transient response model is used for fitting. The data expression of the first-order RL circuit transient response model is:

[0046]

[0047] In the formula, This indicates that the theoretical physical model is at time 10:00. The predicted current value; This represents the steady-state current value, that is, the stable current value reached after the transient process ends, such as the current value when the motor is running stably after starting. This represents the initial current value, that is, the current value at the beginning of the transient process, such as the current value at the instant the start button is pressed; It represents the time constant and is a physical quantity that characterizes the decay rate of a transient process; This represents a time variable, starting from the beginning of the transient process.

[0048] To ensure that the transient response model of the first-order RL circuit accurately matches the measured data, the Levenberg-Marquardt algorithm is used to estimate the model parameters. , and The error function is defined as the sum of squared residuals between the measured current value and the model's predicted current value:

[0049]

[0050] in, Indicates the first The current timing in each data block is at time... The measured current value, This represents the total number of all acquisition times in the current timing sequence (e.g., The total data acquisition time for the data block is 15 minutes, with one sampling point per minute; this is achieved by solving an optimization problem. Obtain the optimal estimate of the model parameters.

[0051] After fitting the theoretical physical model, the physical consistency index is calculated based on the measured current values ​​in the current time series and the predicted current values ​​of the theoretical physical model. The specific calculation method is as follows: Based on the theoretical physical model, the predicted current value corresponding to each sampling point in the current time series is obtained. The residual value between the measured current value and the corresponding predicted current value at each sampling point in the current time series is calculated, and the sum of squares of all residual values ​​is obtained. The average value of all measured current values ​​in the current time series and the difference between each measured current value and this average value are calculated, and the sum of squares of all differences is obtained. The square root of the ratio of the residual sum of squares to the total sum of squares is taken, and 1 minus the square root value yields the physical consistency index. The specific formula is as follows:

[0052]

[0053] In the formula, Indicates the first Physical consistency metrics for each data block; Indicates the first The current timing in each data block is at time... The measured current value; Indicates the first The current timing in each data block is at time... The predicted current value; Indicates the first The average of all measured current values ​​in the current timing sequence of each data block; This represents the total number of all sampling moments in the current timing sequence.

[0054] It represents the sum of squared residuals between the measured current value and the predicted current value of the theoretical physical model, reflecting the total error of the theoretical physical model failing to fit the data. The sum of squares represents the total squares of the measured current values ​​around their mean, reflecting the overall degree of variation in the data. The ratio of the residual sum of squares to the total sum of squares represents the proportion of data variation that the theoretical physical model cannot explain. The result is calculated by subtracting the square root of this ratio from 1. It intuitively represents the extent to which theoretical physical models can explain the variations in measured data.

[0055] The range is [0,1], when When the value approaches 1, it indicates that the measured current timing is in high agreement with the theoretical physical model. The current change exhibits typical exponential decay transient characteristics and strictly follows the basic laws of electromagnetic induction. Typical scenarios include normal instantaneous power consumption behaviors such as motor starting, transformer switching, and large equipment starting. Under these circumstances, even if the current amplitude changes drastically, it is a normal phenomenon that conforms to the laws of physics and should not be misjudged as equipment failure.

[0056] when When the current approaches zero, it indicates that the measured current timing deviates significantly from the theoretical physical model, and the current change process violates the basic laws of electromagnetic physics. Typical scenarios include accuracy drift caused by aging metering chips, current sensor failure, poor connector contact, and other progressive degradation problems of equipment. These anomalies usually manifest as slow linear trends, non-exponential decaying oscillations, or irregular fluctuations, which cannot be described by standard electromagnetic transient models.

[0057] S31: Determine the electricity consumption cycle and calculate the mode consistency component based on the physical consistency index of a preset number of historical cycles.

[0058] In the power grid operating environment, normal electricity consumption behavior and equipment failure behavior differ fundamentally in their temporal evolution patterns. Normal electricity consumption behavior (such as factories starting production lines at 9:00 AM daily and commercial buildings turning off lights at 6:00 PM daily) exhibits strong periodicity and repeatability, with highly consistent patterns over similar historical time periods, and the changes are smooth and predictable. In contrast, equipment failure behavior (such as accuracy drift caused by aging metering chips, decreased sensitivity of current sensors, and degradation of internal circuit components) is irreversible and cumulative, exhibiting unidirectional and continuous trend changes, and no similar patterns can be found in historical data. By quantifying the consistency of historical patterns and the rate of change of current trends, a pattern discrimination index with clear temporal characteristics can be constructed to accurately identify the essential evolutionary patterns of electricity consumption behavior, providing a scientific basis for the temporal dimension of subsequent dynamic correction of the original anomaly score.

[0059] First, determine the electricity consumption cycle: obtain the current time series of data blocks within a consecutive preset number of days (e.g., 15 days) from the electricity meter to form a long-term current time series. Calculate the autocorrelation function of the long-term current time series, and take the time delay value corresponding to the first significant positive peak value of the autocorrelation function as the natural cycle of the electricity consumption behavior. The calculation of the autocorrelation function of the long-term current time series is existing technology and will not be elaborated here.

[0060] After obtaining the electricity consumption cycle, the pattern consistency component is calculated. The specific calculation method includes: determining historically similar time periods corresponding to the time window of the current data block within the most recent preset number of historical cycles (e.g., 3) based on the electricity consumption cycle; obtaining the physical consistency index corresponding to each historically similar time period; and averaging all physical consistency indices to obtain the pattern consistency component. The specific formula is as follows:

[0061]

[0062] In the formula, Indicates the first The schema consistency component of each data block; This represents the number of historical cycles. In this embodiment, the three most recent complete cycles are used to ensure statistical significance. The specific value can be adjusted according to the actual application scenario. Indicates the electricity consumption cycle; Indicates the first In the historical cycle and the first The physical consistency index of the time windows of each data block corresponding to historical similar time periods.

[0063] By aggregating physical consistency indicators from similar historical time periods, the degree of consistency between current electricity consumption patterns and historical patterns can be measured. The range is [0,1], when When the value approaches 1, it indicates that the current changes during similar historical periods within the last three historical cycles strictly follow the laws of electromagnetic transient physics, and the patterns are highly consistent; when... When the value approaches 0, it indicates that the current variation pattern over similar historical periods is inconsistent and lacks repeatability. For example, in a scenario where a factory starts up its equipment at 9 a.m. every day, the pattern remains the same daily. The rate is relatively high; however, for metering chips that gradually age, due to irreversible degradation, It will decrease day by day.

[0064] S32: Obtain the maximum current change rate based on the current timing sequence, and calculate the trend change rate component based on the maximum current change rate, current timing sequence, and sampling interval.

[0065] To quantify the severity of current trend changes in the current block, the central difference method is first used to calculate the current rate of change. Forward or backward differencing is used at boundary points to obtain the current rate of change time series, and the current rate of change with the largest absolute value is selected. The difference between each measured current value and the average of all measured current values ​​in the current time series is obtained, and the difference with the largest absolute value is selected. The ratio between the current rate of change with the largest absolute value and the difference with the largest absolute value is calculated. This ratio is then multiplied by the sampling time interval to obtain the trend rate of change component. The specific formula is as follows:

[0066]

[0067] In the formula, Indicates the first The rate of change component of each data block; Indicates the first The current timing in each data block is at time... The rate of change of current, for sampling points in the current time series ( to According to the central difference formula Calculate the rate of change of current, for the initial sampling point ( According to the forward difference formula Calculate the rate of change of current, for the end sampling point ( According to the backward difference formula Calculate the rate of change of current; Indicates the first The current timing in each data block is at time... The measured current value; Indicates the first The average of all measured current values ​​in the current timing sequence of each data block; This indicates the sampling time interval, expressed in seconds.

[0068] The maximum instantaneous slope of the change in current is measured, reflecting the swiftness of the change. The ratio of the two measures the maximum fluctuation amplitude of the current signal itself, reflecting the magnitude of the change; the ratio of the two represents the maximum rate of change corresponding to a unit amplitude change, eliminating the magnitude difference caused by different current levels; multiplied by To achieve dimensionless transformation, Components with pattern consistency They are comparable and together constitute the time series pattern discrimination index.

[0069] The range is [0, +∞), when A larger value indicates a drastic change in current over a short period of time relative to its fluctuation range, potentially indicating an abnormal event; when... When the current is relatively small, it indicates that the change in current is gradual, which is consistent with the gradual change characteristics of normal electricity use.

[0070] S33: Calculate the pattern discrimination index based on the pattern consistency component and the trend change rate component.

[0071] The sum of the pattern consistency component and the trend change rate component is calculated, and the ratio of the pattern consistency component to this sum is used as the pattern discrimination index. The specific formula is as follows:

[0072]

[0073] In the formula, Indicates the first Pattern discrimination index for each data block; Indicates the first The schema consistency component of each data block; Indicates the first The rate of change component of each data block.

[0074] This represents the probability confidence level that the current electricity consumption behavior belongs to a normal periodic pattern. The range is [0,1], when When it approaches 1, it indicates Much larger This indicates that current electricity consumption behavior is highly repeatable within similar historical periods, and the current changes are gradual. Typical scenarios include factories starting equipment at set times daily and commercial users using electricity at fixed times daily—normal, cyclical electricity consumption behaviors. These behaviors represent normal, predictable cyclical electricity consumption patterns. Even if the Isolation Forest algorithm identifies them as abnormal due to their prominent static characteristics, the system should still be based on high... It is identified as normal periodic behavior, suppressing false alarms; when When it approaches 0, it indicates Dominant A relatively small value indicates that the current electricity consumption behavior has no similar pattern in history, and the change process is drastic or shows a unidirectional trend. Typical scenarios include equipment failures such as continuous drift in accuracy caused by aging metering chips, gradual decrease in the sensitivity of current sensors, and irreversible degradation of internal circuit components. Such behavior represents the progressive failure or irreversible degradation of the equipment itself, and the system should identify it as a real equipment risk.

[0075] S34: Calculate the moving average and moving standard deviation of the mode discrimination index, calculate the correction coefficient based on the moving standard deviation, calculate the correction factor based on the correction coefficient, mode discrimination index and moving average, and multiply the correction factor by the original outlier score to obtain the corrected outlier score.

[0076] The raw anomaly scores output by the Isolation Forest algorithm cannot distinguish between anomalies in different evolutionary patterns, leading to misjudgments of normal periodic electricity consumption behavior. While the pattern discrimination index can effectively identify the essential evolutionary patterns of electricity consumption behavior, it needs to be transformed into a quantitative correction mechanism for anomaly scores. This correction mechanism should possess adaptive characteristics: when… When high (normal periodic behavior), it significantly suppresses original abnormal scores and avoids false alarms; when At low speeds (progressive equipment failures), maintain sensitivity to anomaly scores to ensure a high failure detection rate. Simultaneously, the correction strength should be adjusted accordingly. The confidence level is adaptively adjusted to avoid over-correction of boundary cases.

[0077] The moving average and moving standard deviation of the pattern discrimination index are calculated using the exponentially weighted moving average method. The moving average is calculated as follows: The moving average of the pattern discrimination index of the previous data block is obtained; a smoothing coefficient is set; the product of this smoothing coefficient and the pattern discrimination index of the current data block is calculated to obtain the first product; the difference between this smoothing coefficient and the first product is calculated; the product of this difference and the moving average of the pattern discrimination index of the previous data block is calculated to obtain the second product; the sum of the first and second products is used as the moving average. The specific formula is as follows:

[0078]

[0079] In the formula, Indicates the first The moving average of the pattern discrimination index for each data block; Indicates the first Pattern discrimination index for each data block; Indicates the first The moving average of the pattern discrimination index for each data block; This represents the smoothing coefficient, used to balance the weights of historical and current data. In this embodiment... The specific value can be adjusted according to the actual application scenario.

[0080] The method for calculating the moving standard deviation of the pattern discriminant index includes: calculating the square of the difference between the pattern discriminant index of the current data block and its moving average; multiplying the square of this difference by the smoothing coefficient to obtain a third product; obtaining the moving standard deviation of the pattern discriminant index of the previous data block; multiplying the difference between 1 and the smoothing coefficient by the square of the moving standard deviation of the pattern discriminant index of the previous data block to obtain a fourth product; and taking the square root of the sum of the third and fourth products to obtain the moving standard deviation of the pattern discriminant index of the current data block. The specific formula is as follows:

[0081]

[0082] In the formula, Indicates the first The moving standard deviation of the pattern discrimination index for each data block; Indicates the first Pattern discrimination index for each data block; Indicates the first The moving average of the pattern discrimination index for each data block; Indicates the first The square of the moving standard deviation of the pattern discrimination index for each data block; This represents the smoothing coefficient.

[0083] The average confidence level characterizing normal periodic behavior in historical data. reflect The degree of fluctuation, i.e. The confidence level. The range is [0, 0.5]. A smaller value indicates that the historical data pattern is stable, and the current data can be trusted more. Judgment and correction can be more radical; when A larger value indicates a volatile historical pattern, requiring caution in dealing with the current situation. Judgments and revisions should be made more conservatively.

[0084] Calculating the correction factor based on the moving standard deviation involves: setting a zero-prevention constant, selecting the maximum value between the moving standard deviation of the current data block and the zero-prevention constant, and using the reciprocal of the maximum value as the correction factor. This is expressed by the following formula:

[0085]

[0086] In the formula, Indicates the first Correction factor for each data block; Indicates the first The moving standard deviation of each data block; In this embodiment, the zero constant is represented. .

[0087] and Inversely proportional, when historical patterns are highly consistent ( Hour, Large, the correction curve is steep, for More sensitive to changes; when historical patterns are volatile ( When (large), Small, with a gentle correction curve, avoiding over-correction. The range is [2, +∞).

[0088] After obtaining the correction coefficients, a correction factor is calculated based on the correction coefficients, the mode discrimination index, and the moving average: the difference between the mode discrimination index and the moving average of the current data block is calculated, and the product of this difference and the correction coefficient is used as the exponent, calculated using the natural constant. The correction factor is obtained by adding 1 to the exponential function value with base 0 and taking the reciprocal. The specific formula is as follows:

[0089]

[0090] In the formula, Indicates the first Correction factor for each data block; Indicates the first Pattern discrimination index for each data block; Indicates the first The moving average of the pattern discrimination index for each data block; Indicates the first Correction factor for each data block; It is a natural constant.

[0091] The corrected anomaly score is obtained by multiplying the obtained correction factor by the original anomaly score output by the isolated forest model, as shown in the following formula:

[0092]

[0093] In the formula, Indicates the first Corrected anomaly score for each data block; The output of the isolated forest model represents the first... The raw anomaly score of each data block; Indicates the first Correction factor for each data block.

[0094] The correction factor has a defined physical threshold characteristic, when Time (current electricity consumption behavior is a normal periodic behavior), The original outlier scores were significantly suppressed; when (Current electricity consumption behavior may be due to equipment malfunction). The original abnormal scores remained largely unchanged. This controls the steepness of the correction curve; a larger value indicates a more drastic correction. For example, when... , , hour, This will reduce the corrected outlier score to 18% of the original outlier score; when , , hour, It only slightly reduced the original abnormal score.

[0095] It combines the anomaly detection capabilities and temporal pattern discrimination capabilities of isolated forests. The range is [0,1], when When the value approaches 1, it indicates that the current electricity consumption behavior is highly abnormal and the pattern does not conform to normal electricity consumption patterns, and should be addressed first; when When the value approaches 0, it indicates that the current electricity consumption behavior is normal or conforms to physical laws.

[0096] After obtaining the corrected anomaly scores, an anomaly threshold is constructed. The construction method includes: obtaining the corrected anomaly scores of all data blocks that were judged to be normal within the most recent preset number of days (e.g., within 7 days) of the current data block, forming an anomaly score sequence; calculating the mean and standard deviation of the anomaly score sequence, and using the sum of the mean of the anomaly score sequence and three times the standard deviation as the anomaly threshold.

[0097] When the corrected anomaly score exceeds the anomaly threshold, the current data block of the electricity meter is determined to have a real anomaly risk.

[0098] After determining a genuine anomaly risk, the anomaly is categorized based on the pattern discrimination index of the current data block: when... When this is determined to be a progressive equipment failure (such as aging of the metering chip or drift in sensor accuracy), a Level 1 alarm is generated, requiring on-site handling within 24 hours; when If the activity is identified as potential electricity theft or abnormal electricity use, a level two alarm will be generated, requiring verification within 72 hours. If the alarm is determined to be due to environmental interference or normal power fluctuations, a Level 3 alarm will be generated, and the alarm will be recorded and observed without requiring emergency action.

[0099] When the corrected anomaly score is less than or equal to the anomaly threshold, the system performs a multi-dimensional anomaly contribution analysis. By tracing the segmentation paths and information gains of each feature dimension in the isolated forest model, the system evaluates the contribution of each dimension, such as voltage, current, and power, to the original anomaly score. If the final corrected anomaly score does not exceed the anomaly threshold, but the original anomaly score exceeds the threshold, and the voltage dimension contribution exceeds a preset threshold (e.g., 50%), the system determines it as a single-dimensional voltage anomaly, classifying it as a potential fault in the equipment sampling or metering module, thus avoiding missed detections due to correction factor suppression.

[0100] It should be noted that during the system initialization phase, data blocks from the first 30 days after the electricity meter is put into operation are used as the initial normal sample set. The corrected anomaly score for each data block is obtained, resulting in an initial anomaly score sequence. The mean and standard deviation of the initial anomaly score sequence are calculated, and the sum of the mean and three times the standard deviation is used as the initial anomaly threshold. This initial anomaly threshold is then used to determine the corrected anomaly scores of data blocks from day 31 to day 36 after the electricity meter begins operation.

[0101] By utilizing the gold standard data from the initial operation of electricity meters to establish initial anomaly thresholds, the system automatically establishes an appropriate anomaly judgment benchmark for each electricity meter without the need for manual experience in setting thresholds. This reduces the false alarm rate in the early stages of system deployment and allows the system to accumulate some online data, preparing for subsequent dynamic updates of anomaly thresholds.

[0102] This application also discloses an automatic risk identification system for electricity meters based on big data of electricity meters. The system includes a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, the automatic risk identification method for electricity meters based on big data of electricity meters according to the above embodiments of the present invention is implemented.

[0103] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0104] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. An automatic risk identification method for electricity meters based on big data from electricity meters, characterized in that, include: Real-time acquisition of multiple dimensions of operational data from electricity meters is performed and segmented according to fixed-duration time windows to obtain data blocks containing the time sequence of operational data for each dimension. Feature extraction is performed on the current data block and a feature vector is constructed. The feature vectors are input into the trained isolated forest model, and the original outlier scores are calculated. The original anomaly score is corrected to obtain a corrected anomaly score. An anomaly threshold is constructed. When the corrected anomaly score is greater than the anomaly threshold, the current data block of the electricity meter is determined to have an anomaly risk. The method for correcting the original anomaly score includes: for the current time series in the current data block, constructing a theoretical physical model, and calculating the physical consistency index based on the current time series and the predicted current value of the theoretical physical model; determining the electricity consumption cycle, and calculating the mode consistency component based on the physical consistency index of a preset number of historical cycles; obtaining the maximum current change rate based on the current time series, and calculating the trend change rate component based on the maximum current change rate, the current time series, and the sampling interval; calculating the mode discrimination index based on the mode consistency component and the trend change rate component; calculating the moving average and moving standard deviation of the mode discrimination index, calculating the correction coefficient based on the moving standard deviation, calculating the correction factor based on the correction coefficient, the mode discrimination index, and the moving average, and multiplying the correction factor by the original anomaly score to obtain the corrected anomaly score; The process of constructing the theoretical physical model includes: based on the transient response model of the first-order RL circuit, using the current time series data of the current data block as the fitting target, solving the model parameters of the transient response model of the first-order RL circuit by minimizing the prediction error, and obtaining the theoretical physical model; The calculation of the pattern consistency component based on the physical consistency index of a preset number of historical periods includes: determining the historical similar time period corresponding to the current data block in the most recent preset number of historical periods based on the electricity consumption cycle; obtaining the physical consistency index corresponding to each historical similar time period; and averaging all physical consistency indices to obtain the pattern consistency component. The calculation of the trend rate of change component based on the maximum current change rate, current time series, and sampling interval includes: obtaining the difference between each measured current value and the average of all measured current values ​​in the current time series, and selecting the difference with the largest absolute value; calculating the ratio between the current change rate with the largest absolute value and the difference with the largest absolute value, and multiplying this ratio by the sampling time interval to obtain the trend rate of change component. The calculation of the pattern discrimination index based on the pattern consistency component and the trend rate of change component includes: calculating the sum of the pattern consistency component and the trend rate of change component, and using the ratio of the pattern consistency component to the sum as the pattern discrimination index.

2. The method for automatic risk identification of electricity meters based on big data of electricity meters according to claim 1, characterized in that, The calculation of the physical consistency index for predicted current values ​​based on current time series and theoretical physical models includes: obtaining the predicted current value corresponding to each sampling point in the current time series based on the theoretical physical model; calculating the residual value between the measured current value and the corresponding predicted current value at each sampling point in the current time series; summing the squares of all residual values ​​to obtain the residual sum of squares; calculating the average value of all measured current values ​​in the current time series and the difference between each measured current value and the average value; summing the squares of all differences to obtain the total sum of squares; taking the square root of the ratio of the residual sum of squares to the total sum of squares, and subtracting the square root from 1 to obtain the physical consistency index.

3. The method for automatic risk identification of electricity meters based on big data of electricity meters according to claim 1, characterized in that, The calculation of the correction factor based on the sliding standard deviation includes: setting a zero-prevention constant, selecting the maximum value between the sliding standard deviation and the zero-prevention constant of the current data block, and using the reciprocal of the maximum value as the correction factor.

4. The method for automatic risk identification of electricity meters based on big data of electricity meters according to claim 1, characterized in that, The calculation of the correction factor based on the correction coefficient, mode discrimination index, and moving average includes: calculating the difference between the mode discrimination index and the moving average of the current data block; multiplying this difference by the correction coefficient as the exponent; and calculating the factor using the natural constant. The correction factor is obtained by adding 1 to the exponential function value with base 1 and taking the reciprocal.

5. The method for automatic risk identification of electricity meters based on big data of electricity meters according to claim 1, characterized in that, The method for constructing the anomaly threshold includes: obtaining the corrected anomaly scores of all data blocks that were judged to be normal within the most recent preset number of days for the current data block, forming an anomaly score sequence; calculating the mean and standard deviation of the anomaly score sequence, and using the sum of the mean and three times the standard deviation of the anomaly score sequence as the anomaly threshold of the current data block.

6. An automatic risk identification system for electricity meters based on big data from electricity meters, characterized in that, include: The processor and memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the automatic risk identification method for electricity meters based on big data of electricity meters as described in any one of claims 1-5 is implemented.

Citation Information

Patent Citations

  • Experimental data processing method and device, AI analysis module and computer equipment

    CN120705604A

  • Single battery early-stage thermal runaway early warning method based on operation parameter fusion and isolated forest algorithm optimization

    CN120742121A