Electric energy meter slip type anomaly detection method and system based on weighted isolation forest
By adopting a slip-based anomaly detection method for smart meters based on weighted isolated forests, the data acquisition problem caused by clock anomalies in smart meters was solved, achieving more efficient anomaly detection and more accurate clock data acquisition, thus reducing user complaints.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED
- Filing Date
- 2023-10-08
- Publication Date
- 2026-06-12
AI Technical Summary
Existing smart meters suffer from clock malfunctions, resulting in low success rates for electricity data acquisition and frequent complaints from electricity users, leading to metering disputes.
A slip-type anomaly detection method for electricity meters based on weighted isolated forest is adopted. By acquiring time series data of electricity consumption information, anomaly detection is performed using sliding window technology and weighted isolated forest method, and anomaly scores are calculated and judged.
This has improved the reliability and accuracy of electricity meter clock data acquisition, reduced user complaints, and created a more favorable environment for smart meter applications.
Smart Images

Figure CN117368829B_ABST
Abstract
Claims
1. A method for detecting slip-type anomalies in electricity meters based on weighted isolated forests, characterized in that, Including the following steps: S1. Obtain and sort the time series data of electricity consumption information from smart meters; the time series data of electricity consumption information includes meter readings and metering time. S2. Use the sliding window technique to process the time series data of electricity consumption information to obtain a dataset; S3. Use the weighted isolation forest method to perform anomaly detection on the dataset and obtain anomaly scores; S4. Make anomaly judgments based on anomaly scores; S5, Move the sliding window; S6. Repeat steps S3-S5 until the entire electricity consumption information time series data has been processed. The specific steps of step S3 are as follows: S3.1 Constructing isolation trees (iTree) to form an isolation forest (iForest); S3.2 Calculate the path length h(d) of the sample point data in each tree; where the path length refers to the number of edges traversed from the root node to the external node in an iTree; S3.3 Obtain the path length of the sample point with the longest path length in each tree. ; S3.4, Based on the maximum path length of each tree The weighted path length is obtained by weighting the path lengths of all sample points obtained from each tree. ; S3.5 Calculate the outlier score S(d,n); In step S3.4, the formula for calculating the weighted path length is as follows: in, Let represent the weighted path length of the i-th data in the k-th isolation tree, and y represent the total number of isolation trees. This represents the original path length of the i-th data in the k-th isolation tree.
2. The method for detecting slip-type anomalies in electricity meters based on weighted isolated forests according to claim 1, characterized in that, In step S3.1, when constructing the iTree, that is, randomly select the attribute A and the cut point P from the dataset D processed by using the sliding window technique, and then according to the value of A for each data to be partitioned; if < p, then place the data in the left subtree, otherwise place it in the right subtree; recursively construct the left subtree and the right subtree in this way until one of the following conditions is met: Data set D contains only one or more identical data entries; The tree has reached its maximum height.
3. The method for detecting slip-type anomalies in electricity meters based on weighted isolated forests according to claim 1, characterized in that, In step S3.5, the formula for calculating the anomaly score S(d,n) is: in, Let h(d) be the average value of h(d) in the iTree set; m is the number of leaf nodes. is Euler's constant.
4. The method for detecting slip-type anomalies in electricity meters based on weighted isolated forests according to claim 3, characterized in that, In step S4, the specific process of determining anomalies based on anomaly scores is as follows: when When C(n) → 0.5, it means that there are no obvious outliers in all samples. when When S→0, that is, S→1, it indicates that the data is an outlier; when When S→m-1, it means S→0, indicating that the data is within the normal range.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when run by a processor, performs the steps of the method as described in any one of claims 1 to 4.
6. A slip-type anomaly detection system for electricity meters based on weighted isolated forests, comprising an interconnected memory and a processor, wherein the memory stores a computer program, characterized in that, The computer program, when run by a processor, performs the steps of the method as described in any one of claims 1 to 4.