Electricity consumption prediction method and device, electronic equipment and storage medium
By performing multiple verifications and abnormal data detection on the electricity consumption data, the problems of incomplete data and poor abnormal data recognition capabilities in the prior art are solved, and the accuracy and user experience of electricity consumption prediction are improved.
Patent Information
- Application Number
- CN202411502886.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-28
AI Technical Summary
In the power consumption prediction, the prior art has low accuracy of power consumption prediction due to incomplete data and poor abnormal data recognition capabilities, which affects the user experience.
Before power consumption prediction, the power consumption data is checked multiple times and abnormal data detection is detected to ensure the integrity and accuracy of the data, and is only used for prediction after multiple detections.
Improves the accuracy and data quality of power consumption prediction and improves the user experience.
Smart Images

Figure CN119539147A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electricity consumption prediction, and in particular to an electricity consumption prediction method, device, electronic device and storage medium. Background Art
[0002] When participating in market transactions, electricity users need to make predictions about their own electricity consumption, and power sales companies and power grid companies also need to predict the electricity consumption of the proxy users they serve. Different types of electricity users generally need to make a prediction about their future electricity consumption, and the proxy power purchasers will form corresponding power purchase agreements based on the predicted electricity consumption.
[0003] The current prediction of electricity consumption mainly relies on the calculation of electricity consumption information collection data. However, in the current processing method, the acquired data may be incomplete or abnormal, affecting the accuracy of the data itself. Inaccurate data will further affect the electricity consumption forecast results, seriously affecting the accuracy of electricity consumption forecasts and affecting user experience. Summary of the invention
[0004] In view of this, the present application proposes a power consumption prediction method, device, electronic device and storage medium to solve or partially solve the above-mentioned problems.
[0005] Based on the above purpose, this application provides a method for predicting power consumption, including:
[0006] Obtain electricity consumption data;
[0007] Checking whether the data items included in the electricity consumption data and each specific data item meet the set conditions;
[0008] In response to the power usage data passing the verification, performing abnormal data detection on the power usage data according to a set rule table;
[0009] In response to the power consumption data passing the detection, the power consumption data is input into a prediction model to perform power consumption prediction for a set time period to obtain prediction data;
[0010] The predicted data is output.
[0011] In some exemplary embodiments, the acquiring of electricity usage data includes:
[0012] Acquire at least one piece of initial data, and compare and integrate the at least one piece of initial data;
[0013] The compared and integrated initial data are classified, and a label is set for each compared and integrated initial data according to a set rule, so as to generate the electricity consumption data.
[0014] In some exemplary embodiments, inputting the electricity usage data into a prediction model comprises:
[0015] According to the specific classification of the electricity usage data and the corresponding labels, the weights of each specific data in the electricity usage data in the prediction model are adjusted.
[0016] In some exemplary embodiments, the data item included in the power usage data is at least one data item;
[0017] The checking of the data items included in the power consumption data and whether each specific data item meets the set conditions includes:
[0018] Determining all necessary items that the electricity usage data should include, and determining whether the at least one data item includes all necessary items;
[0019] In response to including all the necessary items, determining a set range of any data item, and determining whether specific data corresponding to any data item is within the set range;
[0020] In response to being within the set range, obtaining historical data corresponding to any one of the data items, determining a fluctuation range of any one of the data items according to the historical data, and determining whether the fluctuation range is less than a set threshold;
[0021] In response to the fluctuation amplitude being smaller than a set threshold, it is determined that any one of the data items passes the verification.
[0022] In some exemplary embodiments, performing abnormal data detection on the power usage data according to a set rule table includes:
[0023] Determining actual variation patterns of the electricity consumption data;
[0024] Performing anomaly detection on the actual change rule according to the set rule table;
[0025] In response to the power usage data failing the abnormal data detection, tracing the power usage data to determine a specific abnormal location.
[0026] In some exemplary embodiments, the prediction model includes a long short-term memory model and a transformer model;
[0027] The step of inputting the power consumption data into a prediction model to predict power consumption in a set time period to obtain prediction data includes:
[0028] Inputting the power consumption data into the long short-term memory model and the transformer model respectively, so as to perform the power consumption prediction by the long short-term memory model and the transformer model respectively;
[0029] The outputs of the long short-term memory model and the transformer model are compared and integrated to obtain the predicted data.
[0030] In some exemplary embodiments, after outputting the prediction data, the method further includes:
[0031] Acquire actual data corresponding to the predicted data;
[0032] An accuracy analysis is performed based on the actual data and the predicted data, and the prediction model is adjusted based on the analysis results.
[0033] Based on the same concept, the present application also provides a power consumption prediction device, comprising:
[0034] The first module is used to obtain electricity consumption data;
[0035] The second module is used to check whether the data items included in the power consumption data and each specific data meet the set conditions;
[0036] A third module is used for performing abnormal data detection on the power consumption data according to a set rule table in response to the power consumption data passing the verification;
[0037] A fourth module is used for inputting the power consumption data into a prediction model in response to the power consumption data passing the detection, and performing power consumption prediction for a set time period to obtain prediction data;
[0038] The fifth module is used to output the prediction data.
[0039] Based on the same concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the methods described above when executing the program.
[0040] Based on the same concept, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement any of the methods described above.
[0041] As can be seen from the above, the present application provides a method, device, electronic device and storage medium for predicting power consumption, the method comprising: obtaining power consumption data; checking whether the data items and each specific data contained in the power consumption data meet the set conditions; in response to the power consumption data passing the check, performing abnormal data detection on the power consumption data according to the set rule table; in response to the power consumption data passing the detection, inputting the power consumption data into the prediction model, predicting the power consumption for the set time period, and obtaining the prediction data; and outputting the prediction data. The present application performs multiple checks, abnormal data detection and other processing on the power consumption data before predicting power consumption, detects whether there are abnormalities in the power consumption data from multiple angles, and finds problems in time. For problematic power consumption data, the corresponding terminal can be notified immediately for adjustment and correction. Only when the power consumption data passes the above multiple tests will it be used for power consumption prediction, thereby ensuring the accuracy of the input data during power consumption prediction, improving data quality, and ultimately improving the accuracy of power consumption prediction and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 A flowchart of an exemplary method provided in an embodiment of the present application.
[0044] Figure 2 A schematic diagram of a specific flow chart of the data acquisition process provided in an embodiment of the present application.
[0045] Figure 3 A schematic diagram of a specific flow chart of the data verification process provided in an embodiment of the present application.
[0046] Figure 4 A schematic diagram of a specific process of detecting anomalies in data provided in an embodiment of the present application.
[0047] Figure 5 A schematic diagram of a specific flow chart of a data prediction process provided in an embodiment of the present application.
[0048] Figure 6 A flowchart of a specific scenario implementation of the exemplary method provided in an embodiment of the present application.
[0049] Figure 7 A schematic diagram of the structure of an exemplary device provided in an embodiment of the present application.
[0050] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of this specification more clear, this specification is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0052] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements, objects or method steps appearing before the word cover the elements, objects or method steps listed after the word and their equivalents, without excluding other elements, objects or method steps. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0053] As mentioned in the background technology section, the power industry is currently undergoing market-oriented reforms. According to the corresponding requirements, the industrial and commercial catalog sales electricity prices will be cancelled, and industrial and commercial users will be encouraged to enter the electricity market and purchase electricity at market prices. For users who have not yet purchased electricity directly from the electricity market, the power grid companies will purchase electricity on their behalf. Power grid companies should disclose relevant information on proxy power purchases in a timely manner as required, mainly the monthly total power forecast for proxy users and the deviation between the relevant forecast data and the actual data. Therefore, it is necessary to establish a modeling method and forecasting model based on proxy power purchases, and to incorporate as many data variables that may affect the power forecast as possible to participate in the forecast, thereby forming a complete data forecasting model.
[0054] The current proxy power purchasers rely on the data collected from power consumption information for calculation, but there are some problems that need to be improved. For example, the current data model is incomplete, and the T-2 power data within the month has daily data missing and abnormalities, which greatly affects the accuracy of power data calculation and verification; the current means of identifying abnormal data are incomplete, which brings errors to the power data basis, and the overall proxy power purchase forecast results are quite different. With the continuous deepening of power market construction, market price mechanisms, transaction varieties, connection rules, and load types are more diversified, and the power consumption characteristics of proxy power purchasers are more complex, which brings severe challenges to the accurate prediction of proxy power purchase electricity. The traditional power forecasting method can no longer meet the increasingly refined power forecasting needs. Among them, T-2 power data refers to (current date - 2), which is the power data of the day before yesterday.
[0055] Specifically, in some embodiments, research related to power purchase by proxy is a hot topic in the power industry, mainly focusing on how to improve the accuracy of power forecasting devices so as to publish more accurate information to users who purchase power by proxy. At present, the main problems affecting the accuracy of power forecasting devices are incomplete data, poor ability to identify abnormal data, and lack of monitoring and supervision of the impact of data changes. Some solutions are to adopt a more accurate model and multiple prediction models to predict simultaneously and verify each other to make power forecasts. Other solutions are to optimize power data by big data analysis, and to label and clean the power data used for prediction.
[0056] However, in this embodiment, the prediction model has the problem of incomplete data and large data missing. This is related to the non-standard access data and the lack of effective management of access data. The daily electricity consumption data is a huge and complex database, involving tens of millions of electricity users from all walks of life. As the business changes, electricity users will change the type and capacity of electricity consumption, and the resulting data changes will affect the predicted value. Therefore, solving the problem of prediction model data is the fastest way to improve the accuracy of the prediction model.
[0057] In combination with the above actual situation, the embodiment of the present application provides a power consumption prediction solution. Before the power consumption prediction is performed, the present application performs multiple verifications and abnormal data detection on the power consumption data, detects whether there are abnormalities in the power consumption data from multiple angles, and finds problems in time. For problematic power consumption data, the corresponding terminal can be notified immediately to make adjustments and corrections. Only when the power consumption data passes the above multiple detections will it be used for power consumption prediction, thereby ensuring the accuracy of the input data during power consumption prediction, improving data quality, and ultimately improving the accuracy of power consumption prediction and user experience.
[0058] Figure 1 A flow chart of an exemplary method provided in an embodiment of the present application is shown.
[0059] like Figure 1 As shown, the power consumption prediction method exemplarily proposed in the embodiment of the present application includes the following steps.
[0060] Step 102, obtaining electricity consumption data.
[0061] In this step, the electricity consumption data refers to all data related to the user's daily electricity consumption. The user here can be an individual or an enterprise. In addition to the relevant electric energy attribute data of daily electricity consumption determined by meter reading, the specific data can also include peripheral data such as replacement of electricity meters, rate changes, weather changes, economic changes, etc., surrounding equipment, policies and even corresponding conditions (weather or economy, etc.) surrounding the user's electricity consumption. These data can together constitute a user's electricity consumption data, among which the corresponding peripheral data can be mainly used as a reference for weight adjustment when predicting electricity consumption.
[0062] In more specific scenarios, the data can be further classified. General users can be divided into many types, such as ordinary electricity market users, proxy electricity purchasing users, etc. At the same time, among these users, there may be some users who need to be focused on, and their data needs to be paid more detailed terminal attention, and some are customers with large electricity consumption. Afterwards, according to the above, for some data in the surrounding data, such as meteorological data, economic data, etc., it itself will have a unified impact on all users in a larger range, and can be classified as a separate category. At the same time, there may be overlaps in the electricity consumption data obtained through different paths, and then when obtaining the electricity consumption data, you can also first compare the data with each other and integrate the same or overlapping data.
[0063] Furthermore, for each user's electricity consumption data, corresponding labels can be further set to mark their electricity consumption habits, electricity consumption types, energy consumption, whether there are alternative energy sources, etc., so that these labels can be used to further adjust the weights of corresponding parameters in the prediction model in a more detailed manner.
[0064] That is, in some embodiments, the obtaining of electricity consumption data includes: obtaining at least one piece of initial data, comparing and integrating the at least one piece of initial data; classifying the compared and integrated initial data, and setting a label for each piece of compared and integrated initial data according to set rules, so as to generate the electricity consumption data.
[0065] In some more specific embodiments, such as Figure 2As shown in the figure, it is a specific process of obtaining electricity consumption data. It can use the following methods to ensure that the sampled electricity consumption data is more authentic and reliable. First, the customer file data, meter collection data, file change work order, marketing economic data, etc. can be synchronized through the data synchronization center. Through the file change work order, the new installation, meter replacement, rate change, capacity reduction, suspension, capacity increase and account cancellation customers on the day of data collection are compared with the customer file data. The file labels of the power customer files that have changed in the data classification due to file changes are changed to further determine the scale of proxy power purchase users. Second, the list of special proxy power purchase users can be managed. According to the relevant policy documents issued by various provinces, the user archives can be compared to screen out high-energy-consuming users, corporate users with coal-fired self-contained power plants, and users who have withdrawn from the market without legitimate reasons, and they are marked with customer labels. After the prediction, they are separately classified and displayed according to their customer load ratio. The special proxy power purchase users here are the users who need to be focused on. Third, for power purchase users, their functions, industries, power demand characteristics, power structure, and load characteristics can be secondary subdivided. It also supports the modification and classification of labels according to actual usage. It mainly includes three types of electricity consumption: high voltage, medium voltage, and low voltage. Its industry type is divided according to the standard industry type classification, and the electricity structure and load characteristics are assisted by labeling through clustering algorithms. Fourth, users who have been marketized can be tagged according to the scale of electricity consumption, voltage, etc. Its labels are synchronized from the customer archives through the data synchronization center. Fifth, for large customers with large electricity consumption, such as the top 500 customers in the company's business area and the top 500 customers who purchase electricity as agents, the entry and statistical analysis functions of their daily, weekly, and monthly electricity fluctuation forecasts can be realized, and support online (platform) reporting of large customers' daily, weekly, and monthly electricity fluctuation forecasts and deviation analysis. Open up the collection and transmission link of sample user information to realize information transmission. Classify and record data that affects electricity forecasts, such as production plan adjustments, maintenance, increased production and expansion, and reduced production for large customers.
[0066] Step 104: Check whether the data items included in the power consumption data and each specific data item meet the set conditions.
[0067] In this step, the power consumption data is first checked at the level of the data itself, and the check here can include multiple forms or a combination of multiple forms. First, the power consumption data can be checked according to the corresponding setting conditions. For example, a power consumption data generally needs to include multiple specific data items, and then according to the statistical laws of the data, several setting items required for each power consumption data can be determined to form corresponding setting conditions. When the specific power consumption data is obtained, it can be detected whether the power consumption data contains these necessary data items, that is, whether it contains all the necessary items, so as to determine whether the power consumption data is complete. If it is incomplete, it is considered that it needs to be corrected. Afterwards, for different power consumption data and their more specific data items, according to the corresponding summary rules, their specific value ranges can be determined. For example, some power consumption data cannot have negative data, etc., so that corresponding setting conditions can also be generated to check the data. In other words, for each data item, a corresponding setting range can be set, and then it can be detected whether it falls within the setting range. If not, it is considered that it needs to be corrected. Then, since electricity consumption data is generally long-term continuous data, any electricity consumption data or specific data items of electricity consumption data generally have corresponding historical data. For example, a daily electricity consumption data, its corresponding historical data can be the average daily electricity consumption of the previous 7 days, the daily electricity consumption on the same day last week, the daily electricity consumption on the same day of the Gregorian calendar last year, the daily electricity consumption on the same day of the lunar calendar last year, etc. The numerical range of the electricity consumption data can be further limited by using historical data. For example, the aforementioned daily electricity consumption can fluctuate within a certain threshold range above and below the average daily electricity consumption of the previous 7 days, and then by comparing the electricity consumption data with the historical data, the fluctuation range of the electricity consumption data can be determined, and then see whether the fluctuation is within the set threshold range. If not, it is considered that it needs to be corrected. In some embodiments, if the verification includes only one method, then an electricity consumption data only needs to meet the conditions corresponding to the method. If the verification includes multiple methods, then an electricity consumption data needs to meet the requirements of these methods at the same time to consider that the electricity consumption data has passed the verification. As long as one item does not meet the requirements, it is considered that the electricity consumption data needs to be corrected. For data that needs to be corrected, the corresponding terminals can be notified to perform targeted data re-acquisition, data checking, etc. After these terminals update the data, the data can be acquired or synchronized again.
[0068] In some embodiments, in order to ensure the integrity and rationality of the power consumption data, multiple verification methods can be combined. That is, in some embodiments, the data items included in the power consumption data are at least one data item; the data items included in the power consumption data and each specific data are verified to see whether they meet the set conditions, including: determining all necessary items that the power consumption data should include, determining whether the at least one data item includes all necessary items; in response to including all necessary items, determining the set range of any data item, determining whether the specific data corresponding to any data item is within the set range; in response to being within the set range, obtaining the historical data corresponding to any data item, determining the fluctuation range of any data item based on the historical data, and determining whether the fluctuation range is less than the set threshold; in response to the fluctuation range being less than the set threshold, determining that any data item has passed the verification.
[0069] In more specific scenarios, such as Figure 3 As shown, the integrity and rationality of the acquired data can be checked, among which the power integrity check counts the power consumption category, industry category, and voltage level of all the collected data, and monitors whether the data covers all the load data that needs to be covered. If an abnormality occurs, report to the data acquisition synchronization center (here, the data acquisition synchronization center is used to obtain power consumption data), and after the data is updated, synchronize the source data again. The power negative data check checks the obvious error problem of negative power, and returns the report to the data acquisition synchronization center, so that the data synchronization center synchronizes the source data again. The power fluctuation rationality check counts and displays the number of days when the ratio of the power of the day to the average power of the previous 7 days, the power of the same day last week, the power of the same day last year, and the power of the same day last year exceeds the threshold. Supports the function of customizing the reasonable range of the power ratio interval, and the data within the reasonable range is normal. If it is abnormal, report to the data acquisition synchronization center, so that the data synchronization center synchronizes the source data again.
[0070] Step 106 : in response to the electricity usage data passing the verification, abnormal data detection is performed on the electricity usage data according to a set rule table.
[0071] In this step, the electricity consumption data after verification can be further tested for abnormal data. The verification in the previous step is only for the integrity and rationality of a single data or data set, while here the rationality of the electricity consumption data in the continuous data is tested. It can be understood that the previous step is a verification of a "point" of the electricity consumption data, and here is the detection of the electricity consumption data in the "line". After that, there can be many forms of detection. First of all, the data itself can be tested, such as serious deviation from the mean, 0 step value, etc. Secondly, through the summary of abnormal data, it can be concluded that when the data curve shape of some electricity consumption data meets some requirements, or the electricity consumption data conforms to some logical rules, it is abnormal data. Finally, it is still possible to identify abnormal values by combining historical data for inductive comparison.
[0072] In some embodiments, for electricity consumption data that is identified as abnormal, similar to the verification, it can be directly fed back to the corresponding terminal, allowing the corresponding terminal to re-acquire or process the data, and re-synchronize the data after the data is updated. You can also trace the source of these abnormal electricity consumption data to determine where the abnormal electricity consumption data is caused by a problem. For example, if the daily electricity consumption data of a community is obtained, and the data of one resident is abnormal, then tracing can determine that there is a problem with the resident's electricity meter (that is, the specific collection equipment); and if the data of all residents in the community have problems in the same location, then it may be that the main station of the community has an abnormality. After completing the tracing, information feedback can be more targeted.
[0073] In some embodiments, in order to further carry out various checks on the rationality of fluctuations, rationality of deviations, rationality of proportions, etc. of electricity consumption data, the above multiple methods can be combined. That is, in some embodiments, the abnormal data detection of the electricity consumption data according to the set rule table includes: determining the actual change law of the electricity consumption data; performing abnormal detection on the actual change law according to the set rule table; in response to the electricity consumption data failing the abnormal data detection, tracing the electricity consumption data to determine the specific abnormal location. Among them, the actual change law of the electricity consumption data can be used in the multiple detection methods described in the aforementioned embodiments, and the actual change law can be used to detect the data itself, detect logical rules, detect based on historical data, and so on.
[0074] In more specific scenarios, such as Figure 4As shown, abnormal data identification can be performed for the verified electricity consumption data. First, data quality analysis can be performed. According to the results of data quality analysis, abnormal data can be automatically verified. Various verifications can be carried out on the rationality of fluctuation, deviation and proportion of power data. Comprehensive search and deep mining are carried out. It supports manual definition of reasonable interval thresholds and flexibly locates various abnormal data exceeding the interval according to multi-dimensional scenarios. In the abnormal data identification automation process, the following multiple associated abnormal identification technologies can be used to locate abnormal data to complete data quality analysis. First, it can be based on physical association and use general abnormal data identification technology to identify abnormal data such as null values, 0 step values, and serious deviations from the mean; secondly, it can be based on mode association, fully combining business experience to build a logical rule library and automatically mark it as abnormal; finally, it can be based on model association, refer to historical operation mode, and select the most similar model to identify abnormal values.
[0075] Afterwards, for the data that has been determined to be abnormal, the abnormal data can be located based on the abnormal data identification results. First, the object to which the abnormal data belongs, the user category, the meter category, etc. are analyzed, and then the cause of the abnormality is traced and summarized, including collection equipment abnormality, master station processing abnormality, file configuration error, file update abnormality, etc. Finally, when repairing, the corresponding terminal can be required to fit the actual power consumption according to the power usage habits, and full consideration should be given to different time scenarios such as weekdays, weekends, and holidays. In combination with the user's power usage behavior habits, differentiated abnormal data repair rules should be designed, and the repaired data should be re-checked for abnormal data to ensure the rationality of the repair results.
[0076] Step 108, in response to the power consumption data passing the detection, the power consumption data is input into a prediction model to perform power consumption prediction for a set time period to obtain prediction data.
[0077] In this step, the electricity consumption data that has been detected has considerable accuracy at this time, and the data at this time can be used to predict electricity consumption, so as to improve the accuracy of the predicted results. The prediction model here can be a more commonly used prediction model such as a long short-term memory model (LSTM) or a transformer model. These models can complete the prediction task by conducting targeted training on the model. The final result output by the prediction model is the prediction result of the electricity consumption prediction. The electricity consumption prediction here can be set for any time period, which can be determined mainly according to the model training situation. For example, if it is necessary to predict the electricity consumption of the day or the electricity consumption of the next week, etc., the corresponding training set can be set for training.
[0078] In some embodiments, in order to further ensure the accuracy of the prediction, the power consumption data can be input into different models respectively, and the data output by the models can be integrated to improve the accuracy. For example, the results of the long short-term memory model and the transformer model can be compared and integrated, and the integrated results can be used as the prediction data. The comparison and integration method can be, for example, the average value, the median value, etc. That is, in some embodiments, the prediction model includes a long short-term memory model and a transformer model; the power consumption data is input into the prediction model to predict the power consumption for a set time period to obtain the prediction data, including: inputting the power consumption data into the long short-term memory model and the transformer model respectively, so as to predict the power consumption by the long short-term memory model and the transformer model respectively; comparing and integrating the outputs of the long short-term memory model and the transformer model to obtain the prediction data.
[0079] In more specific scenarios, such as Figure 5 As shown in the figure, in the process of power forecasting, for multivariate time series forecasting problems, a centralized and suitable algorithm can be selected, and the algorithm expansion is also supported. At present, the long short-term memory network (LSTM) algorithm and multi-head attention mechanism can be mainly used to predict the data by machine learning. As an improved version of the recurrent neural network (RNN), the long short-term memory network (LSTM) solves the problem that important information is covered by the later input information in long time series training. The long short-term memory network manages the retention of important information by adding gated memory elements, which makes up for the shortcomings of RNN in long time series data training. Subsequently, in order to adapt to different data and improve the prediction accuracy, various derivative models were formed based on LSTM. The LSTM model is widely used in the field of time series prediction. The attention mechanism is a mechanism that assigns algorithm weights according to the importance and representativeness of the data. Among them, the mechanism that automatically generates parameters without supervision and artificial setting through the algorithm is the self-attention mechanism. The self-attention mechanism strengthens the ability of the long time series network to save important data by learning and assigning weights, further enhances the prediction ability of long time series, and provides a solution to the problem of information loss in long time series training. The transformer algorithm has also been added. It is an algorithm that repeatedly increases accuracy and gradually enhances the structure of encoders and decoders, and performs well in training large data sets.
[0080] In addition, in some embodiments, for the electricity consumption data that has been classified and labeled in the above embodiments, when predicting electricity consumption, the weights of the corresponding data or model parameters can be adjusted according to the specific classification and label, so as to further improve the accuracy of the prediction. That is, in some embodiments, inputting the electricity consumption data into the prediction model includes: adjusting the weights of each specific data in the electricity consumption data in the prediction model according to the specific classification and corresponding label of the electricity consumption data.
[0081] Step 110: output the predicted data.
[0082] In this step, the predicted data may be output, for example, it may be displayed on a corresponding device to give the operator corresponding feedback. Of course, in other embodiments, the output method of the predicted data may not be limited to output display, and it may also be used to store, display, use or reprocess the predicted data. According to different application scenarios and implementation needs, the specific output method of the predicted data can be flexibly selected.
[0083] Specifically, for example, in an application scenario where the method of this embodiment is executed on a single device, the prediction data can be directly output in a displayed manner on the display component (display, projector, etc.) of the current device, so that the operator of the current device can directly see the content of the prediction data from the display component.
[0084] For another example, in an application scenario where the method of this embodiment is executed on a system composed of multiple devices, the prediction data can be sent to other preset devices as receivers in the system, that is, synchronization terminals, through any data communication method (wired connection, NFC, Bluetooth, wifi, cellular mobile network, etc.), so that the synchronization terminal can perform subsequent processing on it. Optionally, the synchronization terminal can be a preset server, which is generally set up in the cloud as a data processing and storage center, which can store and distribute the prediction data; wherein the recipient of the distribution is the terminal device, and the holder or operator of these terminal devices can be power grid managers, supervisors, maintenance and sales personnel, etc.
[0085] For another example, in an application scenario where the method of this embodiment is executed on a system composed of multiple devices, the prediction data can be sent directly to a preset terminal device through any data communication method, and the terminal device can be one or more of the ones listed in the preceding paragraphs.
[0086] In some more specific scenarios, the corresponding display tools can be used to display the forecast data in columns according to user categories, industry categories, etc. The overlapping data are re-estimated.
[0087] Furthermore, the forecast data can be further analyzed. For example, after the forecast data is obtained, the corresponding actual data can be obtained after the actual electricity consumption occurs. At this time, the accuracy of the forecast data can be determined by using the difference between the two and other analysis methods, and then the accuracy is fed back to the forecast model to adjust the corresponding parameters or weights of the forecast model. That is, in some embodiments, after the forecast data is output, the method also includes: obtaining the actual data corresponding to the forecast data; performing accuracy analysis based on the actual data and the forecast data, and adjusting the forecast model based on the analysis results. More specifically, in some scenarios, the data can be analyzed by the corresponding data evaluation and analysis method to achieve the evaluation of the daily load forecast effect of the proxy power purchase index, and support chart display. It can include a curve display of the forecast value, actual value, and accuracy of the daily load curve for multiple consecutive days, and the above-mentioned related data can be displayed at the same time.
[0088] Later, in more specific scenarios, such as Figure 6 The figure shows the process of predicting electricity consumption in a specific scenario. In the specific scenario, according to the actual needs of power purchasing agents and the problems that need to be solved by current power purchasing agents, data collection and data verification can be optimized, and as many data that affect power prediction as possible can be accessed, and data changes can be updated and optimized in a timely manner. According to the data evaluation and analysis tools, the parameters of various data can be adjusted to achieve more accurate power data prediction.
[0089] like Figures 2 to 6 As shown in the figure, the data acquisition module is used to obtain data from the collection system and the power marketing system, and the user change manager is used to re-label and re-adjust the parameters of customer data with meter replacement, rate change, capacity reduction, suspension, capacity increase, and account cancellation. The special user management database compares high-energy-consuming users and enterprise users with coal-fired self-contained power plants through the data synchronization center, and screens out high-energy-consuming users and users with coal-fired self-contained power plants, and specially marks and monitors them. The agent power purchase user archive database obtains data from the data synchronization center on a daily basis and generates user archives. Meteorological and economic databases are obtained through the data management center and participate in the optimization of the prediction model as parameters. The large customer power monitoring system synchronizes the power monitoring of large power users through the data synchronization center, and synchronizes data for the main factors affecting daily, weekly, and monthly power forecasts, such as production plan adjustment, maintenance, production increase and expansion, and production reduction of large customers.
[0090] Data verification is to verify and compare the data integrity of two data sources, whether there is any asynchrony between archive and collected data, synchronize the deviated data with archive data, and remind the corresponding terminals to make corrections immediately.
[0091] The data collected through the data acquisition module after classification, screening and data verification covers as many factors as possible that affect the accuracy of power forecasting. However, since the data is collected from millions of users and meters, due to the limitations of equipment and communication technology, some data will inevitably be missing or erroneous. These synchronization data problems will affect the accuracy of power forecasting data. Therefore, through data anomaly detection, an identification rule manager is established to identify problematic data in the data. After that, the problematic data can be classified, and similar to the verification, the reasons for missing data for different reasons can be traced in different ways, and immediate notification can be made to make corrections.
[0092] Through the power forecasting module, transformer, regression analysis and other algorithms are used to predict the daily power consumption based on T-2 data.
[0093] Afterwards, the prediction results are analyzed and displayed by categories, and different user types are displayed by categories.
[0094] Finally, data evaluation and analysis can be performed, and the daily load forecast effect evaluation of the proxy power purchase index can be supported. It supports chart display. It includes the curve display of the predicted value, actual value, and accuracy of the daily load curve for multiple consecutive days, and can also display the above-mentioned related data. The accuracy rate is analyzed, and the parameters of data verification and power forecast are maintained to make the forecast value more accurate.
[0095] It can be seen from the above embodiments that the embodiments of the present application provide a method for predicting power consumption, which includes: obtaining power consumption data; checking whether the data items and each specific data contained in the power consumption data meet the set conditions; in response to the power consumption data passing the check, performing abnormal data detection on the power consumption data according to the set rule table; in response to the power consumption data passing the detection, inputting the power consumption data into the prediction model, performing power consumption prediction for a set time period, and obtaining prediction data; and outputting the prediction data. The present application performs multiple checks, abnormal data detection and other processing on the power consumption data before predicting power consumption, detects whether there are abnormalities in the power consumption data from multiple angles, and finds problems in time. For problematic power consumption data, the corresponding terminal can be notified immediately to make adjustments and corrections. Only when the power consumption data passes the above multiple tests will it be used for power consumption prediction, thereby ensuring the accuracy of the input data during power consumption prediction, improving data quality, and ultimately improving the accuracy of power consumption prediction and user experience.
[0096] More specifically, the method provided in the embodiment of the present application collects various types of data through the data middle station, and performs data identification, correction, and data verification to build a comprehensive data foundation; monitors and analyzes the electricity consumption of key large customers, and monitors the electricity consumption of each category at the same time to improve the ability to perceive the change of electricity consumption. The data prediction layer focuses on solving the difficulties in purchasing electricity prediction, building an accurate prediction model, and providing multi-object and multi-time dimension electricity prices and proxy purchase electricity predictions. Comprehensive prediction, error analysis, linkage verification, and continuous improvement of the prediction model form a closed-loop management of the prediction process. Through the refined real-time dynamic management of user data and electricity consumption data based on proxy purchase electricity. And identify, correct and verify this data. Afterwards, this method can use multi-dimensional monitoring method electricity consumption data, conduct special data monitoring on large customers who especially cause changes in the prediction model, and timely obtain the main factors affecting daily, weekly, and monthly electricity predictions such as production plan adjustment, maintenance, increased production, and reduced production of large customers through the interface, and correct the prediction data of the day. In addition, compared with other prediction models, this method provides a more accurate data model and more dimensional data display.
[0097] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of the embodiment of the present application can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0098] It should be noted that the above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0099] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a power consumption prediction device.
[0100] refer to Figure 7 , the power consumption prediction device comprises:
[0101] The first module 710 is used to obtain power consumption data.
[0102] The second module 720 is used to check whether the data items included in the power consumption data and each specific data meet the set conditions.
[0103] The third module 730 is configured to perform abnormal data detection on the power usage data according to a set rule table in response to the power usage data passing the verification.
[0104] The fourth module 740 is used for inputting the power consumption data into a prediction model in response to the power consumption data passing the detection, and performing power consumption prediction for a set time period to obtain prediction data.
[0105] The fifth module 750 is used to output the prediction data.
[0106] In some exemplary embodiments, the first module 710 is further configured to:
[0107] Acquire at least one piece of initial data, and compare and integrate the at least one piece of initial data;
[0108] The compared and integrated initial data are classified, and a label is set for each compared and integrated initial data according to a set rule, so as to generate the electricity consumption data.
[0109] In some exemplary embodiments, the fourth module 740 is further configured to:
[0110] According to the specific classification of the electricity usage data and the corresponding labels, the weights of each specific data in the electricity usage data in the prediction model are adjusted.
[0111] In some exemplary embodiments, the data item included in the power usage data is at least one data item;
[0112] The second module 720 is further used for:
[0113] Determining all necessary items that the electricity usage data should include, and determining whether the at least one data item includes all necessary items;
[0114] In response to including all the necessary items, determining a set range of any data item, and determining whether specific data corresponding to any data item is within the set range;
[0115] In response to being within the set range, obtaining historical data corresponding to any one of the data items, determining a fluctuation range of any one of the data items according to the historical data, and determining whether the fluctuation range is less than a set threshold;
[0116] In response to the fluctuation amplitude being smaller than a set threshold, it is determined that any one of the data items passes the verification.
[0117] In some exemplary embodiments, the third module 730 is further configured to:
[0118] Determining actual variation patterns of the electricity consumption data;
[0119] Performing anomaly detection on the actual change rule according to the set rule table;
[0120] In response to the power usage data failing the abnormal data detection, tracing the power usage data to determine a specific abnormal location.
[0121] In some exemplary embodiments, the prediction model includes a long short-term memory model and a transformer model;
[0122] The fourth module 740 is further used for:
[0123] Inputting the power consumption data into the long short-term memory model and the transformer model respectively, so as to perform the power consumption prediction by the long short-term memory model and the transformer model respectively;
[0124] The outputs of the long short-term memory model and the transformer model are compared and integrated to obtain the predicted data.
[0125] In some exemplary embodiments, the fifth module 750 is further configured to:
[0126] Acquiring actual data corresponding to the predicted data;
[0127] An accuracy analysis is performed based on the actual data and the predicted data, and the prediction model is adjusted based on the analysis results.
[0128] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0129] The device of the above embodiment is used to implement the corresponding power consumption prediction method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0130] Based on the same concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the power consumption prediction method as described in any of the above embodiments is implemented.
[0131] Figure 8A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0132] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0133] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0134] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0135] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0136] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0137] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0138] The electronic device of the above embodiment is used to implement the corresponding power consumption prediction method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0139] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the power consumption prediction method described in any of the above embodiments.
[0140] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0141] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the power consumption prediction method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0142] Based on the same concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer so that the computer and / or the processor execute the power consumption prediction method. Corresponding to the execution subject corresponding to each step in each embodiment of the power consumption prediction method, the processor that executes the corresponding step may belong to the corresponding execution subject.
[0143] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the power consumption prediction method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0144] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0145] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0146] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0147] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for predicting power consumption, characterized in that: include: Obtain electricity consumption data; Checking whether the data items included in the electricity consumption data and each specific data item meet the set conditions; In response to the power usage data passing the verification, performing abnormal data detection on the power usage data according to a set rule table; In response to the power consumption data passing the detection, the power consumption data is input into a prediction model to perform power consumption prediction for a set time period to obtain prediction data; The predicted data is output.
2. The method according to claim 1, characterized in that The obtaining of electricity consumption data comprises: Acquire at least one piece of initial data, and compare and integrate the at least one piece of initial data; The compared and integrated initial data are classified, and a label is set for each compared and integrated initial data according to a set rule, so as to generate the electricity consumption data.
3. The method according to claim 2, characterized in that The step of inputting the electricity consumption data into a prediction model comprises: According to the specific classification of the electricity usage data and the corresponding labels, the weights of each specific data in the electricity usage data in the prediction model are adjusted.
4. The method according to claim 1, characterized in that: The data item included in the electricity consumption data is at least one data item; The checking of the data items included in the power consumption data and whether each specific data item meets the set conditions includes: Determining all necessary items that the electricity usage data should include, and determining whether the at least one data item includes all necessary items; In response to including all the necessary items, determining a set range of any data item, and determining whether specific data corresponding to any data item is within the set range; In response to being within the set range, obtaining historical data corresponding to any one of the data items, determining a fluctuation range of any one of the data items according to the historical data, and determining whether the fluctuation range is less than a set threshold; In response to the fluctuation amplitude being smaller than a set threshold, it is determined that any one of the data items passes the verification.
5. The method according to claim 1, characterized in that The performing abnormal data detection on the power consumption data according to the set rule table includes: Determining an actual change pattern of the electricity consumption data; Performing anomaly detection on the actual change rule according to the set rule table; In response to the power usage data failing the abnormal data detection, the power usage data is traced to determine a specific abnormal location.
6. The method according to claim 1, characterized in that The prediction model includes a long short-term memory model and a transformer model; The step of inputting the power consumption data into a prediction model to predict power consumption in a set time period to obtain prediction data includes: Inputting the power consumption data into the long short-term memory model and the transformer model respectively, so as to perform the power consumption prediction by the long short-term memory model and the transformer model respectively; The outputs of the long short-term memory model and the transformer model are compared and integrated to obtain the predicted data.
7. The method according to claim 1, characterized in that After outputting the prediction data, the method further includes: Acquire actual data corresponding to the predicted data; An accuracy analysis is performed based on the actual data and the predicted data, and the prediction model is adjusted based on the analysis results.
8. A power consumption prediction device, characterized in that: include: The first module is used to obtain electricity consumption data; The second module is used to check whether the data items included in the power consumption data and each specific data meet the set conditions; A third module is used for performing abnormal data detection on the power consumption data according to a set rule table in response to the power consumption data passing the verification; A fourth module is used for inputting the power consumption data into a prediction model in response to the power consumption data passing the detection, and performing power consumption prediction for a set time period to obtain prediction data; The fifth module is used to output the prediction data.
9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to implement the method according to any one of claims 1 to 7.