Electric energy metering equipment anomaly detection method and system based on time sequence analysis

By introducing weighted autocorrelation and dynamic threshold adjustment methods, the problems of high false alarm and false negative rates in the anomaly detection of power metering equipment are solved, the accuracy of detection is improved, and normal fluctuations and anomalies can be effectively distinguished.

CN121980322APending Publication Date: 2026-05-05WUXI HENGTONG ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUXI HENGTONG ELECTRIC CO LTD
Filing Date
2026-04-07
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies for detecting anomalies in electricity metering equipment neglect the long-term correlation of time-series data and the influence of external environmental factors, resulting in high false alarm or false negative rates, and low detection accuracy, especially in complex scenarios.

Method used

By employing a weighted autocorrelation and dynamic threshold adjustment method, the weighted autocorrelation coefficient and correction threshold are obtained by calculating the degree of change in electricity consumption data. Taking into account long-term correlation, periodicity, and noise effects, the false alarm rate and false negative rate are significantly reduced.

Benefits of technology

It significantly improves the accuracy of anomaly detection in power metering equipment, can distinguish between normal seasonal/cyclical fluctuations and real anomalies, and reduces misjudgments during peak periods and missed detections during low-load periods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121980322A_ABST
    Figure CN121980322A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to an electric energy metering equipment anomaly detection method and system based on time sequence analysis. The method comprises the following steps of: acquiring power utilization data by utilizing electric energy metering equipment, calculating the change degree of the power utilization data according to the power utilization data, calculating a weighted autocorrelation coefficient of a power utilization data detrending sequence by taking the change degree of the power utilization data as a weight, obtaining a maximum weighted autocorrelation coefficient, calculating a correction threshold value of the detrending sequence in combination with a variable coefficient, and calculating the correction threshold value of the detrending sequence according to the correction threshold value. And judging the abnormal condition of the electric energy metering equipment according to the corrected threshold value. The false alarm rate and the missing report rate of the electric energy metering equipment can be obviously reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method and system for detecting anomalies in power metering equipment based on time-series analysis. Background Technology

[0002] As key equipment for power system operation monitoring and electricity billing, the accurate detection of operational status and anomalies in electricity metering devices is of paramount importance. Currently, anomaly detection technologies for electricity metering devices are mainly divided into two categories: offline methods, which use dedicated hardware for on-site detection and identification, but these methods are costly and inefficient; and online methods, which primarily identify abnormal states by analyzing metering data.

[0003] In existing technologies, anomaly detection in electricity metering equipment primarily relies on time-series data analysis methods. For example, sliding window averaging or simple threshold comparisons are used to monitor fluctuations in electricity consumption. Specifically, existing systems collect time-series data (such as electricity consumption sequences) from electricity metering equipment, calculate short-term averages, and compare them to preset thresholds. If the value exceeds the threshold, it is considered an anomaly. This method is based on statistical principles and aims to capture sudden changes in the data. However, existing technologies ignore the long-term correlation of time-series data and the influence of external environmental factors, leading to high false alarm or false negative rates in complex scenarios. For example, during seasonal peak periods, electricity consumption naturally fluctuates significantly, and simple threshold methods struggle to distinguish between normal fluctuations and anomalies. Summary of the Invention

[0004] To address the problem that existing technologies neglect the long-term correlation of time-series data and the influence of external environmental factors, resulting in high false alarm or false alarm rates in complex scenarios for power metering equipment, thus affecting the accuracy of anomaly detection, this application provides an anomaly detection method and system for power metering equipment based on time-series analysis. This application introduces weighted autocorrelation and dynamic threshold adjustment, taking into account long-term correlation, periodicity, and noise effects, significantly reducing the false alarm and false alarm rates of power metering equipment.

[0005] Firstly, this application provides a method for detecting anomalies in power metering equipment based on time-series analysis, employing the following technical solution: A method for detecting anomalies in power metering equipment based on time-series analysis, comprising the following steps: Electricity consumption data is collected using electricity metering equipment. The degree of change in electricity consumption data is calculated based on the data. The degree of change in electricity consumption data is used as a weight to calculate the weighted autocorrelation coefficient of the detrended series of electricity consumption data. The maximum weighted autocorrelation coefficient is obtained and combined with the coefficient of variation to calculate the correction threshold of the detrended series. The abnormal situation of the electricity metering equipment is judged based on the correction threshold. The electricity consumption data is a raw time-series data sequence, including timestamps and corresponding electricity consumption. The method for calculating the degree of change in the electricity consumption data: A detrended sequence is obtained from the original time series data sequence. A range of lag orders is preset. For the detrended sequence, the autocorrelation coefficients at multiple lag orders within the lag order range are calculated. A significant peak lag set is obtained based on the lag order and the corresponding autocorrelation coefficient. The electricity consumption change rate at any lag order in the significant peak lag set is calculated. Then, the periodicity value of the detrended sequence is calculated based on the standard deviation and mean of the detrended sequence, as well as the autocorrelation coefficients and electricity consumption change rates corresponding to each lag order. The detrended sequence is continuously and non-overlappingly divided into multiple detrended subsequences according to a preset noise window size. The noise level of the electricity consumption data is obtained based on the autocorrelation coefficient of each detrended subsequence when the lag order is 1 and the standard deviation of each detrended subsequence. The product of the difference between 1 and the periodic value and the noise level is used as the degree of change in electricity consumption data.

[0006] Furthermore, the step of obtaining the detrended sequence based on the original time series data sequence includes: fitting the original time series data sequence using the least squares method, obtaining the fitted value at each time moment, calculating the difference between the actual value and the fitted value at any time moment as the detrended value at that time moment, and forming a detrended sequence from the detrended values ​​at all times. The actual value at any given moment is the electricity consumption data at the corresponding moment in the original time-series data sequence.

[0007] Furthermore, the step of obtaining the significant peak lag set based on the lag order and the corresponding autocorrelation coefficient includes: constructing an autocorrelation curve from the continuous lag order and its corresponding autocorrelation coefficient, obtaining the lag order corresponding to the maximum point of the autocorrelation curve, and taking the lag order corresponding to the maximum point of each autocorrelation curve as the significant peak lag set.

[0008] Furthermore, the calculation of the rate of change in electricity consumption at any lag order in the significant peak lag set includes: For any lag order, calculate the ratio of the absolute value of the difference between two data points with any lag order in the detrending sequence to the preceding data point, and calculate the average of all ratios under the corresponding lag order as the electricity consumption change rate corresponding to that lag order.

[0009] Furthermore, the method for calculating the periodicity value of the detrended sequence is as follows: Calculate the ratio of the sum of the products of the autocorrelation coefficients and the rate of change in electricity consumption for each lag order in the detrended series to the sum of the rates of change in electricity consumption. The negative of the ratio of the standard deviation of the detrended series to the mean of the detrended series is calculated, multiplied by the hyperparameter, and then the exponential function value is calculated as the periodic value corresponding to the detrended series.

[0010] Furthermore, the step of calculating the weighted autocorrelation coefficient of the detrended electricity consumption data series by using the degree of change in electricity consumption data as a weight includes: For any lag order, calculate the product of the difference between any data point in the detrended sequence and the mean of the detrended sequence, and the difference between the data point with the interval response lag order and the mean of the detrended sequence, and then multiply this product by the degree of change of the corresponding electricity consumption data to obtain the weighted covariance of the data point; calculate the product of the square of the difference between the data point and the mean of the detrended sequence and the degree of change of the corresponding electricity consumption data to obtain the weighted variance of the data point; Similarly, obtain the weighted covariance and weighted variance of other data points in the detrended sequence, and then obtain the weighted covariance sum and weighted variance sum; The weighted autocorrelation coefficient of the detrended series at the corresponding lag order is obtained by calculating the ratio of the weighted sum of covariance to the weighted sum of variance.

[0011] Furthermore, the method for calculating the correction threshold is as follows: Preset initial threshold; The adjustment factor is calculated as the ratio of the absolute value of the maximum weighted autocorrelation coefficient among all lag orders to the coefficient of variation of the detrended series. To avoid the adjustment factor being too large or too small, hyperparameters are added to the numerator and denominator of the adjustment factor respectively. The product of the initial threshold and the adjustment factor is calculated as the corrected threshold.

[0012] Furthermore, the step of judging the abnormal situation of the power metering equipment according to the correction threshold includes: using z-score to calculate the standard score of the data point at any time in the detrending sequence; if the standard score is greater than the correction threshold, the data point at the corresponding time is marked as an abnormal point, and all abnormal points are output as an abnormal point list.

[0013] Secondly, this application provides an anomaly detection system for power metering equipment based on time-series analysis, employing the following technical solution: An anomaly detection system for electricity metering equipment based on time-series analysis includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the anomaly detection method for electricity metering equipment based on time-series analysis described above.

[0014] This application has the following technical effects: This application introduces weighted autocorrelation and dynamic threshold adjustment, taking into account long-term correlation, periodicity and noise effects, which can distinguish between normal seasonal / periodic fluctuations and real anomalies, significantly reducing false alarm rate (false alarm during peak periods) and false alarm rate (faults missed during low load periods), and improving the accuracy of anomaly detection in power metering equipment. Attached Figure Description

[0015] The above and other objects, features, and advantages of the present invention will become readily apparent from the following detailed description of exemplary embodiments, accompanied by the accompanying drawings. In the drawings, several embodiments of the invention are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein: Figure 1 This is a flowchart of an anomaly detection method for power metering equipment based on time-series analysis provided in an embodiment of this application; Figure 2 This is a flowchart of the method for calculating the degree of change in electricity consumption data in the time-series analysis-based abnormal detection method for electricity metering equipment provided in the embodiments of this application. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] This application discloses an anomaly detection method for power metering equipment based on time-series analysis, referring to... Figure 1 ,include: S1: Collect electricity consumption data using electricity metering equipment.

[0018] It is important to note that electricity metering equipment serves as the core basis for electricity trade settlement and electricity billing. The accuracy and reliability of its operating status directly affect the economic benefits of power companies, the legitimate rights and interests of users, and the safe and stable operation of the power grid. Traditional anomaly detection methods often rely on manual inspections or simple threshold judgments, which are difficult to detect hidden faults and anomalies in a timely manner, leading to inaccurate metering, power loss, or even safety accidents. Therefore, it is necessary to collect data from electricity metering equipment in real time and perform time-series analysis to achieve anomaly detection of electricity metering equipment.

[0019] Specifically, the electricity consumption data is a raw time-series data sequence, including timestamps and corresponding electricity consumption.

[0020] S2: Calculate the degree of change in electricity consumption data based on the electricity consumption data.

[0021] It is important to note that in smart grid scenarios, autocorrelation of time-series data is a key characteristic. Electricity consumption behavior often exhibits periodicity, such as daily peak-valley or weekly patterns, leading to lag dependencies between data points. If autocorrelation is ignored, existing algorithms, such as the moving average method, may misjudge periodic fluctuations as anomalies; for example, peak weekday electricity consumption might be mistaken for electricity theft, resulting in a high false alarm rate. Furthermore, external factors such as holidays or weather changes can alter autocorrelation patterns, causing static thresholds to become invalid and potentially leading to missed detections of equipment malfunctions during low-load periods. Therefore, this embodiment uses the calculation of autocorrelation coefficients to analyze the time-series data collected by electricity metering devices.

[0022] It is also important to note that in existing smart grid technologies, the collected electricity consumption data is affected by periodic and sudden noise. For example, residential users exhibit significant differences in electricity consumption patterns between day and night, weekdays and weekends, and summer and winter. When the periodicity is strong (e.g., continuous heating in winter), the collected electricity consumption data will show significant correlation at multiple lag orders; when the periodicity is weak (e.g., random air conditioning use in summer or electricity theft), only a small lag order will show some correlation, and if the lag order is too large, the autocorrelation will be weakened. Furthermore, thunderstorms and substation switching can increase the noise data collected in a short period, leading to a decrease in the reliability of the electricity consumption data during that time period.

[0023] like Figure 2 As shown in the embodiments of this application, the degree of change in electricity consumption data is calculated based on periodicity and noise level.

[0024] S201: Obtain the set of significant peak lags.

[0025] It is important to note that the increase in user devices or seasonal factors can lead to non-stationary data sequences. To avoid bias in the subsequent calculation of autocorrelation coefficients (trends can artificially inflate long-lag correlations) and further affect the calculation of the degree of change, this approach is crucial. Furthermore, in smart grids, trending electricity consumption data may misjudge normal, long-term growth in electricity consumption as abnormal (e.g., equipment aging), ignoring short-term fluctuations in electricity theft. Therefore, this embodiment obtains a detrended sequence to make subsequent calculations more accurate.

[0026] Specifically, the least squares method is used to perform polynomial fitting on the acquired original time-series data sequence to obtain a polynomial fitting model, and the fitted value at each time step is obtained based on the polynomial fitting model; the difference between the actual value and the fitted value at any given time step is calculated as the detrended value at that time step. The actual value at any given time step is the electricity consumption data collected in step S1; the detrended values ​​at all times form a detrended sequence. For detrended series, calculate the autocorrelation coefficients at multiple lag orders; the preset range for the lag order is... ,in This represents the total number of data points in the detrended sequence. For a detrended sequence, the autocorrelation coefficient of any lag order is calculated using the ACF (Autocorrelation Function). The continuous lag orders and their corresponding autocorrelation coefficients constitute an autocorrelation curve. The lag order corresponding to the maximum point of the curve is obtained, and the lag order corresponding to the maximum point of the curve is taken as the significant peak lag set.

[0027] It is important to note that this embodiment uses the maximum points of the selected curves as the significant peak lag set, retaining only significant peaks, i.e., focusing only on periods with higher reliability. The stronger the periodicity, the more lag orders are in the significant peak lag set; conversely, the weaker the periodicity, the fewer lag orders are in the significant peak lag set.

[0028] S202: Calculate the rate of change of electricity consumption for any lag order.

[0029] Specifically, calculating the rate of change in electricity consumption under any lag order in the significant peak lag set includes: for any lag order, calculating the ratio of the absolute value of the difference between two data points at any lag order interval in the detrending sequence to the preceding data point, and calculating the average of all ratios under the corresponding lag order as the rate of change in electricity consumption corresponding to that lag order.

[0030] Specifically, based on any lag order in the significant peak lag set, the rate of change in electricity consumption at that lag order is calculated using the following expression: in, Indicates the lag order. The corresponding rate of change in electricity consumption at that time; This represents the total number of data points in the detrended sequence; Indicates the lag order value; Indicates the ordinal number of the data in the detrended sequence; Indicates the first in the detrending sequence One data point; Indicates the first in the detrending sequence Data points.

[0031] S203: Calculate the periodicity value of the detrended sequence.

[0032] It is important to note that user electricity consumption behavior is influenced by multiple factors, meaning that user electricity consumption behavior may exhibit different periodicities. Therefore, this embodiment calculates periodicity by obtaining a significant peak lag set composed of lag orders with high correlation. Furthermore, if a user experiences sudden power outages, using only a single lag order, especially if it contains noisy data, will disrupt the periodicity. Therefore, this embodiment obtains multiple lag orders for comprehensive calculation to avoid contamination of a single lag order by noisy data and improve the accuracy of periodicity calculation.

[0033] Specifically, the periodicity value of the detrended series is calculated as follows: the ratio of the sum of the products of the autocorrelation coefficients and the electricity consumption change rates corresponding to each lag order in the detrended series to the sum of the electricity consumption change rates; the negative of the ratio of the standard deviation of the detrended series to the mean of the detrended series is calculated and multiplied by the hyperparameters to obtain the exponential function value as the periodicity value corresponding to the detrended series.

[0034] Specifically, the expression for calculating the periodicity value of the detrended sequence is as follows: in, Represents the periodicity value of the detrended sequence; Indicates the lag order value; Represents a set of significant peak lags; Indicates the lag order The corresponding autocorrelation coefficient; Indicates the lag order The corresponding rate of change in electricity consumption; This represents hyperparameters, taken from empirical values. ,avoid Too large, leading to Convergence too fast; This represents the standard deviation of the detrended series; This represents the mean of the detrended sequence; Represented by natural constant An exponential function with base 1.

[0035] Specifically, using Highlighting the lag points with strong correlation and dramatic changes in electricity consumption, that is, the periodicity of users will be amplified as the user's electricity consumption status (electricity consumption change rate) becomes more "active". If the user's electricity consumption changes more at a certain lag order, the periodicity is stronger, and vice versa. This is a normalization term used to normalize... Normalization is performed.

[0036] Specifically, The coefficient of variation represents the detrended sequence. The larger the value, the more irregular the user's electricity consumption behavior, and the more necessary it is to reduce the periodicity to avoid mistaking fluctuations for periodicity; the smaller the value, the more regular the user's electricity consumption behavior, and the more necessary it is to preserve the original periodicity.

[0037] S204: Calculate the noise level.

[0038] Specifically, in this embodiment, a noise window of size 50 is preset, and the detrending sequence is divided into multiple detrending sub-sequences that are continuous and non-overlapping according to the preset noise window size; the noise level is calculated based on the multiple detrending sub-sequences, and the calculation expression is as follows: in, Indicates noise level; This represents the total number of detrended subsequences; Indicates the ordinal number of the detrended subsequence; Indicates the first The standard deviation of the detrended subsequence; This represents the maximum standard deviation of all detrended subsequences, used for... Perform normalization; Indicates the first In a detrended subsequence, the autocorrelation coefficient corresponding to a lag order of 1; Represented by natural constant An exponential function with base 1; express The absolute value of.

[0039] in, This indicates the degree of volatility within any detrended subsequence; the larger the value, the stronger the noise level. Furthermore, the autocorrelation coefficient corresponding to a lag order of 1 within the detrended subsequence is obtained as the correlation of the noise window. If the correlation is stronger, the noise level is reduced, and vice versa.

[0040] S205: The product of the difference between 1 and the periodic value and the noise level is used as the degree of change in electricity consumption data.

[0041] Specifically, the difference between 1 and the periodic value is calculated; the product of the difference between 1 and the periodic value and the noise level is taken as the degree of change in the electricity consumption data; if the degree of change in electricity consumption is greater, it indicates that the user's electricity consumption is more irregular or that there is continuous external interference; conversely, the user's electricity consumption is more regular.

[0042] S3: Calculate the weighted autocorrelation coefficient of the detrended electricity consumption data series by using the degree of change in electricity consumption data as the weight.

[0043] It's important to note that traditional autocorrelation coefficient calculations typically assign equal weights to all sample points. However, the autocorrelation of user electricity consumption data is affected by the degree of variation in this data. Smaller variations indicate more regular user behavior; in this case, a smaller fixed weight will retain too much noise from long-lag data, leading to an inflated autocorrelation coefficient and misinterpreting random fluctuations as periodicity. This can further result in overly broad thresholds and missed detections of electricity theft. Conversely, larger variations indicate less regular user behavior; a larger fixed weight will result in an underestimation of the autocorrelation coefficient, leading to overly narrow thresholds and misreporting normal changes as abnormalities.

[0044] Specifically, calculating the weighted autocorrelation coefficient of the detrended electricity consumption data series by using the degree of change in electricity consumption data as a weight includes: for any lag order, calculating the product of the difference between any data point in the detrended series and the mean of the detrended series and the difference between the data point at the interval response lag order and the mean of the detrended series, and then multiplying this product by the corresponding degree of change in electricity consumption data to obtain the weighted covariance of that data point; calculating the product of the square of the difference between that data point and the mean of the detrended series and the corresponding degree of change in electricity consumption data to obtain the weighted variance of that data point; similarly, obtaining the weighted covariance and weighted variance of other data points in the detrended series, and then obtaining the weighted covariance sum and the weighted variance sum; calculating the ratio of the weighted covariance sum to the weighted variance sum to obtain the weighted autocorrelation coefficient of the detrended series at the corresponding lag order.

[0045] Specifically, in this embodiment, the range of the preset lag order is as follows: ,in This represents the total number of data points in the detrended sequence; The formula for calculating the weighted autocorrelation coefficient of the detrended series of electricity consumption data is as follows: in, Indicates the lag order as At that time, the weighted autocorrelation coefficient of the detrended series; This represents the total number of data points in the detrended sequence; This represents the ordinal number of the data point in the detrended sequence; This indicates the degree of change in electricity consumption data; Indicates the first in the detrending sequence One data point; Indicates the first in the detrending sequence One data point; This represents the mean of all data points in the detrended sequence. Indicates the first The data points have a lag order of [number]. Weighted covariance at time; Indicates the first The data points have a lag order of [number]. Weighted variance over time.

[0046] S4: Obtain the maximum weighted autocorrelation coefficient and calculate the correction threshold for the detrended sequence based on the coefficient of variation. Determine the abnormal status of the power metering equipment based on the correction threshold.

[0047] It is important to note that the weighted autocorrelation coefficient reflects the similarity between current electricity consumption and past consumption. A stronger weighted autocorrelation coefficient indicates a high degree of similarity between current and past consumption, which is a normal cyclical pattern. A larger weighted autocorrelation coefficient suggests a stationary sequence, and the threshold should be relaxed to tolerate greater deviations and prevent normal fluctuations from being misjudged as abnormal. Conversely, a smaller weighted autocorrelation coefficient indicates a less stationary sequence, and the threshold should be narrowed to sensitively capture smaller changes.

[0048] Specifically, the calculation method for the correction threshold is as follows: preset an initial threshold; calculate the ratio of the absolute value of the maximum weighted autocorrelation coefficient among all lag orders to the coefficient of variation of the detrended sequence as the adjustment factor; avoid the adjustment factor being too large or too small by adding hyperparameters to the numerator and denominator of the adjustment factor respectively; calculate the product of the initial threshold and the adjustment factor as the correction threshold.

[0049] Specifically, the calculation expression for the correction threshold is as follows: in, Indicates the correction threshold; This indicates a preset initial threshold; in this embodiment, the preset initial threshold is 2. This represents the maximum weighted autocorrelation coefficient among all lag orders of the detrended sequence of electricity consumption data. The coefficient of variation represents the detrended sequence. express The absolute value; Indicates hyperparameters, for example To avoid the correction threshold being too large or too small due to the numerator or denominator being too small; This represents the adjustment factor.

[0050] in, The coefficient of variation represents the degree of load variation in the acquired power grid data. When the load variation is large, the detection sensitivity is increased, the correction threshold is lowered, and the false negatives are reduced. When the load variation is small, the detection sensitivity is reduced, the correction threshold is increased, and the false positives are reduced.

[0051] The z-score is used to calculate the standard score of the data point at any time in the detrending sequence. If the standard score is greater than a preset threshold, the data point at that time is marked as an outlier. Finally, all outliers are output as an outlier list, and staff are reminded to check them in time.

[0052] This application also discloses an anomaly detection system for electricity metering equipment based on time-series analysis, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the anomaly detection method for electricity metering equipment based on time-series analysis according to this application is implemented.

[0053] 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.

[0054] In this application, the aforementioned memory can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as resistive random access memory (DRAM), dynamic random access memory (DRAM), static random access memory (SRAM), or any other medium that can be used to store required information and can be accessed by an application program, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device.

[0055] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A method for detecting anomalies in power metering equipment based on time-series analysis, characterized in that the steps are as follows: include: Electricity consumption data is collected using electricity metering equipment. The degree of change in electricity consumption data is calculated based on the data. The degree of change in electricity consumption data is used as a weight to calculate the weighted autocorrelation coefficient of the detrended series of electricity consumption data. The maximum weighted autocorrelation coefficient is obtained and combined with the coefficient of variation to calculate the correction threshold of the detrended series. The abnormal situation of the electricity metering equipment is judged based on the correction threshold. The electricity consumption data is a raw time-series data sequence, including timestamps and corresponding electricity consumption. The method for calculating the degree of change in the electricity consumption data: A detrended sequence is obtained from the original time series data sequence. A range of lag orders is preset. For the detrended sequence, the autocorrelation coefficients at multiple lag orders within the lag order range are calculated. A significant peak lag set is obtained based on the lag order and the corresponding autocorrelation coefficient. The electricity consumption change rate at any lag order in the significant peak lag set is calculated. Then, the periodicity value of the detrended sequence is calculated based on the standard deviation and mean of the detrended sequence, as well as the autocorrelation coefficients and electricity consumption change rates corresponding to each lag order. The detrended sequence is continuously and non-overlappingly divided into multiple detrended subsequences according to a preset noise window size. The noise level of the electricity consumption data is obtained based on the autocorrelation coefficient of each detrended subsequence when the lag order is 1 and the standard deviation of each detrended subsequence. The product of the difference between 1 and the periodic value and the noise level is used as the degree of change in electricity consumption data.

2. The method for anomaly detection of power metering equipment based on time series analysis according to claim 1, characterized in that, The step of obtaining a detrended sequence based on the original time series data sequence includes: fitting the original time series data sequence using the least squares method, obtaining the fitted value at each time moment, calculating the difference between the actual value and the fitted value at any time moment as the detrended value at that time moment, and forming a detrended sequence from the detrended values ​​at all times. The actual value at any given moment is the electricity consumption data at the corresponding moment in the original time-series data sequence.

3. The method for anomaly detection of power metering equipment based on time series analysis according to claim 1, characterized in that, The step of obtaining the significant peak lag set based on the lag order and the corresponding autocorrelation coefficient includes: constructing an autocorrelation curve with the continuous lag order and its corresponding autocorrelation coefficient, obtaining the lag order corresponding to the maximum point of the autocorrelation curve, and taking the lag order corresponding to the maximum point of each autocorrelation curve as the significant peak lag set.

4. The method for anomaly detection of power metering equipment based on time series analysis according to claim 1, characterized in that, The calculation of the rate of change in electricity consumption at any lag order in the significant peak lag set includes: For any lag order, calculate the ratio of the absolute value of the difference between two data points with any lag order in the detrending sequence to the preceding data point, and calculate the average of all ratios under the corresponding lag order as the electricity consumption change rate corresponding to that lag order.

5. The method for anomaly detection of power metering equipment based on time series analysis according to claim 1, characterized in that, The method for calculating the periodic value of the detrended sequence: Calculate the ratio of the sum of the products of the autocorrelation coefficients and the rate of change in electricity consumption for each lag order in the detrended series to the sum of the rates of change in electricity consumption. The negative of the ratio of the standard deviation of the detrended series to the mean of the detrended series is calculated, multiplied by the hyperparameter, and then the exponential function value is calculated as the periodic value corresponding to the detrended series.

6. The method for anomaly detection of power metering equipment based on time series analysis according to claim 1, characterized in that, The calculation of the weighted autocorrelation coefficient of the detrended electricity consumption data series, using the degree of change in electricity consumption data as a weight, includes: For any lag order, calculate the product of the difference between any data point in the detrended sequence and the mean of the detrended sequence, and the difference between the data point with the interval response lag order and the mean of the detrended sequence, and then multiply this product by the degree of change of the corresponding electricity consumption data to obtain the weighted covariance of the data point; calculate the product of the square of the difference between the data point and the mean of the detrended sequence and the degree of change of the corresponding electricity consumption data to obtain the weighted variance of the data point; Similarly, obtain the weighted covariance and weighted variance of other data points in the detrended sequence, and then obtain the weighted covariance sum and weighted variance sum; The weighted autocorrelation coefficient of the detrended series at the corresponding lag order is obtained by calculating the ratio of the weighted sum of covariance to the weighted sum of variance.

7. The method for anomaly detection of power metering equipment based on time series analysis according to claim 1, characterized in that, The method for calculating the correction threshold is as follows: Preset initial threshold; The adjustment factor is calculated as the ratio of the absolute value of the maximum weighted autocorrelation coefficient among all lag orders to the coefficient of variation of the detrended series. To avoid the adjustment factor being too large or too small, hyperparameters are added to the numerator and denominator of the adjustment factor respectively. The product of the initial threshold and the adjustment factor is calculated as the corrected threshold.

8. The method for anomaly detection of power metering equipment based on time series analysis according to claim 1, characterized in that, The method of judging abnormal conditions of power metering equipment based on the correction threshold includes: using z-score to calculate the standard score of data point at any time in the detrending sequence; if the standard score is greater than the correction threshold, the data point at the corresponding time is marked as an abnormal point, and all abnormal points are output as an abnormal point list.

9. An anomaly detection system for power metering equipment based on time series analysis, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the time-series analysis-based anomaly detection method for power metering equipment according to any one of claims 1-8.