Method and system for detecting abnormal electricity consumption of intelligent electric meter based on data analysis
By performing three-layer clustering analysis and dynamic threshold adjustment of the historical electricity consumption data of smart electricity meters, abnormal electricity consumption behavior is identified, and the problem of limited detection accuracy in the existing technology is solved, and more accurate electricity consumption abnormality detection is achieved.
Patent Information
- Application Number
- CN202510749530.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-06
AI Technical Summary
The existing smart meter abnormal electricity detection technology is difficult to adapt to the dynamic changes in user electricity usage mode, resulting in limited detection accuracy and prone to false alarms or missed alarms.
By analyzing the historical electricity consumption data of smart electricity meters, performing three-layer clustering analysis, combining external environment characteristics and composite characteristics, a feature matrix is constructed, abnormal behaviors that significantly deviate from the normal electricity consumption mode, and adaptively adjusting model parameters for real-time monitoring through feedback mechanisms.
It realizes accurate description of user electricity usage mode, flexibly responds to personalized electricity usage mode, improves the accuracy of abnormal detection, reduces false alarm rates, and adapts to complex and changeable electricity usage scenarios.
Smart Images

Figure CN120262702A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of abnormal power consumption detection, and specifically relates to an intelligent electricity meter abnormal power consumption detection method and system based on data analysis. Background Technique
[0002] With the intelligent upgrade of the power system, intelligent electricity meters have gradually replaced traditional electricity meters as the core devices for power metering. Intelligent electricity meters not only record power consumption but also provide real-time monitoring and two-way communication functions for power consumption data, which makes it possible to detect abnormal power consumption. However, the wide deployment of intelligent electricity meters has also brought a series of challenges, such as problems like power consumption fraud, equipment failures, or power theft. These abnormal power consumption behaviors not only affect the revenue of power companies but also pose potential threats to the stability of the power system and power consumption safety.
[0003] In current intelligent electricity meter abnormal detection technologies, there are mainly the following common methods: rule threshold method, statistical analysis method, machine learning-based classification method, and clustering analysis method. These methods are difficult to adapt to the dynamic changes of users' power consumption patterns, resulting in limited detection accuracy.
[0004] For example, Chinese Patent Application with Publication No. CN116975726A discloses a method and system for detecting abnormal power consumption behaviors of electricity users, including: collecting users' power consumption data from the power system; randomly injecting false data into the power consumption data to form abnormal power consumption samples; extracting features based on statistical characteristics from the power consumption data set containing abnormal power consumption samples according to a set statistical market; applying the data after feature extraction to a machine learning model constructed by combining an improved sparrow search algorithm and an ISSA-RF random forest to detect abnormal power consumption data. The user abnormal power consumption behavior detection method provided by this invention can more efficiently and conveniently find abnormal power consumption users, thereby reducing the manual investigation volume, protecting the stable operation of the power grid while reducing losses for the power grid company.
[0005] A Chinese patent application with the publication number CN117150409A discloses a method for detecting abnormal electricity consumption, including: obtaining a dataset to be detected, building a model for detecting and judging abnormal electricity consumption, obtaining a first training dataset, performing preprocessing and data sampling on it, training the model for detecting and judging abnormal electricity consumption based on the sampled first training dataset, inputting the dataset to be detected into the model for detecting and judging abnormal electricity consumption to determine whether this dataset is abnormal, building a model for identifying abnormal electricity consumption, obtaining a second training dataset, training the model for identifying abnormal electricity consumption based on the second training dataset, inputting the dataset determined to be abnormal into the trained model for identifying abnormal electricity consumption for identification, and obtaining an identification result. The method for detecting abnormal electricity consumption provided by this invention can realize the judgment of abnormal electricity consumption and the identification of abnormal types, which is convenient to use and saves time and effort.
[0006] Defects of the above patent: It is difficult to cope with complex, changeable and dynamically changing electricity consumption patterns, and false alarms or missed alarms are likely to occur, resulting in limited detection accuracy. Summary of the Invention
[0007] In view of the deficiencies of the prior art, the present invention proposes an intelligent electricity meter abnormal electricity consumption detection method and system based on data analysis. By analyzing historical electricity consumption data and real-time electricity consumption data, comprehensively considering the time series characteristics of electricity consumption data and the high-dimensional characteristics of electricity consumption patterns, and through multi-level data screening and analysis, dynamic detection is carried out to judge in real time whether there is abnormal electricity consumption behavior.
[0008] To achieve the above object, the present invention provides the following technical solutions: An intelligent electricity meter abnormal electricity consumption detection method based on data analysis, including: Obtaining the historical electricity consumption data of users according to the intelligent electricity meter, and performing preprocessing on the obtained historical electricity consumption data of users; Extracting the features of the preprocessed historical electricity consumption data of users; Performing three-layer clustering analysis on the extracted features to analyze the historical electricity consumption behavior of users; Identifying abnormal behaviors that significantly deviate from the normal electricity consumption pattern according to the historical electricity consumption behavior of users; Real-time monitoring of abnormal electricity consumption of the intelligent electricity meter by adaptively adjusting the model parameters through a feedback mechanism.
[0009] Specifically, the extraction of the features of the preprocessed historical electricity consumption data of users and the analysis of the historical electricity consumption behavior of users include: Normalizing the preprocessed historical electricity consumption data of users, and constructing a feature vector X(t) at time t, , x m (t) represents the mth electricity consumption feature at time t. By setting a sliding window, a feature matrix T is constructed, , where x m (t n ) represents the m-th electricity consumption feature at the n-th moment; Combining the external environment features and composite features, a feature matrix T is constructed. The external environment features include: daily temperature, humidity, holiday flag, etc. The composite features include: temperature sensitivity, which is the ratio of electricity consumption to the reference period during high-temperature or low-temperature periods.
[0010] Specifically, three-layer clustering analysis is performed on the extracted features to analyze the user's historical electricity consumption behavior, including: Performing three-layer clustering analysis on the constructed feature matrix T, including the first-layer clustering analysis, the second-layer clustering analysis, and the third-layer clustering analysis. In the first-layer clustering, the clustering parameters are iteratively optimized by maximizing the likelihood function, and the feature matrix T is grouped and probabilistically partitioned. The specific formula is: , where p(X(t)) represents the grouping of the feature matrix T, K represents the number of clusters, represents the mixing coefficient of the k-th Gaussian distribution, represents the Gaussian distribution function, represents the mean of the k-th Gaussian distribution, represents the covariance matrix of the k-th Gaussian distribution; In the second-layer clustering, hierarchical clustering is performed on the grouping p(X(t)) of the feature matrix T to construct a hierarchical model, and the distance between layers is calculated. The specific formula is: , where d ij represents the distance between the i-th cluster and the j-th cluster in the grouping of the feature matrix T, X i represents the central feature vector of the i-th class in the grouping of the feature matrix T, X j represents the central feature vector of the j-th class in the grouping of the feature matrix T, represents the Euclidean distance between the centers of the i-th cluster and the j-th cluster.
[0011] Specifically, the features of the preprocessed user's historical electricity consumption data also include: Specifically, the features of the preprocessed user's historical electricity consumption data also include: In the third-layer clustering, a time decay factor is used to optimize the results of the first-layer clustering and the second-layer clustering. The optimization objective function is: , where, represents the objective function value of the third-layer clustering, C represents the number of cluster centers, X pDenote the p-th class clustering in the grouping of the feature matrix T, c q Denote the q-th cluster center, Denote the p-th class clustering X in the grouping of the feature matrix T p For the q-th cluster center c q The membership degree of, Denote the fuzzy factor, Denote the p-th class clustering X in the grouping of the feature matrix T p For the q-th cluster center c q The square of the Euclidean distance; According to the three-layer clustering analysis results, obtain the user's electricity consumption behavior.
[0012] Specifically, the abnormal behavior that significantly deviates from the normal electricity consumption pattern identified according to the user's historical electricity consumption behavior includes: Obtain the real-time data of the user's smart meter, and set the real-time data feature vector after preprocessing the real-time data of the user's smart meter as X; Calculate the distance from the real-time data feature vector X of the user's smart meter after preprocessing to the cluster center. The specific formula is: , Wherein, Denote the distance from the real-time data feature vector X of the user's smart meter after preprocessing to the cluster center, zz represents the transpose of the vector; Judge the possibility that the real-time data of the user's smart meter belongs to the normal electricity consumption pattern, and calculate the probability density value of the real-time data feature vector X of the user's smart meter after preprocessing under each cluster distribution. The specific formula is: , Wherein, Denote the probability density value of the real-time data feature vector X of the user's smart meter after preprocessing under each cluster distribution, wd represents the dimension of the real-time data feature vector X of the user's smart meter after preprocessing; According to the probability density results of all clusters, calculate the total abnormal score. The specific formula is: , Wherein, S(X) represents the total abnormal score, that is, the degree to which the real-time data feature vector X of the user's smart meter after preprocessing deviates from the normal mode, and log() represents the logarithmic function.
[0013] Specifically, the abnormal behavior that significantly deviates from the normal electricity consumption pattern identified according to the user's historical electricity consumption behavior further includes: Set the distance threshold as And the initial threshold of the abnormal score as The anomaly score threshold for the current time window is adaptively updated based on the anomaly distribution of historical detection data and the stability of the current clustering center to obtain the anomaly score threshold for the current time window. The specific formula is as follows: , wherein, represents the anomaly score threshold for the current time window, represents the anomaly score threshold at the previous moment of the current time window, represents the update step size, represents the standard deviation of the anomaly scores for the current time window; Based on the distance from the feature vector X of the real-time data preprocessed from the user's smart meter real-time data to the clustering center and the total anomaly score S(X), analyze the causal relationship between the changes in real-time electricity consumption data and historical electricity consumption behaviors, and determine whether the current electricity consumption change is caused by normal factors. At the same time, based on the time series prediction model, predict the electricity consumption trend within a specified future time period. If the deviation between the actual real-time data and the predicted trend exceeds the set threshold, determine that the smart meter real-time data of the current user is abnormal electricity consumption behavior; otherwise, determine it as normal electricity consumption behavior.
[0014] Specifically, the preprocessing in the preprocessing of the obtained user historical electricity consumption data includes: Completing or removing missing data and smoothing abnormal data points.
[0015] Specifically, the characteristics of the user historical electricity consumption data include: Daily average electricity consumption, peak-valley electricity consumption ratio, current volatility, periodic trend, and abnormal event frequency.
[0016] An intelligent meter abnormal electricity consumption detection system based on data analysis, which is used to implement the intelligent meter abnormal electricity consumption detection method based on data analysis, includes: a data acquisition module, a feature extraction module, a behavior analysis module, an anomaly analysis module, and a real-time monitoring module; The data acquisition module is used to obtain the user's historical electricity consumption data according to the smart meter and preprocess the obtained user historical electricity consumption data; The feature extraction module is used to extract the characteristics of the preprocessed user historical electricity consumption data; The behavior analysis module is used to perform three-layer clustering analysis on the extracted characteristics to analyze the user's historical electricity consumption behaviors; The anomaly analysis module is used to identify abnormal behaviors that significantly deviate from the normal electricity consumption pattern according to the user's historical electricity consumption behaviors; The real-time monitoring module is used to adaptively adjust model parameters through a feedback mechanism and monitor the abnormal electricity consumption of smart meters in real time.
[0017] Specifically, the behavior analysis module includes: a feature extraction unit and a clustering analysis unit; The feature extraction unit is used to extract the feature vectors of user electricity consumption data and construct a feature matrix; The clustering analysis unit is used to perform three-layer clustering analysis on the constructed feature matrix to obtain the historical electricity consumption behavior of users.
[0018] Specifically, the abnormal analysis module includes: a distance calculation unit, an abnormal score calculation unit, and an abnormal behavior judgment unit; The distance calculation unit is used to calculate the distance from the real-time data feature vector to the clustering center; The abnormal score calculation unit is used to calculate the probability density of all clusters, and calculate the total abnormal score according to the probability density results of all clusters; The abnormal behavior judgment unit is used to judge whether the user's electricity consumption behavior is abnormal according to the abnormal score and the distance.
[0019] Compared with the prior art, the beneficial effects of the present invention are: 1. The present invention proposes a method for detecting abnormal electricity consumption of smart meters based on data analysis, clustering the electricity consumption data, which can accurately depict the typical electricity consumption patterns of users. Through the probability density function, it can flexibly cope with the personalized electricity consumption patterns of different users, improve the accuracy of abnormal detection, and reduce false alarms.
[0020] 2. The present invention proposes a method for detecting abnormal electricity consumption of smart meters based on data analysis, which solves the inherent problems of a single clustering method in a dynamic scenario. The dynamic hierarchical fusion of the time decay factor and hierarchical clustering breaks through the limitations of traditional static stratification. The closed-loop feedback and two-way optimization of parameters form a complete chain of adaptive detection, which is particularly suitable for user groups with complex electricity consumption characteristics.
[0021] 3. The present invention proposes a method for detecting abnormal electricity consumption of smart meters based on data analysis, introducing a dynamic threshold adjustment mechanism based on distribution, which can adapt to changes in the user's electricity consumption pattern. Traditional methods use fixed thresholds, which are prone to false alarms or missed alarms, while dynamic threshold adjustment can be adaptively adjusted according to changes in the user's electricity consumption behavior, thus achieving more accurate abnormal detection. Description of the Drawings
[0022] Figure 1 It is a flowchart of the method for detecting abnormal electricity consumption of smart meters based on data analysis provided by the present invention; Figure 2 It is a three-layer clustering flowchart provided by the present invention; Figure 3 This is the architecture diagram of the intelligent electricity meter abnormal power consumption detection system based on data analysis provided by the present invention. Detailed implementation manners
[0023] To make the technical means, creative features, achieved purposes and functions of the present invention easy to understand, in the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation to the present invention. In addition, the terms "No. 1", "No. 2", "No. 3" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The present invention will be further described below in conjunction with specific implementation manners.
[0024] Embodiment 1
[0025] Please refer to Figure 1 and Figure 2 An embodiment provided by the present invention: an intelligent electricity meter abnormal power consumption detection method based on data analysis, including the following specific steps: Step S1: Obtain the historical power consumption data of the user according to the intelligent electricity meter. The historical power consumption data of the user includes information such as power consumption, time period, and voltage, and preprocess the obtained historical power consumption data of the user; The preprocessing includes: complementing (such as averaging) or removing missing data, and smoothing abnormal data points to prevent misleading subsequent analysis; Step S2: Extract the features of the preprocessed historical power consumption data of the user; The specific steps of Step S2 are as follows: Step S201: Normalize the preprocessed historical power consumption data of the user and construct a feature vector X(t) at time t, , x m (t) represents the mth power consumption feature at time t. By setting a sliding window, a time series feature matrix T1 is constructed, , where x m (t n ) represents the mth power consumption feature at the nth moment; The time series features include: daily average power consumption, peak-valley power consumption ratio, current volatility, periodic trend, and other features such as abnormal event frequency. Through normalization, all feature values are made to fall between [0, 1], ensuring fairness in clustering for data with different dimensions. The time series feature matrix is formed by feature vectors at multiple time points, reflecting the user's electricity consumption characteristics at different times; Step S202: Combine the external environment features and composite features to construct the feature matrix T. The external environment features include: daily temperature, humidity, and holiday flag, etc. The composite features include: temperature sensitivity, which is the ratio of power consumption in high-temperature or low-temperature periods to that in the reference period. The reference period represents a specific time period, usually divided according to the variation law of electricity load. Based on the total power consumption in this period divided by the number of hours in this period. For example, the reference period includes peak period, normal period, and valley period. The peak period: generally from 10:00 to 12:00 and from 14:00 to 19:00, a total of 7 hours; the normal period: other time periods, a total of 9 hours; the valley period: generally from 0:00 to 8:00, a total of 8 hours; the power consumption in the peak period is divided by 7 hours, the power consumption in the normal period is divided by 9 hours, and the power consumption in the valley period is divided by 8 hours; Step S3: Conduct a three-layer clustering analysis on the extracted features to analyze the user's historical electricity consumption behavior; The specific steps of Step S3 are as follows: Step S301: Conduct a three-layer clustering analysis on the constructed feature matrix T, including the first-layer clustering analysis, the second-layer clustering analysis, and the third-layer clustering analysis. In the first-layer clustering, the clustering parameters are iteratively optimized by maximizing the likelihood function, and the feature matrix T is grouped and probabilistically partitioned. The specific formula is: , where p(X(t)) represents the grouping of the feature matrix T, K represents the number of clusters, which is the number of categories used to partition the feature matrix, represents the mixing coefficient of the k-th Gaussian distribution, that is, the proportion of the k-th class, represents the Gaussian distribution function, that is, the probability density of the feature vector X(t) in the k-th class, represents the mean of the k-th Gaussian distribution, that is, the central position of the k-th class, represents the covariance matrix of the k-th Gaussian distribution, that is, the distribution range and direction of the k-th class; By maximizing the probability density of the feature vector X(t), the mixing coefficients, means, and covariance matrices of each class are iteratively optimized, and finally the data is divided into K clusters; Gaussian distribution function The specific formula of , Among them, exp() represents the exponential function, zz represents the transpose of a vector, represents the determinant value of the covariance matrix of the k-th Gaussian distribution, which is used to describe the spread of the distribution, represents the inverse matrix of the covariance of the k-th Gaussian distribution, which is used to standardize the distance of data. a represents the dimension of the feature vector at time t, which is equal to the length of the feature vector, represents the constant of pi; The core of the Gaussian distribution function is based on the distance between the feature vector and the mean, and controls the variance and correlation between features through the covariance matrix to determine the distribution of samples in the feature space; Step S302: In the second-layer clustering, perform hierarchical clustering on the grouping p(X(t)) of the feature matrix T, construct a hierarchical model, and calculate the distance between layers. The specific formula is: , where d ij represents the distance between the i-th cluster and the j-th cluster in the grouping of the feature matrix T, X i represents the central feature vector of the i-th class in the grouping of the feature matrix T, X j represents the central feature vector of the j-th class in the grouping of the feature matrix T, represents the Euclidean distance between the centers of the i-th cluster and the j-th cluster, which is used to calculate the shortest distance between classes; By calculating the minimum distance between clusters, the closest clusters are gradually merged to form a hierarchical structure, which is suitable for more complex clustering relationships; Step S303: In the third-layer clustering, use the time decay factor to optimize the results of the first-layer clustering and the second-layer clustering. The optimization objective function is: , where represents the objective function value of the third-layer clustering, which is used to minimize the clustering error. C represents the number of cluster centers, X p represents the p-th cluster in the grouping of the feature matrix T, c q represents the q-th cluster center, represents the membership degree of the p-th cluster X in the grouping of the feature matrix T p for the q-th cluster center c q , that is, the correlation between the cluster and the cluster center, represents the fuzzy factor, generally taking a value of 2, which is used to control the smoothness of the membership degree, represents the square of the Euclidean distance of the p-th cluster X in the grouping of the feature matrix T p for the q-th cluster center c q , represents the time decay factor, , where ts represents the number of days between the data time and the current time, and sx represents the attenuation coefficient; In this embodiment, by minimizing the objective function , the membership degree between each data point and multiple cluster centers is optimized, so that the sample has different membership degrees for each cluster center, forming a fuzzy class boundary, which is convenient for describing the fuzzy characteristics of electricity consumption behavior; by using the time decay factor, the clustering pays more attention to recent data, adapts to the dynamic changes of electricity consumption patterns, reduces the interference of stale data on the clustering results, and improves timeliness; Step S304: Obtain the user's electricity consumption behavior according to the three-layer clustering analysis results.
[0026] In this embodiment, the three-layer clustering is not a simple stacking of models. The first layer outputs the probability clustering result, which is used as the input of the second-layer hierarchical clustering to construct the hierarchical relationship of the user's electricity consumption behavior; the third layer optimizes the membership degree based on the results of the first two layers, generates dynamic cluster centers, and forms a closed-loop feedback with the Mahalanobis distance calculation in the real-time detection stage. Through the three-layer clustering, the inherent problems of a single clustering method in a dynamic scenario are solved, and unexpected technical effects are achieved in terms of false alarm rate, detection speed, and complex pattern recognition, including: the dynamic hierarchical fusion of the time decay factor and hierarchical clustering, breaking through the limitations of traditional static stratification; the two-way optimization of the closed-loop feedback and parameters, forming a complete chain of adaptive detection.
[0027] Step S4: Identify abnormal behaviors that significantly deviate from the normal electricity consumption pattern according to the user's historical electricity consumption behavior; The specific steps of Step S4 are as follows: Step S401: Obtain the real-time data of the user's smart meter, and set the real-time data feature vector after preprocessing the real-time data of the user's smart meter as X; Step S402: Calculate the distance from the real-time data feature vector X of the user's smart meter after preprocessing the real-time data to the cluster center. The specific formula is: , where represents the distance from the real-time data feature vector X of the user's smart meter after preprocessing the real-time data to the cluster center, and zz represents the transpose of the vector; In this embodiment, the distance here is the Mahalanobis distance. The larger the distance, the higher the degree to which the point deviates from the normal electricity consumption pattern, and the data points with larger deviations will be determined as abnormal points; Step S403: Judge the possibility that the real-time data of the user's smart meter belongs to the normal electricity consumption pattern, and calculate the probability density value of the real-time data feature vector X of the user's smart meter after preprocessing the real-time data under each cluster distribution. The specific formula is: , Among them, represents the probability density value of the real-time data feature vector X after preprocessing the real-time data of the user's smart meter under each clustering distribution, and wd represents the dimension of the real-time data feature vector X after preprocessing the real-time data of the user's smart meter; In this embodiment, this formula is the probability density function based on the Gaussian distribution. For multi-dimensional data, the Gaussian distribution can be characterized by the mean vector and the covariance matrix: the mean vector μ k describes the position of the data center, while the covariance matrix describes the distribution of the data in different directions. By calculating the probability density value of X , the possibility that X falls into the cluster c q can be obtained. The larger the density value, the closer X is to the cluster center and the more in line with the typical pattern; on the contrary, it means that X is more deviated from the normal pattern and may be abnormal data; Step S404: According to the probability density results of all clusters, calculate the total anomaly score. The specific formula is: , Among them, S(X) represents the total anomaly score, that is, the degree to which the real-time data feature vector X of the user's smart meter after preprocessing deviates from the normal pattern, and log() represents the logarithmic function; In this embodiment, the total anomaly score S(X) measures its anomaly degree by calculating the total probability density of X under all clusters. First, calculate the probability density of X in each cluster , and then weight it according to the mixing coefficient π k to obtain the total probability density value of X under all patterns. Take the logarithm of the total probability density value and take the negative to get the anomaly score S(X). If S(X) is large, it means that the probability of X under all patterns is low and it deviates from all normal patterns, so it is abnormal data; if S(X) is small, it means that the data point is more in line with the normal pattern; Step S405: Set the distance threshold to and the initial threshold of the anomaly score to . The anomaly score threshold of the current time window is adaptively updated according to the anomaly scores of historical detection data. The specific formula is: , Among them, represents the anomaly score threshold of the current time window, represents the anomaly score threshold of the previous moment of the current time window, represents the update step, which is used to control the change speed of the threshold. The update step is inversely proportional to the stability of the current cluster center. The stability is calculated by the historical offset of the cluster center, Represents the standard deviation of the anomaly scores for the current time window; By dynamically adjusting the threshold, it can adapt to changes in the user's electricity consumption pattern and reduce false alarms and missed alarms; Step S406: According to the distance from the real-time data feature vector X after preprocessing the real-time data of the user's smart meter to the cluster center and the total anomaly score S(X), determine whether the user's electricity consumption behavior is abnormal. When or S(X) > analyze the causal relationship between the change in real-time electricity consumption data and the historical electricity consumption behavior, and determine whether the current electricity consumption change is caused by normal factors. At the same time, based on the time series prediction model, predict the electricity consumption trend within a specified future time period. If the deviation between the actual real-time data and the predicted trend exceeds the set threshold, determine that the real-time data of the user's smart meter is abnormal electricity consumption behavior; otherwise, determine it as normal electricity consumption behavior.
[0028] Step S5: Through the feedback mechanism, adaptively adjust the model parameters to monitor the abnormal electricity consumption of the smart meter in real time.
[0029] Embodiment 2
[0030] Please refer to Figure 3 , another embodiment provided by the present invention: an abnormal electricity consumption detection system for smart meters based on data analysis, including: a data acquisition module, a feature extraction module, a behavior analysis module, an anomaly analysis module, and a real-time monitoring module; The data acquisition module is used to obtain the user's historical electricity consumption data according to the smart meter and preprocess the obtained user historical electricity consumption data; The feature extraction module is used to extract the features of the preprocessed user historical electricity consumption data; The behavior analysis module is used to perform three-layer clustering analysis on the extracted features to analyze the user's historical electricity consumption behavior; The anomaly analysis module is used to identify abnormal behaviors that significantly deviate from the normal electricity consumption pattern according to the user's historical electricity consumption behavior; The real-time monitoring module is used to adaptively adjust the model parameters through the feedback mechanism to monitor the abnormal electricity consumption of the smart meter in real time.
[0031] The behavior analysis module includes: a feature extraction unit and a clustering analysis unit; The feature extraction unit is used to extract the feature vector of the user's electricity consumption data and construct a feature matrix; The clustering analysis unit is used to perform three-layer clustering analysis on the constructed feature matrix to obtain the user's historical electricity consumption behavior.
[0032] Anomaly analysis module, including: distance calculation unit, anomaly score calculation unit and abnormal behavior judgment unit; The distance calculation unit is used to calculate the distance from the real-time data feature vector to the cluster center; The anomaly score calculation unit is used to calculate the probability density of all clusters, and calculate the total anomaly score according to the probability density results of all clusters; The abnormal behavior judgment unit is used to judge whether the user's power consumption behavior is abnormal according to the anomaly score and the distance.
[0033] In addition, the parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0034] As described above in the specific implementation manners, the purpose, technical solutions and beneficial effects of the present invention have been further described in detail. It should be understood that the above are only the specific implementation manners of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An intelligent electricity meter abnormal power consumption detection method based on data analysis, characterized in that, The specific steps include: Obtaining historical electricity consumption data of users according to smart meters, and preprocessing the acquired historical electricity consumption data of users; Extract the features of the pre-processed historical electricity consumption data of users, including time series features, external environment features and composite features; Perform three-layer clustering analysis on the extracted features to analyze the user's historical electricity consumption behavior; Based on the user's historical electricity usage behavior, identify abnormal behavior that significantly deviates from normal electricity usage patterns; The model parameters are adaptively adjusted through the feedback mechanism to monitor the abnormal power consumption of smart meters in real time.
2. The intelligent electric meter abnormal power consumption detection method based on data analysis according to claim 1, characterized in that, The feature extraction of the pre-processed historical electricity consumption data of the user includes: Normalize the preprocessed historical electricity consumption data of users, and construct the feature vector X(t) at time t. , x m (t) represents the m-th electricity consumption feature at time t. By setting a sliding window, construct the time series feature matrix T1. , where x m (t n ) represents the m-th electricity consumption feature at the n-th moment. The feature matrix T is constructed by combining external environmental features and composite features. The external environmental features include daily temperature, humidity and holiday signs. The composite features include temperature sensitivity, the ratio of power consumption to the reference period during high or low temperature periods.
3. The intelligent electric meter abnormal power consumption detection method based on data analysis according to claim 2, characterized in that, The three-layer clustering analysis is performed on the extracted features to analyze the user's historical electricity consumption behavior, including: The constructed feature matrix T is subjected to three-layer clustering analysis, including the first-layer clustering analysis, the second-layer clustering analysis and the third-layer clustering analysis. In the first-layer clustering, the clustering parameters are iteratively optimized by maximizing the likelihood function, and the feature matrix T is grouped and probability-partitioned to obtain the grouping p(X(t)) of the feature matrix T. In the second - layer clustering, hierarchical clustering is performed on the grouping p(X(t)) of the feature matrix T to construct a hierarchical model, and the distance d between the i - th cluster and the j - th cluster in the grouping of the feature matrix T is calculated ij ; In the third-layer clustering, the time decay factor is used to optimize the results of the first-layer clustering and the second-layer clustering, and the optimization objective function is set; According to the three-layer clustering analysis results, the user's electricity consumption behavior is obtained.
4. The intelligent electricity meter abnormal power consumption detection method based on data analysis according to claim 1, characterized in that, The identifying, based on the user's historical electricity usage behavior, abnormal behavior that significantly deviates from the normal electricity usage pattern includes: Acquire the real-time data of the user's smart meter, and set the real-time data feature vector after preprocessing the real-time data of the user's smart meter as X; Calculate the distance from the real-time data feature vector X of the user's smart meter after real-time data preprocessing to the cluster center ; Judge the possibility that the real-time data of the user's smart meter belongs to the normal power consumption mode, and calculate the probability density value of the real-time data feature vector X after preprocessing the real-time data of the user's smart meter under each clustering distribution ; Based on the probability density results of all clusters, calculate the total anomaly score S(X).
5. The intelligent electric meter abnormal power consumption detection method based on data analysis according to claim 4, characterized in that, The identifying, based on the user's historical electricity usage behavior, abnormal behavior that significantly deviates from the normal electricity usage pattern also includes: Set the distance threshold to and the initial threshold of the anomaly score to , and the anomaly score threshold of the current time window is adaptively updated according to the anomaly distribution of historical detection data and the stability of the current clustering center to obtain the anomaly score threshold of the current time window ; The distance from the real-time data feature vector X preprocessed from the user's smart meter real-time data to the cluster center and the total anomaly score S(X) are used to determine whether the user's electricity consumption behavior is abnormal. When > or S(X) > analyze the causal relationship between the change in real-time electricity consumption data and historical electricity consumption behavior to determine whether the current electricity consumption change is caused by normal factors. At the same time, based on the time series prediction model, predict the electricity consumption trend within a specified future time period. If the deviation between the actual real-time data and the predicted trend exceeds the set threshold, determine that the real-time data of the current user's smart meter is abnormal electricity consumption behavior; otherwise, determine it as normal electricity consumption behavior.
6. The intelligent electricity meter abnormal power consumption detection method based on data analysis according to claim 1, characterized in that The preprocessing of the acquired historical electricity consumption data of the user includes: Complete or remove missing data and smooth abnormal data points.
7. The intelligent electric meter abnormal power consumption detection method based on data analysis according to claim 1, characterized in that, The characteristics of the user's historical electricity consumption data include: Daily average electricity consumption, peak-to-valley ratio, current fluctuation, periodic trends and frequency of abnormal events.
8. An intelligent electricity meter abnormal power consumption detection system based on data analysis, which is used to implement the intelligent electricity meter abnormal power consumption detection method based on data analysis described in any one of claims 1-7, characterized in that, include: Data acquisition module, feature extraction module, behavior analysis module, anomaly analysis module and real-time monitoring module; The data acquisition module is used to acquire the user's historical electricity usage data according to the smart meter, and pre-process the acquired user's historical electricity usage data; The feature extraction module is used to extract the features of the pre-processed historical electricity consumption data of the user; The behavior analysis module is used to perform three-layer clustering analysis on the extracted features to analyze the user's historical electricity consumption behavior; The abnormal analysis module is used to identify abnormal behaviors that significantly deviate from normal power consumption patterns based on the user's historical power consumption behaviors; The real-time monitoring module is used to adaptively adjust model parameters through a feedback mechanism to perform real-time monitoring of abnormal power consumption of the smart meter.
9. The intelligent electricity meter abnormal power consumption detection system based on data analysis according to claim 8, characterized in that, The behavior analysis module includes: a feature extraction unit and a cluster analysis unit; The feature extraction unit is used to extract the feature vectors of the user's power consumption data and construct a feature matrix; The clustering analysis unit is used to perform three-layer clustering analysis on the constructed feature matrix to obtain the user's historical power consumption behavior.
10. The intelligent electricity meter abnormal power consumption detection system based on data analysis according to claim 9, characterized in that, The anomaly analysis module includes: a distance calculation unit, an anomaly score calculation unit, and an anomaly behavior judgment unit; The distance calculation unit is used to calculate the distance from the real-time data feature vector to the cluster center; The anomaly score calculation unit is used to calculate the probability density of all clusters, and calculate the total anomaly score according to the probability density results of all clusters; The anomaly behavior judgment unit is used to judge whether the user's power consumption behavior is abnormal according to the anomaly score and the distance.
Citation Information
Patent Citations
Power consumption behavior anomaly detection method and device and computer readable storage medium
CN112686288A
Electricity stealing user identification system based on deep well network
CN117495109A
Low-voltage power distribution fault automatic monitoring method and system based on Internet of Things
CN118473086A
Visual intelligent management tool system for power grid operation risk level
CN119809309A
Cited By
Intelligent ammeter high-precision low-power consumption metering method and system
CN120652162A
Electric energy meter parameter differentiation correction system based on multi-dimensional data
CN120742225A
Electric energy meter data potential safety hazard analysis method and system
CN120805126A
Intelligent identification method for power load state of power grid
CN120810950A
Electricity utilization safety early warning method and system based on big data of electric energy meter
CN120892976A