A power load forecasting method based on deep learning and data-driven
Through the DCNN encoder and BiGRU decoder structure of the feature weighting mechanism and multi-layer attention mechanism, the problem of efficiently integrating historical and future features and dynamic adjustment of feature weights in traditional power load prediction methods is solved, and the prediction accuracy and model stability are improved, which is suitable for load prediction of power systems.
Patent Information
- Application Number
- CN202510465571.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-04-15
AI Technical Summary
Traditional power load prediction methods are difficult to fully explore the complex nonlinear relationship between high-dimensional historical data and external factors, and a single model has limitations when dealing with multi-time scale features or dynamically weighted input features. How to efficiently integrate historical and future features, dynamically adjust feature weights, and optimize long-term dependency modeling is a technical problem that needs to be solved urgently.
A bidirectional gated cyclic unit (BiGRU) decoder structure adopts feature weighting mechanism, expansion convolutional encoder (DCNN) and multi-layer attention mechanism, assigns weights to input features through feature weighting mechanism, uses DCNN encoder to capture long-term dependencies, and optimizes similar daily selection and BiGRU decoder for dynamic decoding through multi-layer attention mechanism.
The model's adaptability and prediction accuracy to complex load modes is improved, and the prediction effect is verified through public data sets, providing technical support for the efficient operation of the power system.
Smart Images

Figure CN120016472B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of short-term load forecasting for power systems, and in particular to a load forecasting method using a dilated convolutional encoder with a feature weighting mechanism and a bidirectional gated recurrent unit decoder with a multi-layer attention mechanism. Background Art
[0002] In recent years, with the rapid development of intelligent power systems and data acquisition technology, power load forecasting methods have gradually become a research hotspot. Traditional load forecasting methods are difficult to fully explore the complex nonlinear relationship between high-dimensional historical data and external factors. Deep learning, by constructing multi-layer neural networks, can effectively capture the temporal characteristics and potential patterns in the data, thereby improving prediction accuracy.
[0003] Existing research suggests that convolutional neural networks are suitable for capturing local features, while gated recurrent units are suitable for processing long-range dependencies in time series. However, single models have limitations when processing features at multiple time scales or dynamically weighted input features. To address this, some researchers have proposed solutions that incorporate attention mechanisms. For example, attention-based models can adaptively focus on important time steps or features, while dilated convolutional neural networks (DCNNs) can capture a wider range of temporal dependencies by expanding their receptive field.
[0004] Currently, most prediction methods are implemented through feature engineering or simple network structures. However, efficient integration of historical and future features, dynamic adjustment of feature weights, and optimization of long-term dependency modeling remain pressing technical challenges. Therefore, a novel architecture integrating a feature weighting mechanism, a DCNN encoder, and a Bidirectional Gated Recurrent Unit (BiGRU) decoder with a multi-layer attention mechanism is proposed. This architecture not only improves the model's adaptability to complex load patterns but also allows its predictions to be validated using publicly available datasets, providing technical support for the efficient operation of power systems. Summary of the Invention
[0005] A method for power load forecasting based on deep learning and data-driven, the method comprising the following operations:
[0006] First, the ISO-NE dataset is used to select hourly historical electricity load demand data.
[0007] Second, a feature weighting mechanism is applied to assign weights to the input features.
[0008] Again, develop a DCNN encoder.
[0009] Then, a multi-layer attention mechanism is used to select similar days and calculate the context vector to assist BiGRU in decoder prediction.
[0010] Finally, the entire DCNN encoder with a feature weighting mechanism and the BiGRU decoder with a multi-layer attention mechanism are constructed as a load prediction model. The model is then verified using the dataset, and the prediction effect of the model is judged based on the evaluation indicators.
[0011] The present invention is a power load forecasting method based on deep learning and data-driven, using the ISO-NE dataset. The input features include power load demand, dry-bulb temperature and dew point temperature features. is the historical time step, To predict future time steps, As the feature dimension, separate the historical features ,express The dimension is , separating future features ,Right now The dimension is , set the historical target to ,Right now The dimension is , the historical characteristics and future features Concatenate to input matrix ,exist China Construction Indicates the The characteristic dimension of the moment element is , the explanation of dimension symbols will not be repeated in the future.
[0012] The present invention applies a feature weighting mechanism to assign weights to input features. The process specifically includes:
[0013] Step (1) For each time step ,Will The feature attention score vector is obtained by linear layer transformation:
[0014]
[0015] in, is the activation function, represents the linear layer weights, represents the linear layer bias.
[0016] Step (2) Refine the meaning of feature dimensions and get , indicating the Time step The attention score vector of the features, ,right application Function, calculates feature attention weight:
[0017]
[0018] in For the The feature attention weights of each time step.
[0019] Step (3) assigns feature attention weights and Multiply element by element to obtain the weighted total feature:
[0020]
[0021] in Represents element-by-element multiplication to separate weighted historical features and weighted future features .
[0022] The present invention develops a DCNN encoder, and the process specifically includes:
[0023] Step (1) Concatenate weighted historical features at each moment and historical goals Get input , for each time have , after transposing, we get , used as the input of DCNN, if the input dimension Different from the initial number of channels , dimensionality reduction through linear layers:
[0024]
[0025] in, Adapt weights for the dimensionality reduction layer, is the bias of the dimension reduction layer, , the whole also has , after transposing, we get .
[0026] Step (2) Input the encoder Block, let the expansion factor be , , is the number of convolution blocks, is the number of expansion layers, in the block Neidi The output of the layer is also used as the The input of the layer, such as For blocks The first layer input, so the The output of the layer is as follows:
[0027]
[0028]
[0029] in, is the convolution kernel size, For blocks exist The first Layer output, For blocks No. The convolution kernel of the layer weights, For blocks No. The bias of the layer, is the activation function.
[0030] Step (3) Block The entire block output With Block The last layer output Make residual connections to get blocks The entire block output :
[0031] ;
[0032] If the block Output channel number and block Inconsistency, for the correction block The entire block output , through which Convolution performs projection:
[0033]
[0034] in, For blocks Projected convolution weights, For blocks Projection convolution bias, then With Block The last layer output Make residual connections to get blocks The entire block output :
[0035] .
[0036] Step (4) After all convolution blocks, the total output is obtained , passing the output through the adaptation layer:
[0037]
[0038] in, is the adaptation layer weight, is the adaptation layer bias, thus obtaining the encoder hidden representation sequence As the DCNN output, Refers to one of them, is the number of DCNN output channels.
[0039] The present invention uses a multi-layer attention mechanism to select similar days and calculate context vectors to assist BiGRU in decoder prediction. The process specifically includes:
[0040] Step (1) weights historical features Divided by period, each period includes time steps, a total of cycles, there are , refactoring it into , while weighting the future feature reconstruction to ,copy times obtained .
[0041] Step (2) for the cycle No. time steps, calculate the adjusted weighted historical features With weighted future features Similarities:
[0042]
[0043]
[0044] in is the normalized periodic attention weight, which is calculated using the inverse of the similarity.
[0045] Step (3) for each prediction time step ,have , using BiGRU's previous prediction time step The forward hidden state , backward hidden state , current weighted future features Constructing query vector , calculate the temporal attention score :
[0046]
[0047]
[0048] in, is the temporal attention score weight, It is both the number of output channels of the aforementioned DCNN encoder and the dimension of the BiGRU hidden state. is the temporal attention score bias, The function is used to connect and normalize the current time attention distribution:
[0049]
[0050] in Also called temporal attention weight.
[0051] Step (4) for each cycle , using the temporal attention weights to DCNN encoder output Calculate weighted encoder output :
[0052]
[0053]
[0054] in To weight the information of each cycle, it is also called the context vector.
[0055] Step (5) converts the context vector Current and future characteristics Splicing to obtain BiGRU input , and update the status:
[0056]
[0057]
[0058] in, for The forward hidden state at any moment, for The backward hidden state at the moment, The function is the operation process of the bidirectional gated recurrent unit, which is spliced and then passed through the fully connected layer to generate the prediction:
[0059]
[0060] in, is the activation function, is the weight of the fully connected layer, is the weight of the fully connected layer.
[0061] The present invention constructs the entire DCNN encoder with feature weighting mechanism and BiGRU decoder structure with multi-layer attention mechanism as the load forecasting model, and obtains the final prediction sequence as .
[0062] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention divides input features into historical features and future features, adaptively allocates feature weights, and enhances the auxiliary role of features in prediction; (2) The present invention dynamically adjusts the relationship between input features and convolution channels by dimensionality reduction, and adjusts the relationship between output channels of different convolution blocks by projection; (3) The present invention uses a multi-layer attention mechanism to extract similar days, performs period and time weighting on historical information, updates the information flow of BiGRU, and improves prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a specific flow chart of a power load forecasting method based on deep learning and data-driven according to the present invention;
[0064] Figure 2 is a structural diagram of the attention mechanism in an example of the present invention to obtain the weighted encoder output;
[0065] Figure 3 It is a structural diagram of BiGRU dynamic update in an example of the present invention. DETAILED DESCRIPTION
[0066] The present invention will be further described below with reference to the accompanying drawings. The embodiments are provided to more clearly illustrate the technical solution of the present invention, and the scope of application of the present invention is not limited thereto and can be applied to many fields. Here is just one example.
[0067] like Figure 1 As shown in the figure, a power load forecasting method based on deep learning and data-driven is specifically divided into the following steps:
[0068] First, using the ISO-NE dataset, the input features include power load demand, dry bulb temperature and dew point temperature features. is the historical time step, To predict future time steps, As the feature dimension, separate the historical features ,express The dimension is , separating future features ,Right now The dimension is , set the historical target to ,Right now The dimension is , the historical characteristics and future features Concatenate to input matrix ,exist China Construction Indicates the The characteristic dimension of the moment element is , the explanation of dimension symbols will not be repeated in the future.
[0069] Secondly, a feature weighting mechanism is applied to assign weights to the input features. The process specifically includes:
[0070] Step (1) For each time step ,Will The feature attention score vector is obtained by linear layer transformation:
[0071]
[0072] in, is the activation function, represents the linear layer weights, represents the linear layer bias.
[0073] Step (2) Refine the meaning of feature dimensions and get , indicating the Time step The attention score vector of the features, ,right application Function, calculates feature attention weight:
[0074]
[0075] in For the The feature attention weights of each time step.
[0076] Step (3) assigns feature attention weights and Multiply element by element to obtain the weighted total feature:
[0077]
[0078] in Represents element-by-element multiplication to separate weighted historical features and weighted future features .
[0079] Next, develop the DCNN encoder. The process specifically includes:
[0080] Step (1) Concatenate weighted historical features at each moment and historical goals Get input , for each time have , after transposing, we get , used as the input of DCNN, if the input dimension Different from the initial number of channels , dimensionality reduction through linear layers:
[0081]
[0082] in, Adapt weights for the dimensionality reduction layer, is the bias of the dimension reduction layer, , the whole also has , after transposing, we get .
[0083] Step (2) Input the encoder Block, let the expansion factor be , , is the number of convolution blocks, is the number of expansion layers, in the block Neidi The output of the layer is also used as the The input of the layer, such as For blocks The first layer input, so the The output of the layer is as follows:
[0084]
[0085]
[0086] in, is the convolution kernel size, For blocks exist The first Layer output, For blocks No. The convolution kernel of the layer weights, For blocks No. The bias of the layer, is the activation function.
[0087] Step (3) Block The entire block output With Block The last layer output Make residual connections to get blocks The entire block output :
[0088] ;
[0089] If the block Output channel number and block Inconsistency, for the correction block The entire block output , through which Convolution performs projection:
[0090]
[0091] in, For blocks Projected convolution weights, For blocks Projection convolution bias, then With Block The last layer output Make residual connections to get blocks The entire block output :
[0092] .
[0093] Step (4) After all convolution blocks, the total output is obtained , passing the output through the adaptation layer:
[0094]
[0095] in, is the adaptation layer weight, is the adaptation layer bias, thus obtaining the encoder hidden representation sequence As the output of the DCNN encoder, Refers to one of them, is the number of DCNN output channels.
[0096] Then, a multi-layer attention mechanism is used to select similar days and calculate the context vector to assist BiGRU in decoder prediction. The process specifically includes:
[0097] Step (1) weights historical features Divided by period, each period includes time steps, a total of cycles, there are , refactoring it into , while weighting future features Refactored to ,copy times obtained .
[0098] Step (2) for the cycle No. time steps, calculate the adjusted weighted historical features With weighted future features Similarities:
[0099]
[0100]
[0101] in is the normalized periodic attention weight, which is calculated using the inverse of the similarity.
[0102] Step (3) for each prediction time step ,have , using BiGRU's previous prediction time step The forward hidden state , backward hidden state , current weighted future features Constructing query vector , calculate the temporal attention score :
[0103]
[0104]
[0105] in, is the temporal attention weight, It is both the number of output channels of the aforementioned DCNN encoder and the dimension of the BiGRU hidden state. is the temporal attention bias, The function is used to connect and normalize the current time attention distribution:
[0106]
[0107] in It is also the temporal attention weight.
[0108] Step (4) is as follows Figure 2 As shown, for each cycle , using the temporal attention weights to DCNN encoder output Calculate weighted encoder output :
[0109]
[0110]
[0111] in To weight the information of each cycle, it is also called the context vector.
[0112] Step (5) is as follows Figure 3 As shown, the context vector Current and future characteristics Splicing to obtain BiGRU input , and update the status:
[0113]
[0114]
[0115] in, for The forward hidden state at any moment, for The backward hidden state at the moment, The function is the operation process of the bidirectional gated recurrent unit, which is spliced and then passed through the fully connected layer to generate the prediction:
[0116]
[0117] in, is the activation function, is the weight of the fully connected layer, is the weight of the fully connected layer.
[0118] Finally, the entire DCNN encoder with feature weighting mechanism and BiGRU decoder with multi-layer attention mechanism are constructed as the load forecasting model, and the final prediction sequence is obtained as follows: .
[0119] In the examples of the present invention, the mean absolute percentage error (MAPE [%]) and the mean absolute mean error (NRMSE [%]) are selected for verification, and the formulas for the two are:
[0120]
[0121] Where, yes The load forecast value at the time, yes The actual value of the load at the moment, is the minimum value of the true value of the load, is the maximum value of the true value of the load, To predict the future time step.
[0122] The prediction results are shown in Table 1. When other model conditions are the same, the model proposed in this invention is compared with the CNN, BiGRU and CNN-BiGRU models to predict the average load in the next 24 hours, and the evaluation indicators are used to judge the effectiveness of the model.
[0123] Table 1 Model evaluation index results table:
[0124] Model Category MAPE (%) NRMSE(%) CNN 4.644 6.733 BiGRU 4.317 6.327 CNN-BiGRU 5.156 7.108 Prediction model of the present invention 2.653 3.634
[0125] From the results in Table 1, it can be seen that the effect achieved by the prediction model of the present invention is the best, which can prove the benefits of the present invention.
Claims
1. A power load forecasting method based on deep learning and data-driven, characterized in that: The method comprises the following operations: first, using the ISO-NE dataset, selecting its hourly historical power load demand data; second, applying a feature weighting mechanism to assign weights to input features; Next, we developed a dilated convolutional encoder. We then used a multi-layer attention mechanism to select similar days and calculate context vectors to assist the bidirectional gated recurrent unit in decoder prediction. Finally, we constructed a load forecasting model that combines a dilated convolutional encoder with a feature weighting mechanism and a bidirectional gated recurrent unit decoder with a multi-layer attention mechanism. The model was then validated using a dataset and its prediction performance was determined based on evaluation metrics. The specific process is as follows: First, using the ISO-NE dataset, the input features include power load demand, dry bulb temperature and dew point temperature features. is the historical time step, To predict future time steps, As the feature dimension, separate the historical features ,express The dimension is , separating future features ,Right now The dimension is , set the historical target to ,Right now The dimension is , the historical characteristics and future features Concatenate to input matrix ,exist China Construction Indicates the The characteristic dimension of the moment element is , the explanation of dimension symbols will not be repeated in the future; Secondly, a feature weighting mechanism is applied to assign weights to the input features. The process specifically includes: Step (1) For each time step ,Will The feature attention score vector is obtained by linear layer transformation: in, is the activation function, represents the linear layer weights, represents the linear layer bias; Step (2) Refine the meaning of feature dimensions and get , indicating the Time step The attention score vector of the features, ,right application Function, calculates feature attention weight: in For the Feature attention weights for each time step; Step (3) assigns feature attention weights With input Multiply element by element to obtain the weighted total feature: in Represents element-by-element multiplication to separate weighted historical features and weighted future features ; Next, we develop a dilated convolutional encoder, which includes: Step (1) Concatenate weighted historical features at each moment and historical goals Get input , for each time have , after transposition, we get the dilated convolution encoder input ; Step (2) Input the encoder Block, let the expansion factor be , , is the number of convolution blocks, is the number of expansion layers, in the block Neidi The output of the layer is also used as the The input of the layer, such as For blocks The first layer input, so the The output of the layer is as follows: in, is the convolution kernel size, For blocks exist The first Layer output, For blocks No. The convolution kernel of the layer weights, For blocks No. The bias of the layer, is the activation function; Step (3) Block The entire block output With Block The last layer output Make residual connections to get blocks The entire block output : Step (4) After all convolution blocks, the total output is obtained , passing the output through the adaptation layer: in, is the adaptation layer weight, is the adaptation layer bias, thus obtaining the encoder hidden representation sequence As the output of the dilated convolutional encoder, Refers to one of them, is the number of dilated convolution output channels; Then, a multi-layer attention mechanism is used to select similar days and calculate the context vector to assist the bidirectional gated recurrent unit in decoder prediction. The process specifically includes: Step (1) weights historical features Divided by period, each period includes time steps, a total of cycles, there are , refactoring it into , while weighting future features Refactored to ,copy times obtained ; Step (2) for the cycle No. time steps, calculate the adjusted weighted historical features With weighted future features Similarities: in is the normalized periodic attention weight, which is calculated using the inverse of the similarity; Step (3) for each prediction time step ,have , using the bidirectional gated recurrent unit to predict the previous time step The forward hidden state , backward hidden state , current weighted future features Constructing query vector , calculate the temporal attention score : in, is the temporal attention score weight, It is both the number of output channels of the aforementioned dilated convolutional encoder and the hidden state dimension of the bidirectional gated recurrent unit. is the temporal attention score bias, Function is used to connect and normalize the current time attention distribution : in Also called temporal attention weight; Step (4) for each cycle , using temporal attention weights to the output of the dilated convolutional encoder Calculate weighted encoder output : in To weight the information of each cycle, also called context vector; Step (5) converts the context vector with current weighted future features Splicing to obtain the input of the bidirectional gated recurrent unit , and update the status: in, for The forward hidden state at any moment, for The backward hidden state at the moment, The function is the operation process of the bidirectional gated recurrent unit, which is spliced and then passed through the fully connected layer to generate the prediction: in, is the activation function, is the weight of the fully connected layer, is the bias of the fully connected layer; Finally, the entire dilated convolutional encoder with feature weighting mechanism and the bidirectional gated recurrent unit decoder with multi-layer attention mechanism are constructed as the load forecasting model, and the final prediction sequence is obtained as follows: .
2. The method for power load forecasting based on deep learning and data-driven according to claim 1, characterized in that: The developed dilated convolutional encoder stage concatenates weighted historical features at each moment and historical goals Get input , for each time have , is the historical time step, if the input dimension Different from the initial number of channels , dimensionality reduction through linear layers: in, Adapt weights for the dimensionality reduction layer, is the bias of the dimension reduction layer, , the whole also has , after transposing, we get , used as input to the dilated convolutional encoder.
3. The method for power load forecasting based on deep learning and data-driven according to claim 1, characterized in that: The developed dilated convolutional encoder stage, if the block Output channel number and block Inconsistency, for the correction block The entire block output , through which Convolution performs projection: in, For blocks Projected convolution weights, For blocks Projection convolution bias, then With Block The last layer output Make residual connections to get blocks The entire block output : , in order to calculate the total output of all convolutional blocks.
Citation Information
Patent Citations
Sequence-to-sequence power load prediction method based on multi-dimensional gating circulation unit
CN116384572A
Short-term load prediction method based on self-attention encoder and time convolutional network
CN118554422A