Power load prediction method and system based on load-temperature correlation
By calculating the correlation values between power load and temperature data and extracting the correlation features between power load and temperature using a multidimensional convolutional attention module, the problem of insufficient power load prediction accuracy in existing technologies is solved, and higher accuracy power load prediction is achieved.
Patent Information
- Application Number
- CN202410603978.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-11-18
AI Technical Summary
Existing power load forecasting models fail to fully consider the dynamic correlation between factors such as temperature and power load, resulting in insufficient forecast accuracy. Furthermore, recurrent neural networks struggle to extract sufficient time-series features.
By calculating the correlation value between power load and temperature data as prior knowledge, and combining it with a multidimensional convolutional attention module to extract the correlation features between power load and temperature, and using a multi-view convolutional module to enhance the feature extraction capability, a power load prediction system based on load-temperature correlation is constructed.
It significantly reduces power load forecasting errors, improves forecast accuracy and precision, and enhances the model's flexibility and adaptability when dealing with complex data.
Smart Images

Figure CN120978700A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of power load prediction, and particularly relates to a power load prediction method and system based on load-temperature correlation. BACKGROUND
[0002] Power load prediction can help power companies optimize resource allocation and plan power generation capacity. Accurate power load prediction helps ensure sufficient power supply during peak periods, while reducing waste of excess resources during low load periods, and also helps power companies save costs. Adjusting power generation plans and resource allocation according to predicted load can reduce costs and improve efficiency. Accurate prediction of power load can ensure that users have stable and reliable power supply, which is of great significance to industrial, commercial and individual users.
[0003] Although the development of deep learning provides many solutions for power load prediction, some existing models still have major defects in actual prediction, specifically facing the following problems:
[0004] (1) The change of power is affected by many factors, and most existing inventions only use single power load data, making it difficult to improve the accuracy of power load prediction. Although some existing technologies consider the influence of temperature, economy and other factors, they do not fully consider the dynamic correlation changes between these influencing factors and power load.
[0005] (2) Power load data and other influencing factors data are all time series data. Currently, some models based on recurrent neural networks are used to predict time series data, but such models are difficult to extract more sufficient and effective information from the data, and lack a feature extraction module with strong feature extraction capability.
[0006] (3) Among various other data that affect power load changes, power load changes are closely related to other data, and they are always in a dynamic change process. Most existing inventions do not consider the dynamic correlation changes between the two, making it difficult to extract features from other influencing factor data. SUMMARY
[0007] To overcome the shortcomings of the prior art, the present application provides a power load prediction method and system based on load-temperature correlation, which considers power load data and temperature data at corresponding time, calculates the correlation between the two, uses the correlation value as prior knowledge to guide the network to extract correlation features, and combines a multi-dimensional convolution attention module to obtain a double-weighted feature map, extract time series features and deeper correlation features, and significantly reduce the prediction error of predicted power load.
[0008] To achieve the above object, one or more embodiments of the present application provide the following technical solutions:
[0009] The present application provides a power load prediction method based on load-temperature correlation.
[0010] The power load prediction method based on load-temperature correlation comprises the following steps:
[0011] Obtain power load historical data and temperature historical data corresponding to the time of the power load historical data;
[0012] Input the power load historical data and the temperature historical data corresponding to the time of the power load historical data into a decoder module to calculate the correlation value of the two, and input the power load historical data, the temperature historical data corresponding to the time of the power load historical data, and the correlation value of the two as a feature matrix into a multi-dimensional convolution attention module to extract features through a channel attention module and a spatial attention module respectively to obtain the correlation features of the power load historical data and the temperature historical data;
[0013] Input the power load historical data into an encoder module to extract the time sequence features of the power load historical data, splice the obtained time sequence features and correlation features to obtain spliced features, and obtain the power load prediction result of the future time based on the spliced features.
[0014] The present application provides a power load prediction system based on load-temperature correlation.
[0015] The power load prediction system based on load-temperature correlation comprises:
[0016] The data acquisition module is configured to obtain power load historical data and temperature historical data corresponding to the time of the power load historical data;
[0017] The correlation feature extraction module is configured to input the power load historical data and the temperature historical data corresponding to the time of the power load historical data into a decoder module to calculate the correlation value of the two, and input the power load historical data, the temperature historical data corresponding to the time of the power load historical data, and the correlation value of the two as a feature matrix into a multi-dimensional convolution attention module to extract features through a channel attention module and a spatial attention module respectively to obtain the correlation features of the power load historical data and the temperature historical data;
[0018] The feature merging and prediction module is configured to input the power load historical data into an encoder module to extract the time sequence features of the power load historical data, splice the obtained time sequence features and correlation features to obtain spliced features, and obtain the power load prediction result of the future time based on the spliced features.
[0019] The third aspect of the present application provides a computer readable storage medium, which stores a program, and the program is executed by a processor to implement the steps in the power load prediction method based on load-temperature correlation according to the first aspect of the present application.
[0020] The fourth aspect of the present application provides an electronic device, which comprises a memory, a processor and a program stored in the memory and executable on the processor, and the processor implements the steps in the power load prediction method based on load-temperature correlation according to the first aspect of the present application when executing the program.
[0021] The above one or more technical solutions have the following beneficial effects:
[0022] The present application provides a power load prediction method and system based on load-temperature correlation, which innovatively uses temperature historical data at the corresponding time of power load historical data to represent the external characteristics of power load, and introduces the maximum mutual information number to measure the correlation between power load data and temperature. The power load data, temperature data and their correlation are used as the feature matrix of the input network, and the correlation value between sequences is introduced as prior knowledge into the input of neural network learning, so as to promote the mining of high-order correlation between nonlinear sequences of neural network in a feature enhancement manner, guide the network to extract correlation features, and thus obtain more comprehensive and accurate correlation features, which is beneficial to the accuracy of subsequent prediction results.
[0023] The present application designs a multi-dimensional convolution attention module to enhance the effect of recurrent neural network and attention, which adopts a channel attention module constructed by combining a long short-term neural network with a time attention mechanism, and a spatial attention module constructed by using a multi-view convolution, obtains a double-weighted feature map to extract the time sequence features and deeper correlation features of the sequence, and significantly reduces the prediction error of the predicted power load.
[0024] The present application considers introducing a multi-view convolution module for extracting features between different dimensions. The multi-view convolution module can consider different scales and perspectives of input data at the same time, more comprehensively capture local information of data by fusing information of multiple views, and thus improve the local feature extraction capability of the model. On the other hand, the convolution kernels of different views enable the model to adaptively select the most suitable receptive field to process different input data, and improve the flexibility and adaptability of the model in processing complex data.
[0025] The advantages of the additional aspects of the present application will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0026] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0027] Figure 1 This is a flowchart of the method in the first embodiment.
[0028] Figure 2 This is a diagram illustrating the process of extracting features from power load data.
[0029] Figure 3 This is a flowchart of the data processing for the multidimensional convolutional attention module. Detailed Implementation
[0030] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0031] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0032] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0033] Example 1
[0034] This embodiment discloses a power load forecasting method based on load-temperature correlation.
[0035] like Figure 1 As shown, the power load forecasting method based on load-temperature correlation provided in this embodiment first requires the construction of an encoder module and a decoder module. The decoder module further includes a correlation calculation module, a multidimensional convolutional attention module, and a feature fusion and output module. Specifically, it includes the following steps:
[0036] First, it is necessary to obtain historical power load data and corresponding historical temperature data for that time period.
[0037] Historical power load data is input into the encoder module to extract the time-series characteristics of the historical power load data;
[0038] Historical power load data and corresponding historical temperature data are input into the decoder module, and the correlation calculation module calculates the correlation value between the two.
[0039] The power load historical data, the temperature historical data corresponding to the time thereof, and the correlation value of the two are input into the multi-dimensional convolution attention module as a feature matrix, and features are extracted by a channel attention module and a spatial attention module respectively to obtain the correlation features of the power load historical data and the temperature historical data.
[0040] In the feature fusion and output module, the obtained time sequence features and correlation features are spliced to obtain spliced features, and the power load prediction result of the future time is obtained based on the spliced features.
[0041] Next, the specific implementation of the present embodiment will be described in detail in combination with Figure 1 , Figure 2 and Figure 3 .
[0042] (I) Encoder module
[0043] As shown in Figure 2 , the encoder module part of the present embodiment is composed of three layers of TCN, which is used to extract the time sequence features of the power load sequence. The most significant feature of time sequence is that it has time sequence, that is, there is a time sequence between data points. This time sequence makes the future trend and model of the time sequence be predictable. TCN uses convolution operation to extract and learn local patterns and long-range dependencies in time sequence. Convolution operation enables efficient parallel computation in the training and inference process, and the propagation of its gradient is also more stable.
[0044] Further, the time sequence features of the power load sequence are extracted, and the specific process is as follows:
[0045] For the power load sequence X=[x1,x2,…,x T ]∈R 1×T , the encoding process is as follows:
[0046]
[0047]
[0048] Where f=(f1,f2,…,f k ) represents the convolution kernel, k is the number of convolution kernels, d is the dilation coefficient, and X t-d·i represents the input before t time. Residual block represents the residual module part, and each residual module performs two transformations, and the activation function Activation uses ReLU activation function. After the features are extracted by TCN, the time sequence features of the power load are obtained
[0049] (ii) Decoder-relevance calculation module
[0050] The power load data is affected by various factors, and the correlation calculation between other factor data and power load is very important. The Maximal Information Coefficient (MIC) is a method for calculating the correlation of nonlinear data, which makes MIC not limited by data type and distribution when processing data such as power load. At the same time, in order to calculate the correlation characteristics of the dynamic changes of the two during the occurrence of the incident, the calculation process is carried out through a sliding window of appropriate size.
[0051] Temperature is an important factor affecting the change of power load data. The change of temperature will lead to different needs of households or industries for power, so exploring the correlation between power and temperature is helpful for predicting power load data.
[0052] For the power load sequence X = [x1, x2, …, x T ] and the temperature sequence Y = [y1, y2, …, y T ] corresponding to the time, the mutual information I of X and Y is as follows:
[0053]
[0054] Among them, p(x, y) is the joint probability density function of X and Y, and p(x), p(y) are the marginal probability density functions, respectively.
[0055] Then, it is mapped to a two-dimensional space D = {(x1, y1), (x2, y2), …, (x T , y T )}, and then the two-dimensional space where D is located is divided into x*y block regions, and the grid partition is recorded as G. D|G represents the distribution of points in D on the grid cell of grid G. Due to different grid division methods, different D|G probability distributions will be obtained. The mutual information under all distributions is calculated and the maximum value is recorded as I * (D, x, y), and then normalized to the range of 0 to 1 to obtain M(D) x,y :
[0056]
[0057] Finally, different values of x and y will produce different M(D) x,y , and the maximum M(D) x,y is the MIC value of X and Y, which is as follows:
[0058]
[0059] where n is the number of samples, the authors of the method proposed the upper limit of the number of grid division as n 0.6 .
[0060] The M(D) above x,y is the maximum value in each divided region in the x*y block region of the two-dimensional space where D is located, and the final C(D) obtained is the maximum value in all divided regions, i.e., the maximum value in each divided region M(D) x,y .
[0061] (Three) Decoder-Multidimensional Convolution Attention Module
[0062] In this module, the power load data, temperature data and their correlation are taken as the feature matrix of the input network. The purpose of this strategy is to introduce the correlation value between sequences as prior knowledge into the input of neural network learning, to promote the mining of high-order correlation between sequences in a feature-enhanced manner, and the multidimensional convolution attention module is as shown in Figure 3 The multidimensional convolution attention module proposed in this embodiment mainly consists of channel attention mechanism and spatial attention mechanism, wherein the channel attention mechanism mainly extracts important information in different dimensions of multidimensional features, and reflects what is effective in the input, and the spatial attention mainly focuses on where is effective.
[0063] More specifically, in the channel attention module:
[0064] For the input feature matrix Z, first, the LSTM with time attention mechanism is used for feature extraction within the sliding window, and the LSTM cell with attention mechanism preserves the time sequence of the sequence itself. After the average pooling and maximum pooling operations, the spatial information of the feature map is integrated to form two different spatial features: and They respectively represent the average pooling feature and the maximum pooling feature.
[0065] Next, the two features are sent to a shared network for generating a channel attention map M c . The shared network consists of a multilayer perceptron and a hidden layer, and finally uses element summation to merge the output feature vector. The channel attention calculation is as follows:
[0066] F = LSTM(Attention(Z)) (6)
[0067]
[0068] where LSTM represents a long short-term memory neural network calculation module, Attention represents an attention mechanism calculation module, AvgPool represents an average pooling operation, MaxPool represents a maximum pooling operation, and σ represents an activation function. After extracting the channel attention features, the first weighted feature map is obtained.
[0069] More specifically, in the spatial attention module:
[0070] Spatial attention mainly focuses on "where" is effective, but using only single-view convolutional operations cannot fully consider the mutual influence between different dimensional information, especially when inputting multiple feature information. The present embodiment considers introducing a multi-view convolutional module for extracting features between different dimensions. The multi-view convolutional module can simultaneously consider different scales and perspectives of the input data, more comprehensively capturing local information of the data by fusing information from multiple views, thereby improving the local feature extraction capability of the model. On the other hand, the convolutional kernels of different views allow the model to adaptively select the most suitable receptive field to process different input data, improving the flexibility and adaptability of the model when processing complex data. The specific process of the spatial attention mechanism is as follows.
[0071] In order to further extract the local features of the sequence, the first weighted feature map of the channel attention module is then processed. First, average and maximum pooling operations are performed to aggregate the channel information twice, thereby generating two new feature maps: and respectively represent the average and maximum pooling features across the channels, and then the multi-view convolutional module is used to extract local information, generating a second weighted feature map.
[0072] The calculation of the spatial attention mechanism module is as follows:
[0073]
[0074] where f represents a convolutional operation with different receptive fields, and the present invention sets three parallel CNN modules with convolutional kernel sizes of 10, 5, and 1.
[0075] After extracting the features through the multi-dimensional convolutional attention module, the correlation features of the power load sequence and the temperature sequence are obtained
[0076] (Four) Decoder-feature fusion and output module
[0077] After extracting the features through the encoder and decoder, the time series features of the power load and the correlation sequence features between the power data and the temperature data are obtained, and then the final result is predicted using a fully connected layer after concatenation.
[0078] Specifically, after extracting the features through the encoder and the decoder, the correlation sequence features between the power load and the temperature are obtained, and then the matrix splicing of the following formula is performed:
[0079]
[0080] Finally, the prediction result is output by using the full connection layer, as shown in the following formula:
[0081]
[0082] wherein, is the predicted result.
[0083] (Five) Evaluation index display
[0084] In order to better show the effect of the method of the application, some evaluation indexes of the regression problem are used to show the results in this embodiment, which are the mean absolute error (MAE), the root mean square error (RMSE) and the mean absolute scaled error (MASE). Wherein y t represents the actual value of the time series at time t, represents the predicted value of y t , and n is the length of the test set.
[0085]
[0086]
[0087]
[0088] The method of this embodiment is compared with three advanced methods: an attention long short-term memory neural network (Attention-LSTM) with a time attention mechanism, a method of extracting frequency domain features in sequence data by using a frequency domain enhancement technology (FEDformer), and a time series prediction method (Transformer) model based on an encoder and a decoder structure. The three indexes of the method of the application are the highest, ranking first in the comparison methods, which confirms the effectiveness of the method of this embodiment.
[0089] Embodiment two
[0090] The embodiment discloses a power load prediction system based on load-temperature correlation.
[0091] The power load prediction system based on load-temperature correlation comprises:
[0092] A data acquisition module is configured to acquire power load historical data and temperature historical data corresponding to the time of the power load historical data.
[0093] The correlation feature extraction module is configured to: input the power load historical data and the temperature historical data corresponding to the time of the power load historical data into the decoder module, calculate the correlation degree value of the power load historical data and the temperature historical data corresponding to the time of the power load historical data, input the power load historical data, the temperature historical data corresponding to the time of the power load historical data and the correlation degree value of the power load historical data and the temperature historical data corresponding to the time of the power load historical data into the multi-dimensional convolution attention module as a feature matrix, and extract the features of the power load historical data and the temperature historical data by the channel attention module and the spatial attention module respectively to obtain the correlation features of the power load historical data and the temperature historical data.
[0094] The feature merging and prediction module is configured to: input the power load historical data into the encoder module to extract the time sequence features of the power load historical data, splice the obtained time sequence features and the correlation features to obtain spliced features, and obtain the power load prediction result of the future time based on the spliced features.
[0095] Embodiment three
[0096] An objective of the present embodiment is to provide a computer-readable storage medium.
[0097] A computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the steps in the power load prediction method based on load-temperature correlation as described in Embodiment 1 of the present disclosure.
[0098] Embodiment four
[0099] An objective of the present embodiment is to provide an electronic device.
[0100] An electronic device including a memory, a processor, and a program stored on the memory and executable on the processor, wherein the processor implements the steps in the power load prediction method based on load-temperature correlation as described in Embodiment 1 of the present disclosure when executing the program.
[0101] The steps and methods involved in the above embodiments two, three and four correspond to Embodiment 1, and the specific implementation can be referred to the relevant description part of Embodiment 1. The term "computer-readable storage medium" should be understood to include a single medium or multiple media of one or more instruction sets; it should also be understood to include any medium capable of storing, encoding or carrying instruction sets for execution by a processor and causing the processor to perform any method in the present application.
[0102] Those skilled in the art should understand that each module or step of the present application described above can be realized by a general computer device, alternatively, they can be realized by program codes executable by a computing device, so that they can be stored in a storage device for execution by a computing device, or they can be respectively manufactured into individual integrated circuit modules, or a plurality of modules or steps among them can be manufactured into a single integrated circuit module to realize. The present application is not limited to any specific combination of hardware and software.
[0103] The above describes the specific embodiments of the present application in conjunction with the drawings, but is not a limitation on the scope of protection of the present application. Those skilled in the art should understand that various modifications or variations made by those skilled in the art on the basis of the technical solutions of the present application without creative labor are still within the scope of protection of the present application.
Claims
1. A power load forecasting method based on load-temperature correlation, characterized in that, Includes the following steps: Acquire historical power load data and corresponding historical temperature data for that time period; Historical power load data and corresponding historical temperature data are input into the decoder module to calculate their correlation value. The historical power load data, corresponding historical temperature data, and their correlation value are used as a feature matrix and input into the multidimensional convolutional attention module. Features are extracted through the channel attention module and the spatial attention module respectively to obtain the correlation features of historical power load data and historical temperature data. Historical power load data is input into the encoder module, the time-series features of the historical power load data are extracted, the obtained time-series features and correlation features are spliced together to obtain spliced features, and the power load prediction results for future times are obtained based on the spliced features.
2. The power load forecasting method based on load-temperature correlation as described in claim 1, characterized in that, The process for calculating the correlation value is as follows: Combine historical power load data with historical temperature data at the corresponding time points to form load-temperature data pairs; Multiple load-temperature data pairs are mapped to a two-dimensional space, and the two-dimensional space is divided into multiple regions; Calculate the mutual information of load-temperature data pairs in each partitioned region, take the maximum value of all mutual information and normalize it to obtain the maximum mutual information value in each partitioned region. Calculate the maximum value of all mutual information values within all divided regions to obtain the maximum information coefficient of historical power load data and historical temperature data, and use the maximum information coefficient as the correlation value between the two.
3. The power load forecasting method based on load-temperature correlation as described in claim 1, characterized in that, In the multidimensional convolutional attention module: For the input feature matrix, feature extraction within a sliding window is performed using an LSTM with a time attention mechanism in the channel attention module. After pooling, the first weighted feature map is obtained. The first weighted feature map is input into the spatial attention module. After pooling, local features are extracted by the multi-view convolution module to generate the second weighted feature map, thus obtaining the correlation features between historical power load data and historical temperature data.
4. The power load forecasting method based on load-temperature correlation as described in claim 1, characterized in that, In the encoder module, the temporal features of historical power load data are extracted using multi-layer TCN.
5. The power load forecasting method based on load-temperature correlation as described in claim 2, characterized in that, Calculate the maximum M(D) x,y The formula is: Among them, M(D) x,y C(D) represents the maximum normalized mutual information; C(D) represents the maximum information coefficient of historical power load data and historical temperature data; X = [x1, x2, ..., x T [y1, y2, ..., y] represents the power load data sequence, where Y = [y1, y2, ..., y]. T [ ] represents the temperature data sequence at the corresponding time.
6. The power load forecasting method based on load-temperature correlation as described in claim 3, characterized in that, The specific calculation process for the first weighted feature map is as follows: F = LSTM(Attention(Z)) Where Z is the input feature matrix, LSTM represents the Long Short-Term Memory Neural Network computation module, Attention represents the attention mechanism computation module, AvgPool represents the average pooling operation, MaxPool represents the max pooling operation, and σ represents the activation function.
7. The power load forecasting method based on load-temperature correlation as described in claim 4, characterized in that, The specific calculation process for the second weighted feature map is as follows: Where f represents a convolution operation with different receptive fields; and These represent the average pooling feature and the maximum pooling feature across channels, respectively.
8. A power load forecasting system based on load-temperature correlation, characterized in that: include: The data acquisition module is configured to acquire historical power load data and corresponding historical temperature data for that time period. The correlation feature extraction module is configured to: input historical power load data and corresponding historical temperature data into the decoder module, calculate the correlation value between the two, and input the historical power load data, corresponding historical temperature data, and their correlation value as a feature matrix into the multidimensional convolutional attention module, extract features through the channel attention module and spatial attention module respectively, and obtain the correlation features of historical power load data and historical temperature data. The feature merging and prediction module is configured to: input historical power load data into the encoder module, extract the time-series features of the historical power load data, concatenate the obtained time-series features and correlation features to obtain concatenated features, and obtain the power load prediction results for future times based on the concatenated features.
9. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by a processor, the program implements the steps in the load-temperature correlation-based power load forecasting method as described in any one of claims 1-7.
10. An electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the power load forecasting method based on load-temperature correlation as described in any one of claims 1-7.