A power consumption data verification and repair method, device, equipment and medium

By constructing a deep learning-based electricity consumption prediction model, abnormal electricity consumption data can be automatically identified and repaired, solving the problems of low data processing efficiency and low accuracy in smart grids. This enables efficient and accurate verification of electricity consumption data and reduces labor costs.

CN122262500APending Publication Date: 2026-06-23STATE GRID CHONGQING ELECTRIC POWER COMPANY MARKETING SERVICE CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID CHONGQING ELECTRIC POWER COMPANY MARKETING SERVICE CENTER
Filing Date
2026-03-26
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technologies are inefficient in processing electricity consumption data in smart grids, cannot meet real-time processing requirements, have low anomaly detection accuracy, and lack automated anomaly data repair mechanisms, which affect the efficiency and accuracy of data management.

Method used

By constructing a deep learning-based electricity consumption prediction model, anomalies are automatically identified and repaired, including data preprocessing, anomaly analysis and repair, a hierarchical alarm mechanism is designed, and model parameters are optimized to adapt to changes in user electricity consumption behavior.

Benefits of technology

It enables accurate and efficient verification of electricity consumption data, improves data quality, reduces labor costs, and meets the high standards of data processing required by the smart grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122262500A_ABST
    Figure CN122262500A_ABST
Patent Text Reader

Abstract

The application discloses a power consumption data verification and repair method and device, equipment and medium, which are applied to a power data processing system, and relate to the field of smart power grids. The method comprises the following steps: receiving user power consumption data of a target user collected by a preset collection terminal, and predicting the power consumption data of the target user by using a target power consumption prediction model; determining a current target power consumption dynamic threshold based on obtained target predicted power consumption data and historical power consumption data of the target user, and determining whether a target difference between the user power consumption data and the target predicted power consumption data is greater than the target power consumption dynamic threshold; if the target difference is greater than the target power consumption dynamic threshold, performing abnormal analysis on the user power consumption data to determine an abnormal type of the user power consumption data, and performing corresponding abnormal alarm based on the abnormal type; and performing data repair on the user power consumption data based on the abnormal type to obtain repaired user power consumption data. Therefore, automatic abnormal identification and repair of power data can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart grids, and in particular to a method, apparatus, equipment, and medium for verifying and repairing electricity consumption data. Background Technology

[0002] With the large-scale application of smart grids, power companies need to process massive amounts of electricity consumption data, but existing data acquisition and verification technologies have significant shortcomings. In existing technologies, manual review methods rely on human intervention, resulting in extremely low efficiency when dealing with large-scale data and failing to meet real-time processing requirements, leading to delays in anomaly detection. Simple statistical methods can only capture basic data patterns and are poorly adaptable to complex electricity consumption patterns (such as seasonal fluctuations, holiday electricity consumption changes, and personalized user electricity consumption habits), resulting in low anomaly detection accuracy and the omission of a large number of anomaly data in complex scenarios. Furthermore, the current lack of effective automated anomaly data repair mechanisms necessitates manual intervention to correct data anomalies, further extending the data processing cycle and impacting the overall efficiency and accuracy of smart grid data management. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for verifying and repairing electricity consumption data. This method, through an automated anomaly identification and repair mechanism, enables accurate and efficient verification of electricity consumption data, improves data quality, reduces labor costs, and meets the high standards of data processing required by smart grids. The specific solution is as follows: In a first aspect, this application discloses a method for verifying and repairing electricity consumption data, applied to a power data processing system, comprising: Receive user electricity consumption data of target users collected by preset acquisition terminals, and predict the electricity consumption data of target users through target electricity consumption prediction model to obtain target predicted electricity consumption data; Based on the target predicted electricity consumption data and the target user's historical electricity consumption data, determine the current target dynamic threshold for electricity consumption, and determine whether the target difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold for electricity consumption; If the target difference is greater than the target dynamic threshold for electricity consumption, then an anomaly analysis is performed on the user's electricity consumption data to determine the anomaly type of the user's electricity consumption data, and a corresponding anomaly alarm is issued based on the anomaly type. Based on the anomaly type, the user's electricity consumption data is repaired to obtain the repaired user electricity consumption data.

[0004] Optionally, before receiving the target user's electricity consumption data collected by the preset acquisition terminal and predicting the target user's electricity consumption data using the target electricity consumption prediction model to obtain the target predicted electricity consumption data, the method further includes: An initial electricity consumption prediction model is constructed by pre-setting a deep neural network, and historical data of target users are collected. Duplicate data is removed from the historical data, and missing data in the historical data is repaired by a preset linear interpolation algorithm. Then, outliers in the historical data are processed by the Laida criterion to obtain the target training data. The time features and electricity consumption behavior features of the target training data are extracted, and the initial electricity consumption prediction model is trained using the target training data, the time features, and the electricity consumption behavior features to obtain the target electricity consumption prediction model.

[0005] Optionally, the step of receiving user electricity consumption data of target users collected by a preset acquisition terminal, and predicting the target user electricity consumption data through a target electricity consumption prediction model to obtain target predicted electricity consumption data, includes: The system receives user electricity consumption data of the target user from a preset acquisition terminal based on a preset acquisition frequency through a preset dedicated power communication network. The time stamp for collecting the user's electricity consumption data is determined, and the electricity consumption data of the target user at the time stamp is predicted using the target electricity consumption prediction model to obtain the target predicted electricity consumption data.

[0006] Optionally, determining the current target dynamic threshold for electricity consumption based on the target predicted electricity consumption data and the historical electricity consumption data of the target user, and determining whether the target difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold for electricity consumption, includes: Determine the historical electricity consumption data of the target user within a preset historical time range, and determine the electricity consumption fluctuation data based on the historical electricity consumption data; If the electricity consumption fluctuation data is greater than the preset electricity consumption fluctuation threshold, the target user's electricity consumption type is determined to be a stable electricity consumption user; if the electricity consumption fluctuation data is not greater than the preset electricity consumption fluctuation threshold, the target user's electricity consumption type is determined to be a fluctuating electricity consumption user. Based on the electricity consumption type, determine the dynamic coefficient corresponding to the target user, and determine the current target electricity consumption dynamic threshold based on the target predicted electricity consumption data and the dynamic coefficient; Calculate the target difference between the user's electricity consumption data and the target predicted electricity consumption data, and determine whether the target difference is greater than the target dynamic electricity consumption threshold.

[0007] Optionally, if the target difference is greater than the target dynamic threshold for electricity consumption, then anomaly analysis is performed on the user's electricity consumption data to determine the anomaly type of the user's electricity consumption data, and a corresponding anomaly alarm is issued based on the anomaly type, including: If the target difference is greater than the target dynamic threshold for electricity consumption, it is determined that the user's electricity consumption data is abnormal, and an anomaly analysis is performed on the user's electricity consumption data to determine the type of anomaly. If the anomaly type is a data acquisition anomaly, an anomaly alarm will be issued within a preset first time threshold. If the anomaly type is equipment malfunction or abnormal power consumption behavior, an anomaly alarm will be issued within a preset second time threshold; the preset second time threshold is less than the preset first time threshold.

[0008] Optionally, the step of repairing the user's electricity consumption data based on the anomaly type to obtain repaired user electricity consumption data includes: If the anomaly type is the data acquisition anomaly, then the acquisition anomaly type is determined; If the type of collection anomaly is missing data, then data filling is performed based on the target predicted electricity consumption data and the historical electricity consumption data to obtain the repaired user electricity consumption data. If the collection anomaly type is a transmission error, a data retransmission request is initiated to the preset collection terminal to use the user electricity consumption retransmitted by the preset collection terminal as the repaired user electricity consumption data. If the anomaly type is a device malfunction, then the backup data in the preset backup data source is used as the user's electricity consumption data after the repair. If the anomaly type is the abnormal electricity consumption behavior, the user's electricity consumption data is retained for manual review.

[0009] Optionally, after performing data repair on the user electricity consumption data based on the anomaly type to obtain repaired user electricity consumption data, the method further includes: The electricity consumption data of users after the repair is verified by the target electricity consumption prediction model to determine whether the repair was successful. Record the electricity consumption prediction performance parameters of the target electricity consumption prediction model, and optimize the model parameters of the target electricity consumption prediction model based on the electricity consumption prediction performance parameters according to a preset time period, so as to use the optimized model as the target electricity consumption prediction model for the next preset time period.

[0010] Secondly, this application discloses an electricity data verification and repair device, applied to an electricity data processing system, comprising: The electricity consumption data prediction module is used to receive the electricity consumption data of the target user collected by the preset acquisition terminal, and predict the electricity consumption data of the target user through the target electricity consumption prediction model to obtain the target predicted electricity consumption data. The data comparison module is used to determine the current target dynamic threshold for electricity consumption based on the target predicted electricity consumption data and the historical electricity consumption data of the target user, and to determine whether the target difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold for electricity consumption. An anomaly alarm module is used to perform anomaly analysis on the user's electricity consumption data if the target difference is greater than the target dynamic threshold for electricity consumption, in order to determine the anomaly type of the user's electricity consumption data, and to issue a corresponding anomaly alarm based on the anomaly type. The data repair module is used to repair the user's electricity consumption data based on the anomaly type to obtain the repaired user electricity consumption data.

[0011] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor is used to execute the computer program to implement the power consumption data verification and repair method as described above.

[0012] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned method for verifying and repairing power consumption data.

[0013] In this application, user electricity consumption data of a target user collected by a preset acquisition terminal can be received, and the user electricity consumption data of the target user can be predicted using a target electricity consumption prediction model to obtain target predicted electricity consumption data. Based on the target predicted electricity consumption data and the target user's historical electricity consumption data, a current target electricity consumption dynamic threshold is determined, and it is determined whether the target difference between the user electricity consumption data and the target predicted electricity consumption data is greater than the target electricity consumption dynamic threshold. If the target difference is greater than the target electricity consumption dynamic threshold, anomaly analysis is performed on the user electricity consumption data to determine the anomaly type of the user electricity consumption data, and a corresponding anomaly alarm is issued based on the anomaly type. Based on the anomaly type, the user electricity consumption data is repaired to obtain repaired user electricity consumption data.

[0014] Therefore, the method of this application requires, after receiving electricity consumption data collected by a preset acquisition terminal, to predict the electricity consumption data of the target user using a target electricity consumption prediction model. Based on the obtained target predicted electricity consumption data and the target user's historical electricity consumption data, a current target dynamic threshold for electricity consumption is determined. If the difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold, it indicates an anomaly in the user's electricity consumption data, requiring repair according to the anomaly type to obtain repaired user electricity consumption data. In this way, by constructing a deep learning-based electricity consumption model and designing an automated anomaly identification and repair mechanism, the shortcomings of existing technologies in large-scale real-time data verification, complex electricity consumption anomaly detection, and data processing efficiency can be addressed. This achieves accurate and efficient verification of electricity consumption data, improves data quality, reduces labor costs, and meets the high standards of data processing required by smart grids. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0016] Figure 1 This is a flowchart of a method for verifying and repairing electricity consumption data disclosed in this application; Figure 2 This is a flowchart of a specific method for verifying and repairing electricity consumption data disclosed in this application; Figure 3 This is a schematic diagram of the structure of an electricity data verification and repair device disclosed in this application; Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

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

[0018] Currently, data acquisition and verification technologies have significant shortcomings. Manual review methods rely on human operation, which is extremely inefficient when dealing with large-scale data and cannot meet the needs of real-time processing. Simple statistical methods can only capture basic data patterns and have low accuracy in detecting complex electricity consumption patterns. Furthermore, there is a lack of effective automated abnormal data repair mechanisms. After data anomalies occur, manual intervention is required for correction, which affects the overall efficiency and accuracy of smart grid data management.

[0019] To overcome the aforementioned technical problems, this application discloses a method, apparatus, equipment, and medium for verifying and repairing electricity consumption data. Through an automated anomaly identification and repair mechanism, it can achieve accurate and efficient verification of electricity consumption data, improve data quality, reduce labor costs, and meet the high standards of data processing required by smart grids.

[0020] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a method for verifying and repairing electricity consumption data, applied to an electricity data processing system, including: Step S11: Receive the user electricity consumption data of the target user collected by the preset acquisition terminal, and predict the target user's electricity consumption data through the target electricity consumption prediction model to obtain the target predicted electricity consumption data.

[0021] In this embodiment, it is necessary to predict user electricity consumption based on user electricity consumption data collected by the acquisition terminal. Specifically, it is necessary to receive user electricity consumption data of the target user collected by the acquisition terminal at a preset acquisition frequency through a preset dedicated power communication network. It should be noted that the intelligent acquisition terminal collects user electricity consumption data in real time, and the acquisition frequency can be set according to user needs. Furthermore, the collected user electricity consumption data includes electrical parameters, electricity metering data, and auxiliary data. Among them, electrical parameters include: voltage (unit: V), current (unit: A), active power (unit: kW), reactive power (unit: kVar), and power factor; electricity metering data includes: daily electricity consumption (unit: kWh), and time-period electricity consumption (peak, valley, and flat periods are metered separately); auxiliary data includes: acquisition timestamp, meter device number, user number, and transformer area information. The collected user electricity consumption data is transmitted to the intranet server in real time through the preset dedicated power communication network, and the transmission process uses an encryption protocol (such as AES-256) to ensure data security. It should be noted that the preset dedicated power communication network includes, but is not limited to, power line carrier, 5G private network, and fiber optic. It should be further explained that the data transmission method between the smart meter and the central server can be replaced by low-power wide-area network technologies such as LoRa (Long-range radio) and NB-IoT (Narrow Band Internet of Things) depending on the actual application scenario, which is suitable for remote areas or transformer substations with limited communication conditions.

[0022] Furthermore, it is necessary to determine the timestamp of the user's electricity consumption data collection and predict the target user's electricity consumption data at that timestamp using the target electricity consumption prediction model to obtain the target predicted electricity consumption data. It should be noted that since users' electricity consumption varies at different times, the data predicted by the target electricity consumption prediction model needs to be consistent with the timestamp when the user's electricity consumption data was collected to ensure the accuracy of the predicted target electricity consumption data. The target electricity consumption prediction model is constructed using a DNN (Deep Neural Networks) algorithm.

[0023] Step S12: Determine the current target dynamic threshold for electricity consumption based on the target predicted electricity consumption data and the historical electricity consumption data of the target user, and determine whether the target difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold for electricity consumption.

[0024] In this embodiment, it is necessary to calculate the current dynamic threshold for electricity consumption, and then compare the difference between the user's electricity consumption data and the target predicted electricity consumption data with the dynamic threshold to determine the user's electricity consumption status. Specifically, it is necessary to determine the target user's historical electricity consumption data within a preset historical time range, and determine the electricity consumption fluctuation data based on the historical electricity consumption data. If the electricity consumption fluctuation data is greater than the preset electricity consumption fluctuation threshold, the target user's electricity consumption type is determined to be a stable electricity consumption user; if the electricity consumption fluctuation data is not greater than the preset electricity consumption fluctuation threshold, the target user's electricity consumption type is determined to be a fluctuating electricity consumption user. Specifically, it is necessary to collect the target user's historical electricity consumption data within a preset historical time range, and determine the user's electricity consumption fluctuation data based on the difference between the target user's peak electricity consumption and the valley electricity consumption during this period. If the electricity consumption fluctuation data is greater than the preset dynamic threshold for electricity consumption, it indicates that the user's electricity consumption fluctuation is large, and the target user's electricity consumption type is a fluctuating electricity consumption user; otherwise, it indicates that the user's electricity consumption fluctuation is small, and the target user's electricity consumption type is a stable electricity consumption user.

[0025] Furthermore, it is necessary to determine the dynamic coefficient corresponding to the target user based on the electricity consumption type, and to determine the current target electricity consumption dynamic threshold based on the target predicted electricity consumption data and the dynamic coefficient. It should be noted that if the target user has stable electricity consumption, its corresponding dynamic coefficient is 15%; if the target user has fluctuating electricity consumption, its corresponding dynamic coefficient is 30%. The current dynamic coefficient corresponding to the target user can be calculated using a preset threshold calculation formula: Threshold = Target Predicted Electricity Consumption Data × (1 ± Dynamic Coefficient). Therefore, the calculated target electricity consumption dynamic threshold changes according to the user's electricity consumption. Finally, it is necessary to calculate the target difference between the user's electricity consumption data and the target predicted electricity consumption data, and determine whether the target difference is greater than the target electricity consumption dynamic threshold. It should be noted that the calculation method of the dynamic threshold coefficient can be replaced by the quantile method based on user electricity consumption data (such as setting the threshold using the 95th quantile or 99th quantile), or by dividing normal electricity consumption data into clusters based on clustering algorithms (such as K-Means), and using the cluster boundary as the threshold. This is suitable for user groups with uneven distribution of electricity consumption patterns. In this way, it can be ensured that the target dynamic threshold of electricity consumption for users at different time periods corresponds to the electricity consumption situation at the current time period, thereby ensuring the accuracy of electricity consumption data verification and repair.

[0026] Step S13: If the target difference is greater than the target dynamic threshold for electricity consumption, then perform anomaly analysis on the user's electricity consumption data to determine the anomaly type of the user's electricity consumption data, and issue a corresponding anomaly alarm based on the anomaly type.

[0027] In this embodiment, it is necessary to determine whether there are any anomalies in the user's electricity consumption data by comparing the difference between the user's electricity consumption data and the target predicted electricity consumption data with the target dynamic threshold. Specifically, if the target difference is greater than the target dynamic threshold, it is determined that the user's electricity consumption data is abnormal, and anomaly analysis is performed on the user's electricity consumption data to determine the type of anomaly. That is, when the deviation between real-time data and predicted values ​​exceeds the dynamic threshold, it is judged as abnormal data. At the same time, it is necessary to combine multi-dimensional data for cross-validation, such as the correlation between voltage and power, and the deviation of electricity consumption during a certain period from the historical same period, to avoid misjudgment based on a single indicator.

[0028] Furthermore, if the anomaly type is data acquisition anomaly, an anomaly alarm will be triggered within a preset first time threshold. If the anomaly type is equipment malfunction or electricity consumption behavior anomaly, an anomaly alarm will be triggered within a preset second time threshold; the preset second time threshold is less than the preset first time threshold. It should be noted that data acquisition anomalies include data loss, duplicate acquisition, and transmission errors, which require data format and integrity verification for determination; equipment malfunction anomalies include metering failures and line aging, which require multi-parameter correlation for determination, such as abnormal power fluctuations and unstable voltage; electricity consumption behavior anomalies include users adding high-power devices or malicious electricity use, which require characteristics such as sudden changes in short-term electricity consumption and abnormal electricity consumption periods for determination. Moreover, for the determined abnormal data, the system automatically triggers tiered alarms: Level 1 alarms are for emergencies: such as equipment malfunctions or suspected malicious electricity use, which notify maintenance personnel in real time via SMS and platform push notifications, with a response time limit of the preset first time threshold, i.e., within 30 minutes; Level 2 alarms are for general situations: such as data acquisition anomalies, which the system automatically records and notifies data management personnel, with a response time limit of the preset second time threshold, i.e., within 2 hours. Furthermore, the alarm information includes details of the abnormal data, such as user ID, meter number, abnormal indicator, abnormal time, preliminary judgment result, and handling suggestions. In this way, through hierarchical automated anomaly alarms, rapid response to different types of anomalies can be achieved, thereby improving data processing efficiency.

[0029] Step S14: Perform data repair on the user's electricity consumption data based on the anomaly type to obtain repaired user electricity consumption data.

[0030] In this embodiment, user electricity consumption data needs to be repaired according to the anomaly type to obtain repaired user electricity consumption data. Specifically, if the anomaly type is data acquisition anomaly, the acquisition anomaly type is determined; if the acquisition anomaly type is data missing, data filling is performed based on the target predicted electricity consumption data and historical electricity consumption data to obtain repaired user electricity consumption data; if the acquisition anomaly type is transmission error, a data retransmission request is initiated to the preset acquisition terminal to use the retransmitted user electricity consumption data from the preset acquisition terminal as the repaired user electricity consumption data. That is, data acquisition anomalies can be divided into two cases: in the first case, if it is data missing, model prediction values ​​are combined with historical data from the same period to fill the gaps; in the second case, if it is a transmission error, a data retransmission request is automatically initiated. It should be noted that for the repair of missing data, a prediction filling method based on gradient boosting tree (XGBoost) or a weighted average method of similar electricity consumption patterns of adjacent users can be used to suit scenarios with insufficient historical data or sudden changes in electricity consumption patterns.

[0031] Furthermore, if the anomaly type is equipment failure, then the backup data in the preset backup data source will be used as the user's electricity consumption data after the repair. Specifically, before the maintenance personnel handle the fault, the backup data source, such as the distribution data of the transformer area's main meter or the historical data of similar electricity consumption patterns, needs to be called to temporarily replace it to ensure data continuity.

[0032] Furthermore, if the anomaly type is abnormal electricity consumption behavior, the user's electricity consumption data should be retained for manual review. Specifically, the original data needs to be retained, and the abnormal characteristics should be marked for subsequent manual review to determine whether correction is necessary.

[0033] It should be noted that after data repair, the repaired data needs to be verified and the target electricity consumption prediction model needs to be automatically updated. Specifically, the repaired user electricity consumption data needs to be verified using the target electricity consumption prediction model to determine whether the repair was successful. This involves re-entering the repaired data into the electricity consumption model for secondary verification. If the deviation is within the normal range, the repair is confirmed to be effective; if the deviation still exceeds the threshold, the alarm level is automatically escalated, and manual intervention is initiated.

[0034] Furthermore, it is necessary to record the electricity prediction performance parameters of the target electricity prediction model, and optimize the model parameters based on these performance parameters within a preset time period. The optimized model will then serve as the target electricity prediction model for the next preset time period. Specifically, anomaly detection accuracy, data repair success rate, and false alarm rate should be used as reward signals to construct a reinforcement learning environment and intelligently adjust model parameters, such as dynamic threshold coefficients, feature weights, and the number of neurons in the hidden layer of the DNN model, to achieve adaptive performance improvement. Monthly performance evaluations are also required, with evaluation metrics including anomaly detection accuracy (target ≥ 95%), false alarm rate (target ≤ 3%), and data repair success rate (target ≥ 90%). Algorithm parameters or model structure should be optimized based on the evaluation results. It should be noted that model optimization can be replaced with genetic algorithms or particle swarm optimization algorithms, using iterative optimization of model parameters to achieve continuous performance improvement, making it suitable for scenarios with high optimization speed requirements. In this way, through dynamic model updates and reinforcement learning optimization mechanisms, it is ensured that the model can continuously adapt to changes in user electricity consumption behavior and maintain long-term stable validation performance.

[0035] In this embodiment, after receiving electricity consumption data collected by a preset acquisition terminal, the electricity consumption data of the target user needs to be predicted using a target electricity consumption prediction model. Based on the obtained target predicted electricity consumption data and the target user's historical electricity consumption data, a current target dynamic threshold for electricity consumption is determined. If the difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold, it indicates an anomaly in the user's electricity consumption data, requiring repair according to the anomaly type to obtain repaired user electricity consumption data. In this way, by constructing a deep learning-based electricity consumption model and designing an automated anomaly identification and repair mechanism, the shortcomings of existing technologies in large-scale real-time data verification, complex electricity consumption anomaly detection, and data processing efficiency can be addressed. This achieves accurate and efficient verification of electricity consumption data, improves data quality, reduces labor costs, and meets the high standards of data processing required by the smart grid.

[0036] As can be seen from the foregoing embodiments, this application requires predicting user electricity consumption data using a target electricity consumption prediction model. However, the target electricity consumption prediction model needs to be obtained through training an initial model. Therefore, this embodiment provides a detailed explanation of how to train the model and obtain the target electricity consumption prediction model. See [link to documentation]. Figure 2 As shown in the figure, an embodiment of the present invention discloses a method for verifying and repairing electricity consumption data, applied to an electricity data processing system, including: Step S21: Construct an initial electricity consumption prediction model using a preset deep neural network and collect historical data from the target users.

[0037] In this embodiment, a personalized electricity consumption model for the user needs to be constructed using a pre-set deep neural network algorithm. Then, historical data of the target user is collected and used as training data to train the user. It should be noted that the model constructed using the DNN algorithm includes an input layer (20 feature neurons), hidden layers (3 layers, 64 neurons per layer, using ReLU activation function), and an output layer (1 output neuron, corresponding to the predicted electricity consumption). In some cases, a convolutional neural network (CNN) or a long short-term memory network (LSTM) can be used to construct the initial electricity consumption prediction model. CNN is suitable for scenarios that focus more on the spatiotemporal feature extraction of electricity consumption data, while LSTM is suitable for scenarios that emphasize the temporal correlation of electricity consumption data. Both can achieve similar results in learning electricity consumption patterns and detecting anomalies.

[0038] Step S22: Remove duplicate data from the historical data, repair missing data in the historical data using a preset linear interpolation algorithm, and then process outliers in the historical data using the Laida criterion to obtain target training data.

[0039] In this embodiment, historical data needs to be preprocessed, including cleaning historical electricity consumption data, such as removing duplicate data, repairing missing data using linear interpolation, and processing outliers based on the 3σ principle, in order to obtain target training data.

[0040] Step S23: Extract the time features and electricity consumption behavior features of the target training data, and train the initial electricity consumption prediction model using the target training data, the time features, and the electricity consumption behavior features to obtain the target electricity consumption prediction model.

[0041] In this embodiment, it is necessary to extract the temporal features and electricity consumption behavior features of the target training data. Specifically, the extracted temporal features include weekday / rest day identifiers, seasonal identifiers, time period identifiers, and holiday identifiers; the behavioral features include electricity consumption trend features, such as 7-day moving average and 30-day moving average; power fluctuation features, such as standard deviation and coefficient of variation; and peak electricity consumption features, such as daily peak time periods and peak values. During training, the Adam optimizer is used for model training, and the loss function is the mean-squared error (MSE). An early stopping strategy is employed during training to prevent overfitting, ultimately yielding the target electricity consumption prediction model. Furthermore, a dynamic update mechanism needs to be established, incrementally training the model every 7 days using the latest collected electricity consumption data to ensure that the model can adapt to changes in user electricity consumption behavior.

[0042] In this embodiment, the personalized electricity consumption model construction method based on deep neural networks combined with reinforcement learning can adaptively capture complex user electricity consumption patterns, including seasonality, holidays, and personalized behavior changes, thereby improving the accuracy of anomaly detection. Furthermore, the dynamic updating and reinforcement learning optimization mechanism of the model ensures that the model can continuously adapt to changes in user electricity consumption behavior and maintain long-term stable verification performance.

[0043] See Figure 3 As shown in the figure, an embodiment of the present invention discloses an electricity data verification and repair device, applied to an electricity data processing system, comprising: The electricity consumption data prediction module 11 is used to receive the user electricity consumption data of the target user collected by the preset acquisition terminal, and predict the electricity consumption data of the target user through the target electricity consumption prediction model to obtain the target predicted electricity consumption data. The data comparison module 12 is used to determine the current target dynamic threshold for electricity consumption based on the target predicted electricity consumption data and the historical electricity consumption data of the target user, and to determine whether the target difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold for electricity consumption. The anomaly alarm module 13 is used to perform anomaly analysis on the user's electricity consumption data if the target difference is greater than the target dynamic threshold for electricity consumption, so as to determine the anomaly type of the user's electricity consumption data and to issue a corresponding anomaly alarm based on the anomaly type. The data repair module 14 is used to repair the user's electricity consumption data based on the anomaly type to obtain the repaired user electricity consumption data.

[0044] In this embodiment, after receiving electricity consumption data collected by a preset acquisition terminal, the electricity consumption data of the target user needs to be predicted using a target electricity consumption prediction model. Based on the obtained target predicted electricity consumption data and the target user's historical electricity consumption data, a current target dynamic threshold for electricity consumption is determined. If the difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold, it indicates an anomaly in the user's electricity consumption data, requiring repair according to the anomaly type to obtain repaired user electricity consumption data. In this way, by constructing a deep learning-based electricity consumption model and designing an automated anomaly identification and repair mechanism, the shortcomings of existing technologies in large-scale real-time data verification, complex electricity consumption anomaly detection, and data processing efficiency can be addressed. This achieves accurate and efficient verification of electricity consumption data, improves data quality, reduces labor costs, and meets the high standards of data processing required by the smart grid.

[0045] In some embodiments, the power consumption data verification and repair device may further include: The historical data acquisition unit is used to build an initial electricity consumption prediction model through a preset deep neural network and collect historical data of the target users. The data preprocessing unit is used to remove duplicate data from the historical data, repair missing data in the historical data using a preset linear interpolation algorithm, and then process outliers in the historical data using the Laida criterion to obtain target training data. The model training unit is used to extract the time features and electricity consumption behavior features of the target training data, so as to train the initial electricity consumption prediction model using the target training data, the time features, and the electricity consumption behavior features to obtain the target electricity consumption prediction model.

[0046] In some embodiments, the electricity consumption data prediction module 11 may specifically include: The electricity data acquisition unit is used to receive user electricity data of the target user collected by a preset acquisition terminal based on a preset acquisition frequency through a preset dedicated power communication network. The electricity consumption data prediction unit is used to determine the collection timestamp of the user's electricity consumption data, and to predict the target user's electricity consumption data at the collection timestamp using the target electricity consumption prediction model, so as to obtain the target predicted electricity consumption data.

[0047] In some embodiments, the data comparison module 12 may specifically include: The electricity consumption fluctuation data determination unit is used to determine the historical electricity consumption data of the target user within a preset historical time range, and to determine the electricity consumption fluctuation data based on the historical electricity consumption data. The first data comparison unit is used to determine the target user's electricity consumption type as a stable electricity consumption user if the electricity consumption fluctuation data is greater than a preset electricity consumption fluctuation threshold, and to determine the target user's electricity consumption type as a fluctuating electricity consumption user if the electricity consumption fluctuation data is not greater than the preset electricity consumption fluctuation threshold. A threshold calculation unit is used to determine the dynamic coefficient corresponding to the target user based on the electricity consumption type, and to determine the current target electricity consumption dynamic threshold based on the target predicted electricity consumption data and the dynamic coefficient. The second data comparison unit is used to calculate the target difference between the user's electricity consumption data and the target predicted electricity consumption data, and to determine whether the target difference is greater than the target dynamic threshold for electricity consumption.

[0048] In some embodiments, the anomaly alarm module 13 may specifically include: An anomaly type determination unit is used to determine that the user's electricity consumption data is abnormal if the target difference is greater than the target dynamic threshold for electricity consumption, and to perform anomaly analysis on the user's electricity consumption data to determine the anomaly type of the user's electricity consumption data. The first anomaly alarm unit is used to issue an anomaly alarm within a preset first time threshold if the anomaly type is a data acquisition anomaly. The second abnormal alarm unit is used to issue an abnormal alarm within a preset second time threshold if the abnormality type is equipment failure or abnormal power consumption behavior; the preset second time threshold is less than the preset first time threshold.

[0049] In some embodiments, the data repair module 14 may specifically include: An anomaly type determination unit is used to determine the anomaly type if the anomaly type is the data acquisition anomaly. The first data repair unit is used to fill in the data based on the target predicted electricity consumption data and the historical electricity consumption data if the type of the collection anomaly is data missing, so as to obtain the repaired user electricity consumption data. The second data repair unit is used to initiate a data retransmission request to the preset acquisition terminal if the acquisition anomaly type is a transmission error, so as to use the user electricity retransmission data retransmitted by the preset acquisition terminal as the repaired user electricity data. The third data repair unit is used to call the backup data in the preset backup data source as the user's electricity consumption data after repair if the anomaly type is the equipment failure anomaly. The fourth data repair unit is used to retain the user's electricity consumption data if the abnormality type is the abnormal electricity consumption behavior, so as to manually review the user's electricity consumption data.

[0050] In some embodiments, the power consumption data verification and repair device may further include: The repair verification unit is used to verify the repaired user electricity consumption data through the target electricity consumption prediction model to determine whether the repair was successful. The model optimization unit is used to record the electricity prediction performance parameters of the target electricity prediction model, and optimize the model parameters of the target electricity prediction model according to the electricity prediction performance parameters based on a preset time period, so as to use the optimized model as the target electricity prediction model for the next preset time period.

[0051] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0052] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the power consumption data verification and repair method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0053] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0054] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0055] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the power data verification and repair method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0056] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed method for verifying and repairing electricity consumption data. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0057] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0058] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0059] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0060] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0061] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for power data verification and repair, comprising: Applications in power data processing systems include: Receive user electricity consumption data of target users collected by preset acquisition terminals, and predict the electricity consumption data of target users through target electricity consumption prediction model to obtain target predicted electricity consumption data; Based on the target predicted electricity consumption data and the target user's historical electricity consumption data, determine the current target dynamic threshold for electricity consumption, and determine whether the target difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold for electricity consumption; If the target difference is greater than the target dynamic threshold for electricity consumption, then an anomaly analysis is performed on the user's electricity consumption data to determine the anomaly type of the user's electricity consumption data, and a corresponding anomaly alarm is issued based on the anomaly type. Based on the anomaly type, the user's electricity consumption data is repaired to obtain the repaired user electricity consumption data.

2. The method of electricity usage data validation and repair of claim 1, wherein, Before receiving the user electricity consumption data of the target user collected by the preset acquisition terminal, and predicting the target user's electricity consumption data through the target electricity consumption prediction model to obtain the target predicted electricity consumption data, the method further includes: An initial electricity consumption prediction model is constructed by pre-setting a deep neural network, and historical data of target users are collected. Duplicate data is removed from the historical data, and missing data in the historical data is repaired by a preset linear interpolation algorithm. Then, outliers in the historical data are processed by the Laida criterion to obtain the target training data. The time features and electricity consumption behavior features of the target training data are extracted, and the initial electricity consumption prediction model is trained using the target training data, the time features, and the electricity consumption behavior features to obtain the target electricity consumption prediction model.

3. The method of electricity usage data validation and remediation of claim 1, wherein, The process of receiving user electricity consumption data of target users collected by a preset acquisition terminal, and predicting the target user electricity consumption data using a target electricity consumption prediction model to obtain target predicted electricity consumption data, includes: The system receives user electricity consumption data of the target user from a preset acquisition terminal based on a preset acquisition frequency through a preset dedicated power communication network. The time stamp for collecting the user's electricity consumption data is determined, and the electricity consumption data of the target user at the time stamp is predicted using the target electricity consumption prediction model to obtain the target predicted electricity consumption data.

4. The method of electricity consumption data validation and cure of claim 1, wherein, The step of determining the current target dynamic threshold for electricity consumption based on the target predicted electricity consumption data and the historical electricity consumption data of the target user, and determining whether the target difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold for electricity consumption, includes: Determine the historical electricity consumption data of the target user within a preset historical time range, and determine the electricity consumption fluctuation data based on the historical electricity consumption data; If the electricity consumption fluctuation data is greater than the preset electricity consumption fluctuation threshold, the target user's electricity consumption type is determined to be a stable electricity consumption user; if the electricity consumption fluctuation data is not greater than the preset electricity consumption fluctuation threshold, the target user's electricity consumption type is determined to be a fluctuating electricity consumption user. Based on the electricity consumption type, determine the dynamic coefficient corresponding to the target user, and determine the current target electricity consumption dynamic threshold based on the target predicted electricity consumption data and the dynamic coefficient; Calculate the target difference between the user's electricity consumption data and the target predicted electricity consumption data, and determine whether the target difference is greater than the target dynamic electricity consumption threshold.

5. The method for verifying and repairing electricity consumption data according to claim 1, characterized in that, If the target difference is greater than the target dynamic electricity consumption threshold, then anomaly analysis is performed on the user's electricity consumption data to determine the anomaly type of the user's electricity consumption data, and a corresponding anomaly alarm is issued based on the anomaly type, including: If the target difference is greater than the target dynamic threshold for electricity consumption, it is determined that the user's electricity consumption data is abnormal, and an anomaly analysis is performed on the user's electricity consumption data to determine the type of anomaly. If the anomaly type is a data acquisition anomaly, an anomaly alarm will be issued within a preset first time threshold. If the anomaly type is equipment malfunction or abnormal power consumption behavior, an anomaly alarm will be issued within a preset second time threshold; the preset second time threshold is less than the preset first time threshold.

6. The method for verifying and repairing electricity consumption data according to claim 5, characterized in that, The step of repairing the user's electricity consumption data based on the anomaly type to obtain repaired user electricity consumption data includes: If the anomaly type is the data acquisition anomaly, then the acquisition anomaly type is determined; If the type of collection anomaly is missing data, then data filling is performed based on the target predicted electricity consumption data and the historical electricity consumption data to obtain the repaired user electricity consumption data. If the collection anomaly type is a transmission error, a data retransmission request is initiated to the preset collection terminal to use the user electricity consumption retransmitted by the preset collection terminal as the repaired user electricity consumption data. If the anomaly type is a device malfunction, then the backup data in the preset backup data source is used as the user's electricity consumption data after the repair. If the anomaly type is the abnormal electricity consumption behavior, the user's electricity consumption data is retained for manual review.

7. The method for verifying and repairing electricity consumption data according to any one of claims 1 to 6, characterized in that, After performing data repair on the user electricity consumption data based on the anomaly type to obtain repaired user electricity consumption data, the process further includes: The electricity consumption data of users after the repair is verified by the target electricity consumption prediction model to determine whether the repair was successful. Record the electricity consumption prediction performance parameters of the target electricity consumption prediction model, and optimize the model parameters of the target electricity consumption prediction model based on the electricity consumption prediction performance parameters according to a preset time period, so as to use the optimized model as the target electricity consumption prediction model for the next preset time period.

8. A device for verifying and repairing electricity data, characterized in that, Applications in power data processing systems include: The electricity consumption data prediction module is used to receive the electricity consumption data of the target user collected by the preset acquisition terminal, and predict the electricity consumption data of the target user through the target electricity consumption prediction model to obtain the target predicted electricity consumption data. The data comparison module is used to determine the current target dynamic threshold for electricity consumption based on the target predicted electricity consumption data and the historical electricity consumption data of the target user, and to determine whether the target difference between the user's electricity consumption data and the target predicted electricity consumption data is greater than the target dynamic threshold for electricity consumption. An anomaly alarm module is used to perform anomaly analysis on the user's electricity consumption data if the target difference is greater than the target dynamic threshold for electricity consumption, in order to determine the anomaly type of the user's electricity consumption data, and to issue a corresponding anomaly alarm based on the anomaly type. The data repair module is used to repair the user's electricity consumption data based on the anomaly type to obtain the repaired user electricity consumption data.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the power consumption data verification and repair method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the power consumption data verification and repair method as described in any one of claims 1 to 7.