Power system short-term load prediction method based on TCN-BIGRU-CBAM

By combining the model architecture of time convolution network, bidirectional gating cyclic unit and convolutional block attention module, the problems of traditional short-term load prediction models' lack of information loss and long-term dependency capture capabilities during high-dimensional feature extraction and complex time series processing are solved, and higher prediction accuracy and stability are achieved.

CN119726687APending Publication Date: 2025-03-28NANJING INST OF TECH
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202411851807.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Traditional short-term load prediction models have problems such as information loss and insufficient long-term dependency capture capabilities when extracting high-dimensional feature and processing complex time series.

Method used

Using a model architecture combining time convolutional network (TCN), bidirectional gating cyclic unit (BIGRU) and convolutional block attention module (CBAM), the long-term dependencies in the time series are extracted through TCN, BIGRU captures short-term and long-term features, and enhances attention to key features through CBAM.

Benefits of technology

It significantly improves the accuracy and stability of short-term load prediction, effectively solves the problems of information loss and difficulty in extracting high-dimensional feature, and improves the model's expression ability and prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119726687A_ABST
    Figure CN119726687A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power system short-term load prediction method based on TCN-BIGRU-CBAM, and the method comprises the steps: obtaining a standard load time series data set as input data, and carrying out the preprocessing of the input data; establishing a time convolutional network TCN model, and extracting a long-term dependency relationship in the time sequence; establishing a two-way gating cycle unit network BIGRU, and outputting two-way time characteristics; constructing a convolutional block attention module (CBAM), and obtaining a four-dimensional feature map subjected to channel and space attention enhancement; and establishing a full connection layer, mapping the time sequence characteristics to a scalar through linear transformation, and outputting a power load prediction value of a target time step. According to the method, the problems of information loss, difficulty in high-dimensional feature extraction and the like of a traditional short-term load prediction model in complex time sequence modeling are effectively solved, the precision and the stability of short-term load prediction are remarkably improved, and the method has relatively high practical value and popularization potential.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a short-term load forecasting method for an electric power system, and in particular provides a short-term load forecasting method based on TCN-BIGRU-CBAM, belonging to the technical field of short-term load forecasting for an electric power system. Background Art

[0002] With the continuous development of power systems, power load forecasting plays a vital role in power dispatching, energy management and power market operations. Short-term load forecasting refers to the prediction of power load in the next few hours or days. Its main goal is to provide decision support for real-time dispatching of power systems, power generation planning and transactions in the power market. The accuracy of short-term load forecasting directly affects the stability and economy of the power system. Therefore, how to improve the accuracy and robustness of load forecasting models has always been a hot topic in the power field.

[0003] Traditional short-term load forecasting methods usually rely on statistical models and machine learning algorithms, such as autoregressive models (AR) and support vector machines (SVM). These methods can capture the changing patterns of power load to a certain extent, but because power load is affected by many factors (such as meteorological conditions, seasonal changes, holiday effects, etc.), traditional methods have limited performance when facing complex nonlinear relationships and long-term and short-term dependencies of time series. In addition, traditional methods often lack the feature extraction of time series data and cannot effectively capture multi-level time patterns, resulting in limited improvement in prediction accuracy. In recent years, with the rapid development of deep learning technology, more and more deep learning models have been applied to short-term load forecasting, especially in time series data modeling. The application of convolutional neural networks (CNN) and recurrent neural networks (RNN) in time series data processing has achieved remarkable results. However, traditional convolutional neural networks and recurrent neural networks still face certain challenges in capturing long time series dependencies and processing complex time series patterns.

[0004] In order to overcome these problems, researchers have proposed some improved models in recent years, such as temporal convolutional networks and gated recurrent units (GRUs). These methods can effectively capture the long-term and short-term dependencies in time series and improve the prediction performance of the model. In this context, the combination method based on temporal convolutional networks (TCNs) and bidirectional gated recurrent units has gradually attracted attention. Temporal convolutional networks model time series data through multi-layer convolution structures and can automatically extract the features of time series data, while bidirectional gated recurrent units (BiGRUs) improve the model's learning ability for long-term dependencies through bidirectional information flow. Although these methods have achieved certain success in load forecasting tasks, they still have certain limitations because they cannot fully mine the information of multi-level temporal patterns in power load data. Therefore, how to further improve the accuracy and robustness of the model in short-term load forecasting based on the existing deep learning model has become an urgent problem to be solved. Summary of the invention

[0005] Purpose of the invention: In view of the deficiencies in the prior art, the present invention provides a short-term load forecasting method based on TCN-BIGRU-CBAM. In view of the limitations of traditional load forecasting models such as information loss and insufficient ability to capture long-term dependencies when extracting high-dimensional features and processing complex time series, the present invention proposes a model architecture that combines a temporal convolutional network TCN, a bidirectional gated recurrent unit BIGRU and a convolutional block attention module CBAM.

[0006] Technical solution: A method for short-term load forecasting of a power system based on TCN-BIGRU-CBAM, comprising the following steps:

[0007] Step 1: Obtain a standard load time series data set as input data, the input data includes a timestamp and corresponding load records, and preprocess the input data;

[0008] Step 2: Establish a temporal convolutional network (TCN) model, and input the preprocessed data in step 1 into the temporal convolutional network (TCN) model to extract the long-term dependencies in the time series;

[0009] Step 3: Establish a bidirectional gated recurrent unit network BIGRU, send the feature vector of the data processed in step 2 to the bidirectional gated recurrent unit network BIGRU, use its internal reset gate, update gate structure, and candidate hidden state to dynamically control the flow of information to capture short-term features in the sequence and retain long-term information, then use forward and backward gated recurrent units GRU to model the forward and reverse features of the time series, extract comprehensive time series dependencies, and the output of the bidirectional gated recurrent unit network BIGRU is a bidirectional time feature;

[0010] Step 4: Construct a convolutional block attention module (CBAM), which consists of two key submodules: a channel attention submodule and a spatial attention submodule. The channel attention submodule and the spatial attention submodule are used to assign weights to the input data for different dimensions, and a four-dimensional feature map enhanced by channel and spatial attention is obtained.

[0011] Step 5. Send the output of the convolutional block attention module CBAM in step 4 to the fully connected layer, and map the high-dimensional features to the target output dimension through linear transformation, that is, map the time series features to a scalar, which is the load value at the target time point, and finally output the power load prediction value at the target time step to complete the power load prediction.

[0012] Furthermore, the preprocessing in step 1 is specifically as follows: taking the load data as input, first aligning the timestamp, then filling the missing values, and finally normalizing; its expression is:

[0013]

[0014] Among them, x is the normalized data; x 1 is the original data: x min and x max are the maximum and minimum values ​​of the data respectively;

[0015] Timestamp alignment processing is to unify all timestamps in the data set into a standard format to eliminate the noise caused by time misalignment in the input data;

[0016] Missing value filling processing uses mean filling to fill missing values ​​in the data to ensure the integrity of the input data;

[0017] Normalization scales features with different numerical ranges to a uniform range, which improves the convergence speed of the model and avoids instability caused by large differences in feature values ​​during training.

[0018] Furthermore, the step 2 is specifically as follows:

[0019] The temporal convolutional network (TCN) model extracts long-term dependencies and complex time series features in load time series data by combining causal convolution with dilated convolution. The temporal convolutional network (TCN) model includes at least two groups of residual blocks, each of which includes an expanded causal convolution layer, a batch normalization layer, an activation function, and a dropout layer.

[0020] The dilated convolution coefficient D is set to [1, 2, 4, 8], and the preprocessed data is processed by the dilated causal convolution layer. The batch normalization layer is used to accelerate training and improve model stability, and the ReLU activation function is used to introduce nonlinear learning to capture data features. The Dropout layer is set to prevent the model from overfitting. The output of each residual block is connected through a 1x1 convolution layer, and finally the feature vector containing high-dimensional time series features is output.

[0021] Furthermore, the step three is specifically as follows:

[0022] The forward gated recurrent unit is responsible for learning the state from the past time step t-1 to the current time step t, and the backward gated recurrent unit is responsible for learning the state from the future time step t+1 to the current time step t. The output of each time step is concatenated from the hidden states of the forward and backward gated recurrent units. The formula of the gated recurrent unit is as follows:

[0023] z t =σ(W z x t +U z h t-1 )

[0024] r t =σ(W r x t +U r h t-1 )

[0025]

[0026] Among them, z t and r t are update gate and reset gate respectively; σ is sigmoid function; tanh represents hyperbolic tangent function; W r , W z , U r , U z , W, U are training parameter matrices; x t Input for the current time; h t-1 is the output of the previous hidden layer neuron; h t is the hidden layer output at time t; is the candidate hidden layer state.

[0027] Furthermore, the step 4 is specifically as follows:

[0028] The convolutional block attention module CBAM first processes the output of the bidirectional gated recurrent unit network BIGRU through its channel attention submodule, and uses the output of the bidirectional gated recurrent unit network BIGRU as the input feature map of CBAM. Then, the channel attention submodule generates channel attention weights by weighting each channel, thereby obtaining the most important channel features for the prediction task, that is, the channel features with the largest channel attention weights, to capture the key trends in the bidirectional temporal features, specifically:

[0029] The channel attention submodule first aggregates each channel of the input feature map through global average pooling and global maximum pooling operations to generate a channel descriptor. The channel descriptor reflects the global information and significant features of each channel. Then, the channel descriptor is further processed by a shared multi-layer perceptron MLP to calculate the importance of each channel and generate a channel weight map. The channel weight map is normalized by a Sigmoid activation function so that each channel is weighted to obtain a channel weight and each channel is weighted, thereby strengthening the model's attention to the key channel, i.e., the channel with the largest weight, and improving the model's performance in the prediction task. In this way, the convolutional block attention module CBAM can effectively enhance the model's capture of key data features, i.e., the channel features with the largest channel attention weight, highlight the periodicity and trend in the data, and thus improve the accuracy and robustness of the model in the prediction task;

[0030] Full Average Pooling: F avg =GlobalAveragepooling(F)

[0031] Global maximum pooling: F max =GlobalMaxPooling(F)

[0032] Calculate the channel attention weight: α = σ (W 2 δ(W 1 F cancat +b 1 )+b 2 )

[0033] Apply channel attention weight: F out =Fα

[0034] Among them, W 1 and W 2 is the weight matrix of the fully connected layer, δ is the ReLU activation function, σ is the Sigmoid activation function, and b 1 and b 2 is the offset.

[0035] Furthermore, the calculation process of the shared multi-layer perceptron MLP is specifically as follows:

[0036] X is the input feature map, whose dimension is C×H×W, C is the number of channels, H and W are the height and width of the feature map;

[0037] GAP(X)=σ(GAP_c(X)),

[0038] Among them, GAP_c(X) is the global average pooling result of X on channel c;

[0039] GMP(X)=σ(GMP_c(X)),

[0040] Among them, GMP_c(X) is the global maximum pooling result of X on channel c;

[0041] Feature vector after MLP fusion:

[0042] F=Concatenate(GAP(X),GMP(X));

[0043] The channel weight is

[0044] Mc=Sigmoid(MLP(F)),

[0045] Among them, MLP contains two fully connected layers. Finally, the weighted feature map is Y=Mc×X, where "×" represents element-by-element multiplication;

[0046] The feature vector F is obtained by global maximum pooling and global average pooling in the channel attention submodule and And generate channel attention after the shared multi-layer perceptron MLP, then use element addition to merge the output feature vector, compress it using the sigmoid function, and then multiply it with the original input feature map to obtain the weighted feature map. The formula for channel attention is as follows:

[0047]

[0048] Among them, M c (F) represents the channel weight map generated by the channel attention mechanism; C is the number of network channels; σ is the sigmoid function, which is used to compress the value of the multi-layer perceptron output to the interval [0,1] as the weight; MLP represents the multi-layer perceptron, which accepts input and performs forward propagation to generate a new feature representation; (AvgPool(F)))+MLP(MaxPool(F))) respectively represent the global average pooling and global maximum pooling operations on the input feature map F; Favg and Fmax respectively represent the feature maps after average pooling and maximum pooling.

[0049] Furthermore, by applying global maximum and global average pooling to the channel attention output, and The spatial attention submodule obtains the feature map, and the formula of spatial attention is:

[0050]

[0051] Among them, f 7×7 F represents the convolution kernel of the filter size of 7x7; s Generates the attention weight map for a spatial attention function.

[0052] Furthermore, the step five is specifically as follows:

[0053] The output of CBAM is a four-dimensional feature map enhanced by channel and spatial attention, with a dimension of [batch_size, channels, height, width]. In order to map the time series features to the target dimension, the four-dimensional feature map is first flattened into a tensor of [batch_size, channels*height*width], and then linearly transformed through the fully connected layer, that is, the weight matrix W and the bias b: y=WX+b. The load data of the time series as input is pooled and max pooled to extract the main features of the data; then, the pooled features are processed into a combination vector; then, the nonlinear function RULE is applied to the combination vector, and a convolution operation is performed through the convolution kernel to extract and combine features; finally, the nonlinear factor is introduced through the sigmoid activation function to obtain the output of [batch_size, output_dim]. This process converts the time series features into a scalar, that is, the power load prediction value at the target time point, to achieve power load prediction.

[0054] Beneficial effects: The present invention effectively solves the problems of information loss and difficulty in extracting high-dimensional features in traditional short-term load forecasting models in complex time series modeling, significantly improves the accuracy and stability of short-term load forecasting, and has high practical value and promotion potential. The temporal convolutional network (TCN) uses dilated convolution to extract local features in time series and effectively captures long-term dependencies; the bidirectional gated recurrent unit network (BIGRU) enhances the context modeling capability of time series data and improves the understanding of load change trends through bidirectional information flow; the convolutional block attention module (CBAM) dynamically enhances the focus on key features through channel and spatial attention mechanisms, reduces the interference of redundant information, and thus improves the model's expressiveness and prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0056] Figure 1 This is the short-term load forecasting structure diagram of TCN-BIGRU-CBAM;

[0057] Figure 2 This is the causal expansion convolution structure diagram;

[0058] Figure 3 This is the GRU model structure diagram;

[0059] Figure 4 It is a bidirectional GRU structure diagram;

[0060] Figure 5 This is the CBAM structure diagram. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0062] In the description of the present invention, it is necessary to understand that the terms "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0063] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature.

[0064] like Figure 1 As shown, a method for short-term load forecasting of a power system based on TCN-BIGRU-CBAM includes the following steps:

[0065] Step 1: Obtain a standard load time series data set as input data. The input data records the historical load values ​​of multiple time steps. The purpose is to capture the time series pattern and regularity of the load, including timestamps and corresponding load records. In order to ensure the validity of the data and the training effect, the data needs to be preprocessed first;

[0066] The load time series data sets are Austria (AT), Bosnia and Herzegovina (BA), and Albania (AL). The data sets are one year of data collected every hour. The time span of the AT, BA, and AL data sets is from January to December 2018, with a total of 8760 data. If there are outliers or missing values ​​in the data set, the missing values ​​can be filled by the mean, median, previous value, or next value, and the outliers can be replaced.

[0067] The preprocessing in step 1 is as follows: taking the load data as input, first aligning the timestamp, then filling the missing values, and finally normalizing it; its expression is:

[0068]

[0069] Among them, x is the normalized data; x 1 is the original data: x min and x max are the maximum and minimum values ​​of the data respectively;

[0070] Timestamp alignment processing is to unify all timestamps in the data set into a standard format to eliminate the noise caused by time misalignment in the input data;

[0071] Missing value filling processing uses mean filling to fill missing values ​​in the data to ensure the integrity of the input data;

[0072] Normalization scales features with different numerical ranges to a uniform range, which improves the convergence speed of the model and avoids instability caused by large differences in feature values ​​during training.

[0073] Step 2: Establish a temporal convolutional network (TCN) model, and input the preprocessed data in step 1 into the temporal convolutional network (TCN) model to extract the long-term dependencies in the time series;

[0074] The step 2 is specifically as follows:

[0075] The temporal convolutional network (TCN) model extracts long-term dependencies and complex time series features in load time series data by combining causal convolution with dilated convolution. The TCN model includes at least two groups of residual blocks, each of which includes an expanded causal convolution layer, a batch normalization layer, an activation function, and a Dropout layer. The design of the residual block can help avoid the gradient vanishing problem in deep network training while retaining the local feature extraction capability of the convolution operation. The architecture of TCN allows parallel processing of data at multiple time steps, thereby improving computational efficiency while retaining key time series information.

[0076] The working principle of causal expansion convolution is as follows Figure 2 As shown in the figure, by setting the expansion factor, the model can extract key features of long time spans with fewer layers, avoiding inaccurate predictions caused by information loss. Setting the expansion convolution coefficient D = [1,2,4,8] can increase the receptive field and expand the model's field of view, thereby capturing long-term dependencies in time series. The preprocessed data is processed by the expansion causal convolution layer, where the batch normalization layer is used to accelerate training and improve model stability, and the ReLU activation function is used to introduce nonlinear learning to capture data features. The Dropout layer is set to prevent the model from overfitting. The Dropout coefficient of the Dropout layer is 0.1, which helps prevent the model from overfitting, especially when the training data is limited; the output of each residual block is connected through a 1x1 convolution layer to keep the tensor dimension consistent, prevent information loss, and promote the effective propagation of gradients. The final output is a feature vector containing high-dimensional time series features. The key to the expansion causal convolution is to maintain causality, that is, the model only depends on the current and past time steps and does not introduce future information.

[0077] Step 3: Establish a bidirectional gated recurrent unit network BIGRU, send the feature vector of the data processed in step 2 to the bidirectional gated recurrent unit network BIGRU, use its internal reset gate, update gate structure, and candidate hidden state to dynamically control the flow of information to capture short-term features in the sequence and retain long-term information, then use forward and backward gated recurrent units GRU to model the forward and reverse features of the time series, extract comprehensive time series dependencies, and the output of the bidirectional gated recurrent unit network BIGRU is a bidirectional time feature;

[0078] GRU is a variant of RNN recurrent neural network with longer memory capacity, and is more efficient than long short-term memory network LSTM during training. The design of bidirectional GRU allows the model to capture the previous and next information of the time series at the same time, improving the ability to model time dependencies. The forward GRU is responsible for learning the state from the past time step to the current time step. It can capture the changing rules from the past to the present in the time series. The backward GRU learns the state from the future time step to the current time step, which can help the model obtain future contextual information and make up for the limitations of unidirectional processing. The output of each time step is spliced ​​by the hidden states of the forward and backward GRUs to form a richer feature representation. This splicing method enhances the learning ability of the model, enabling it to simultaneously utilize global information from the past to the future. The bidirectional structure allows the model to extract features from both the forward and reverse dimensions, thereby enhancing the understanding of time series data. Its specific structure can be seen through the basic construction diagram of GRU as follows Figure 3 The overall structure of the bidirectional GRU is shown in Figure 4 The following is an explanation.

[0079] The step three is specifically as follows:

[0080] The forward gated recurrent unit is responsible for learning the state from the past time step t-1 to the current time step t, and the backward gated recurrent unit is responsible for learning the state from the future time step t+1 to the current time step t. The output of each time step is concatenated from the hidden states of the forward and backward gated recurrent units. The formula of the gated recurrent unit is as follows:

[0081] z t =σ(W z x t +U z h t-1 )

[0082] r t =σ(W r x t +U r h t-1 )

[0083]

[0084] Among them, z t and r t are update gate and reset gate respectively; σ is sigmoid function; tanh represents hyperbolic tangent function; W r , W z , U r , U z , W, U are training parameter matrices; x t Input for the current time; h t-1is the output of the previous hidden layer neuron; h t is the hidden layer output at time t; is the candidate hidden layer state.

[0085] Step 4: Construct a convolutional block attention module CBAM, which consists of two key submodules: the channel attention submodule and the spatial attention submodule. The channel attention submodule and the spatial attention submodule respectively assign weights to the input data for different dimensions, and obtain a four-dimensional feature map enhanced by channel and spatial attention. By introducing the two submodules of channel attention and spatial attention, CBAM can adaptively learn and pay attention to the periodicity and trend in key data features. CBAM enables the model to dynamically acquire knowledge about the importance of each channel and position, thereby improving the expressiveness of the model. CBAM shows obvious advantages in channel characteristics, spatial characteristics, computational efficiency and scalability.

[0086] To address the information loss and high-dimensional feature extraction difficulties in long sequence data, this paper introduces the convolutional block attention module CBAM structure as follows: Figure 5 The core idea of ​​CBAM is to weight the input features through the channel attention mechanism and the spatial attention mechanism, so as to highlight the most important features for the current time step prediction and weaken the influence of redundant information.

[0087] The step 4 is specifically as follows:

[0088] The convolutional block attention module CBAM first processes the output of the bidirectional gated recurrent unit network BIGRU through its channel attention submodule, and uses the output of the bidirectional gated recurrent unit network BIGRU as the input feature map of CBAM. Then, the channel attention submodule generates channel attention weights by weighting each channel, thereby obtaining the most important channel features for the prediction task, that is, the channel features with the largest channel attention weights, to capture the key trends in the bidirectional temporal features, specifically:

[0089] The channel attention submodule first aggregates each channel of the input feature map through global average pooling and global maximum pooling operations to generate a channel descriptor. The channel descriptor reflects the global information and significant features of each channel. Then, the channel descriptor is further processed by a shared multi-layer perceptron MLP to calculate the importance of each channel and generate a channel weight map. The channel weight map is normalized by a Sigmoid activation function so that each channel is weighted to obtain a channel weight and each channel is weighted, thereby strengthening the model's attention to the key channel, i.e., the channel with the largest weight, and improving the model's performance in the prediction task. In this way, the convolutional block attention module CBAM can effectively enhance the model's capture of key data features, i.e., the channel features with the largest channel attention weight, highlight the periodicity and trend in the data, and thus improve the accuracy and robustness of the model in the prediction task;

[0090] Full Average Pooling: F avg =GlobalAveragepooling(F)

[0091] Global maximum pooling: F max =GlobalMaxPooling(F)

[0092] Calculate the channel attention weight: α = σ (W 2 δ(W 1 F cancat +b 1 )+b 2 )

[0093] Apply channel attention weight: F out =Fα

[0094] Among them, W 1 and W 2 is the weight matrix of the fully connected layer, δ is the ReLU activation function, σ is the Sigmoid activation function, and b 1 and b 2 is the offset.

[0095] The calculation process of the shared multi-layer perceptron MLP is specifically as follows:

[0096] X is the input feature map, whose dimension is C×H×W, C is the number of channels, H and W are the height and width of the feature map;

[0097] GAP(X)=σ(GAP_c(X)),

[0098] Among them, GAP_c(X) is the global average pooling result of X on channel c;

[0099] GMP(X)=σ(GMP_c(X)),

[0100] Among them, GMP_c(X) is the global maximum pooling result of X on channel c;

[0101] Feature vector after MLP fusion:

[0102] F=Concatenate(GAP(X),GMP(X));

[0103] The channel weight is

[0104] Mc=Sigmoid(MLP(F)),

[0105] Among them, MLP contains two fully connected layers. Finally, the weighted feature map is Y=Mc×X, where "×" represents element-by-element multiplication;

[0106] The feature vector F is obtained by global maximum pooling and global average pooling in the channel attention submodule and And generate channel attention after the shared multi-layer perceptron MLP, then use element addition to merge the output feature vector, compress it using the sigmoid function, and then multiply it with the original input feature map to obtain the weighted feature map. The formula for channel attention is as follows:

[0107]

[0108] Among them, M c (F) represents the channel weight map generated by the channel attention mechanism; C is the number of network channels; σ is the sigmoid function, which is used to compress the value of the multi-layer perceptron output to the interval [0,1] as the weight; MLP represents the multi-layer perceptron, which accepts input and performs forward propagation to generate a new feature representation; (AvgPool(F)))+MLP(MaxPool(F))) respectively represent the global average pooling and global maximum pooling operations on the input feature map F; Favg and Fmax respectively represent the feature maps after average pooling and maximum pooling.

[0109] The spatial attention submodule weights the spatial dimensions of the features to highlight the key time steps in the time series. By calculating the correlation between the hidden state of each time step and all other time steps, CBAM is able to generate a set of dynamically adjusted attention weights that indicate which time steps are more important for the prediction of the current time step. Therefore, CBAM can not only select the most informative features in the channel dimension, but also select the time period that has the greatest impact on the prediction results in the time dimension, thereby effectively improving the prediction accuracy and robustness of the model.

[0110] By applying global max and global average pooling to the channel attention output, and The spatial attention submodule obtains the feature map, and the formula of spatial attention is:

[0111]

[0112] Among them, f 7×7 F represents the convolution kernel of the filter size of 7x7; s Generates the attention weight map for a spatial attention function.

[0113] Step 5: Send the output of the convolutional block attention module CBAM in step 4 to the fully connected layer, map the high-dimensional features to the target output dimension through linear transformation, that is, map the time series features to a scalar, which is the load value at the target time point, and finally output the power load prediction value at the target time step to complete the power load prediction;

[0114] The step five is specifically as follows:

[0115] CBAM outputs a four-dimensional feature map enhanced by channel attention and spatial attention. In order to map these time series features to the target dimension, the four-dimensional feature map needs to be flattened into a one-dimensional tensor. Then, it is linearly transformed through the fully connected layer, that is, the weight matrix W and the bias b: y = WX + b. Subsequently, the main features of the time series data are extracted by pooling operations, especially maximum pooling. The pooled features are processed into a combined vector and activated by the ReLU nonlinear function to capture more complex feature information. Next, the combined vector is further feature extracted and combined using convolution operations. Finally, the nonlinear factor is introduced through the Sigmoid activation function to obtain the final output. This process realizes the conversion of time series features into scalars, representing the power load forecast value at the target time point, thereby completing the power load forecasting task.

[0116] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0117] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for short-term load forecasting of power system based on TCN-BIGRU-CBAM, characterized by: The following steps are involved: Step 1: Obtain a standard load time series data set as input data, the input data includes a timestamp and corresponding load records, and preprocess the input data; Step 2: Establish a temporal convolutional network (TCN) model, and input the preprocessed data in step 1 into the temporal convolutional network (TCN) model to extract the long-term dependencies in the time series; Step 3: Establish a bidirectional gated recurrent unit network BIGRU, send the feature vector of the data processed in step 2 to the bidirectional gated recurrent unit network BIGRU, use its internal reset gate, update gate structure, and candidate hidden state to dynamically control the flow of information to capture short-term features in the sequence and retain long-term information, then use forward and backward gated recurrent units GRU to model the forward and reverse features of the time series, extract comprehensive time series dependencies, and the output of the bidirectional gated recurrent unit network BIGRU is a bidirectional time feature; Step 4: Construct a convolutional block attention module (CBAM), which consists of two key submodules: a channel attention submodule and a spatial attention submodule. The channel attention submodule and the spatial attention submodule are used to assign weights to the input data for different dimensions, and a four-dimensional feature map enhanced by channel and spatial attention is obtained. Step 5. Send the output of the convolutional block attention module CBAM in step 4 to the fully connected layer, and map the high-dimensional features to the target output dimension through linear transformation, that is, map the time series features to a scalar, which is the load value at the target time point, and finally output the power load prediction value at the target time step to complete the power load prediction.

2. The method for short-term load forecasting of a power system based on TCN-BIGRU-CBAM according to claim 1, characterized in that: The preprocessing in step 1 is specifically as follows: taking the load data as input, first aligning the timestamps, then filling the missing values, and finally normalizing; Its expression is Among them, x is the normalized data; x1 is the original data: min and x max are the maximum and minimum values ​​of the data respectively; Timestamp alignment processing is to unify all timestamps in the data set into a standard format to eliminate the noise caused by time misalignment in the input data; Missing value filling processing uses mean filling to fill missing values ​​in the data to ensure the integrity of the input data; Normalization scales features with different numerical ranges to a uniform range, which improves the convergence speed of the model and avoids instability caused by large differences in feature values ​​during training.

3. The method for short-term load forecasting of a power system based on TCN-BIGRU-CBAM according to claim 1, characterized in that: The step 2 is specifically as follows: The temporal convolutional network (TCN) model extracts long-term dependencies and complex time series features in load time series data by combining causal convolution with dilated convolution. The temporal convolutional network (TCN) model includes at least two groups of residual blocks, each of which includes an expanded causal convolution layer, a batch normalization layer, an activation function, and a dropout layer. The dilated convolution coefficient D is set to [1, 2, 4, 8], and the preprocessed data is processed by the dilated causal convolution layer. The batch normalization layer is used to accelerate training and improve model stability, and the ReLU activation function is used to introduce nonlinear learning to capture data features. The Dropout layer is set to prevent the model from overfitting. The output of each residual block is connected through a 1x1 convolution layer, and finally the feature vector containing high-dimensional time series features is output.

4. The method for short-term load forecasting of a power system based on TCN-BIGRU-CBAM according to claim 1, characterized in that: The step three is specifically as follows: The forward gated recurrent unit is responsible for learning the state from the past time step t-1 to the current time step t, and the backward gated recurrent unit is responsible for learning the state from the future time step t+1 to the current time step t. The output of each time step is concatenated from the hidden states of the forward and backward gated recurrent units. The formula of the gated recurrent unit is as follows: z t =σ(W z x t +U z h t-1 ) r t =σ(W r x t +U r h t-1 ) Among them, z t and r t are update gate and reset gate respectively; σ is sigmoid function; tanh represents hyperbolic tangent function; W r , W z , U r , U z , W, U are training parameter matrices; x t Input for the current time; h t-1 is the output of the previous hidden layer neuron; h t is the hidden layer output at time t; is the candidate hidden layer state.

5. The method for short-term load forecasting of a power system based on TCN-BIGRU-CBAM according to claim 1, characterized in that: The step 4 is specifically as follows: The convolutional block attention module CBAM first processes the output of the bidirectional gated recurrent unit network BIGRU through its channel attention submodule, and uses the output of the bidirectional gated recurrent unit network BIGRU as the input feature map of CBAM. Then, the channel attention submodule generates channel attention weights by weighting each channel, thereby obtaining the most important channel features for the prediction task, that is, the channel features with the largest channel attention weights, to capture the key trends in the bidirectional temporal features, specifically: The channel attention submodule first aggregates each channel of the input feature map through global average pooling and global maximum pooling operations to generate a channel descriptor. The channel descriptor reflects the global information and significant features of each channel. Then, the channel descriptor is further processed by a shared multi-layer perceptron MLP to calculate the importance of each channel and generate a channel weight map. The channel weight map is normalized by a Sigmoid activation function so that each channel is weighted to obtain a channel weight and each channel is weighted, thereby strengthening the model's attention to the key channel, i.e., the channel with the largest weight, and improving the model's performance in the prediction task. In this way, the convolutional block attention module CBAM can effectively enhance the model's capture of key data features, i.e., the channel features with the largest channel attention weight, highlight the periodicity and trend in the data, and thus improve the accuracy and robustness of the model in the prediction task; Full Average Pooling: F avg =GlobalAveragepooling(F) Global maximum pooling: F max =GlobalMaxPooling(F) Calculate the channel attention weight: α = σ(W2δ(W1F cancat +b1)+b2) Apply channel attention weight: F out =Fα Among them, W1 and W2 are the weight matrices of the fully connected layer, δ is the ReLU activation function, σ is the Sigmoid activation function, and b1 and b2 are biases.

6. The method for short-term load forecasting of a power system based on TCN-BIGRU-CBAM according to claim 5, characterized in that: The calculation process of the shared multi-layer perceptron MLP is specifically as follows: X is the input feature map, whose dimension is C×H×W, C is the number of channels, H and W are the height and width of the feature map; GAP(X)=σ(GAP_c(X)), Among them, GAP_c(X) is the global average pooling result of X on channel c; GMP(X)=σ(GMP_c(X)), Among them, GMP_c(X) is the global maximum pooling result of X on channel c; Feature vector after MLP fusion: F=Concatenate(GAP(X),GMP(X)); The channel weight is Mc=Sigmoid(MLP(F)), Among them, MLP contains two fully connected layers. Finally, the weighted feature map is Y=Mc×X, where "×" represents element-by-element multiplication; The feature vector F is obtained by global maximum pooling and global average pooling in the channel attention submodule and And generate channel attention after the shared multi-layer perceptron MLP, then use element addition to merge the output feature vector, compress it using the sigmoid function, and then multiply it with the original input feature map to obtain the weighted feature map. The formula for channel attention is as follows: Among them, M c (F) represents the channel weight map generated by the channel attention mechanism; C is the number of network channels; σ is the sigmoid function, which is used to compress the value of the multi-layer perceptron output to the interval [0,1] as the weight; MLP represents the multi-layer perceptron, which accepts input and performs forward propagation to generate a new feature representation; (AvgPool(F)))+MLP(MaxPool(F))) respectively represent the global average pooling and global maximum pooling operations on the input feature map F; Favg and Fmax respectively represent the feature maps after average pooling and maximum pooling.

7. The method for short-term load forecasting of a power system based on TCN-BIGRU-CBAM according to claim 6, characterized in that: By applying global max and global average pooling to the channel attention output, and The spatial attention submodule obtains the feature map, and the formula of spatial attention is: Among them, f 7×7 F represents the convolution kernel of the filter size of 7x7; s Generates the attention weight map for a spatial attention function.

8. The method for short-term load forecasting of a power system based on TCN-BIGRU-CBAM according to claim 1, characterized in that: The step five is specifically as follows: CBAM outputs a four-dimensional feature map enhanced by channel attention and spatial attention. In order to map these time series features to the target dimension, the four-dimensional feature map needs to be flattened into a one-dimensional tensor first, and then linearly transformed through a fully connected layer, i.e., a weight matrix W and a bias b: y = WX + b; then, the main features of the time series data are extracted using maximum pooling, and the pooled features are processed into a combined vector, and the ReLU nonlinear function is applied for activation to capture more complex feature information; next, the combined vector is further extracted and combined using a convolution operation; Finally, the nonlinear factor is introduced through the Sigmoid activation function to obtain the final output; the time series features are converted into a scalar, that is, converted into the power load forecast value at the target time point, thereby completing the power load forecasting task.

Citation Information

Cited By

  • Fine-grained power load collaborative prediction method

    CN120471232A

  • Hybrid model-based power transformer periodic time sequence prediction method and multivariable periodic time sequence prediction method

    CN120493181A

  • Hybrid model-based power transformer periodic time series prediction method and multivariate periodic time series prediction method

    CN120493181B

  • Biodegradable film production line control method and system based on machine learning

    CN121028706A

  • Multi-device power consumption monitoring, predicting and regulating system and method

    CN121209451A