Electricity consumption data anomaly detection method and module based on big data

By building a multidimensional state space model combined with big data analysis, the problems of insufficient accuracy and real-time performance of machine learning methods in power anomaly monitoring are solved, efficient power anomaly identification and early warning are achieved, and the safe operation of the power grid is guaranteed.

CN118964820BActive Publication Date: 2025-09-16ANHUI ZENITH ELECTRICITY & ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411035955.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2025-09-16
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Existing power anomaly monitoring methods based on machine learning have deficiencies in accuracy and real-time performance. They cannot effectively identify the temporal changes in user power consumption, and the training time is long, which cannot meet the requirements of real-time identification of abnormal power consumption.

Method used

A big data-based power consumption data anomaly detection method for electricity collection terminals is adopted. By constructing a multidimensional state space model, combining trend, seasonal and external factor characteristics, using the variational Bayesian inference algorithm to train the model, and using the prediction standard score algorithm to calculate the power deviation in real time, abnormal data can be identified.

Benefits of technology

It improves the accuracy and real-time performance of power anomaly identification, can quickly identify abnormal conditions such as meter damage and line overheating, reduce losses caused by equipment failure, and provide reliable technical support for the safe operation of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964820B_ABST
    Figure CN118964820B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of power equipment, and specifically relates to a method for detecting anomalies in power data of a power collection terminal based on big data, and its corresponding modules and terminals. This solution comprehensively considers the characteristic parameters that affect the changes in power consumption of users in the substation area, and analyzes the statistical laws of power consumption in combination with the trend, seasonality and external factors of power consumption; and then uses the method of probability prediction of a structured state space model to train an power prediction model that can predict power consumption at future moments based on historical power consumption data offline. Finally, the actual power data collected by the power collection terminal is compared with the data predicted by the model. When the deviation between the two exceeds the preset safety range, it is determined that the actual power data collected by the power collection terminal is abnormal. The solution of the present invention uses an offline model to realize anomaly recognition, which has better real-time performance. The power prediction model can be dynamically updated, so the recognition accuracy is relatively higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of electric power equipment, and in particular relates to a method for detecting anomaly of electric power data of an electric power collection terminal based on big data, and a corresponding electric power data anomaly detection module and an electric power collection terminal. Background Art

[0002] As the power grid continues to grow and expand, more and more loads are participating in the real-time dispatch and operation of the power system. User-side electricity data has become the primary basis for power market settlement. The consistency and integrity of this massive amount of electricity data directly impacts the fairness of the power market. The power grid's settlement center needs to identify and monitor anomalies in the electricity data uploaded by the collection terminals. In the early days, technicians typically used manually defined rules to identify abnormal electricity data. However, as the scale of the power grid continued to expand, this manual detection method consumed a large amount of manpower and material resources and no longer met market demand.

[0003] On this basis, domestic and international scholars have proposed numerous solutions for data anomaly detection. Among these, anomaly data detection methods based on machine learning have been widely used and have achieved good results. Machine learning methods include classification methods based on supervised learning and clustering methods based on unsupervised learning. Supervised learning classification methods primarily include neural networks, random forests, and isolation forests, among other anomaly data identification methods. Supervised anomaly data identification methods train classification models based on anomaly-labeled data, requiring manual pre-labeling of abnormal power data. Furthermore, the number of anomaly data samples is relatively small, leading to sample imbalance, a major bottleneck restricting the performance of such methods. To address this issue, numerous unsupervised machine learning methods have been applied to anomaly data identification, primarily including methods based on clustering or DBSCAN clustering, and methods combining power time series modeling with clustering.

[0004] Currently, an increasing number of unsupervised learning methods based on deep learning are being applied to identify anomalies in power data. However, two challenges remain when applying these methods to identifying anomaly data from power consumption collection terminals. First, user electricity consumption is influenced by people's daily lives and production patterns, and exhibits inherent temporal variations. Identifying anomaly data requires considering these temporal variations in electricity consumption to identify different types of abnormal power consumption. Second, machine learning-based methods require extensive historical data to train the recognition model, which takes a long time to train and cannot meet the requirements for real-time identification of abnormal power consumption. Summary of the Invention

[0005] In order to solve the shortcomings of the existing power anomaly monitoring method based on machine learning, such as low accuracy and insufficient real-time performance, the present invention provides a power data anomaly detection method, module and terminal for power consumption collection terminals based on big data.

[0006] The technical solution provided by the present invention is:

[0007] A method for detecting abnormality in power consumption data of a power consumption collection terminal based on big data comprises the following steps:

[0008] S1: Obtain historical electricity data and perform preliminary screening using any abnormal data detection algorithm to eliminate abnormal data and form the required sample database.

[0009] S2: Based on trend characteristics, seasonal characteristics and external factors, the electricity consumption data is modeled in state space, thereby forming a multidimensional state space model that includes measurement equations and state equations. The process is as follows:

[0010] S21: Using trend level and trend change slope as characteristic parameters, a state space model of power trend is constructed.

[0011] S22: Using seasonal impact coefficient, number of seasons and seasonal repetition period as characteristic parameters, a seasonal state space model of electricity consumption is constructed.

[0012] S23: Using the external factor influence coefficient, the number of influencing factors and the regression coefficient of the external factor influence coefficient as characteristic parameters, a state space model of the external factor of electricity is constructed.

[0013] S24: Using the power trend state space model, the power seasonality state space model, and the power external factor state space model, the following multidimensional state space model is constructed:

[0014] Measurement equation:

[0015] Equation of state:

[0016] η t ~N(0,Q t )

[0017] In the above formula, y t is the power data at time t; α t and α t-1 is the m-dimensional system state vector at different times, which is unobservable; ε t is the measurement noise; η t is the state noise; Z t is an m-dimensional output vector, representing the conversion between system state and power; T t is the m×m state transition matrix, represents the measurement noise ε t Variance of R t is the m×q control matrix; Qt is a q×q state diffusion matrix; where q>m.

[0018] S3: Use the sample database to statistically analyze the characteristics of different features to obtain the corresponding power time series data, and use the variational Bayesian inference algorithm to train the posterior distribution of each parameter in the multidimensional state space model created based on different features; determine the value of each undetermined feature parameter.

[0019] S4: Deploy the multi-dimensional state space model trained in the previous step as the power prediction model.

[0020] Among them, the power prediction model is used to sample the posterior distribution of model parameters in combination with the actual power data of the previous moment, thereby realizing real-time prediction of the probability distribution of future power.

[0021] S5: Calculate the metering deviation between the actual power consumption at the current moment collected by the power collection terminal and the power consumption at the current moment predicted by the power prediction model at the previous moment, and make the following decisions based on the value of the metering deviation:

[0022] (1) When the metering deviation exceeds the preset deviation threshold, it is determined that the electricity data collected by the electricity collection terminal is abnormal.

[0023] (2) When the metering deviation does not exceed the preset deviation threshold, it is determined that the electricity data collected by the electricity consumption collection terminal is normal.

[0024] and / or

[0025] The identified normal data is added to the sample data set for retraining the power prediction model.

[0026] As a further improvement of the present invention, in step S1, the abnormal data detection algorithm adopts the Z-score method, isolation forest or spatial clustering algorithm.

[0027] As a further improvement of the present invention, in step S21, the expression of the power trend state space model is as follows:

[0028]

[0029] In the above formula, μ t is the trend of the electric quantity at time t; δ t is the trend change of the electric quantity between time t and time t+1, corresponding to the slope at time t; η μ,t and η δ,t are the errors of trend and trend change respectively.

[0030] As a further improvement of the present invention, in step S22, the expression of the electricity seasonal state space model is as follows:

[0031]

[0032] In the above formula, γ t+d , γ t , γ t-(s-4)d ,…,γ t-d They represent multiple seasonal influence coefficients respectively; s is the number of seasons; d is the duration of each season, that is, the seasonal repetition period; η γ,t It is the error of the degree of influence of seasonal factors on electricity consumption.

[0033] As a further improvement of the present invention, in step S23, the expression of the state space model of the external factors of electricity is as follows:

[0034]

[0035] In the above formula, x 1,t ~x J,t Represents the influence coefficients of multiple external factors; β 1,t+1 ~β J,t+1 is the regression coefficient of various external influencing factors at time t; J is the number of external influencing factors; η β,1,t ~η β,J,t is the error in the degree of influence of various external factors on power at time t.

[0036] As a further improvement of the present invention, in step S24, the state transformation vectors of the three state space models constructed based on different characteristic parameters are spliced, and the state transfer matrices and control matrices of different characteristic parameters are respectively combined into block diagonal matrices, thereby forming a unified multidimensional state space model that takes into account various characteristic parameters.

[0037] As a further improvement of the present invention, in step S3, the characteristic parameters to be determined include: trend level, trend change slope, seasonal influence coefficient, external factor influence coefficient and regression coefficient of the external factor influence coefficient.

[0038] As a further improvement of the present invention, in step S5, the prediction standard score algorithm is used to calculate in real time the degree to which the actual collected power deviates from the mean of the predicted power probability distribution, and this is used as the measurement deviation. The calculation formula is as follows:

[0039]

[0040] In the above formula, Y t Indicates the actual amount of electricity collected at time t; The expected value of the probability distribution of the electricity volume predicted by the model at time t, i.e. the mean value; is the variance of the model's historical prediction results.

[0041] The present invention also provides an electric quantity data anomaly detection module, which includes: a data acquisition unit, an electric quantity prediction unit, a deviation calculation unit, and an anomaly recognition unit.

[0042] The data collection unit is used to obtain real-time electricity consumption data collected by the electricity consumption collection terminal. The electricity consumption prediction unit deploys an electricity consumption prediction model built and trained using the aforementioned big data-based electricity consumption data anomaly detection method. This model combines the actual electricity consumption data from the previous moment to predict the probability distribution of electricity consumption at a future moment.

[0043] The deviation calculation unit is used to calculate in real time the degree to which the actual power collected each time deviates from the mean value of the predicted power probability distribution using the prediction standard score algorithm, and obtain the corresponding measurement deviation value.

[0044] The abnormality identification unit is used to determine that there is an abnormality in the electricity data collected by the electricity collection terminal when the measurement deviation of the actual electricity collected at any time exceeds a preset deviation threshold.

[0045] The present invention also includes an electricity consumption collection terminal, which is integrated with the aforementioned electricity data anomaly detection module, thereby realizing anomaly monitoring of the electricity data collected by itself.

[0046] The technical solution provided by the present invention has the following beneficial effects:

[0047] The present invention provides a solution that uses a large amount of real user historical electricity data to train a structured state space model constructed by combining multiple feature parameters, thereby obtaining an electricity prediction model that can be run offline; the electricity prediction model is then used to predict future electricity data and compare it with the electricity data obtained by the electricity collection terminal. When the deviation between the two is too large, the electricity data obtained by the electricity collection terminal is identified as abnormal data. In the solution of the present invention, the structured state space model comprehensively considers the various statistical laws of electricity data and can dynamically update the model parameters based on the recognition results. Therefore, the recognition results of this solution are more accurate. In addition, the offline model used in this embodiment can be deployed locally, thereby meeting the real-time requirements of the solution in actual application scenarios.

[0048] The solution of the present invention utilizes historical data to build a data model, reducing the steps involved in data collection and model building during actual operation and improving the efficiency of diagnosing abnormal data. Furthermore, the solution of the present invention can determine abnormal conditions in newly added electricity data in real time, quickly identifying potential abnormalities in the substation area, such as meter damage, line overheating and burnout, and equipment damage. It also provides early warnings to operations and maintenance personnel, effectively reducing losses caused by substation failures and providing reliable technical support for ensuring the safe operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 This is a flowchart of the steps of the method for detecting abnormal power data of an electricity consumption collection terminal based on big data provided in Example 1 of the present invention.

[0050] Figure 2 This is a schematic diagram of the method for detecting abnormal power data of a power consumption collection terminal based on big data provided in Example 1 of the present invention.

[0051] Figure 3 This is a system topology diagram of the power data anomaly detection module proposed in Example 2 of the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0053] Example 1

[0054] This embodiment provides a method for detecting anomalies in electricity consumption data from electricity collection terminals based on big data. The overall concept of this solution is as follows: First, it comprehensively considers the characteristic parameters that influence changes in electricity consumption within the substation area and analyzes the statistical patterns of electricity consumption in combination with trends, seasonality, and external factors. Furthermore, using a structured state space model probabilistic prediction method, an electricity prediction model is trained offline based on historical electricity consumption data to predict future electricity consumption. The actual electricity consumption data collected by the electricity collection terminal is then compared with the data predicted by the model. When the deviation between the two exceeds a preset safety range, the actual electricity consumption data collected by the electricity collection terminal is determined to be anomaly. Based on this, operations and maintenance personnel can further verify the cause of the anomaly, mitigate the impact of equipment failures, and provide reliable technical support for the safe operation of the power grid. The main causes of anomalies in data collected by the electricity collection terminal include meter damage, line overheating, and equipment damage.

[0055] Specifically, if Figure 1 and Figure 2 As shown, the method for detecting abnormal power data of a power consumption collection terminal based on big data provided in this embodiment includes the following steps:

[0056] S1: Obtain historical electricity data and perform preliminary screening using any abnormal data detection algorithm to eliminate abnormal data and form the required sample database.

[0057] The solution of this embodiment relies on a structured state space probability prediction model to achieve power consumption prediction, and the prediction accuracy of the trained model is closely related to the accuracy of the adopted data source. Therefore, this embodiment requires data screening of the collected historical power consumption data.

[0058] In practical applications, this embodiment can employ the Z-score method, isolation forest, and spatial clustering algorithms as abnormal data detection algorithms. This data review process can eliminate historical data containing significant abnormal electricity usage data caused by acquisition device failures, communication channel interruptions, and other factors, thereby obtaining a high-quality electricity usage dataset that can be used to construct a structured state space probabilistic prediction model.

[0059] S2: Based on trend characteristics, seasonal characteristics and external factors, the electricity consumption data is modeled in state space, thereby forming a multidimensional state space model including measurement equations and state equations.

[0060] Electricity consumption is a typical observable time series data with basic time series characteristics. This embodiment, based on the fundamental concept of the state-space model, abstracts electricity consumption behavior into a system whose state changes over time. Electricity consumption is the external manifestation of this system state. Electricity consumption is an observable time series, while the system state is unobservable. Therefore, a structured state-space model is used to model different characteristics of electricity consumption, enabling probabilistic distribution prediction of electricity consumption.

[0061] Specifically, the state space model includes state equations and measurement equations. The state equation refers to the law of change of the state of the dynamic system from the previous moment to the current moment; the measurement equation refers to the changing relationship between power consumption and the state of the system. The model state transformation vector is expressed as the conversion vector between the system state and power consumption.

[0062] Considering that electricity consumption time series are affected by various factors such as social development and people's production and living patterns, they usually have characteristics such as trend, seasonality, and being affected by external factors. Therefore, this embodiment constructs a state space model of different electricity consumption characteristics based on these characteristics, and then obtains a multidimensional state space model. Specifically, the construction process of the multidimensional state space model in this embodiment is as follows:

[0063] S21: Using trend level and trend change slope as characteristic parameters, a state space model of power trend is constructed.

[0064] The trend characteristic of electricity consumption refers to the trend in electricity consumption changes within a certain time range. The trend of electricity consumption at a certain moment is the trend level, and the change in the trend between the previous moment and the current moment is the trend change slope. Combining the trend level and trend change slope, the expression of the electricity trend state space model constructed according to the state space model method in this embodiment is as follows:

[0065]

[0066] In the above formula, y t is the power data at time t; μ t is the trend of the electric quantity at time t; δ t is the trend change of the electric quantity between time t and time t+1, corresponding to the slope at time t; η μ,t and η δ,t are the errors of trend and trend change respectively. t The observation error of each state space model constitutes the measurement noise of the system.

[0067] S22: Using seasonal impact coefficient, number of seasons and seasonal repetition period as characteristic parameters, a seasonal state space model of electricity consumption is constructed.

[0068] The seasonal characteristics of electricity consumption refer to the seasonal variation patterns of electricity consumption with daily, weekly, monthly, and quarterly cycles. The degree of influence of seasonal factors on electricity consumption is the seasonal influence coefficient. Different seasons can be defined according to different cycles such as hourly, daily, monthly, or quarterly. The repetition period of each season is set to 24 (hours), 7 (days), 12 (months), or 4 (quarters). The seasonal characteristic model is the regression of electricity consumption on several virtual seasonal variables. According to the state space model method, this embodiment uses the seasonal influence coefficient, the number of seasons, and the seasonal repetition period as characteristic parameters to construct the expression of the seasonal state space model of electricity consumption as follows:

[0069]

[0070] In the above formula, γ t+d , γ t , γ t-(s-4)d ,…,γ t-d They represent multiple seasonal influence coefficients respectively; s is the number of seasons; d is the duration of each season, that is, the seasonal repetition period; η γ,t is the error of seasonal factors on power consumption; t For observation error.

[0071] S23: Using the external factor influence coefficient, the number of influencing factors and the regression coefficient of the external factor influence coefficient as characteristic parameters, a state space model of the external factor of electricity is constructed.

[0072] The impact of external factors on electricity consumption refers to the influence of external factors such as temperature and holidays on electricity consumption. The degree of influence of external factors on electricity consumption is the external factor influence coefficient. Temperature, holidays, etc. are abstracted into different influencing factors, and each influencing factor corresponds to a different influencing factor regression coefficient. According to the state space model method, this embodiment uses the external factor influence coefficient, the number of influencing factors, and the regression coefficient of the external factor influence coefficient as characteristic parameters. The expression of the constructed electricity external factor state space model is as follows:

[0073]

[0074] In the above formula, x 1,t ~x J,t Represents the influence coefficients of multiple external factors; β 1,t+1 ~β J,t+1 is the regression coefficient of various external influencing factors at time t; J is the number of external influencing factors; η β,1,t ~η β,J,t is the error in the degree of influence of various external factors on power at time t.

[0075] S24: Using the electricity trend state space model, electricity seasonality state space model, and electricity external factor state space model, the state transformation vectors of the corresponding models can be obtained. These state transformation vectors are spliced ​​together, and the state transfer matrices and control matrices with different characteristics are respectively combined into block diagonal matrices. Finally, a unified multidimensional state space model that considers various electricity consumption characteristic parameters can be formed. The expression of the multidimensional state space model is as follows:

[0076] Measurement equation:

[0077] Equation of state:

[0078] η t ~N(0,Q t )

[0079] In the above formula, y t is the power data at time t; α t and α t-1 is the m-dimensional system state vector at different times, which is unobservable; ε t is the measurement noise; η t is the state noise; Z t is an m-dimensional output vector, representing the conversion between system state and power; Tt is the m×m state transition matrix, represents the measurement noise ε t Variance of R t is the m×q control matrix; Q t is a q×q state diffusion matrix; where q>m.

[0080] S3: Use the sample database to statistically analyze the characteristics of different features to obtain the corresponding power time series data, and use the variational Bayesian inference algorithm to train the posterior distribution of each parameter in the multidimensional state space model created based on different features; determine the value of each undetermined feature parameter.

[0081] In this embodiment, after training with the sample database, the undetermined characteristic parameters that can be determined include: trend level, trend change slope, seasonal influence coefficient, external factor influence coefficient and regression coefficient of the external factor influence coefficient.

[0082] S4: Deploy the multi-dimensional state space model trained in the previous step as the power prediction model.

[0083] Among them, the power prediction model is used to sample the posterior distribution of model parameters in combination with the actual power data of the previous moment, thereby realizing real-time prediction of the probability distribution of future power.

[0084] In this embodiment, once the power consumption prediction model meets the required accuracy, it can be directly deployed as an offline model. In a more optimized solution, the normal data after each prediction can be used as new sample data and added to the original sample database to retrain a new power consumption prediction model. The model update frequency can be flexibly set according to the actual application scenario.

[0085] S5: Calculate the metering deviation between the actual power consumption at the current moment collected by the power collection terminal and the power consumption at the current moment predicted by the power prediction model at the previous moment, and make the following decisions based on the value of the metering deviation:

[0086] (1) When the metering deviation exceeds the preset deviation threshold, it is determined that the electricity data collected by the electricity collection terminal is abnormal.

[0087] When data anomalies are detected, this embodiment can send a corresponding early warning signal to the management personnel or the substation data center, reminding the substation data center to dispatch operation and maintenance personnel to the site to conduct inspections and eliminate safety hazards.

[0088] (2) When the metering deviation does not exceed the preset deviation threshold, it is determined that the electricity data collected by the electricity consumption collection terminal is normal.

[0089] During the actual application of the solution of this embodiment, it is also possible to choose to add the identified normal data to the sample data set for retraining the power prediction model to further improve the prediction accuracy of the power prediction model.

[0090] In this implementation, the prediction standard score algorithm is used to calculate in real time the degree to which the actual collected power deviates from the mean of the predicted power probability distribution, and this is used as the measurement deviation. The calculation formula is as follows:

[0091]

[0092] In the above formula, Y t Indicates the actual amount of electricity collected at time t; The expected value of the probability distribution of the electricity volume predicted by the model at time t, i.e. the mean value; is the variance of the model's historical prediction results.

[0093] Example 2

[0094] Based on the solution of embodiment 1, this embodiment further provides a power data abnormality detection module, such as Figure 3 As shown, it includes: a data acquisition unit, a power prediction unit, a deviation calculation unit, and an abnormality identification unit.

[0095] The data collection unit is used to obtain real-time electricity consumption data collected by the electricity consumption collection terminal. The electricity consumption prediction unit deploys an electricity consumption prediction model built and trained using the aforementioned big data-based electricity consumption data anomaly detection method. This model combines the actual electricity consumption data from the previous moment to predict the probability distribution of electricity consumption at a future moment.

[0096] It is important to note that the power prediction model trained in this embodiment is influenced by historical data during the training phase and is significantly regional. Therefore, in actual application, the power prediction model deployed in each circuit prediction unit should be trained using historical data from the region. For some newly added substations, the power prediction model of similar substations can be used as a temporary model. After accumulating sufficient historical data, a power prediction model specific to the region can be trained.

[0097] The deviation calculation unit is used to calculate in real time the degree to which the actual power collected each time deviates from the mean value of the predicted power probability distribution using the prediction standard score algorithm, and obtain the corresponding measurement deviation value.

[0098] The abnormality identification unit is used to determine that there is an abnormality in the electricity data collected by the electricity collection terminal when the measurement deviation of the actual electricity collected at any time exceeds a preset deviation threshold.

[0099] The solution of this embodiment can directly utilize an offline power consumption prediction model trained with historical data, reducing the steps of collecting data and building models during actual operation, improving diagnostic efficiency and enhancing the real-time performance of the solution. Furthermore, the solution of the present invention can also use continuously generated real power consumption data within the substation area to correct the power consumption prediction model, thereby improving the accuracy of the diagnostic results.

[0100] The power data anomaly detection module provided in Example 2 is an embedded module designed based on the method in Example 1. This embedded module can be applied to the power consumption collection terminal in the substation area or deployed in other devices independent of the power consumption collection terminal.

[0101] In addition, the power data anomaly detection module in this embodiment can also be deployed as a computer device that can operate independently. The computer device can take various forms, such as a smart terminal that can execute programs, a tablet computer, a laptop computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including a standalone server or a server cluster composed of multiple servers). The computer device in this embodiment includes at least, but is not limited to: a memory and a processor that can be interconnected via a system bus.

[0102] In this embodiment, the memory (i.e., readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device.

[0103] In other embodiments, the memory may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc., equipped with the computer device. Of course, the memory may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory is generally used to store the operating system and various application software installed on the computer device. In addition, the memory may also be used to temporarily store various types of data that have been output or are about to be output.

[0104] In some embodiments, the processor may be a central processing unit (CPU), a graphics processing unit (GPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor is generally used to control the overall operation of the computer device. In this embodiment, the processor is used to run program code stored in the memory or process data.

[0105] In addition, this embodiment further provides an electricity consumption collection terminal, which directly integrates the aforementioned embedded power data anomaly detection module, thereby realizing anomaly monitoring of the power data collected by itself.

[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting abnormality in power consumption data of power collection terminals based on big data, characterized in that: It includes the following steps: S1: Obtain historical electricity data and use any abnormal data detection algorithm to preliminarily screen it, and form the required sample database after eliminating abnormal data; S2: Based on trend characteristics, seasonal characteristics and external factors, the electricity consumption data is modeled in state space, thereby forming a multidimensional state space model that includes measurement equations and state equations. The process is as follows: S21: Using the trend level and trend change slope as characteristic parameters, a state space model of power trend is constructed; S22: Using seasonal influence coefficient, number of seasons and seasonal repetition period as characteristic parameters, a seasonal state space model of electricity consumption is constructed; S23: Using the external factor influence coefficient, the number of influencing factors and the regression coefficient of the external factor influence coefficient as characteristic parameters, a state space model of the external factors of electricity is constructed; S24: Utilizing the electricity trend state space model, the electricity seasonality state space model, and the electricity external factor state space model, the following multidimensional state space model is constructed: Measurement equation: Equation of state: or t ~N(0,Q t ) In the above formula, y t is the power data at time t; α t and α t-1 is the m-dimensional system state vector at different times, which is unobservable; ε t is the measurement noise; η t is the state noise; Z t is an m-dimensional output vector, representing the conversion between system state and power; T t is the m×m state transition matrix, represents the measurement noise ε t Variance of R t is the m×q control matrix; Q t is a q×q state diffusion matrix; where q>m; S3: Statistically analyzing the characteristics of different features using the sample database to obtain corresponding power time series data, and using a variational Bayesian inference algorithm to train the posterior distribution of each parameter in the multidimensional state space model created based on the different features; and determining the value of each undetermined feature parameter; S4: Deploy the multi-dimensional state space model trained in the previous step as the power prediction model; The power prediction model is used to sample the posterior distribution of model parameters in combination with the actual power data at the previous moment, thereby realizing real-time prediction of the probability distribution of future power; S5: Calculate the measurement deviation between the actual power consumption at the current moment collected by the power collection terminal and the power consumption at the current moment predicted by the power prediction model at the previous moment, and make the following decisions based on the value of the measurement deviation: (1) When the metering deviation exceeds the preset deviation threshold, it is determined that the electricity data collected by the electricity collection terminal is abnormal; (2) When the metering deviation does not exceed the preset deviation threshold, it is determined that the electricity data collected by the electricity collection terminal is normal; and / or The identified normal data is added to the sample data set for retraining the power prediction model.

2. The method for detecting abnormality in power consumption data of a power consumption collection terminal based on big data according to claim 1, characterized in that: In step S1, the abnormal data detection algorithm adopts the Z-score method, isolation forest or spatial clustering algorithm.

3. The method for detecting abnormality in power consumption data of a power consumption collection terminal based on big data according to claim 1, characterized in that: In step S21, the expression of the power trend state space model is as follows: In the above formula, μ t is the trend of electricity at time t; δ t is the trend change of electricity between time t and time t+1, corresponding to the slope at time t; η μ,t and η δ,t are the errors of trend and trend change respectively.

4. The method for detecting abnormality in power consumption data of a power consumption collection terminal based on big data according to claim 3, characterized in that: In step S22, the expression of the electricity seasonal state space model is as follows: In the above formula, γ t+d , γ t , γ t-(s-4)d ,…,γ t-d They represent multiple seasonal influence coefficients respectively; s is the number of seasons; d is the duration of each season, that is, the seasonal repetition period; η γ,t It is the error of the degree of influence of seasonal factors on electricity consumption.

5. The method for detecting abnormality in power consumption data of a power consumption collection terminal based on big data according to claim 4, characterized in that: In step S23, the expression of the state space model of the external factors of electric quantity is as follows: In the above formula, x 1,t ~x J,t Represents the influence coefficients of multiple external factors; β 1,t+1 ~β J,t+1 is the regression coefficient of various external influencing factors at time t; J is the number of external influencing factors; η β,1,t ~η β,J,t is the error in the degree of influence of various external factors on power at time t.

6. The method for detecting abnormality in power consumption data of a power consumption collection terminal based on big data according to claim 5, characterized in that: In step S24, the state transformation vectors of the three state space models constructed based on different characteristic parameters are spliced, and the state transfer matrices and control matrices of different characteristic parameters are respectively combined into block diagonal matrices, thereby forming a unified multidimensional state space model considering various characteristic parameters.

7. The method for detecting abnormality in power consumption data of a power consumption collection terminal based on big data according to claim 6, characterized in that: In step S3, the undetermined characteristic parameters include: trend level, trend change slope, seasonal influence coefficient, external factor influence coefficient and regression coefficient of external factor influence coefficient.

8. The method for detecting abnormality in power consumption data of a power consumption collection terminal based on big data according to claim 1, characterized in that: In step S5, the prediction standard score algorithm is used to calculate in real time the degree to which the actual collected power deviates from the mean of the predicted power probability distribution, and the deviation is used as the measurement deviation. The calculation formula is as follows: In the above formula, Y t Indicates the actual amount of electricity collected at time t; The expected value of the probability distribution of the electricity volume predicted by the model at time t, i.e. the mean value; is the variance of the model's historical prediction results.

9. A power data anomaly detection module, characterized in that: It includes: A data collection unit, which is used to obtain the power consumption data collected in real time by the power collection terminal; An electric power prediction unit, wherein a power prediction model constructed and trained using the method for detecting anomalies in electric power data from an electricity consumption collection terminal based on big data according to any one of claims 1 to 8 is deployed; the power prediction model is used to predict the probability distribution of electric power at a future moment by combining actual electric power data at a previous moment; Deviation calculation unit, which is used to calculate the degree to which the actual collected power data deviates from the mean value of the predicted power probability distribution in real time using the prediction standard score algorithm to obtain the value of the measurement deviation; as well as The abnormality identification unit is used to determine that the power data collected by the power collection terminal is abnormal when the measurement deviation of the actual power collected at any time exceeds a preset deviation threshold.

10. A power consumption collection terminal, characterized by: It is integrated with the power data anomaly detection module as claimed in claim 9, thereby realizing anomaly monitoring of the power data collected by itself.

Citation Information

Patent Citations

  • Abnormal power consumption behavior identification method based on power consumption data

    CN113128567A

  • Power consumption abnormity detection method and device, electronic device and electronic equipment

    CN116227543A