Big data-based electricity data anomaly detection method and module for electricity utilization acquisition terminal
By constructing a multidimensional state space model, combining trend, seasonal and external factors, the abnormal detection of power data is solved by using the variational Bayesian inference algorithm, the problems of low accuracy and insufficient real-time in the existing technology are solved, and high efficiency is achieved The abnormality of the power data is identified and responded quickly.
Patent Information
- Application Number
- CN202411035955.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-07-31
AI Technical Summary
The existing machine learning-based power abnormality monitoring methods have problems of low accuracy and insufficient real-time performance, especially when considering the timing changes of power consumption and the long training time of historical data, it cannot meet the real-time identification requirements.
Using the abnormal detection method of power data at the terminal power acquisition based on big data, the multi-dimensional state space model is constructed, combined with trend, seasonal and external factors, the model is trained using the variational Bayesian inference algorithm, and the power prediction model is used for Real-time prediction and abnormal identification.
It improves the accuracy and real-time identification of abnormal data, can quickly identify abnormal situations such as meter damage, line overheating and burning, reduces the workload of operation and maintenance personnel, and ensures the safe operation of the power grid.
Smart Images

Figure CN118964820A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electric power equipment, and in particular relates to a method for detecting abnormal power data of an electricity consumption collection terminal based on big data, and a corresponding abnormal power data detection module and an electricity consumption collection terminal. Background Art
[0002] With the continuous development and expansion of the power grid, more and more loads are involved in the real-time dispatching and operation of the power system, and the user-side electricity data has become the main basis for the settlement of the power market. The consistency and integrity of massive electricity data directly affect the fairness of the power market. The settlement center of the power grid needs to identify and monitor abnormalities in the electricity data uploaded by the acquisition terminal. In the early days, technicians usually used manual setting of rules to identify abnormal electricity data. As the scale of the power grid continued to expand, this manual detection method consumed a lot of manpower and material resources, and therefore no longer met market demand.
[0003] On this basis, domestic and foreign scholars have proposed many solutions for data anomaly detection. Among them, abnormal data detection methods based on machine learning technology are 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 mainly include abnormal data recognition methods such as neural networks, random forests and isolation forests. Supervised abnormal data recognition methods train classification models based on annotated abnormal data, which requires manual labeling of abnormal power data in advance. In addition, there are few samples of abnormal data and there is a sample imbalance problem, which has become the main bottleneck restricting the performance of such methods. In order to solve this problem, many unsupervised machine learning methods have been applied to the field of abnormal data recognition, mainly including methods based on clustering or DBSCAN clustering, and methods combining power time series modeling with clustering.
[0004] At present, more and more unsupervised learning methods based on deep learning are also being applied to the recognition of abnormal power data. However, there are still two problems when applying this type of method to the recognition of abnormal data in power collection terminals. First, the user's power consumption is affected by people's production and living rules, and has its own inherent temporal variation law. The recognition of its abnormal data needs to consider the temporal variation law of power consumption, so as to identify different types of abnormal power. Second, the method based on machine learning needs to use a large amount of historical data to train the recognition model, which takes a long time to train and cannot meet the requirements of real-time recognition of abnormal power. Summary of the invention
[0005] In order to solve the shortcomings of the existing abnormal power monitoring methods based on machine learning, such as low accuracy and insufficient real-time performance, the present invention provides a method, module and terminal for detecting abnormal power data of power consumption collection terminals based on big data.
[0006] The technical solution provided by the present invention is:
[0007] A method for detecting abnormal power data of a power consumption collection terminal based on big data comprises the following steps:
[0008] S1: Obtain historical electricity data and use any abnormal data detection algorithm to perform preliminary screening on it, and form the required sample database after excluding abnormal data.
[0009] S2: Based on the trend characteristics, seasonal characteristics and external factors, the power consumption data is modeled in state space, thereby forming a multidimensional state space model including measurement equations and state equations. The process is as follows:
[0010] S21: Using the trend level and trend change slope as characteristic parameters, a state space model of electricity trend is constructed.
[0011] S22: Using seasonal impact coefficient, seasonal number 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: The following multidimensional state space model is constructed by using the state space model of power trend, the state space model of power seasonality and the state space model of power external factors:
[0014] Measurement equation:
[0015] Equation of state:
[0016]
[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 transfer matrix, Denotes the measurement noise ε t Variance of t is the m×q control matrix; Q t It is a q×q state diffusion matrix; where q>m.
[0018] S3: Use the sample database to statistically analyze the corresponding power time series data according to the characteristics of different features, 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 a 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 at the previous moment, thereby realizing real-time prediction of the probability distribution of future power.
[0021] S5: Calculate the measurement deviation between the actual power collected by the power collection terminal at the current moment and the power predicted by the power prediction model at the previous moment at the current moment, and make the following decisions based on the value of the measurement deviation:
[0022] (1) When the metering deviation exceeds a 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 a Z-score method, an isolation forest or a spatial clustering algorithm.
[0027] As a further improvement of the present invention, in step S21, the expression of the state space model of the power trend 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 cycle; η γ,t The error of the program is caused by seasonal factors affecting 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 Respectively represent 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 It is the error of the program caused by various external factors affecting the 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 electricity deviates from the mean value of the predicted electricity 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; is the expectation of the probability distribution of the electricity volume predicted by the model at time t, i.e., the mean; is the variance of the model's historical prediction results.
[0041] The present invention also provides an electric quantity data anomaly detection module, which comprises: 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 the power data collected by the power collection terminal in real time. The power prediction unit is equipped with a power prediction model constructed and trained using the aforementioned power collection terminal power data anomaly detection method based on big data. The power prediction model is used to combine the actual power data of the previous moment to predict the probability distribution of power at the future moment.
[0043] The deviation calculation unit is used to use the prediction standard score algorithm to calculate in real time the degree to which the actual collected electricity each time deviates from the mean value of the predicted electricity probability distribution, and obtain the corresponding measurement deviation value.
[0044] 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 collected power exceeds a preset deviation threshold at any time.
[0045] The present invention also includes an electricity consumption collection terminal, which integrates the aforementioned power data anomaly detection module, thereby realizing anomaly monitoring of the power 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 historical user electricity data to train a structured state space model that is constructed by combining multiple feature parameters, thereby obtaining an electricity prediction model that can be run offline; then the electricity prediction model is used to predict future electricity data, and the electricity data obtained by the electricity collection terminal is compared with the limit, and 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 various statistical laws of electricity data, and can dynamically update the model parameters according to the recognition results, so the recognition result of the solution is more accurate. In addition, the offline model used in this embodiment can be deployed locally, so it can meet the real-time requirements of the actual application scenario.
[0048] The solution of the present invention uses historical data to build a data model, which reduces the steps of collecting data and building models during actual operation, and improves the diagnostic efficiency of abnormal data. At the same time, the solution of the present invention can judge the abnormal conditions of the newly added power data in real time, quickly identify abnormal conditions such as meter damage, line overheating and burning, and equipment damage that may occur in the substation, and provide early warnings for operation and maintenance personnel, thereby effectively reducing the losses caused by faults in the substation 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 a power consumption collection terminal based on big data provided in Example 1 of the present invention.
[0050] Figure 2 This is a schematic diagram of a 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 solution and advantages of the present invention more clearly understood, the present invention is 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 used to limit the present invention.
[0053] Example 1
[0054] This embodiment provides a method for detecting abnormal power data of power collection terminals based on big data. The overall idea of the scheme is: first, comprehensively consider the characteristic parameters that affect the power consumption changes of users in the substation area, and analyze the statistical laws of power consumption in combination with the trend, seasonality and external factors of power consumption; then use the method of probability prediction of structured state space model to train an electric power prediction model that can predict the power consumption at future moments offline based on historical power consumption data. Then, compare the actual power data collected by the power collection terminal with the data predicted by the model. When the deviation between the two exceeds the preset safety range, it is judged that the actual power data collected by the power collection terminal is abnormal. On this basis, the operation and maintenance personnel can further verify the reasons for the abnormal data, reduce the impact of equipment failure, and provide reliable technical support for the safe operation of the power grid. Among them, the main reasons for the abnormal data collected by the power collection terminal include: meter damage, line overheating and burning, equipment damage, etc.
[0055] Specifically, 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 use any abnormal data detection algorithm to perform preliminary screening on it, and form the required sample database after excluding abnormal data.
[0057] The solution of this embodiment relies on a structured state space probability prediction model to achieve electricity forecasting, 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 electricity data.
[0058] In this embodiment, in the actual application process, the Z-score method, isolation forest, spatial clustering algorithm, etc. can be used as abnormal data detection algorithms. The data review process can exclude the obvious abnormal power consumption data caused by the failure of the collection device, the interruption of the communication channel, etc. contained in the historical data, and then obtain a high-quality power consumption data set that can be used to build a structured state space probability prediction model.
[0059] S2: The state space modeling of electricity consumption data is carried out according to trend characteristics, seasonal characteristics and external factors, thereby forming a multidimensional state space model including measurement equations and state equations.
[0060] Electricity consumption is a typical observable time series data, which has the basic characteristics of a time series. This embodiment is based on the basic idea of the state space model, abstracting the electricity consumption behavior into a system whose state changes over time, and the electricity consumption is the external manifestation of the system state. Electricity consumption is an observable time series, and the system state is unobservable. Therefore, a structured state space model is used to model the different characteristics of electricity consumption, so as to realize the probability 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 the influence of various factors such as social development and people's production and living rules, the time series of electricity consumption usually has 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 the trend level and trend change slope as characteristic parameters, a state space model of electricity trend is constructed.
[0064] The trend characteristic of electricity consumption refers to the trend of 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 the trend change slope, the expression of the electricity trend state space model constructed by 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, seasonal number 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 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 seasonal state space model of electricity consumption. The expression is 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 cycle; η γ,t is the error of the program caused by seasonal factors affecting the power consumption; ε t For viewing 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 influence 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 type of 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, and 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 Respectively represent 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 It is the error of the program caused by various external factors affecting the power at time t.
[0075] S24: The state transformation vectors of the corresponding models can be obtained by using the state space model of power trend, the state space model of power seasonality and the state space model of power external factors. These state transformation vectors are spliced, 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 considering various power 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]
[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; T t is the m×m state transfer matrix, Denotes the measurement noise ε t Variance of t is the m×q control matrix; Q t It is a q×q state diffusion matrix; where q>m.
[0080] S3: Use the sample database to statistically analyze the corresponding power time series data according to the characteristics of different features, 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 a 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 at the previous moment, thereby realizing real-time prediction of the probability distribution of future power.
[0084] In the solution of this embodiment, when the prediction accuracy of the power consumption prediction model meets the requirements, it can be directly deployed as an offline model. In a more optimized solution, the normal data after each prediction can also be used as new sample data and added to the original sample database to retrain a power consumption prediction model. The update frequency of the model can be flexibly set according to the actual application scenario.
[0085] S5: Calculate the measurement deviation between the actual power collected by the power collection terminal at the current moment and the power predicted by the power prediction model at the previous moment at the current moment, and make the following decisions based on the value of the measurement deviation:
[0086] (1) When the metering deviation exceeds a 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 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] In the actual application process of the solution of this embodiment, it is also possible to choose to add the recognized 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 the scheme implemented in this embodiment, the prediction standard score algorithm is used to calculate in real time the degree to which the actual collected electricity deviates from the mean of the predicted electricity 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; is the expectation of the probability distribution of the electricity volume predicted by the model at time t, i.e., the mean; is the variance of the model's historical prediction results.
[0093] Example 2
[0094] Based on the solution of Example 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 the power data collected by the power collection terminal in real time. The power prediction unit is equipped with a power prediction model constructed and trained using the aforementioned power collection terminal power data anomaly detection method based on big data. The power prediction model is used to combine the actual power data of the previous moment to predict the probability distribution of power at the future moment.
[0096] It should be noted that the power prediction model trained in this embodiment is affected by the historical data in the training stage and has obvious regional characteristics. Therefore, in the actual application process, the power prediction model deployed in each circuit prediction unit should be trained by the historical data of the region. For some newly added substations, the power prediction model of similar substations can be used as a temporary model, and then after accumulating a sufficient amount of historical data, a power prediction model exclusive to the region can be trained.
[0097] The deviation calculation unit is used to use the prediction standard score algorithm to calculate in real time the degree to which the actual collected electricity each time deviates from the mean value of the predicted electricity probability distribution, and obtain the corresponding measurement deviation value.
[0098] 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 collected power exceeds a preset deviation threshold at any time.
[0099] The solution of this embodiment can directly use the offline power prediction model trained by historical data, reducing the steps of collecting data and building models in the actual operation process, improving the efficiency of diagnosis, and enhancing the real-time performance of the solution. At the same time, the solution of the present invention can also use the real power data in the continuously generated substation area to correct the power prediction model, thereby improving the accuracy of the diagnosis result.
[0100] The power data anomaly detection module provided in Example 2 is an embedded module designed based on the method in Example 1. The embedded module can be applied to the power consumption collection terminal of the substation, 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 run independently. The computer device can take various forms, such as a smart terminal that can execute a program, a tablet computer, a laptop computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including an independent server, or a server cluster composed of multiple servers). The computer device of this embodiment includes at least but is not limited to:
[0102] The memory and processor can be connected to each other through the system bus.
[0103] In this embodiment, the memory (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, 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.
[0104] 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 card, etc., equipped on 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 data that have been output or are to be output.
[0105] The processor may be a central processing unit (CPU), a graphics processing unit (GPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor is generally used to control the overall operation of a computer device. In this embodiment, the processor is used to run program codes stored in a memory or process data.
[0106] In addition, this embodiment also 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.
[0107] 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 protection scope of the present invention.
Claims
1. A method for detecting abnormal power data of power consumption 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 perform preliminary screening on it, and form the required sample database after excluding abnormal data; S2: Based on the trend characteristics, seasonal characteristics and external factors, the power consumption data is modeled in state space, thereby forming a multidimensional state space model including 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 influence 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; S24: Using the power trend state space model, power seasonal state space model and power external factor state space model, the following multidimensional state space model is constructed: Measurement equation: Equation of state: 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 transfer matrix, Denotes the measurement noise ε t Variance of t is the m×q control matrix; Q t is a q×q state diffusion matrix; where q>m; S3: using the sample database to statistically analyze the corresponding power time series data according to the characteristics of different features, and using the variational Bayesian inference algorithm to train the posterior distribution of each parameter in the multidimensional state space model created based on different features; determining the value of each undetermined feature parameter; S4: Deploy the multidimensional state space model trained in the previous step as a 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 collected by the power collection terminal at the current moment and the power predicted by the power prediction model at the previous moment at the current moment, and make the following decision according to 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 abnormal power data of power consumption collection terminals based on big data according to claim 1, characterized in that: In step S1, the abnormal data detection algorithm adopts Z-score method, isolation forest or spatial clustering algorithm.
3. The method for detecting abnormal power data of power consumption collection terminals 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 electric quantity at time t; δ t is the trend change of electricity between time t and 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 abnormal power data of power consumption collection terminals 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 cycle; η γ,t The error of the program caused by seasonal factors affecting electricity consumption.
5. The method for detecting abnormality of power consumption data of power consumption collection terminals 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 the electric quantity is as follows: In the above formula, x 1,t ~x J,t Respectively represent 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 It is the error of the program caused by various external factors affecting the power at time t.
6. The method for detecting abnormality of power consumption data of power consumption collection terminals 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 of power consumption data of power consumption collection terminals 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 abnormal power data of power consumption collection terminals 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 predicted power probability distribution mean, and this 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; is the expectation of the probability distribution of the electricity volume predicted by the model at time t, i.e., the mean; 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 data collected by the power collection terminal in real time; An electric quantity prediction unit, in which an electric quantity prediction model constructed and trained by the method for detecting abnormal electric quantity data of an electric quantity collection terminal based on big data according to any one of claims 1 to 8 is deployed; the electric quantity prediction model is used to predict the probability distribution of electric quantity at a future moment in combination with the actual electric quantity data at a previous moment; A deviation calculation unit is used to use a prediction standard score algorithm to calculate in real time the degree to which the actual collected power data deviates from the mean value of the predicted power probability distribution, and obtain a 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 collected power exceeds a preset deviation threshold at any time.
10. A power consumption collection terminal, characterized in that: It integrates the power data anomaly detection module as described in claim 9, thereby realizing abnormal 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
User power consumption data anomaly analysis method and system based on power consumption information collection
CN116976707A
Electricity stealing user identification system based on deep well network
CN117495109A
Electric charge anomaly diagnosis method and system based on Bayesian network model
CN117633652A
Cited By
Method and system for detecting abnormal water consumption of intelligent water meter and medium
CN120336771A
