A method and apparatus for multi-step load forecasting based on reinforcement decoder

CN116663709BActive Publication Date: 2026-10-20HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310497034.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-05
Publication Date
2026-10-20
Estimated Expiration
2043-05-05

AI Technical Summary

Technical Problem

训练过程和测试过程的机制差异,使模型在测试过程中很可能处于训练时从见过的状态空间(误差随时步向后传播、累积后的状态空间),以致预测准确率低于预期,也即“暴露偏差”问题

Benefits of technology

[0033](1)本发明提供了一种基于强化解码器的电力负荷多步预测方法,构建的初始预测模型包括预测网络和至少一个现有预测结构的基础网络,经过训练得到目标预测模型。将当前序列输入目标预测模型,利用其中的基础网络输出前一时间步上的负荷估计值,利用智能体从所述基础网络输出的前一时步负荷估计值和解码器的前一时步负荷预测值中选出一个误差最小的,作为解码器执行本步负荷预测任务的输入,从而解码得到本步的负荷预测结果;能够减轻基于自回归机制的Seq2Seq预测模型直接将解码器前一步负荷预测值作为输入导致的误差累计,还能够避免基于Teacher forcing机制的Seq2Seq预测模型在训练过程中将前一时步真实负荷作为输入而与实际预测场景不适应导致的“暴露偏差”问题,最终能够降低多步预测误差,提高电力负荷预测精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116663709B_ABST
    Figure CN116663709B_ABST
Patent Text Reader

Abstract

The application discloses a kind of electric power load multi-step prediction method and device, belong to electric power load multi-step prediction technical field, the initial prediction model of construction includes prediction network and at least one existing prediction structure base network, and target prediction model is obtained after training.Historical load sequence is input into target prediction model, the previous step load prediction value is output using base network, and the previous step prediction value output from base network and decoder is selected using intelligent agent, and the minimum error is used as the input of decoder to execute this step prediction task, so that the load prediction value of this step is decoded, and the load prediction value of future multi-step is obtained by gradually decoding according to time step, and multi-step prediction result is formed;The method can reduce the error accumulation caused by autoregressive mechanism, and can also avoid the exposure bias problem caused by Teacherforcing mechanism, so as to finally reduce the prediction error and improve the multi-step prediction accuracy of electric power load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power load forecasting technology, and more specifically, relates to a method and apparatus for multi-step power load forecasting based on a reinforced decoder. Background Technology

[0002] Multi-step load forecasting refers to predicting electricity load for two or more future time steps based on historical load data sequences. It forms the basis of power system planning and operation and is of great significance for urban energy management decisions. Accurate load forecasting results facilitate the scientific and rational planning of power generation and maintenance schedules for the future, ensuring the safe and stable operation of the power system and improving economic efficiency. Simultaneously, it assists decision-makers in understanding changes in electricity demand and promoting electricity market reform.

[0003] As a commonly used recurrent neural network structure, sequence-to-sequence (Seq2Seq) models, consisting of an encoder and a decoder, have demonstrated powerful capabilities in time series data processing and have become an important technique for multi-step power load forecasting. In existing research, the decoder uses an autoregressive mechanism to generate multi-step forecast results. This involves generating a one-hour load forecast based on historical power load data, then using this forecast as input for the next hour's load forecast, iteratively generating forecasts for the next few hours (i.e., multiple steps). Since each prediction uses the previous hour's load forecast generated by the decoder itself as input, this leads to problems such as error accumulation and slow convergence. The teacher forcing mechanism, by introducing real load data during model training, reduces error accumulation and accelerates convergence, and is one of the most commonly used training techniques for Seq2Seq models in multi-step power load forecasting tasks. Based on the teacher forcing mechanism, the decoder decodes the previous hour's real load as input during training to obtain the next hour's load forecast, preventing prediction errors from propagating further. However, since the actual load data is unavailable during testing (or actual prediction), the testing process still needs to employ an autoregressive mechanism to generate multi-step prediction results. The difference in mechanisms between the training and testing processes means that the model may be in a state space that it has not seen during training (the state space after the error has propagated and accumulated over time) during testing, resulting in a lower-than-expected prediction accuracy, also known as the "exposure bias" problem.

[0004] In summary, given the problems of "exposure bias" and "slow convergence speed" in the training process of existing multi-step power load prediction models, there is an urgent need to propose a new training method to further improve the performance of Seq2Seq models and enhance the accuracy of multi-step power load prediction. Summary of the Invention

[0005] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a method and apparatus for multi-step power load prediction based on a reinforcement decoder. The aim is to introduce an agent based on reinforcement learning during the decoding process to adaptively select the model with the smallest prediction error in the previous step, and use its corresponding prediction value as input for the decoder to perform the next prediction task. Compared to autoregressive mechanisms, this approach effectively prevents further amplification of errors, improves convergence speed, and avoids the "exposure bias" problem, thereby reducing prediction errors and improving the accuracy of multi-step power load prediction.

[0006] To achieve the above objectives, according to one aspect of the present invention, a multi-step power load prediction method is provided, comprising:

[0007] S1: Select a study area and sample at a preset step size to obtain historical observation data of the power load corresponding to the study area; standardize the historical observation data of the power load to obtain a standard data sequence; divide the standard data sequence into multiple samples to construct a supervised learning sample set; each sample includes an input sequence and its corresponding output sequence, and the output sequence is the actual load at multiple time steps in the prediction period corresponding to the input sequence;

[0008] S2: Train the initial prediction model using training samples from the supervised learning sample set to obtain the target prediction model; the initial prediction model includes: a prediction network and a base network including at least one existing prediction structure; the prediction network includes: an encoder, a decoder, and an agent;

[0009] In this iteration, the input sequence is input into the prediction network and the base network respectively. The base network predicts the load estimate at each time step in the corresponding prediction period based on the input sequence. The encoder captures the features of the input sequence to form a feature vector. The agent selects an input decoder from the previous load estimate of the base network and the previous load prediction of the decoder, so that the decoder combines the feature vector to decode and obtain the load prediction value for the current step. The decoder is then decoded step by step to obtain the load prediction values ​​for multiple future steps, forming a prediction sequence. The prediction network is updated based on the error between the prediction sequence and the corresponding output sequence. This process is repeated multiple times until the error between the obtained prediction sequence and the corresponding output sequence meets the training accuracy.

[0010] S3: Input the current electricity load sequence into the target prediction model to obtain the multi-step prediction results of the electricity load for the period to be predicted.

[0011] In one embodiment, S2 includes:

[0012] S21: Input the training samples into the base network of the initial prediction model to obtain at least one load estimation sequence corresponding to the prediction period;

[0013] S22: Input the training samples into the encoder and decoder of the prediction network in the initial prediction model, perform pre-training based on the autoregressive mechanism, initialize the encoder network weights and decoder network weights, and obtain the first prediction model;

[0014] S23: Fix the encoder network weights and decoder network weights of the prediction network in the first prediction model, input the training samples into the agent of the prediction network in the first prediction model for training, and obtain the second prediction model after training; fix the agent network weights of the prediction network in the second prediction model, input the training samples into the encoder and decoder of the prediction network in the second prediction model for training, and obtain the third prediction model after training.

[0015] S24: Determine the target prediction model using the third prediction model.

[0016] In one embodiment, S22 includes: inputting the training samples into the encoder and decoder of the initial prediction model based on an autoregressive mechanism, and training using a gradient descent method, with the training objective being: The first prediction model is obtained after training is completed;

[0017] in, For the actual load at the k-th step in the future; Let be the load forecast value for the k-th step output by the decoder, RMSE be the root mean square error, and H be the number of time steps in the period to be predicted. The decoder uses its own load forecast value for the k-th step as input to decode the load forecast value for the (k+1)-th step.

[0018] In one embodiment, S23 includes:

[0019] S231: Fix the encoder network weights and decoder network weights in the first prediction model, input the training samples into the agent in the first prediction model, and train using the gradient ascent method. The training objective is: max∑ τ R(τ)P(τ) represents the second prediction model obtained after training; where τ is the set of states, actions, and rewards of the agent in the multi-step prediction process; P(τ) is the probability of τ occurring; and R(τ) is the accumulated reward. γ is the discount rate, r k The reward from the environment for the agent's action at step k; the reward at step k. The decoder input selected by the agent at step k is the load prediction value of the decoder at step k or the load estimate value of the base network at step k; when The closer In other words, the smaller the error of the selected model's prediction, the greater the reward the agent receives;

[0020] S232: Fix the network parameters of the agent in the second prediction model, input the training samples into the encoder and decoder of the second prediction model, and train using the gradient descent method; unlike S22, the decoder takes the load prediction value corresponding to the model selected by the agent at step k as input, and decodes to obtain the load prediction value at step k+1, that is...

[0021] The training objective is: The third prediction model is obtained after training.

[0022] In one embodiment, before S2, the method further includes: randomly combining the hyperparameters in the initial prediction model to determine the initial prediction model corresponding to each group of hyperparameters, and performing S21-S23 on each initial prediction model to obtain multiple third prediction models;

[0023] S24 includes: using the verification samples in the supervised learning sample set to verify the prediction accuracy of multiple third prediction models, and taking the third prediction model with the highest prediction accuracy as the target prediction model.

[0024] In one embodiment, both the encoder and the decoder are composed of LSTM recurrent neural networks; the agent is composed of a multi-classification neural network.

[0025] In one embodiment, the existing prediction structure is a machine learning model.

[0026] According to another aspect of the present invention, a multi-step power load prediction device based on a reinforced decoder is provided, comprising:

[0027] The preprocessing module is used to select a study area, sample at a preset step size, and obtain historical observation data of the power load corresponding to the study area; standardize the historical observation data of the power load to obtain a standard data sequence; divide the standard data sequence into multiple samples to construct a supervised learning sample set; each sample includes an input sequence and its corresponding output sequence, and the output sequence is the actual load at multiple time steps of the prediction period corresponding to the input sequence;

[0028] A training module is used to train an initial prediction model using training samples from the supervised learning sample set to obtain a target prediction model. The initial prediction model includes a prediction network and a base network including at least one existing prediction structure. The prediction network includes an encoder, a decoder, and an agent. During this iteration, the input sequence is input into the prediction network and the base network, respectively. The base network makes predictions based on the input sequence to obtain load estimates at each time step of the corresponding prediction period. The encoder captures features of the input sequence to form a feature vector. The agent selects an input decoder from the previous load estimate of the base network and the previous load prediction of the decoder, so that the decoder combines the feature vector to decode and obtain the load prediction value for this step. The decoder is then progressively decoded step by step to obtain load prediction values ​​for multiple future time steps, forming a prediction sequence. The prediction network is updated based on the error between the prediction sequence and the corresponding output sequence. This iteration is repeated until the error between the obtained prediction sequence and the corresponding output sequence meets the training accuracy.

[0029] The prediction module is used to input the current electricity load sequence into the target prediction model to obtain the multi-step prediction results of the electricity load for the period to be predicted.

[0030] According to another aspect of the present invention, a multi-step power load prediction system is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the multi-step power load prediction method.

[0031] According to another aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of a multi-step power load prediction method.

[0032] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:

[0033] (1) This invention provides a multi-step power load prediction method based on a reinforcement decoder. The initial prediction model includes a prediction network and a base network with at least one existing prediction structure. After training, a target prediction model is obtained. The current sequence is input into the target prediction model. The load estimate of the previous time step is output by the base network. An agent selects the load estimate of the previous time step output by the base network and the load prediction value of the previous time step from the load estimate of the previous time step output by the base network and the load prediction value of the previous time step of the decoder. The latter is used as the input for the decoder to perform the load prediction task of this step, thereby decoding to obtain the load prediction result of this step. This method can alleviate the error accumulation caused by the Seq2Seq prediction model based on the autoregressive mechanism directly using the load prediction value of the previous step of the decoder as input. It can also avoid the "exposure bias" problem caused by the Seq2Seq prediction model based on the teacher forcing mechanism using the real load of the previous time step as input during the training process, which is not adapted to the actual prediction scenario. Ultimately, this method can reduce multi-step prediction error and improve the accuracy of power load prediction.

[0034] (2) This scheme provides a multi-step prediction method for power load. During the training process, the encoder network weight and decoder network weight in the first prediction model are fixed to train the agent. For the model after training, the agent network weight is fixed to train the encoder and decoder. The process of "fixing encoder-decoder, training agent - fixing agent, training encoder-decoder" is repeated to finally obtain a relatively ideal third prediction model. The asynchronous training of encoder-decoder and agent can keep the agent in a relatively stable environment in each round of training (i.e., the prediction ability of the basic network and the encoding and decoding ability of encoder-decoder are fixed), reduce the training difficulty of agent and ensure convergence.

[0035] (3) This scheme provides a multi-step prediction method for power load. The encoder and decoder in the initial prediction model are trained by an autoregressive mechanism to obtain the first prediction model, so that the encoder and decoder have preliminary encoding and decoding capabilities. Then, training is carried out based on the first prediction model, which can effectively reduce the training complexity of the encoder and decoder and improve the overall training rate of the initial prediction model.

[0036] (4) This scheme provides a multi-step power load prediction method, which fixes the encoder network weights and decoder network weights in the first prediction model, and sets the training objective as: max∑ τR(τ)P(τ) employs a gradient ascent method to train the agent, enabling it to rapidly evolve towards the direction with the highest cumulative reward. Since the agent receives a larger cumulative reward for selecting the smaller the prediction error of the model, this method allows the trained agent to adaptively select the prediction value with the smaller error as the input for the decoder to execute the next load prediction task during the decoding process, avoiding further amplification of the error and thus improving the accuracy of multi-step prediction.

[0037] (5) This solution provides a multi-step power load prediction method. For the trained model, the agent network weights are fixed, and the training objective is set as follows: The encoder and decoder are trained using gradient descent, enabling them to rapidly evolve in the direction of minimizing the error between the predicted sequence and the corresponding output sequence. This continuously improves the encoding capabilities of the encoder and the decoding capabilities of the decoder, thereby reducing the prediction error.

[0038] (6) This scheme provides a multi-step power load prediction method. Before S2, the hyperparameters in the initial prediction model are randomly combined. S21-S23 are executed on each initial prediction model to obtain multiple third prediction models. The prediction accuracy of each third prediction model is verified using the validation samples in the supervised learning sample set. The third prediction model with the highest prediction accuracy is taken as the target prediction model. Since the third prediction model has not seen the validation samples during the training process, the higher the prediction accuracy on the validation samples, the stronger the model's adaptability to new samples, that is, the stronger its generalization ability. Based on hyperparameter optimization, this scheme improves the generalization ability of the target prediction model, and ultimately improves the prediction accuracy of the target prediction model in actual power load prediction (all new samples).

[0039] (7) The multi-step power load prediction device provided by the present invention includes an initial prediction model comprising a prediction network and a basic network of at least one existing prediction structure. For the load prediction task at each time step in the future to be predicted period, the basic network outputs the previous step load estimate. An agent selects the one with the smallest error from the previous step load estimate output by the basic network and the previous step load prediction value of the decoder, and uses it as the input for the decoder to perform the current step decoding task, thereby decoding to obtain the current step load prediction result. This can alleviate the error accumulation caused by the Seq2Seq prediction model based on the autoregressive mechanism directly using the previous step load prediction result of the decoder as input. It can also avoid the "exposure bias" problem caused by the Seq2Seq prediction model based on the Teacher forcing mechanism using the previous step real value as input during the training process, which is not adapted to the actual prediction scenario. Ultimately, it can reduce multi-step prediction error and improve the accuracy of power load prediction. Attached Figure Description

[0040] Figure 1 This is a flowchart of the multi-step power load prediction method provided in Embodiment 1 of the present invention.

[0041] Figure 2 This is a schematic diagram illustrating the construction of a supervised learning sample set containing input and output sequences.

[0042] Figure 3 This is a schematic diagram of the target prediction model in Embodiment 1 of the present invention.

[0043] Figure 4 yes Figure 3 A partial expanded structure diagram of the agent and decoder in the target prediction model.

[0044] Figure 5 This is a schematic diagram of the structure of the LSTM module unit in the encoder in Embodiment 1 of the present invention.

[0045] Figure 6 This is the electricity load data for a certain region from October 1, 2017 to December 31, 2017, for a total of 24 hours.

[0046] Figure 7 This describes the changes in prediction error on the training and validation sets during the training process of the three methods in Embodiment 7 of the present invention.

[0047] Figure 8 This is a comparison chart of the prediction error MAPE of the three methods in Embodiment 7 of the present invention. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0049] Example 1

[0050] like Figure 1 As shown, the present invention provides a multi-step prediction method for power load, including: S1-S3.

[0051] S1: Select the study area and sample at hourly intervals to obtain historical observation data (hourly level) of the power load in the area; standardize the collected historical observation data to obtain a standard data sequence; divide the standard data sequence into multiple samples to construct a supervised learning sample set; each sample includes an input sequence and its corresponding output sequence, and the output sequence is the actual load of the prediction period (including multiple hours) corresponding to the input sequence.

[0052] Specifically, for a multi-step power load forecasting task that predicts future H-hour loads based on historical d-hour load data, the load of the studied area is first sampled at hourly intervals to obtain a historical observation data sequence (hourly level) of the power load in that area. Then, the obtained raw data sequence is preprocessed in steps S101 and S102 to form a standardized data sequence. Then, based on S103, the sample is split to obtain each sample.

[0053] Step S101: Replace missing and outlier values ​​in the data sequence with the mean of the left and right adjacent values.

[0054] Step S102: Standardize the data, which can be done using methods such as the min-maximum method to standardize the original data. Linear transformation to the specified interval [a, b] to form a standardized data sequence.

[0055] Step S103: The sliding window method can be used, employing a sliding window of length d+H in the standardized data sequence. Gradual sliding (e.g.) Figure 2 Construct a supervised learning sample set with input and output sequences. The input sequence Output sequence The sample set is then divided into a training set and a validation set, according to a certain ratio.

[0056] S2: Train the initial prediction model using training samples from the supervised learning sample set to obtain the target prediction model, such as... Figure 3 As shown. The initial prediction model includes: a prediction network and a base network comprising at least one existing prediction structure. (See attached image.) Figure 4As shown, the prediction network includes an encoder, a decoder, and an agent. The encoder and decoder in the prediction network are recurrent networks, described here as LSTM recurrent neural networks. Note that the RL-Decoder (Reinforcement learning based decoder) section below includes both the decoder and the agent. In this iteration, the input sequence is fed into both the prediction network and the base network. The base network predicts the load estimates for each hour of the corresponding prediction period based on the input sequence. The encoder captures the features of the input sequence to form a feature vector. The agent selects one of the previous hour's load estimates from the base network and the previous hour's load prediction from the decoder, allowing the decoder to combine the feature vector to decode and obtain the current hour's load prediction. This process is repeated step-by-step to obtain load predictions for multiple future hours, forming the prediction sequence. The prediction network is updated based on the error between the prediction sequence and the corresponding output sequence. This iteration is repeated until the error between the obtained prediction sequence and the corresponding output sequence meets the training accuracy.

[0057] Specifically, the RL-Decoder-based multi-step power load prediction model (initial prediction model) includes an RL-Decoder-based Seq2seq model (prediction network) and MSVR and MLP models (base networks) that provide estimates. The prediction network consists of an Encoder and an RL-Decoder. The Encoder captures features from the input data to form a feature vector; the RL-Decoder's expanded structure is as follows... Figure 5 As shown, in this section, the Decoder, based on the estimated value selected by the Agent, combines it with the feature vector extracted by the Encoder to progressively decode and form a multi-step prediction result. Specifically, based on the model structure, the input sequence X... t To output sequence The mapping relationship is shown below.

[0058] like Figure 4 As shown, the Encoder is a recurrent neural network composed of LSTM modules, which extracts the input sequence X. t Features, forming a feature vector c ed :

[0059] (1) The forward propagation of the recurrent neural network is as follows, j∈(0,1,…,d-1):

[0060]

[0061]

[0062]

[0063]

[0064]

[0065] (2) Forming feature vectors through fully connected layers:

[0066] in, These represent the information to be discarded at the current moment in the Encoder network, the stored (updated) information, and the output information, respectively. These represent the long-term and short-term unit states at the current moment, storing long-term and short-term information respectively; This refers to the short-time unit state at the last moment in the Encoder; c ed For feature vectors, V e For network weight sharing, be is the corresponding bias term; σ(·) and tanh(·) are activation functions.

[0067] The RL-Decoder consists of a decoder composed of an LSTM recurrent neural network and an agent composed of a multi-classification neural network. The decoding process is as follows, k∈(1,…,H):

[0068]

[0069]

[0070]

[0071]

[0072]

[0073]

[0074]

[0075] In the formula, These represent the information to be discarded, the stored (updated) information, and the output information in the decoder network at the k-th decoding step, respectively. These represent the long-term and short-term unit states at the current moment, storing long-term and short-term information respectively. V d For network weight sharing, b e σ(·) and tanh(·) are the corresponding bias terms; σ(·) and tanh(·) are the activation functions. This is the decoder's output prediction of the electricity load for the k-th hour; when k=1, That is, the load observation value of the most recent hour in the input sequence. When k>1, the input... t+k The external input information in the Decoder network when generating the load forecast value for the k-th hour is selected by the Agent from the candidate input values. The Agent's policy network is a three-class multilayer perceptron with only one hidden layer.

[0076]

[0077]

[0078] In the formula, These are the predicted load values ​​for the next k-1 hours, provided by the decoder and the underlying network (MLP, MSVR). This is the output of the policy network, where the elements are selected. The probability of being input to the Decoder; For agents, the policy network shares weights. σ(·) and g(·) are the corresponding bias terms; g(·) and g(·) are the activation functions.

[0079] S3: Input the current data sequence into the target prediction model to obtain the power load forecast for the period to be predicted (including multiple hours).

[0080] Example 2

[0081] S2 includes: using training set data to input into the base network and prediction network respectively, and updating the network weight parameters, including weights and bias terms.

[0082] S21: Input the training samples into the base network of the initial prediction model to obtain at least one load estimation sequence corresponding to the prediction period (including multiple hours);

[0083] S22: Input the training samples into the encoder and decoder of the prediction network in the initial prediction model, perform pre-training based on the autoregressive mechanism, initialize the encoder network weights and decoder network weights, and obtain the first prediction model;

[0084] S23: Fix the encoder network weights and decoder network weights of the prediction network in the first prediction model, input the training samples into the agent of the prediction network in the first prediction model for training, and obtain the second prediction model after training; fix the agent network weights of the prediction network in the second prediction model, input the training samples into the encoder and decoder of the prediction network in the second prediction model for training, and obtain the third prediction model after training.

[0085] S24: Use the third prediction model to determine the target prediction model.

[0086] Example 3

[0087] S22 includes: inputting training samples into the encoder and decoder of the initial prediction model based on an autoregressive mechanism, and training using gradient descent. The training objective is: The first prediction model is obtained after training.

[0088] in, This represents the actual load in the k-th hour. Let be the load forecast value for the k-th hour output by the decoder, RMSE be the root mean square error, and H be the number of hours in the forecast period. The decoder uses its own load forecast value for the k-th hour as input to decode the load forecast value for the (k+1)-th hour.

[0089] The network parameters of the initial prediction model often need to be initialized to meet training requirements. In this embodiment, the Encoder and Decoder networks are pre-trained based on an autoregressive mechanism to initialize the network parameters of the encoder and decoder. Let... Take 20% of the sample data from the training set and input it into the Encoder(LSTM)-Decoder(LSTM) network to train the network weight parameters. b e The training objective is:

[0090] Example 4

[0091] S23 includes:

[0092] S231: Fix the encoder and decoder network weights in the first prediction model, input the training samples into the agent in the first prediction model, and train using the gradient ascent method. The training objective is: max∑ τ R(τ)P(τ), and the second prediction model is obtained after training;

[0093] Where τ is the set of states, actions, and rewards of the agent in the multi-step prediction process; P(τ) is the probability of τ occurring; and R(τ) is the accumulated reward. γ is the discount rate, r k The reward from the environment for the agent's action at step k; the reward at step k. The decoder input selected by the agent at step k is the load prediction value of the decoder at hour k or the load estimate value of the base network at hour k; when The closer In other words, the smaller the error of the selected model's prediction, the greater the reward the agent receives.

[0094] S232: Fix the network parameters of the agent in the second prediction model, input the training samples into the encoder and decoder of the second prediction model, and train using the gradient descent method; the training objective is: The third prediction model is obtained after training;

[0095] Unlike S22, the decoder takes the load prediction value corresponding to the model selected by the agent in step k as input, and decodes it to obtain the load prediction value for hour k+1, i.e.

[0096] The training process of the initial prediction model (a Seq2seq model based on RL-Decoder) in this embodiment is as follows:

[0097] Fixed Encoder (LSTM) - Decoder (LSTM) network weights V e , b e The sample data from the training set is input into the prediction network, and the gradient ascent method is used to train the Agent network parameters. The training objective is: max∑ τ R(τ)P(τ); where τ is the set of all states, actions, and rewards observed by the agent in one round (sample). input t+1 ,r1, input t+2 ,r2,…, input t+H ,r H ,);P(τ) is the probability of τ occurring. R(τ) represents the accumulated reward, R(τ) = r1 + γr2 + ... + γ H-1 r H Rewards for each step

[0098] Fixed Agent Network Weight The sample data from the training set is input into the prediction network, and the Encoder(LSTM)-Decoder(LSTM) network parameters are trained using gradient descent. The training objective is:

[0099] Example 5

[0100] Prior to S2, the multi-step prediction method for power load also included: randomly combining the hyperparameters in the initial prediction model, determining the initial prediction model corresponding to each group of hyperparameters, and performing S21-S23 on each initial prediction model to obtain multiple third prediction models.

[0101] S24 includes: using validation samples from the supervised learning sample set to verify the prediction accuracy of multiple third prediction models, and taking the third prediction model with the highest prediction accuracy as the target prediction model.

[0102] In this embodiment, multiple sets of hyperparameter combinations (such as the learning rate of gradient descent / ascent, the memory unit dimension of LSTM, the hidden layer dimension of a three-class multilayer perceptron, etc.) can be obtained by random search. For each set of hyperparameters, training is completed using training set data, and the trained model is validated using validation set data. The model that performs best on the validation set is retained as the final model.

[0103] Example 6

[0104] like Figure 5 As shown, both the encoder and decoder are composed of LSTM recurrent neural networks. The agent is composed of a multi-classification neural network.

[0105] This embodiment is a verification based on the above method, using power load data from a certain region as an example. Due to space limitations, this embodiment uses the prediction of power load for the next 3 days (including 72 hours) as an example to illustrate the multi-step time series prediction method based on reinforcement decoder (RL-Decoder).

[0106] Step S1: Data Acquisition and Preprocessing. For the study area, sampling is performed at hourly intervals to obtain the hourly power load data sequence for the past three months (October 1, 2017 to December 31, 2017), as shown below. Figure 6 As shown. Since all data are real and there are no missing values, the min-max method is directly used to standardize the original data sequence. Dataset partitioning and construction. Considering the task of predicting the load for the next 72 hours based on the historical 168-hour (1-week) power load sequence, a sliding window with a width of 168+72 is used to gradually slide across the standardized data sequence to construct a sample set with input and output sequences. The sample set is then divided into training, validation, and test sets according to ratios of 0.64, 0.16, and 0.12.

[0107] Step S2: Prediction Network Training. Construct a multi-step time series prediction network based on RL-Decoder, train the network weights based on the training set data, optimize the hyperparameters using the validation set, and retain the model that performs best on the validation set as the final model.

[0108] Step S3: Output the prediction results.

[0109] In this embodiment, Figure 6 The data in the sample was constructed using the mean absolute percentage error. The performance of the prediction model is measured, where MAPE represents the deviation between the predicted load sequence and the actual load sequence. The smaller the MAPE, the better the model's prediction performance. Figure 7 The error changes of the three methods on the training and validation sets during 25 iterations show that, compared with the traditional autoregressive mechanism, Teacher forcing and RL-Decoder significantly improve the convergence speed of the model, and the method provided in this embodiment has a better improvement effect. Figure 8 The vertical axis represents the prediction performance evaluation index MAPE. Bar A represents the results obtained based on the traditional autoregressive mechanism, bar B represents the results obtained based on the Teacher-forcing mechanism, and bar C represents the prediction error obtained by the multi-step power load prediction method based on RL-Decoder in this embodiment. It can be seen that the method provided in this embodiment has a prediction error MAPE of 6.2%, which is 6.8% and 7.5% lower than the 13.0% of the traditional autoregressive mechanism and the 13.7% of the Teacher-forcing mechanism, respectively. Combined with... Figure 7-8 As can be seen, although the Teacher-forcing mechanism can improve the convergence speed of the model, it reduces the prediction accuracy due to the exposure of bias. Compared with the traditional autoregressive mechanism and the Teacher-forcing mechanism, the method provided in this embodiment has higher prediction accuracy and faster convergence speed.

[0110] Example 7

[0111] The existing prediction structure is a machine learning model. The base network can be an MSVR model and / or an MLP model. The training set data is input into the MLP and MSVR respectively to complete the training of the base network.

[0112] Example 8

[0113] According to another aspect of the present invention, a multi-step power load prediction device is provided, comprising:

[0114] The preprocessing module is used to select the study area and sample at hourly intervals to obtain historical observation data (hourly level) of the power load in the area; the collected historical observation data is standardized to obtain a standard data sequence; the standard data sequence is divided into multiple samples to construct a supervised learning sample set; each sample includes an input sequence and its corresponding output sequence, and the output sequence is the actual load of the prediction period (including multiple hours) corresponding to the input sequence;

[0115] The training module is used to train the initial prediction model using training samples from the supervised learning sample set to obtain the target prediction model; the initial prediction model includes: a prediction network and a base network including at least one existing prediction structure; the prediction network includes: an encoder, a decoder and an agent;

[0116] In this iteration, the input sequence is fed into the prediction network and the base network respectively. The base network predicts the load estimate for each hour of the corresponding prediction period based on the input sequence. The encoder captures the features of the input sequence to form a feature vector. The agent selects one of the previous hour's load estimate from the base network and the previous hour's load prediction from the decoder, so that the decoder combines the feature vector to decode and obtain the load prediction for the current hour. The decoder is then decoded step by step to obtain the load prediction for the next few hours, forming a prediction sequence. The prediction network is updated based on the error between the prediction sequence and the corresponding output sequence. This process is repeated for multiple iterations until the error between the obtained prediction sequence and the corresponding output sequence meets the training accuracy.

[0117] The prediction module is used to input the current electricity load sequence into the target prediction model to obtain the load prediction results for the period to be predicted.

[0118] Example 9

[0119] According to another aspect of the present invention, a multi-step power load prediction system is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the multi-step power load prediction method.

[0120] Example 10

[0121] According to another aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of a multi-step power load prediction method.

[0122] Those skilled in the art will readily understand that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A multi-step power load prediction method based on a reinforced decoder, characterized in that, include: S1: Select a study area and sample at a preset step size to obtain historical observation data of the power load corresponding to the study area; The historical observation data of the power load is standardized to obtain a standard data sequence; the standard data sequence is divided into multiple samples to construct a supervised learning sample set; each sample includes an input sequence and its corresponding output sequence, wherein the output sequence is the actual load at multiple time steps in the prediction period corresponding to the input sequence; S2: Train the initial prediction model using the training samples in the supervised learning sample set to obtain the target prediction model; The initial prediction model includes: a prediction network and a base network including at least one existing prediction structure; the prediction network includes: an encoder, a decoder, and an agent; In this iteration, the input sequence is input into the prediction network and the base network respectively. The base network predicts the load estimate at each time step in the corresponding prediction period based on the input sequence. The encoder captures the features of the input sequence to form a feature vector. The agent selects an input decoder from the previous load estimate of the base network and the previous load prediction of the decoder, so that the decoder combines the feature vector to decode and obtain the load prediction value for the current step. The decoder is then decoded step by step to obtain the load prediction values ​​for multiple future steps, forming a prediction sequence. The prediction network is updated based on the error between the prediction sequence and the corresponding output sequence. This process is repeated multiple times until the error between the obtained prediction sequence and the corresponding output sequence meets the training accuracy. S3: Input the current electricity load sequence into the target prediction model to obtain the multi-step prediction results of the electricity load for the period to be predicted; S2 includes: S21: Input the training samples into the base network of the initial prediction model to obtain at least one load estimation sequence corresponding to the prediction period; S22: Input the training samples into the encoder and decoder of the prediction network in the initial prediction model, perform pre-training based on the autoregressive mechanism, initialize the encoder network weights and decoder network weights, and obtain the first prediction model; S23: Fix the encoder network weights and decoder network weights of the prediction network in the first prediction model, input the training samples into the agent of the prediction network in the first prediction model for training, and obtain the second prediction model after training; fix the agent network weights of the prediction network in the second prediction model, input the training samples into the encoder and decoder of the prediction network in the second prediction model for training, and obtain the third prediction model after training. S24: Determine the target prediction model using the third prediction model; S22 includes: inputting the training samples into the encoder and decoder of the initial prediction model based on an autoregressive mechanism, and training using a gradient descent method, with the training objective being: The first prediction model is obtained after training; in, For the future The actual load on the time step; For the future output of the decoder Load forecast values ​​for each time step The root mean square error, H represents the number of time steps contained in the time period to be predicted; the decoder uses itself in the first... Using the load forecast value at each time step as input, the load forecast value at the (k+1)th time step is decoded, i.e. .

2. The multi-step power load prediction method based on a reinforced decoder as described in claim 1, characterized in that, S23 includes: S231: Fix the encoder network weights and decoder network weights in the first prediction model, input the training samples into the agent in the first prediction model, and train using the gradient ascent method. The training objective is: After training, the second prediction model is obtained; where, This is the set of states, actions, and rewards of the agent during a multi-step prediction process. for The probability of occurrence; To accumulate rewards, , For discount rate, The reward from the environment for the agent's action at step k; the reward at step k. , For the agent in the first The decoder input selected in step 1 is the decoder's input in the future step 2. The load forecast value at the time step or the basic network at the 1st Load estimates for each time step; when The closer In other words, the smaller the error of the selected model's prediction, the greater the reward the agent receives; S232: Fix the network parameters of the agent in the second prediction model, input the training samples into the encoder and decoder of the second prediction model, and train using gradient descent; unlike S22, the decoder uses the agent's network parameters at the... The load forecast value corresponding to the selected model is taken as input, and the load forecast value at step k+1 is obtained by decoding. ; The training objective is: The third prediction model is obtained after training.

3. The multi-step power load prediction method based on a reinforced decoder as described in claim 1, characterized in that, Before step S2, the method further includes: randomly combining the hyperparameters in the initial prediction model to determine the initial prediction model corresponding to each group of hyperparameters, and performing steps S21-S23 on each initial prediction model to obtain multiple third prediction models. S24 includes: using the verification samples in the supervised learning sample set to verify the prediction accuracy of multiple third prediction models, and taking the third prediction model with the highest prediction accuracy as the target prediction model.

4. The multi-step power load prediction method based on a reinforced decoder as described in claim 1, characterized in that, Both the encoder and the decoder are composed of LSTM recurrent neural networks; the agent is composed of a multi-classification neural network.

5. The multi-step power load prediction method based on a reinforced decoder as described in claim 1, characterized in that, The existing prediction structure is a statistical model and / or a machine learning model.

6. A multi-step power load prediction device based on a reinforced decoder, characterized in that, The method for performing the multi-step power load prediction method based on the enhanced decoder as described in any one of claims 1-5 includes: A preprocessing module is used to select a study area, sample at a preset step size, and obtain historical observation data of the power load corresponding to the study area; standardize the historical observation data of the power load to obtain a standard data sequence; divide the standard data sequence into multiple samples to construct a supervised learning sample set; each sample includes an input sequence and its corresponding output sequence, wherein the output sequence is the actual load at multiple time steps in the prediction period corresponding to the input sequence; A training module is used to train an initial prediction model using training samples from the supervised learning sample set to obtain a target prediction model. The initial prediction model includes a prediction network and a base network including at least one existing prediction structure. The prediction network includes an encoder, a decoder, and an agent. During this iteration, the input sequence is input into the prediction network and the base network, respectively. The base network predicts the load estimate for each time step of the corresponding prediction period based on the input sequence. The encoder captures the features of the input sequence to form a feature vector. The agent selects an input decoder from the previous load estimate of the base network and the previous load prediction of the decoder, so that the decoder combines the feature vector to decode and obtain the load prediction value for the current step. The decoder is then decoded step by step to obtain the load prediction values ​​for multiple future steps, forming a prediction sequence. The prediction network is updated based on the error between the prediction sequence and the corresponding output sequence. This iteration is repeated until the error between the obtained prediction sequence and the corresponding output sequence meets the training accuracy. The prediction module is used to input the current electricity load sequence into the target prediction model to obtain the multi-step prediction results of the electricity load for the period to be predicted.

7. A multi-step power load prediction system based on a reinforced decoder, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the multi-step power load prediction method based on any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the multi-step power load prediction method based on the enhanced decoder as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Prediction method and system for regional cooling, heating, cooling and heating loads

    CN111932015A

  • Load prediction method and system based on deep self-attention network

    CN113379164A