Power data processing method and device, equipment and storage medium
By identifying and processing abnormal values in historical power data and constructing a power consumption prediction model, it solves the problem that traditional energy management systems cannot accurately predict and detect abnormal data, and improves the efficiency and accuracy of power energy management.
Patent Information
- Application Number
- CN202410800051.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-24
AI Technical Summary
Traditional energy management systems cannot accurately predict future power demand, are difficult to detect and repair abnormal data, and lack a timely alarm mechanism, resulting in low efficiency and accuracy of power energy management.
By acquiring historical power data, identifying and processing outliers of unknown data points, building a power consumption prediction model, and providing a visual interface that enables technicians to manually correct abnormal data, optimize the power data model, and improve the accuracy and efficiency of power energy management.
It achieves accurate prediction and anomaly detection of power data, improves the efficiency and accuracy of power energy management, ensures the reliability and timeliness of data, and enhances the ability to predict future power demand.
Smart Images

Figure CN118690905A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method for processing power data, a device for processing power data, a corresponding electronic device, and a corresponding computer-readable storage medium. Background Art
[0002] With the development of society, the demand for electric energy has increased, and it is necessary to effectively manage electric energy. However, traditional energy management systems have problems such as being unable to accurately predict future power demand, difficulty in detecting and repairing abnormal data, and lack of timely alarm mechanisms. Summary of the invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a method for processing power data, a device for processing power data, a corresponding electronic device, and a corresponding computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0004] An embodiment of the present invention discloses a method for processing power data, the method comprising:
[0005] Acquire historical power data, and display data points corresponding to the historical power data on a preset interface; the data points include unknown data points that are not automatically identified as abnormal;
[0006] In response to the selection operation of the unknown data point, the abnormal power value of the unknown data point is processed to obtain the historical power data of the unknown data point after abnormal processing;
[0007] The power consumption is predicted based on the historical power data after the unknown data point abnormality processing to obtain a power prediction value.
[0008] Optionally, the acquiring of historical power data includes:
[0009] Collecting raw power data at preset time intervals;
[0010] Acquire a power data set of a preset time unit from the original power data;
[0011] Performing a preliminary cleaning operation on the power data set of the preset time unit to obtain preliminary power data;
[0012] Performing abnormality identification on the preliminary power data to obtain abnormal power data and unknown power data;
[0013] The abnormal power data and the unknown power data are aggregated to obtain historical power data.
[0014] Optionally, the preliminary cleaning operation includes a missing value deletion operation and an abnormal value replacement operation; performing a preliminary cleaning operation on the power data set of the preset time unit to obtain preliminary power data includes:
[0015] If there are missing values in the power data set of the preset time unit, a missing value deletion operation is performed on the missing values; and / or, if there are power data exceeding a preset threshold in the power data set of the preset time unit, the power data exceeding the preset threshold is replaced with a preset value to obtain preliminary power data.
[0016] Optionally, the performing abnormality identification on the preliminary power data to obtain abnormal power data and unknown power data includes:
[0017] Obtaining the total amount of active electricity of the power data set of the preset time unit;
[0018] Using the total amount of active electric energy, calculate the mean and standard deviation of the electric power data set;
[0019] Using each preliminary power data, the mean value and the standard deviation of the power data set respectively, to calculate a standard score for each preliminary power data;
[0020] If the standard score of the target preliminary power data exceeds the preset number of standard deviations, the target preliminary power data is determined to be initial abnormal power data; and / or if the standard score of the target preliminary power data is less than or equal to the preset number of standard deviations, the target preliminary power data is determined to be unknown power data;
[0021] Among them, the initial abnormal data points corresponding to the initial abnormal power data and the unknown data points corresponding to the unknown power data are used to be displayed on a preset interface.
[0022] Optionally, the historical power data also includes normal power data, and normal data points corresponding to the normal power data are displayed on the preset interface;
[0023] In response to the selection operation of the unknown data point, the abnormal power value of the unknown data point is processed to obtain the historical power data after the abnormal processing of the unknown data point, including:
[0024] obtaining normal power values of normal data points adjacent to the selected unknown data point;
[0025] Obtaining the timestamp of the selected unknown data point, and obtaining the timestamps of the normal data points adjacent to the selected unknown data point;
[0026] Calculate the abnormal power replacement value according to the abnormal power value of the selected unknown data point, the timestamp of the selected unknown data point, the normal power value of the normal data point adjacent to the selected unknown data point, and the timestamp of the normal data point adjacent to the selected unknown data point;
[0027] The abnormal power replacement value is used to replace the abnormal power value of the selected unknown data point.
[0028] Optionally, the performing power consumption prediction based on the historical power data after the unknown data point abnormality processing to obtain the power prediction value includes:
[0029] Aggregate the historical power data after the unknown data point abnormality processing and the power data of other data points in the historical power data except the unknown data point and the abnormal data point to obtain target historical power data;
[0030] Using the target historical power data as sample training data to construct a power consumption prediction model;
[0031] The current power data is obtained, the current power data is input into the power consumption prediction model, and the power prediction value is outputted.
[0032] Optionally, the method further comprises:
[0033] Actual electricity meter data is obtained, and the electricity consumption prediction model is optimized according to the electricity consumption prediction value and the actual electricity meter data.
[0034] Optionally, the optimizing the power consumption prediction model according to the power prediction value and the actual electric meter data further includes:
[0035] Calculating the difference between the power prediction value and the actual power meter data;
[0036] If the difference is within the preset fault tolerance range, the power prediction value is determined to be normal data; and / or, if the difference exceeds the preset fault tolerance range, the power prediction value is determined to be abnormal data.
[0037] Optionally, the optimizing the power consumption prediction model according to the power prediction value and the actual electric meter data includes:
[0038] The normal data and the abnormal data are used as new sample training data to train the power consumption prediction model.
[0039] The embodiment of the present invention further discloses a device for processing power data, the device comprising:
[0040] A data point display module, used to obtain historical power data and display data points corresponding to the historical power data on a preset interface; the data points include unknown data points that are not automatically identified as abnormal;
[0041] An abnormality processing module, used for responding to the selection operation of the unknown data point, processing the abnormal power value of the unknown data point, and obtaining the historical power data of the unknown data point after abnormality processing;
[0042] The power prediction module is used to predict power consumption based on the historical power data after the unknown data point abnormality processing to obtain a power prediction value.
[0043] Optionally, the data point display module includes:
[0044] The historical power data acquisition submodule is used to collect raw power data at preset time intervals; obtain a power data set of preset time units from the raw power data; perform preliminary cleaning operations on the power data set of the preset time units to obtain preliminary power data; perform abnormality identification on the preliminary power data to obtain abnormal power data and unknown power data; and aggregate the abnormal power data and the unknown power data to obtain historical power data.
[0045] Optionally, the preliminary cleaning operation includes a missing value deletion operation and an abnormal value replacement operation; the historical power data acquisition submodule includes:
[0046] A preliminary power data acquisition unit is used to perform a missing value deletion operation on the missing values when there are missing values in the power data set of the preset time unit; and / or, when there is power data exceeding a preset threshold in the power data set of the preset time unit, replace the power data exceeding the preset threshold with a preset value to obtain preliminary power data.
[0047] Optionally, the historical power data acquisition submodule includes:
[0048] A historical power data acquisition unit is used to acquire the total active electricity amount of the power data set of the preset time unit; using the total active electricity amount to calculate the mean and standard deviation of the power data set; using each preliminary power data and the mean and standard deviation of the power data set respectively to calculate the standard score for each preliminary power data; if the standard score of the target preliminary power data exceeds the preset number of standard deviations, the target preliminary power data is determined to be initial abnormal power data; and / or, if the standard score of the target preliminary power data is less than or equal to the preset number of standard deviations, the target preliminary power data is determined to be unknown power data; wherein, the initial abnormal data points corresponding to the initial abnormal power data, and the unknown data points corresponding to the unknown power data, are used to be displayed on a preset interface.
[0049] Optionally, the historical power data also includes normal power data, and normal data points corresponding to the normal power data are displayed on the preset interface; the abnormality processing module includes:
[0050] An abnormality handling submodule is used to obtain a normal power value of a normal data point adjacent to a selected unknown data point; obtain a timestamp of the selected unknown data point, and obtain a timestamp of a normal data point adjacent to the selected unknown data point; calculate an abnormal power replacement value based on the abnormal power value of the selected unknown data point, the timestamp of the selected unknown data point, the normal power value of the normal data point adjacent to the selected unknown data point, and the timestamp of the normal data point adjacent to the selected unknown data point; and replace the abnormal power value of the selected unknown data point with the abnormal power replacement value.
[0051] Optionally, the power prediction module includes:
[0052] The power prediction submodule is used to aggregate the historical power data after the unknown data point is abnormally processed and the power data of other data points in the historical power data except the unknown data point and the abnormal data point to obtain the target historical power data; use the target historical power data as sample training data to construct a power consumption prediction model; obtain current power data, input the current power data into the power consumption prediction model, and output the power prediction value.
[0053] Optionally, the device further comprises:
[0054] The model optimization module is used to obtain actual electricity meter data and optimize the electricity consumption prediction model according to the electricity prediction value and the actual electricity meter data.
[0055] Optionally, the model optimization module includes:
[0056] The model optimization submodule is used to calculate the difference between the power prediction value and the actual meter data; if the difference is within a preset fault tolerance range, the power prediction value is determined to be normal data; and / or, if the difference exceeds the preset fault tolerance range, the power prediction value is determined to be abnormal data; and the normal data and the abnormal data are used as new sample training data to train the power consumption prediction model.
[0057] An embodiment of the present invention further discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements any one of the power data processing methods when executed by the processor.
[0058] An embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any one of the methods for processing power data is implemented.
[0059] The embodiments of the present invention include the following advantages:
[0060] In an embodiment of the present invention, by displaying data points corresponding to historical power data on a preset interface, the abnormal power value of the unknown data point can be processed in response to the selection operation of the displayed unknown data point, and the historical power data after the abnormal processing of the unknown data point can be obtained, and then the power consumption can be predicted based on the historical power data after the abnormal processing of the unknown data point to obtain the power prediction value. By giving technicians data manipulation capabilities and performing functional operations on related visualization interfaces, the abnormal power value of the unknown data point is replaced based on the selection operation of the displayed unknown data point by the technician, and the visual repair of the data is realized, so that the power data model can be optimized based on the abnormal conditions in the data identified and corrected by the technician, thereby improving the efficiency and accuracy of power energy management. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 is a flowchart of a method for processing power data according to an embodiment of the present invention;
[0062] Figure 2 is a flowchart of another method for processing power data according to an embodiment of the present invention;
[0063] Figure 3 is a schematic diagram of a process of power data processing provided by an embodiment of the present invention;
[0064] Figure 4 It is a structural block diagram of an embodiment of a power data processing device of the present invention. DETAILED DESCRIPTION
[0065] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0066] Effective management of electric energy is conducive to accurate prediction of future electricity demand.
[0067] The embodiment of the present invention provides the technician with data manipulation capability and performs the functional operation of the related visualization interface. Based on the response to the technician's selection operation of the displayed unknown data point, the abnormal power value of the unknown data point is replaced to achieve visual repair of the data, so that the abnormal situation in the data identified and corrected by the technician can be optimized, thereby improving the efficiency and accuracy of power energy management. Among them, for the historical power data that has been preliminarily identified as abnormal, the technician can be further provided with manual selection of unknown data points with abnormal power values that are not automatically identified on the visualization interface, further identifying and correcting the abnormal situation in the data, and by providing an intuitive visualization data repair function, the technician can clearly participate in the tuning of the power data model through the interface to improve the accuracy of the data; and, based on the historical power data after abnormal identification and abnormal processing, it is used to predict the power consumption. Since the abnormal power value in the historical power data has been identified and processed, the power consumption can be predicted under the condition of data optimization, and the accuracy of the power prediction value can be improved, that is, by using the machine learning method to establish a prediction model, the prediction accuracy of the future power energy data trend can be improved, so as to make reasonable arrangements for energy supply and provide data reference for abnormal situations that may occur in the future.
[0068] In addition, the predicted power consumption value can be compared with the actual meter data within the preset fault tolerance range. By comparing the actual data with the predicted data, abnormal data can be detected and repaired in time to ensure the accuracy and reliability of the data; and the retraining mechanism of the model is triggered at regular intervals, using the most recent data as sample data to recalculate the power consumption prediction model. Through continuous iteration, the prediction algorithm is continuously iterated, and the historical power data after anomaly identification and anomaly processing is continuously used for model training, the adaptability and accuracy of the power consumption prediction model are improved, ensuring the long-term predictability of the power consumption prediction model.
[0069] Reference Figure 1 , shows a flowchart of a method for processing power data according to an embodiment of the present invention, which may specifically include the following steps:
[0070] Step 101, obtaining historical power data, and displaying data points corresponding to the historical power data on a preset interface;
[0071] In an embodiment of the present invention, the historical power data acquired is the historical power data after preliminary abnormality identification and preliminary abnormality processing. The historical power data after preliminary abnormality identification may include initial abnormal power data automatically identified as abnormal and unknown power data not automatically identified as abnormal.
[0072] Specifically, the acquisition of historical power data can be obtained by performing preliminary cleaning operations and anomaly identification on the original power data. Specifically, it can be manifested as first, collecting the original power data at preset time intervals, and then obtaining the preset time unit from the original power data, such as the power data set of each quarter, and then performing preliminary cleaning operations on the power data set of the preset time unit to obtain preliminary power data, and performing anomaly identification on the preliminary power data to obtain abnormal power data and unknown power data, so as to aggregate the abnormal power data and unknown power data to obtain historical power data.
[0073] Optionally, the historical power data may also include normal power data.
[0074] In one embodiment of the present invention, the historical power data may have corresponding data points, and these data points may be visualized on a preset interface, so that the recognition results of the historical power data may be displayed to the technicians in a visual manner.
[0075] Among them, the data points displayed on the preset interface may include initial abnormal data points corresponding to initial abnormal power data, unknown data points corresponding to unknown power data, and normal data points corresponding to normal power data.
[0076] Step 102, in response to the selection operation of the unknown data point, the abnormal power value of the unknown data point is processed to obtain the historical power data after the abnormality of the unknown data point is processed;
[0077] The provided visual preset interface can provide technical personnel with data manipulation capabilities and perform functional operations on related visual interfaces.
[0078] In one embodiment of the present invention, for the unknown data points displayed on the preset interface, the functional operation provided to the technician can be expressed as a functional operation of data visualization repair. Specifically, the technician can manually select the unknown data points (i.e., non-abnormal data points) displayed on the preset interface. At this time, in response to the selection operation of the unknown data points, the abnormal power values of the unknown data points can be processed, thereby further identifying and correcting the abnormal conditions in the historical power data for which preliminary abnormality identification has been performed.
[0079] Step 103 , predicting power consumption based on the historical power data after the unknown data point exception processing, and obtaining a power prediction value.
[0080] After processing the abnormal power value of the selected unknown data point, the historical power data after the abnormal processing of the unknown data point can be obtained. At this time, the historical power data after the abnormal processing of the unknown data point can be used for power consumption prediction.
[0081] Among them, since the abnormal power values in the historical power data have been identified and processed, when the historical power data after abnormal processing is used to predict power consumption, the power consumption can be predicted under the condition of data optimization, ensuring the accuracy of the obtained power prediction value.
[0082] Specifically, when predicting power consumption, it can be manifested as the process of constructing a power consumption prediction model and the process of using the constructed power consumption prediction model. Among them, the process of constructing the power consumption prediction model can be manifested as aggregating the historical power data after the anomaly processing of unknown data points and the power data of other data points in the historical power data except for unknown data points and abnormal data points to obtain the target historical power data, and then the target historical power data can be used as sample training data to construct a power consumption prediction model, so that when the historical power data after abnormal identification and abnormal processing is used for model training, the accuracy of the power consumption prediction model can be improved; the process of using the constructed power consumption prediction model can be specifically manifested as obtaining the current power data, inputting the current power data into the power consumption prediction model, and outputting the power prediction value.
[0083] In a preferred embodiment of the present invention, in order to continuously iterate the prediction algorithm, improve the adaptability and accuracy of the power consumption prediction model, and thus ensure the long-term predictability of the power consumption prediction model, the actual meter data can be obtained, and the power consumption prediction model can be optimized according to the power prediction value and the actual meter data. It should be noted that the specific iterative optimization method of the power consumption prediction model is not limited by the embodiment of the present invention.
[0084] In an embodiment of the present invention, by displaying data points corresponding to historical power data on a preset interface, the abnormal power value of the unknown data point can be processed in response to the selection operation of the displayed unknown data point, and the historical power data after the abnormal processing of the unknown data point can be obtained, and then the power consumption can be predicted based on the historical power data after the abnormal processing of the unknown data point to obtain the power prediction value. By giving technicians data manipulation capabilities and performing functional operations on related visualization interfaces, the abnormal power value of the unknown data point is replaced based on the selection operation of the displayed unknown data point by the technician, and the visual repair of the data is realized, so that the power data model can be optimized based on the abnormal conditions in the data identified and corrected by the technician, thereby improving the efficiency and accuracy of power energy management.
[0085] Reference Figure 2 , shows a flowchart of another method for processing power data according to an embodiment of the present invention, which may specifically include the following steps:
[0086] Step 201, collecting raw power data at preset time intervals, performing preliminary cleaning operations and abnormality identification on the raw power data, and obtaining historical power data;
[0087] Effective management of electric energy is conducive to accurately predicting future electricity demand. In an embodiment of the present invention, an electric energy prediction and management system based on historical data is proposed. The system can accurately predict future electric energy data trends by utilizing a machine learning algorithm; and the system can also have the function of timely detecting and repairing abnormal data to ensure the accuracy and reliability of the data.
[0088] In an embodiment of the present invention, in order to obtain data for predicting future electric power, raw power data may be collected at preset time intervals.
[0089] For data collection and storage / archiving, such as Figure 3As shown, real-time data including active electricity, timestamp and other information can be collected from the electric energy meter periodically and automatically, and the collected real-time data can be stored in the cloud or local database, wherein the collected real-time data is the original power data. In practical applications, the smart meter data can be collected through communication protocols such as Modbus-RTU (Remote Terminal Unit, a transmission mode of Modbus serial communication protocol) or Modbus-TCP (Transmission Control Protocol, another transmission mode of Modbus serial communication protocol). The collected data can be encapsulated into a private IEMS protocol through GDCS (General Device Controller System, a device control system). The protocol is a TCP-based protocol, and then can be connected to the target server through a router or switch, so that the system can collect active electricity metering data and timestamps from the metering device every several hundred milliseconds. It should be noted that in order to ensure the security of data transmission, AES-256 encryption technology (Advanced Encryption Standard with 256-bit key, a symmetric encryption technology) can be used to securely transmit data to the MongoDB database to ensure high availability and security of data based on the aforementioned data storage solution. This is not limited in the embodiments of the present invention.
[0090] In one embodiment of the present invention, in order to ensure the accuracy and reliability of data used to predict future electric energy, the collected raw power data can be preliminarily cleaned and anomaly identified to obtain historical power data used to predict future electric energy. That is, in practical applications, historical power data can be obtained by preliminarily cleaning the raw power data and identifying anomalies.
[0091] Specifically, after collecting the original power data at preset time intervals, the preset time units, such as the quarterly power data sets, can be obtained from the original power data, and then the power data sets of the preset time units are preliminarily cleaned to obtain preliminary power data, and the preliminary power data are identified for anomalies to obtain abnormal power data and unknown power data, thereby aggregating the abnormal power data and unknown power data to obtain historical power data.
[0092] Among them, the preliminary cleaning operation may include a missing value deletion operation and an outlier value replacement operation.
[0093] The collected raw power data is subjected to preliminary cleaning operations and abnormality identification operations. In one case, if there are missing values in the power data set of a preset time unit, the missing values can be deleted; in another case, if there is power data exceeding a preset threshold in the power data set of a preset time unit, the power data exceeding the preset threshold can be replaced with a preset value to obtain preliminary power data.
[0094] In practical applications, such as Figure 3 As shown, the system can perform feature extraction and preprocessing, mainly automatically extracting preset time units from the stored raw power data, such as key feature values of the quarterly power data set, such as active electricity, etc., to prepare the basic data set for the subsequent preparation; then the extracted power data set can be preliminarily cleaned to implement preliminary data cleaning and remove obvious errors or missing values. The process of data cleaning and feature extraction can ensure the quality and accuracy of the data and build a refined data set for in-depth analysis. In addition, for known abnormal data patterns, such as data cleaning, long-term zero readings, etc., the system can automatically identify and mark abnormal data points.
[0095] For example, the system can extract the total active electricity consumption per quarter from the minute-by-minute data through the Pandas library in Python. The feature extraction formula can be as follows:
[0096]
[0097] Among them, P i It can represent the active energy reading per minute; N can represent the number of minutes in a quarter.
[0098] For example, a primary data cleaning job can be done by removing missing values using Pandas’ .dropna() method and replacing abnormally high readings using the .replace() method.
[0099] In one embodiment of the present invention, after performing a preliminary cleaning operation on the original power data to obtain preliminary power data, abnormality identification can also be performed on the preliminary power data.
[0100] Specifically, the total active electricity of the power data set of the preset time unit can be obtained, and then the total active electricity can be used to calculate the mean and standard deviation for the power data set, and the mean and standard deviation of each preliminary power data and power data set are respectively used to calculate the standard score for each preliminary power data. In one case, if the standard score of the target preliminary power data exceeds the preset number of standard deviations, the target preliminary power data is determined to be the initial abnormal power data; in another case, if the standard score of the target preliminary power data is less than or equal to the preset number of standard deviations, the target preliminary power data is determined to be the unknown power data. Among them, the initial abnormal data points corresponding to the initial abnormal power data, and the unknown data points corresponding to the unknown power data, can be used for display on the preset interface.
[0101] For example, the abnormal identification algorithm may be based on the Z-score method, in which a reading that exceeds 3 standard deviations may be identified as abnormal data. The abnormal identification formula may be as follows:
[0102]
[0103] Among them, Z can refer to the standard score; X can refer to a single data point; μ can refer to the mean of the power data set; σ can refer to the standard deviation of the power data set; the meter readings with calibration exceeding 3 standard deviations, that is, |Z|>3, can be identified as abnormal data.
[0104] Step 202, in response to the selection operation of the unknown data point, the abnormal power value of the unknown data point is processed to obtain the historical power data after the abnormality of the unknown data point is processed;
[0105] In an embodiment of the present invention, historical power data may include abnormal power data and unknown power data, as well as normal power data. The historical power data may have corresponding data points. Then, the data points may include initial abnormal data points corresponding to the initial abnormal power data, unknown data points corresponding to the unknown power data, and normal data points corresponding to the normal power data. At this time, the initial abnormal data points corresponding to the initial abnormal power data, the unknown data points corresponding to the unknown power data, and the normal data points corresponding to the normal power data may be displayed on a preset interface, so that the identification results of the historical power data can be displayed to the technician in a visual manner.
[0106] In order to improve data processing efficiency, the system provided by the embodiment of the present invention can design an intuitive visual data repair function, so that technicians can easily identify and correct abnormalities in the data, thereby optimizing the power data model. Specifically, the visual preset interface can provide technicians with data manipulation capabilities and perform functional operations on related visual interfaces.
[0107] In one embodiment of the present invention, for the unknown data points displayed on the preset interface, the functional operation provided to the technician can be expressed as a functional operation of data visualization repair. Specifically, the technician can manually select the unknown data points (i.e., non-abnormal data points) displayed on the preset interface. At this time, in response to the selection operation of the unknown data points, the abnormal power values of the unknown data points can be processed, thereby further identifying and correcting the abnormal conditions in the historical power data for which preliminary abnormality identification has been performed.
[0108] The processing of the abnormal power value of the unknown data point can be expressed as replacing the abnormal power value of the unknown data point. Specifically, it can be expressed as obtaining the normal power value of the normal data point adjacent to the selected unknown data point, at which time the timestamp of the selected unknown data point can be obtained, and the timestamp of the normal data point adjacent to the selected unknown data point can be obtained; then, according to the abnormal power value of the selected unknown data point, the timestamp of the selected unknown data point, the normal power value of the normal data point adjacent to the selected unknown data point, and the timestamp of the normal data point adjacent to the selected unknown data point, the abnormal power replacement value can be calculated to replace the abnormal power value of the selected unknown data point with the abnormal power replacement value.
[0109] In practical applications, such as Figure 3 As shown, in the process of visual annotation and cleaning of abnormal data, the technical personnel can view the data feature map in the visual interface, and manually select and mark the unknown data points with abnormal power values that are not automatically identified by the system. At this time, the unknown power data with abnormal power values can be cleaned (for example, using interpolation method, historical average replacement method, etc.) or the user can directly mark the unknown power data with abnormal power values as abnormal data points through the preset interface to ensure data quality.
[0110] For example, the interactive abnormal data identification and correction platform provided by the system can be built using the Django framework (a Python Web framework), and the front end can use React.js and Plotly.js for data visualization. In this example, users can select unknown data points with abnormal power values by dragging and drop, and use a linear interpolation algorithm to correct the data. Specifically, between the selected abnormal data points, the platform calculates the linear equation between the two points and replaces the abnormal value; in addition, the platform also supports the use of historical means to replace abnormal values to ensure the purity and reliability of the data set.
[0111] When the user selects unknown data points with abnormal power values and performs linear interpolation, the interpolation formula can be as follows:
[0112]
[0113] Among them, (x1, y1) and (x2, y2) may refer to two adjacent normal data points; x may refer to the timestamp of an unknown data point with an abnormal power value; and y may refer to the interpolated active power value.
[0114] Step 203, obtaining target historical power data, using the target historical power data as sample training data, and constructing a power consumption prediction model;
[0115] After processing the abnormal power value of the selected unknown data point, the historical power data after the abnormal processing of the unknown data point can be obtained. At this time, the historical power data after the abnormal processing of the unknown data point can be used to predict the power consumption. Among them, since the abnormal power value in the historical power data has been identified and processed, when the power consumption is predicted using the historical power data after the abnormal processing, the power consumption can be predicted under data optimization, ensuring the accuracy of the obtained power prediction value.
[0116] Specifically, when performing power consumption prediction, it can be manifested as a process of constructing a power consumption prediction model and a process of using the constructed power consumption prediction model.
[0117] The process of constructing the power consumption prediction model can be expressed as aggregating the historical power data after the anomaly processing of unknown data points and the power data of other data points in the historical power data except the unknown data points and the anomaly data points to obtain the target historical power data. Then, the target historical power data can be used as sample training data to construct the power consumption prediction model, so that when the historical power data after anomaly identification and anomaly processing is used for model training, the accuracy of the power consumption prediction model can be improved.
[0118] In practical applications, such as Figure 3 As shown, for sample fitting and prediction model construction, a machine learning algorithm can be used to perform sample fitting based on the cleaned high-quality data set, optimize model parameters, improve prediction accuracy, and then predict the future power consumption of each electricity meter to generate accurate power prediction values. Specifically, for the implementation of model adaptation and future prediction engines, the system provided by the embodiment of the present invention can use a random forest regression model to predict power consumption, and use the scikit-learn library for implementation, wherein the model training data set can include power data for the past two years, and GridSearchCV is used for parameter optimization. The prediction engine can output power prediction values for the next month by inputting new data into the model. Exemplarily, the random forest regression model consists of multiple decision trees, and its prediction formula can be as follows:
[0119]
[0120] in, It can refer to the predicted value, that is, the power prediction value; T can refer to the number of decision trees; f t (x) may refer to the prediction result of the (t)th decision tree.
[0121] For example, the performance can be evaluated using mean square error (MSE) and coefficient of determination (R 2 ) as an indicator to ensure that the model can achieve accurate power consumption prediction at the individual power meter level and output reliable future trend estimates. The performance evaluation formula, namely the mean square error (MSE) formula, can be shown as follows:
[0122]
[0123] Among them, y i Can refer to actual values; can refer to the predicted value; n can refer to the number of data points.
[0124] Coefficient of determination (R 2 ) The formula can be as follows:
[0125]
[0126] in, Can refer to the mean of the actual values.
[0127] Step 204, obtaining current power data, inputting the current power data into a power consumption prediction model, and outputting a power consumption prediction value;
[0128] The use process of the constructed power consumption prediction model can be specifically manifested as obtaining current power data, inputting the current power data into the power consumption prediction model, and outputting a power prediction value.
[0129] Step 205: Acquire actual electricity meter data, and optimize the electricity consumption prediction model according to the electricity prediction value and the actual electricity meter data.
[0130] In one embodiment of the present invention, in order to continuously iterate the prediction algorithm and improve the adaptability and accuracy of the power consumption prediction model, thereby ensuring the long-term predictability of the power consumption prediction model, actual meter data can be obtained and the power consumption prediction model can be optimized based on the power prediction value and the actual meter data.
[0131] Specifically, the predicted power consumption value can be compared with the actual meter data within a preset fault tolerance range. By comparing the actual data with the predicted data, abnormal data can be detected and repaired in a timely manner to ensure the accuracy and reliability of the data.
[0132] In practical applications, electric meter data can be monitored in real time and intelligently classified / sorted for abnormalities. Figure 3 As shown, it can be specifically manifested as calculating the difference between the power prediction value and the actual meter data, so as to realize the comparison between the power prediction value and the actual meter data within the preset fault tolerance range based on the calculated difference. In one case, if the difference is within the preset fault tolerance range, it means that the deviation between the real-time data and the prediction value is within a reasonable range, then the data can be considered normal, that is, the power prediction value is determined to be normal data, and the aforementioned data can be classified into a normal table for subsequent statistical analysis or automatic control; in another case, if the difference exceeds the preset fault tolerance range, it means that the deviation between the real-time data and the prediction value is not within a reasonable range, then it is regarded as abnormal data, that is, the power prediction value can be determined to be abnormal data, and the aforementioned data can be recorded in an abnormal table to wait for manual review or further analysis. Preferably, when optimizing the power consumption prediction model according to the power prediction value and the actual meter data, normal data and abnormal data are used as new sample training data to train the power consumption prediction model.
[0133] Exemplarily, the system can use Apache Kafka for real-time data stream processing, compare the real-time data with the output of the prediction model, and set the preset fault tolerance range, that is, the tolerance threshold can be ±5%. Data exceeding this range can be recorded in the abnormal event archive and stored in the MongoDB database, so that technicians can review and further analyze the abnormal event archive through the Django Admin interface; when abnormal data flows through the system, it is immediately compared with the estimated value generated by the prediction model, and all matches within the preset tolerance threshold are classified as normal data and included in the regular data analysis library to support further statistical evaluation and automated regulation. The formula for setting the tolerance threshold can be as follows:
[0134]
[0135] in, can refer to the predicted value; y can refer to the real-time data value; 0.05 can refer to the set tolerance threshold.
[0136] For model iteration and optimization, such as Figure 3As shown, at regular intervals, such as every few months, the system provided by the embodiment of the present invention can automatically trigger the model retraining mechanism, use the latest data as sample data, recalculate the power consumption prediction model, and continuously iterate the prediction algorithm through continuous iteration, and continuously use the historical power data after abnormal identification and abnormal processing for model training, so as to improve the adaptability and accuracy of the power consumption prediction model and ensure the long-term predictability of the power consumption prediction model. For example, the random forest regression model can be retrained using the data of the most recent month, the performance of the new model can be evaluated by cross-validation, and the hyperparameters can be optimized by GridSearchCV to recalculate the power consumption prediction model. The new model can be recalculated by the mean square error (MSE) and the coefficient of determination (R 2 ) The evaluation indicators are selected and automatically deployed to the prediction engine, which can ensure the long-term effectiveness and accuracy of the prediction model, continuously iterate and evolve, and constantly polish the adaptability and accuracy of the algorithm. The cross-validation formula takes the k-fold cross-validation formula as an example, which can be shown as follows:
[0137]
[0138] Among them, k can refer to the fold; MSE i It can refer to the mean square error of the i-th fold.
[0139] It should be noted that the parameter optimization formula can use grid search (GridSearchCV) for parameter optimization. The core idea is to find the optimal parameter by traversing the parameter combination: θ * =argminCV_ERROR(θ), where θ may refer to model parameters, θ * It may refer to an optimal parameter combination, which is not limited in the embodiment of the present invention.
[0140] In addition, by setting abnormal thresholds and triggering alarm mechanisms, the system can provide timely alarm reminders, assist users in quickly responding to potential problems, help users deal with abnormal situations in a timely manner, and timely detect and repair abnormal data to ensure data accuracy and reliability. The embodiments of the present invention are not limited to this.
[0141] It should be noted that, for the data collection process provided by the embodiment of the present invention, a database or a real-time monitoring system can be used to collect historical power energy data, but other data sources, such as cloud storage services or API interfaces, can also be used to provide data collection and storage functions; for the power consumption prediction process provided by the embodiment of the present invention, a time series analysis or machine learning method can be used to establish a prediction model, but other prediction algorithms, such as deep learning, neural networks or other statistical learning methods, can also be used; for the abnormal detection and repair process provided by the embodiment of the present invention, interpolation, smoothing and other methods can be used to repair abnormal data, but other repair strategies, such as rule-based methods, pattern recognition or expert systems, can also be considered; for the alarm reminder process provided by the embodiment of the present invention, SMS or email can be used as an alarm reminder method, but other notification methods, such as phone calls, push notifications or sound and light alarm devices, can also be used. Among them, if different data sources are used, the real-time and accuracy of data collection may be affected, and it is necessary to ensure that the selected data source can provide reliable historical data; if different prediction algorithms are used, the accuracy and efficiency of the prediction may be affected, for example, deep learning may require a large amount of training data, while neural networks may require a long training time; if other repair strategies are used, the repair effect of abnormal data may be affected. Some methods may be more suitable for specific types of anomalies, so you need to choose the right method based on the specific situation; using other notification methods may affect the timeliness and reliability of alarm reminders. For example, phone calls may be affected by network problems, and sound and light alarm devices may require additional hardware equipment.
[0142] Also, to check whether the competitor provides a visual display of abnormal data repair, this can be done by actually operating the competitor's system and observing whether it provides a graphical interface to display abnormal data and its repair process during data processing; if a similar dynamic display or comparison view function is found, it may infringe the visual repair function of the embodiment of the present invention; to verify whether the competitor has the function of detecting and repairing abnormal data, technical analysis, such as decompiling software or reviewing runtime code, can be used to identify whether there are specific algorithms or processes in the competitor for detecting and repairing abnormal data. If these methods or processes are similar in principle to the embodiments of the present invention, they may constitute infringement.
[0143] The embodiment of the present invention enables technicians to manipulate data and perform functional operations on related visualization interfaces. Based on the response to the technicians' selection of the displayed unknown data points, the abnormal power values of the unknown data points are replaced to achieve visual repair of the data, so that the power data model can be optimized based on the abnormal conditions in the data identified and corrected by the technicians, thereby improving the efficiency and accuracy of power energy management. In addition, the predicted power forecast value can be compared with the actual meter data within a preset fault tolerance range, and the retraining mechanism of the model can be triggered at regular intervals, using the most recent data as sample data to recalculate the power consumption prediction model. Through continuous iteration, continuous iteration of the prediction algorithm, and continuous use of historical power data after abnormal identification and abnormal processing for model training, the adaptability and accuracy of the power consumption prediction model can be improved, ensuring the long-term predictability of the power consumption prediction model.
[0144] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0145] Reference Figure 4 , shows a structural block diagram of an embodiment of a power data processing device of the present invention, which may specifically include the following modules:
[0146] The data point display module 401 is used to obtain historical power data and display data points corresponding to the historical power data on a preset interface; the data points include unknown data points that are not automatically identified as abnormal;
[0147] The abnormality processing module 402 is used for processing the abnormal power value of the unknown data point in response to the selection operation of the unknown data point to obtain the historical power data after the abnormality processing of the unknown data point;
[0148] The power prediction module 403 is used to predict power consumption based on the historical power data after the unknown data point abnormality processing to obtain a power prediction value.
[0149] In one embodiment of the present invention, the data point display module 401 may include the following submodules:
[0150] The historical power data acquisition submodule is used to collect raw power data at preset time intervals; obtain a power data set of preset time units from the raw power data; perform preliminary cleaning operations on the power data set of the preset time units to obtain preliminary power data; perform abnormality identification on the preliminary power data to obtain abnormal power data and unknown power data; and aggregate the abnormal power data and the unknown power data to obtain historical power data.
[0151] In one embodiment of the present invention, the preliminary cleaning operation includes a missing value deletion operation and an abnormal value replacement operation; the historical power data acquisition submodule may include the following units:
[0152] A preliminary power data acquisition unit is used to perform a missing value deletion operation on the missing values when there are missing values in the power data set of the preset time unit; and / or, when there is power data exceeding a preset threshold in the power data set of the preset time unit, replace the power data exceeding the preset threshold with a preset value to obtain preliminary power data.
[0153] In one embodiment of the present invention, the historical power data acquisition submodule may include the following units:
[0154] A historical power data acquisition unit is used to acquire the total active electricity amount of the power data set of the preset time unit; using the total active electricity amount to calculate the mean and standard deviation of the power data set; using each preliminary power data and the mean and standard deviation of the power data set respectively to calculate the standard score for each preliminary power data; if the standard score of the target preliminary power data exceeds the preset number of standard deviations, the target preliminary power data is determined to be initial abnormal power data; and / or, if the standard score of the target preliminary power data is less than or equal to the preset number of standard deviations, the target preliminary power data is determined to be unknown power data; wherein, the initial abnormal data points corresponding to the initial abnormal power data, and the unknown data points corresponding to the unknown power data, are used to be displayed on a preset interface.
[0155] In an embodiment of the present invention, the historical power data also includes normal power data, and normal data points corresponding to the normal power data are displayed on the preset interface; the abnormality processing module 402 may include the following submodules:
[0156] An abnormality handling submodule is used to obtain a normal power value of a normal data point adjacent to a selected unknown data point; obtain a timestamp of the selected unknown data point, and obtain a timestamp of a normal data point adjacent to the selected unknown data point; calculate an abnormal power replacement value based on the abnormal power value of the selected unknown data point, the timestamp of the selected unknown data point, the normal power value of the normal data point adjacent to the selected unknown data point, and the timestamp of the normal data point adjacent to the selected unknown data point; and replace the abnormal power value of the selected unknown data point with the abnormal power replacement value.
[0157] In an embodiment of the present invention, the power prediction module 403 may include the following submodules:
[0158] The power prediction submodule is used to aggregate the historical power data after the unknown data point is abnormally processed and the power data of other data points in the historical power data except the unknown data point and the abnormal data point to obtain the target historical power data; use the target historical power data as sample training data to construct a power consumption prediction model; obtain current power data, input the current power data into the power consumption prediction model, and output the power prediction value.
[0159] In an embodiment of the present invention, the device provided by the embodiment of the present invention may further include the following modules:
[0160] The model optimization module is used to obtain actual electricity meter data and optimize the electricity consumption prediction model according to the electricity prediction value and the actual electricity meter data.
[0161] In one embodiment of the present invention, the model optimization module may include the following submodules:
[0162] The model optimization submodule is used to calculate the difference between the power prediction value and the actual meter data; if the difference is within a preset fault tolerance range, the power prediction value is determined to be normal data; and / or, if the difference exceeds the preset fault tolerance range, the power prediction value is determined to be abnormal data; and the normal data and the abnormal data are used as new sample training data to train the power consumption prediction model.
[0163] In an embodiment of the present invention, the power data processing device provided by the embodiment of the present invention displays data points corresponding to historical power data on a preset interface, and can respond to the selection operation of the displayed unknown data points, process the abnormal power values of the unknown data points, obtain the historical power data after the abnormal processing of the unknown data points, and then predict the power consumption based on the historical power data after the abnormal processing of the unknown data points to obtain the power prediction value. By giving technicians data manipulation capabilities and performing functional operations on related visualization interfaces, the abnormal power values of the unknown data points are replaced based on the selection operation of the displayed unknown data points by the technicians, and visual repair of the data is achieved, so that the power data model can be optimized based on the abnormal conditions in the data identified and corrected by the technicians, thereby improving the efficiency and accuracy of power energy management.
[0164] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0165] An embodiment of the present invention further provides an electronic device, including:
[0166] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, each process of the above-mentioned power data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0167] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned power data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0168] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0169] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0170] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0171] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0172] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0173] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0174] Finally, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0175] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0176] The above is a detailed introduction to a method for processing power data, a device for processing power data, a corresponding electronic device and a corresponding computer-readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for processing power data, characterized in that: The method comprises: Acquire historical power data, and display data points corresponding to the historical power data on a preset interface; the data points include unknown data points that are not automatically identified as abnormal; In response to the selection operation of the unknown data point, the abnormal power value of the unknown data point is processed to obtain the historical power data of the unknown data point after abnormal processing; The power consumption is predicted based on the historical power data after the unknown data point abnormality processing to obtain a power prediction value.
2. The method according to claim 1, characterized in that The obtaining of historical power data includes: Collecting raw power data at preset time intervals; Acquire a power data set of a preset time unit from the original power data; Performing a preliminary cleaning operation on the power data set of the preset time unit to obtain preliminary power data; Performing abnormality identification on the preliminary power data to obtain abnormal power data and unknown power data; The abnormal power data and the unknown power data are aggregated to obtain historical power data.
3. The method according to claim 2, characterized in that The preliminary cleaning operation includes a missing value deletion operation and an abnormal value replacement operation; the preliminary cleaning operation is performed on the power data set of the preset time unit to obtain preliminary power data, including: If there are missing values in the power data set of the preset time unit, a missing value deletion operation is performed on the missing values; and / or, if there are power data exceeding a preset threshold in the power data set of the preset time unit, the power data exceeding the preset threshold is replaced with a preset value to obtain preliminary power data.
4. The method according to claim 2, characterized in that: The performing abnormal identification on the preliminary power data to obtain abnormal power data and unknown power data includes: Obtaining the total amount of active electricity of the power data set of the preset time unit; Using the total amount of active electric energy, calculate the mean and standard deviation of the electric power data set; Using each preliminary power data, the mean value and the standard deviation of the power data set respectively, to calculate a standard score for each preliminary power data; If the standard score of the target preliminary power data exceeds the preset number of standard deviations, the target preliminary power data is determined to be initial abnormal power data; and / or if the standard score of the target preliminary power data is less than or equal to the preset number of standard deviations, the target preliminary power data is determined to be unknown power data; Among them, the initial abnormal data points corresponding to the initial abnormal power data and the unknown data points corresponding to the unknown power data are used to be displayed on a preset interface.
5. The method according to claim 1, characterized in that The historical power data also includes normal power data, and normal data points corresponding to the normal power data are displayed on the preset interface; In response to the selection operation of the unknown data point, the abnormal power value of the unknown data point is processed to obtain the historical power data after the abnormal processing of the unknown data point, including: obtaining normal power values of normal data points adjacent to the selected unknown data point; Obtaining the timestamp of the selected unknown data point, and obtaining the timestamps of the normal data points adjacent to the selected unknown data point; Calculate the abnormal power replacement value according to the abnormal power value of the selected unknown data point, the timestamp of the selected unknown data point, the normal power value of the normal data point adjacent to the selected unknown data point, and the timestamp of the normal data point adjacent to the selected unknown data point; The abnormal power replacement value is used to replace the abnormal power value of the selected unknown data point.
6. The method according to claim 1, characterized in that The method of performing power consumption prediction based on the historical power data after the unknown data point abnormality processing to obtain a power prediction value includes: Aggregate the historical power data after the unknown data point abnormality processing and the power data of other data points in the historical power data except the unknown data point and the abnormal data point to obtain target historical power data; Using the target historical power data as sample training data to construct a power consumption prediction model; The current power data is obtained, the current power data is input into the power consumption prediction model, and the power prediction value is outputted.
7. The method according to claim 6, characterized in that The method further comprises: Actual electricity meter data is obtained, and the electricity consumption prediction model is optimized according to the electricity consumption prediction value and the actual electricity meter data.
8. The method according to claim 7, characterized in that The optimizing the power consumption prediction model according to the power prediction value and the actual electric meter data further includes: Calculating the difference between the power prediction value and the actual power meter data; If the difference is within the preset fault tolerance range, the power prediction value is determined to be normal data; and / or, if the difference exceeds the preset fault tolerance range, the power prediction value is determined to be abnormal data.
9. The method according to claim 8, characterized in that The optimizing the power consumption prediction model according to the power prediction value and the actual power meter data includes: The normal data and the abnormal data are used as new sample training data to train the power consumption prediction model.
10. A power data processing device, characterized in that: The device comprises: A data point display module, used to obtain historical power data and display data points corresponding to the historical power data on a preset interface; the data points include unknown data points that are not automatically identified as abnormal; An abnormality processing module, used for responding to the selection operation of the unknown data point, processing the abnormal power value of the unknown data point, and obtaining the historical power data of the unknown data point after abnormality processing; The power prediction module is used to predict power consumption based on the historical power data after the unknown data point abnormality processing to obtain a power prediction value.
11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for processing power data according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for processing power data according to any one of claims 1 to 9 is implemented.
