A method, device, equipment and storage medium for predicting power demand load

By extracting the characteristics of the power demand load and using attention mechanism for data fusion, the problem that traditional methods cannot accurately predict the power demand load is solved, and higher prediction accuracy is achieved.

CN118841952BActive Publication Date: 2025-02-21CHAOYANG POWER SUPPLY COMPANY OF STATE GRID LIAONING ELECTRIC POWER SUPPLY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410841614.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2025-02-21
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

Traditional power demand load prediction methods cannot accurately capture the nonlinear dynamic behavior of the power system, and cannot fully consider the complex relationship between real-time data changes and various factors, resulting in insufficient prediction accuracy.

Method used

Using a power demand load prediction method, by collecting and processing power data, using one-dimensional convolution group and LSTM to extract features, calculate the mean square variance, and fuse the features through attention mechanism, and finally through the fully connected layer and linear regression layer. predict.

Benefits of technology

The ability to process nonlinear data is improved, and data analysis is analyzed in time scales, which significantly improves the accuracy of power consumption prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118841952B_ABST
    Figure CN118841952B_ABST
Patent Text Reader

Abstract

The present application proposes a method, device, equipment and storage medium for predicting power demand load. The method obtains one-dimensional input data by collecting power data and performing interpolation, normalization and encoding. Grouping is performed according to preset time intervals, and first-order features are extracted using a one-dimensional convolution group, and second-order features are extracted using LSTM. By calculating the mean square error of the first-order features, the parameter weights are optimized in combination with the attention mechanism, and the features are fused to obtain the prediction features. Finally, the prediction features are processed by the fully connected layer and the linear regression layer to obtain the predicted value of power consumption. This method introduces artificial intelligence and multi-scale fast and slow mechanisms, enhances the nonlinear data processing capabilities, and improves the prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power grid load forecasting, and in particular to a method, device, equipment and storage medium for forecasting power demand load. Background Art

[0002] Accurate demand load forecasting helps optimize the operating cost of the power system. At the same time, accurate forecasting of demand load also provides users with reasonable electricity usage suggestions, which helps save energy and reduce costs. In addition, forecasting can also guide equipment maintenance plans to minimize downtime and repair costs.

[0003] Traditional power demand load forecasting methods usually use statistical models, time series analysis and traditional machine learning algorithms. These methods mainly rely on historical data and manually extracted features, and their prediction performance is limited by the quality of model assumptions and feature engineering. At the same time, traditional methods usually require a lot of manual intervention and adjustment, and have limitations in dealing with nonlinearity, high dynamics and data incompleteness in power systems.

[0004] Due to the complex nonlinear relationships and time-varying characteristics of the power system, traditional methods are often unable to accurately capture and model the dynamic behavior of the system, resulting in limited accuracy of the prediction results.

[0005] In addition, the operating status of the power system and external environmental factors may change at any time. Factors such as weather, season, and electricity consumption habits will affect power demand. However, traditional methods often rely only on historical data and simple features, and fail to fully consider the changes in real-time data and the complex correlation between various factors, resulting in insufficient prediction accuracy. Summary of the invention

[0006] The purpose of this application is to overcome the problems existing in the above-mentioned prior art and to provide a method, device, equipment and storage medium for predicting power demand load.

[0007] The present application provides a method for predicting power demand load, comprising:

[0008] Collecting power data of the day to be predicted, interpolating, normalizing, and one-hot encoding the power data to obtain one-dimensional input data;

[0009] Dividing the one-dimensional input data into multiple groups according to multiple preset time intervals, and respectively using a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data;

[0010] Using LSTM to extract the second-order features of the first-order features;

[0011] Calculating a first mean square error between data of the same time interval and a second mean square error between data of different time intervals of the second-order feature;

[0012] Based on the first mean square error and the second mean square error, a parameter weight obtained by minimizing the first mean square error and maximizing the second mean square error through an attention mechanism, and fusing the second-order features to obtain a prediction feature;

[0013] The predicted features are processed through a fully connected layer and a linear regression layer to obtain a predicted power consumption value.

[0014] Optionally, the power data includes: daily and hourly power consumption data, date type, and weather type parameters;

[0015] The weather type parameters include: temperature, air pressure, wind speed, wind direction and weather type.

[0016] Optionally, the power data is interpolated, normalized, and one-hot encoded, wherein the interpolation includes:

[0017] Autoregressive interpolation is used to fill in the default values ​​in the electricity consumption data.

[0018] Optionally, the power data is interpolated, normalized, and one-hot encoded, wherein the normalization includes:

[0019] The continuous value data in the power data is normalized so that its value range is between 0 and 1.

[0020] Optionally, the power data is interpolated, normalized, and one-hot encoded, wherein the one-hot encoding includes:

[0021] One-hot encoding is performed on the discrete values ​​in the power data.

[0022] Optionally, the multiple preset time intervals include: 1 hour, 3 hours, and 5 hours.

[0023] The present application also provides a power demand load prediction device, comprising:

[0024] A collection module, used for collecting power data of the day to be predicted, interpolating, normalizing and one-hot encoding the power data to obtain one-dimensional input data;

[0025] A first feature module, used to divide the one-dimensional input data into multiple groups according to multiple preset time intervals, and respectively use a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data;

[0026] A second feature module is used to extract the second-order features of the first-order features by using LSTM;

[0027] A mean square error module, used to calculate a first mean square error between data of the same time interval and a second mean square error between data of different time intervals of the second-order feature;

[0028] An attention mechanism module is used to obtain a prediction feature by fusing the second-order features based on the first mean square error and the second mean square error by minimizing the first mean square error and maximizing the second mean square error through an attention mechanism;

[0029] The output module is used to process the prediction features through a fully connected layer and a linear regression layer to obtain a predicted power consumption value.

[0030] Optionally, the acquisition module collects the power data in real time.

[0031] The present application also provides a power demand load prediction device, comprising:

[0032] A memory for storing a computer executable program of the above-mentioned method for predicting power demand load;

[0033] The processor is used to call the computer executable program and execute: collecting power data of a day to be predicted, interpolating, normalizing and one-hot encoding the power data to obtain one-dimensional input data; dividing the one-dimensional input data into multiple groups according to multiple preset time intervals, and respectively using a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data; using LSTM to extract the second-order features of the first-order features; calculating the first mean square error between the data of the same time interval and the second mean square error between the data of different time intervals of the second-order features; based on the first mean square error and the second mean square error, minimizing the first mean square error and maximizing the second mean square error through an attention mechanism to obtain parameter weights, fusing the second-order features to obtain prediction features; processing the prediction features through a fully connected layer and a linear regression layer to obtain a predicted power consumption value.

[0034] The present application also provides a storage medium storing a computer executable program, wherein the computer executable program is used to be called by a processor to execute the steps of the above-mentioned power demand load prediction method.

[0035] The beneficial effects of this application are:

[0036] The present application provides a method for predicting power demand load, including: collecting power data of the day to be predicted, interpolating, normalizing and one-hot encoding the power data to obtain one-dimensional input data; dividing the one-dimensional input data into multiple groups according to multiple preset time intervals, respectively using a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data; using LSTM to extract the second-order features of the first-order features; calculating the first mean square error between the data of the same time interval and the second mean square error between the data of different time intervals of the second-order features; based on the first mean square error and the second mean square error, the parameter weights obtained by minimizing the first mean square error and maximizing the second mean square error through the attention mechanism, and fusing the second-order features to obtain prediction features; processing the prediction features through a fully connected layer and a linear regression layer to obtain a predicted power consumption value. The present application improves the ability to process nonlinear data by introducing artificial intelligence technology and a multi-scale fast and slow mechanism, and combines the time scale to analyze the data, which can improve the accuracy of power consumption prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of the power demand load prediction process in this application;

[0038] Figure 2 It is a logical diagram of power demand load prediction in this application;

[0039] Figure 3 is a schematic diagram of the attention module structure in this application;

[0040] Figure 4 It is a schematic diagram of the power demand load prediction device in this application. DETAILED DESCRIPTION

[0041] The present application is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present application and implement it.

[0042] The following contents are all examples of specific implementation processes provided for describing in detail the technical solutions to be protected by this application. However, this application is also implemented in other ways different from the descriptions herein. Under the guidance of the concept of this application, those skilled in the art may implement this application using different technical means. Therefore, this application is not limited to the specific embodiments below.

[0043] Please refer to Figure 1 and Figure 2 As shown, the present application provides a method for predicting power demand load, and its specific steps include:

[0044] S101. Collect power data of a day to be predicted, and perform interpolation, normalization, and one-hot encoding on the power data to obtain one-dimensional input data.

[0045] The electricity data described in this application include: daily and hourly electricity consumption data of the enterprise, the date type of the day, and related weather type parameters, such as temperature, air pressure, wind speed, wind direction and weather type.

[0046] When processing the power data, the autoregressive interpolation method is first used to supplement the default values ​​in the enterprise's daily power consumption data.

[0047] The autoregressive interpolation method uses the Lagrange interpolation method to complete the default value of the enterprise's daily electricity consumption. The expression of the Lagrange interpolation is shown in the following formula:

[0048]

[0049]

[0050] in Indicates the n+1 time periods around the default value and the corresponding power usage.

[0051] Then the continuous value data such as temperature, air pressure, wind speed, etc. are normalized according to the following formula:

[0052]

[0053] in, represents the original data that has not been normalized. Represents the minimum value in the original data, Represents the maximum value in the original data. Represents normalized data, whose value range is between 0 and 1.

[0054] Finally, the discrete values ​​of the weather type are one-hot encoded.

[0055] S102: Divide the one-dimensional input data into multiple groups according to multiple preset time intervals, and respectively use a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data.

[0056] Please refer to Figure 3 As shown, the weather parameters and power consumption in the power data are stacked into a one-dimensional vector as model input.

[0057] Use one-dimensional convolution to group vectors Extract features and get vector , that is, the first-order feature.

[0058] In this application, the data is divided into three groups according to the time intervals of 1 hour, 3 hours, and 5 hours, and three one-dimensional convolution groups with different structures are used to extract information from the three groups of data. The expressions are as follows:

[0059]

[0060]

[0061] in, Represents the data at time interval i. Indicates for The one-dimensional convolution group used.

[0062] S103: Use LSTM to extract second-order features of the first-order features.

[0063] Please continue to refer to Figure 3 As shown, LSTM is used to extract the second-order features of the first-order features, and the expression is as follows:

[0064]

[0065] in, represents the data with time interval i, Indicates for The LSTM network used.

[0066] S104: Calculate a first mean square error between data of the second-order features at the same time interval and a second mean square error between data of the second-order features at different time intervals.

[0067] The same time interval data refers to data collected in the same time period. For example, the power consumption data collected from 8 to 9 a.m. every day belongs to the same time interval data.

[0068] The different time interval data refers to data collected in different time periods. For example, comparing the data from 8 to 9 in the morning with the data from 2 to 3 in the afternoon, these data belong to different time interval data.

[0069] The mean square error between data in the same time interval is calculated. The goal is to make this mean square error as small as possible, which means that the predicted value of the model in the same time interval is closer to the actual value.

[0070] The mean square error between data at different time intervals is calculated, with the goal of making the mean square error as large as possible so that the model can better distinguish data at different time intervals and thus more accurately capture the pattern of changes in electricity consumption.

[0071] S105. Based on the first mean square error and the second mean square error, minimize the first mean square error and maximize the second mean square error through an attention mechanism to obtain parameter weights, and fuse the second-order features to obtain prediction features.

[0072] Please refer to Figure 4 As shown, in this application, the attention mechanism is used for data fusion, and by adjusting the mean square error between data of the same time interval and different time intervals, the model can learn a more robust feature representation. Through the attention mechanism, the model can extract more robust power consumption features, which not only include the continuity of power consumption in time, but also reflect the regularity and pattern of its changes. Therefore, when using these features for power consumption prediction, higher prediction accuracy can be obtained.

[0073] This application uses the attention mechanism to convert the second-order data ( ) to perform data fusion, by minimizing the mean square error between data in the same time interval and maximizing the mean square error between data in different time intervals, so that Similar, different time intervals Not similar.

[0074] For example, As , the features of the same time interval As .Will As , and then use the output Calculate the mean square error, which is as small as possible.

[0075] In addition, As , the features of different time intervals As .Will As , and then use the output Compute the mean square error, which is as large as possible.

[0076] The above process expression is as follows:

[0077]

[0078]

[0079]

[0080] S106: Process the prediction features through a fully connected layer and a linear regression layer to obtain a predicted power consumption value.

[0081] Use the fully connected layer and the linear regression layer to get the final output , represents the predicted power consumption value.

[0082]

[0083]

[0084] It should be noted that when the network model is trained, after the above steps, the mean square error is calculated :According to the Determines how much to optimize the model parameters.

[0085]

[0086] in is the predicted daily electricity consumption, is the actual power consumption, and n is the batch size.

[0087] The present application also provides a power demand load prediction device, comprising:

[0088] A collection module, used for collecting power data of the day to be predicted, interpolating, normalizing and one-hot encoding the power data to obtain one-dimensional input data;

[0089] A first feature module, used to divide the one-dimensional input data into multiple groups according to multiple preset time intervals, and respectively use a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data;

[0090] A second feature module is used to extract the second-order features of the first-order features by using LSTM;

[0091] A mean square error module, used to calculate a first mean square error between data of the same time interval and a second mean square error between data of different time intervals of the second-order feature;

[0092] An attention mechanism module is used to obtain a prediction feature by fusing the second-order features based on the first mean square error and the second mean square error by minimizing the first mean square error and maximizing the second mean square error through an attention mechanism;

[0093] The output module is used to process the prediction features through a fully connected layer and a linear regression layer to obtain a predicted power consumption value.

[0094] Furthermore, the acquisition module collects the power data in real time.

[0095] The present application also provides a power demand load prediction device, comprising:

[0096] A memory for storing a computer executable program of the above-mentioned method for predicting power demand load;

[0097] The processor is used to call the computer executable program and execute: collecting power data of a day to be predicted, interpolating, normalizing and one-hot encoding the power data to obtain one-dimensional input data; dividing the one-dimensional input data into multiple groups according to multiple preset time intervals, and respectively using a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data; using LSTM to extract the second-order features of the first-order features; calculating the first mean square error between the data of the same time interval and the second mean square error between the data of different time intervals of the second-order features; based on the first mean square error and the second mean square error, minimizing the first mean square error and maximizing the second mean square error through an attention mechanism to obtain parameter weights, fusing the second-order features to obtain prediction features; processing the prediction features through a fully connected layer and a linear regression layer to obtain a predicted power consumption value.

[0098] The present application also provides a storage medium storing a computer executable program, wherein the computer executable program is used to be called by a processor to execute the steps of the above-mentioned power demand load prediction method.

Claims

1. A method for predicting power demand load, characterized in that: include: Collecting power data of the day to be predicted, interpolating, normalizing, and one-hot encoding the power data to obtain one-dimensional input data; Dividing the one-dimensional input data into multiple groups according to multiple preset time intervals, and respectively using a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data; Using LSTM to extract the second-order features of the first-order features; Calculating a first mean square error between data of the same time interval and a second mean square error between data of different time intervals of the second-order feature; Based on the first mean square error and the second mean square error, a parameter weight obtained by minimizing the first mean square error and maximizing the second mean square error through an attention mechanism, and fusing the second-order features to obtain a prediction feature; The predicted features are processed through a fully connected layer and a linear regression layer to obtain a predicted power consumption value.

2. The method for predicting power demand load according to claim 1, characterized in that: The power data includes: daily and hourly power consumption data, date type, and weather type parameters; The weather type parameters include: temperature, air pressure, wind speed, wind direction and weather type.

3. The method for predicting power demand load according to claim 1, characterized in that: The power data is interpolated, normalized, and one-hot encoded, wherein the interpolation includes: Autoregressive interpolation is used to fill in the default values ​​in the electricity consumption data.

4. The method for predicting power demand load according to claim 1, characterized in that: The power data is interpolated, normalized, and one-hot encoded, wherein the normalization includes: The continuous value data in the power data is normalized so that its value range is between 0 and 1.

5. The method for predicting power demand load according to claim 1, characterized in that: The power data is interpolated, normalized, and one-hot encoded, wherein the one-hot encoding includes: One-hot encoding is performed on the discrete values ​​in the power data.

6. The method for predicting power demand load according to claim 1, characterized in that: The multiple preset time intervals include: 1 hour, 3 hours, and 5 hours.

7. A power demand load prediction device, characterized in that: include: A collection module, used for collecting power data of the day to be predicted, interpolating, normalizing and one-hot encoding the power data to obtain one-dimensional input data; A first feature module, used to divide the one-dimensional input data into multiple groups according to multiple preset time intervals, and respectively use a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data; A second feature module is used to extract the second-order features of the first-order features by using LSTM; A mean square error module, used to calculate a first mean square error between data of the same time interval and a second mean square error between data of different time intervals of the second-order feature; An attention mechanism module is used to obtain a prediction feature by fusing the second-order features based on the first mean square error and the second mean square error by minimizing the first mean square error and maximizing the second mean square error through an attention mechanism; The output module is used to process the prediction features through a fully connected layer and a linear regression layer to obtain a predicted power consumption value.

8. The power demand load prediction device according to claim 7, characterized in that: The acquisition module collects the power data in real time.

9. A power demand load prediction device, characterized in that: include: A memory for storing a computer executable program of a method for predicting power demand load according to any one of claims 1 to 6; The processor is used to call the computer executable program to execute: collecting power data of the day to be predicted, interpolating, normalizing and one-hot encoding the power data to obtain one-dimensional input data; Divide the one-dimensional input data into multiple groups according to multiple preset time intervals, respectively use a one-dimensional convolution group with a preset structure to extract the first-order features of each group of the one-dimensional input data; use LSTM to extract the second-order features of the first-order features; Calculating a first mean square error between data of the same time interval and a second mean square error between data of different time intervals of the second-order features; based on the first mean square error and the second mean square error, minimizing the first mean square error and maximizing the second mean square error through an attention mechanism to obtain parameter weights, and fusing the second-order features to obtain prediction features; The predicted features are processed through a fully connected layer and a linear regression layer to obtain a predicted power consumption value.

10. A storage medium, characterized in that: A computer executable program is stored, and the computer executable program is used to be called by a processor to execute the steps of a power demand load prediction method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Power system short-term load prediction method, system and device and medium

    CN112215442A

  • Multi-factor power demand medium and short term prediction method based on multi-model fusion

    CN115130741A