TCN-GLU-Attention-based load energy consumption prediction method, device, equipment, medium and product

By using the TCN-GLU-Attention network, the problems of gradient vanishing, insufficient robustness and error accumulation in load energy consumption prediction are solved, achieving higher accuracy and stable load energy consumption prediction, especially accurate prediction under abnormal conditions.

CN121579919APending Publication Date: 2026-02-27ARTIFICIAL INTELLIGENCE INNOVATION RES INST OF ZHEJIANG UNIV OF TECH BINJIANG DISTRICT HANGZHOU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511774317.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing load energy consumption forecasting methods are prone to gradient vanishing or gradient explosion when processing long-term time series data, making it difficult to capture cross-period dependencies, lacking robustness, failing to effectively distinguish between trend and random fluctuation characteristics, and accumulating errors during multi-step forecasting, resulting in low forecast accuracy.

Method used

The TCN-GLU-Attention network is adopted. The TCN network extracts multi-scale temporal features, the GLU network dynamically selects key features, and the multi-head attention mechanism network integrates contextual information. It is also trained with external auxiliary features such as temperature, humidity, wind speed, and sunshine duration to improve the stability and robustness of the model.

Benefits of technology

It improves the accuracy and robustness of load energy consumption forecasting, especially in abnormal situations where it can more accurately capture the impact of critical moments and reduce the accumulation of errors in multi-step forecasting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579919A_ABST
    Figure CN121579919A_ABST
Patent Text Reader

Abstract

The invention discloses a TCN-GLU-Attention-based load energy consumption prediction method and device, equipment, a medium and a product, and relates to the field of load energy consumption prediction, and the method comprises the steps: obtaining a current load energy consumption sequence; the current load energy consumption sequence is input into a load energy consumption prediction model to predict future load energy consumption, a future load energy consumption sequence is obtained, and the load energy consumption prediction model takes a historical sample load energy consumption sequence as input and takes external auxiliary features as labels to train a TCN-GLU-Attention network; the external auxiliary features comprise air temperature, humidity, wind speed, sunshine duration, holidays and festivals and workdays; the TCN-GLU-Attention network comprises a TCN network, a GLU network, a multi-head attention mechanism network and a position feedforward network; according to the invention, the prediction precision of load energy consumption prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the field of load energy consumption prediction, in particular to a load energy consumption prediction method and device based on TCN-GLU-Attention, equipment, medium and product. BACKGROUND

[0002] In recent years, with the development of deep learning, long short-term memory networks, gate units and convolutional neural networks are widely used in the field of load energy consumption prediction, and the prediction accuracy is improved compared with traditional methods. However, there are still some problems in the actual application of this kind of method: first, the recurrent neural network is prone to gradient disappearance or gradient explosion when processing long time series data, and it is difficult to effectively capture the cross-period dependence relationship; second, the existing model lacks robustness in dealing with abnormal situations such as holidays, sudden power outages and extreme weather, and the prediction result often deviates greatly; third, most methods cannot effectively distinguish and model the trend characteristics, periodic characteristics and random volatility characteristics in the energy consumption data; fourth, when performing multi-step prediction, the prediction error is easy to accumulate, resulting in a decrease in overall prediction accuracy. Based on the above problems, there is a problem of low prediction accuracy in the field of load prediction. SUMMARY

[0003] The purpose of the present application is to provide a load energy consumption prediction method, device, equipment, medium and product based on TCN-GLU-Attention, which can improve the prediction accuracy of load energy consumption prediction.

[0004] To achieve the above purpose, the present application provides the following solutions: In a first aspect, the present application provides a load energy consumption prediction method based on TCN-GLU-Attention, comprising: obtaining a current load energy consumption sequence; inputting the current load energy consumption sequence into a load energy consumption prediction model to predict future load energy consumption and obtain a future load energy consumption sequence; wherein the load energy consumption prediction model is obtained by training a TCN-GLU-Attention network with historical sample load energy consumption sequences as input and external auxiliary features as labels; the external auxiliary features include temperature, humidity, wind speed, sunshine duration, holidays and weekdays; the TCN-GLU-Attention network includes a TCN network, a GLU network, a multi-head attention mechanism network and a position feedforward network; wherein the current load energy consumption sequence is input into the load energy consumption prediction model to predict the future load energy consumption and obtain the future load energy consumption sequence, specifically comprising: inputting the current load energy consumption sequence into the TCN network for feature extraction to obtain multi-scale time series features; input the multi-scale time sequence features into the GLU network for dynamic selection to obtain key features; input the key features into the multi-head attention mechanism network for context information fusion to obtain fusion features; input the fusion features into the position feedforward network to obtain a future load energy consumption sequence.

[0005] In a second aspect, the present application provides a load energy consumption prediction device based on TCN-GLU-Attention, comprising: a data acquisition module configured to acquire a current load energy consumption sequence; a prediction module configured to input the current load energy consumption sequence into a load energy consumption prediction model to predict a future load energy consumption and obtain a future load energy consumption sequence; wherein the load energy consumption prediction model is trained on a TCN-GLU-Attention network with a historical sample load energy consumption sequence as input and external auxiliary features as labels; the external auxiliary features include temperature, humidity, wind speed, sunshine duration, holidays, and weekdays; and the TCN-GLU-Attention network includes a TCN network, a GLU network, a multi-head attention mechanism network, and a position feedforward network. The prediction module comprises: a feature extraction module configured to input the current load energy consumption sequence into the TCN network for feature extraction to obtain multi-scale time sequence features; a feature selection module configured to input the multi-scale time sequence features into the GLU network for dynamic selection to obtain key features; a feature fusion module configured to input the key features into the multi-head attention mechanism network for context information fusion to obtain fusion features.

[0006] In a third aspect, the present application provides a computer device, comprising a memory, a processor, a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the steps of the load energy consumption prediction method based on TCN-GLU-Attention according to any one of the above embodiments.

[0007] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the load energy consumption prediction method based on TCN-GLU-Attention according to any one of the above embodiments.

[0008] In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the load energy consumption prediction method based on TCN-GLU-Attention according to any one of the above.

[0009] According to the specific embodiments provided in the present application, the following technical effects are disclosed: The present application provides a load energy consumption prediction method, device, equipment, medium and product based on TCN-GLU-Attention. The periodicity and trend in the load energy consumption sequence are effectively captured by the TCN network, the dependence ability of the load energy consumption prediction model on long sequences is improved, the key dependent features are retained and the redundant noise is suppressed by the GLU network, the stability and generalization ability of the load energy consumption prediction model are improved, the modeling ability of the key time segments is improved by the multi-head attention mechanism network, and then the prediction accuracy of the load energy consumption prediction model is improved as a whole. In addition, the robustness of the load energy consumption prediction model in dealing with abnormal situations such as holidays, sudden power outages and extreme weather can be improved by training the TCN-GLU-Attention network with multiple external auxiliary features such as temperature, humidity, wind speed, sunshine duration, holidays and working days as labels, so as to further improve the prediction accuracy of the load energy consumption prediction model. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0011] Figure 1 The application environment diagram of the load energy consumption prediction method based on TCN-GLU-Attention in an embodiment of the present application.

[0012] Figure 2 The flowchart of the load energy consumption prediction method based on TCN-GLU-Attention provided in an embodiment of the present application.

[0013] Figure 3 The configuration distribution diagram of the expansion rate in the TCN network provided in an embodiment of the present application.

[0014] Figure 4 The structure diagram of the GLU network provided in an embodiment of the present application.

[0015] Figure 5 The structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0016] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0017] In order to make the purposes, characteristics and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0018] The TCN-GLU-Attention-based load energy consumption prediction method provided by the embodiments of the present application can be applied in an application environment as shown in Figure 1 The terminal 101 communicates with the server 102 through a network. The data storage system can store data required to be processed by the server 102. The data storage system can be separately arranged, or integrated on the server 102, or placed on a cloud or other servers. The terminal 101 can send a current load energy consumption sequence to the server 102. The server 102 receives the current load energy consumption sequence. The server 102 inputs the current load energy consumption sequence into a load energy consumption prediction model to predict future load energy consumption, and obtains a future load energy consumption sequence. The server 102 can feed back the obtained future load energy consumption sequence to the terminal 101. In addition, in some embodiments, the TCN-GLU-Attention-based load energy consumption prediction method can also be realized by the server 102 or the terminal 101 alone, for example, the terminal 101 can directly predict future load energy consumption for the current load energy consumption sequence to be processed, or the server 102 can obtain the current load energy consumption sequence from the data storage system and process it.

[0019] The terminal 101 can be, but is not limited to, various desktop computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle-mounted device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 102 can be realized by an independent server or a server cluster composed of multiple servers, and can also be a cloud server.

[0020] In an exemplary embodiment, as shown in Figure 2As shown, a TCN-GLU-Attention-based load energy consumption prediction method is provided, which is executed by a computer device, specifically, can be executed by a terminal or a server, or both, in the embodiments of the present application, the method is applied to Figure 1 The server 102 in the method is taken as an example for illustration, including the following steps 201 to 202. Wherein: Step 201, obtaining a current load energy consumption sequence.

[0021] Step 202, inputting the current load energy consumption sequence into a load energy consumption prediction model to predict future load energy consumption, and obtaining a future load energy consumption sequence. Wherein, the load energy consumption prediction model is trained with historical sample load energy consumption sequences as input and external auxiliary features as labels; the external auxiliary features include temperature, humidity, wind speed, sunshine duration, holidays and weekdays; the load energy consumption prediction model includes a TCN network, a GLU network, a multi-head attention mechanism network and a position feedforward network.

[0022] In an exemplary embodiment, step 202 includes steps 2021-2024: Step 2021, inputting the current load energy consumption sequence into the TCN network for feature extraction, and obtaining multi-scale time sequence features.

[0023] Specifically, the TCN (Temporal Convolutional Network) network is sequentially stacked by 8 residual dilated convolution blocks. A single residual dilated convolution block is the basic building unit of the network, and its core components include: a one-dimensional dilated convolution layer (1D Conv) (convolution kernel size k=3, output channel number 64), followed by a weight normalization layer (WeightNorm), a ReLU activation function and a Dropout layer (dropout rate 0.1).

[0024] Let the input sequence of the TCN network be , the convolution kernel size be , and the dilation coefficient be , then the dilated convolution layer operation is: ; Wherein, F represents a one-dimensional convolution kernel (its length is consistent with the convolution kernel size k , that is, F is a vector containing k learnable parameters), and is the convolution kernel parameter. Compared with ordinary convolution, dilated convolution expands the receptive field without increasing additional calculation, so that the model can simultaneously consider local patterns and cross-period information.

[0025] The output of the dilated convolution layer is subjected to a nonlinear activation function , to obtain ; In the stacking process, in order to manage the channel dimension and realize the residual connection: the number of feature channels within the network is unified to 64. Since the feature dimension of the original input X is C_in, only in the first residual dilated convolution block, the input channel is upgraded from C_in to 64 by a 1x1 convolution acting on its input, so as to be added to the output of the main path. The input and output dimensions of all subsequent blocks are 64, and no dimension transformation is needed. Finally, the output of each residual dilated convolution block, i.e. the hidden representation of the layer , is composed by adding the output of the main path and the output of the shortcut branch, and applying a ReLU activation function to the whole, and the calculation process of the residual dilated convolution block can be summarized as: =ReLU(main path output+shortcut branch output), where The dimension of .

[0026] The output of the main path is the feature representation F(x) obtained by sequentially passing the input sequence through a one-dimensional dilated convolution layer, weight normalization, ReLU activation, and Dropout, and then repeating the process again.

[0027] The output of the shortcut branch is the result of 1x1 convolution upgrade on the input sequence in the first residual dilated convolution block; in the subsequent residual dilated convolution blocks, it is an identity mapping of the input itself, and the final output of the residual dilated convolution block is ReLU(F(x)+shortcut branch output).

[0028] As shown in Figure 3 , the configuration of the dilation rate adopts an exponential dilation rate strategy to systematically expand the receptive field in the stacking process of the eight residual dilated convolution blocks, and the specific dilation rate sequence is: ; wherein l takes a value of 8. This dilation rate configuration, combined with a convolution kernel of k=3, enables the total receptive field of the network to grow exponentially with the number of layers, which is sufficient to effectively cover the entire input window. This enables the model to capture complex patterns from short-term fluctuations to daily cycles, weekly cycles, and other time scales, and the outputs of each layer are directly stacked and transmitted through the residual structure without the need for additional feature fusion steps.

[0029] To ensure the numerical stability and generalization performance of deep TCN networks during training, several regularization techniques are introduced, including gradient pruning (such as limiting the gradient norm to within 1.0 to prevent gradient explosion), weight decay (penalizing excessively large weights to avoid overfitting), and early stopping (monitoring the validation set loss to prevent overfitting). The optimization process employs the Adam or AdamW optimizer, combined with learning rate scheduling strategies (such as cosine annealing) to improve convergence speed and stability.

[0030] Ultimately, the TCN network maps the input sequence X into a deep feature representation: ; For multi-scale temporal features, rich multi-scale temporal dependency information is encoded and passed as input features to subsequent gating unit modules for more refined feature refining.

[0031] Step 2022 involves inputting the multi-scale temporal features into the GLU network for dynamic selection to obtain key features. Specifically, this includes steps 20221-20222: Step 20221: Input the multi-scale temporal features into the gating unit to dynamically filter the features and obtain the initial key features.

[0032] A Gated Linear Unit (GLU) network consists of gated units and residual computation units.

[0033] like Figure 4 As shown, the structure of the gated unit includes two parallel branches, namely the first branch and the second branch; the first branch includes a one-dimensional dilated convolutional layer (1D Conv) and a second branch connected in sequence. The activation function is used to generate candidate features; the second branch consists of sequentially connected one-dimensional dilated convolutional layers (1D Conv) and The activation function is used to generate the gating weights.

[0034] The first branch extracts candidate feature maps through one-dimensional dilated convolution. and through a nonlinear activation function Perform the transformation; the second branch has the same structure, but its output is a gated weight mapping. The results are constrained to the interval [0,1] using the Sigmoid function. To avoid excessive suppression of feature flow by the gating weights in the early training phase, their bias term... Initialize to a non-negative small value (e.g., 0.1).

[0035] The gating unit converts the multi-scale temporal features output by the TCN network. For input, wherein, denotes the time step (i.e., the input sequence length), denotes the number of feature channels, which maps the multi-scale time-series features at each time instant t into candidate features and the gating weight : ; wherein, is the learnable weight kernel of the one-dimensional dilated convolution layer in the first branch, is the corresponding learnable bias term, denotes the dilated causal convolution operation, is the learnable weight kernel of the one-dimensional dilated convolution layer in the second branch, is the corresponding learnable bias term, and denotes the element-wise product. Through this structure, the model can "selectively" pass information: if certain features contribute less to the prediction, they are gated out; if certain features are highly relevant, they are preserved and strengthened. Compared with directly stacking convolution layers, the GLU network improves the modeling ability of the network for nonlinear features and enhances the robustness.

[0036] The two-way output is multiplied element-wise to obtain the gating unit result, that is, the initial key feature, and the operation formula is as follows: ; wherein, the symbol denotes the element-wise multiplication operation. This operation realizes dynamic filtering of multi-scale time-series features: when is small (close to 0), it means that the time feature is suppressed; when is large (close to 1), it means that the feature is preserved and strengthened.

[0037] In step 20222, the initial key feature and the multi-scale time-series feature are input into the residual operation unit to perform residual operation, and the key feature is obtained.

[0038] The gating unit result and the multi-scale time-series feature are input into the residual operation unit to perform residual connection and normalization, and the following is obtained: ; wherein, is the key feature, denotes the layer normalization or weight normalization operation, which is used to stabilize the feature distribution and accelerate the model convergence.

[0039] In an exemplary embodiment, the gating unit can be sequentially stacked layers, and Dropout (dropout rate ) and L2 regularization to enhance the generalization performance. After multi-layer stacking, the final gating output feature is obtained , and its normalized form is obtained through residual operation , as the input of the subsequent multi-head attention mechanism network.

[0040] Step 2023, input the key feature into the multi-head attention mechanism network for context information fusion to obtain the fusion feature. Specifically, it includes steps 20231-20233: Step 20231, linearly transform the key feature to obtain multiple query matrices, key matrices and value matrices.

[0041] Attention mechanism dynamically adjusts the importance weight of each time step by calculating the correlation between different positions in the sequence. The specific calculation formula is: ; Wherein, represents the key feature, , is the number of time steps (such as 24 representing 24 hours in a day), is the number of feature channels; respectively represent the query (Query), key (Key) and value (Value) corresponding to the learnable linear mapping matrix, the dimensions are , and ; Q, K, V are obtained by linearly transforming the key feature , that is: ; Wherein, is a scaling factor (usually the dimension of the query vector), which is used to prevent gradient instability caused by too large numerical value during dot product calculation.

[0042] In order to further improve the feature expression ability and the diversity of time modeling, the application adopts multi-head attention mechanism, different attention heads respectively pay attention to different time scales and feature dimensions, highlight the modeling ability of key time segments, and improve the prediction accuracy, and its calculation form is: ; ; Wherein, represents the number of attention heads (which can be 2, 4 or 8), represents the output of the th attention head, is the output mapping matrix, which is used to fuse the results of each attention head, and the dimension is Concat(·) represents concatenating the outputs of multiple attention heads on the channel.

[0043] Through the multi-head attention mechanism network, the model can not only effectively distinguish the stable trend and random disturbance in the load data, but also highlight the importance of key moments in special circumstances such as holidays and extreme weather, significantly improving the prediction accuracy and robustness.

[0044] Specifically, the key features After parallel linear transformation, multiple groups of independent query (Query), key (Key) and value (Value) matrices are generated.

[0045] Step 20232, for any group of query matrix, key matrix and value matrix, the attention weight is obtained by using the query matrix and the key matrix, and the weighted sum of the corresponding value matrix is performed by using the attention weight, to obtain the global feature of the converged global context information.

[0046] Inside each "head", the attention weight is obtained by calculating the dot product of the query and the key, and this weight matrix quantifies the mutual importance between any two time points in the sequence.

[0047] The corresponding value (Value) matrix is weighted and summed using the weight, and the global feature containing global context information is obtained by converging.

[0048] Step 20233, concatenate multiple groups of global features, and perform linear transformation on the concatenated global features to obtain the fusion feature.

[0049] Specifically, the output results of all attention heads are concatenated and linearly transformed to obtain the fusion feature .

[0050] Step 2024, input the fusion feature into the position feedforward network to obtain the future load energy consumption sequence.

[0051] Specifically, the position feedforward network is composed of two fully connected layers MLP.

[0052] To effectively fuse the context information and stabilize the training process, the fusion feature and the key feature are connected in residual connection, and layer normalization (Layer Norm) is applied. The normalized feature is sent to the position feedforward network for nonlinear feature transformation, to enhance the expression ability of the model.

[0053] Finally, residual connection and layer normalization operations are applied again to obtain the final output. The enhanced time sequence representation of the final output is denoted as: ; The future load energy consumption sequence Y fuses long-range dependence and deep features, and can better distinguish stable trends from random disturbances, especially in special cases such as holidays and extreme weather, and can more accurately capture the impact at critical moments.

[0054] By performing the above steps, the present application improves the accuracy and robustness of load prediction under normal and abnormal conditions.

[0055] The TCN-GLU-Attention network includes a data collection stage and a data preprocessing stage before training.

[0056] Data collection stage: Collect historical load energy consumption data, with a data sampling interval of 15 minutes, 30 minutes or 1 hour, covering a time range of not less than one complete year in order to capture trend and periodicity. At the same time, collect external auxiliary feature information related to load, including temperature, humidity, wind speed, sunshine duration, holidays and working days, and use them as training labels.

[0057] Data preprocessing stage: In this stage, the following methods are used to process the data: (1) Missing value interpolation: For missing points that occur during the collection process, time series interpolation, adjacent mean method or similar day-based filling method is used for repair.

[0058] (2) Abnormal point correction: Detect data points with zero value or abnormal mutation caused by power failure or equipment failure, and correct them using statistical threshold-based or sliding window smoothing method.

[0059] (3) Normalization: Use the maximum and minimum normalization method to map the load and external features to the [0, 1] interval to improve the stability of model training.

[0060] (4) Sample construction: Through sliding window, the past K-step load energy consumption sequence (i.e. historical sample load energy consumption sequence) and its external auxiliary features are used as input, and the future H-step load is used as prediction target, to form the training sample set required by the load energy consumption prediction model.

[0061] The training sample set is used to train the TCN-GLU-Attention network to ensure that the model can learn the mapping relationship of different time segments.

[0062] In the training process, a dynamic residual monitoring module is introduced to monitor the deviation between the predicted value and the actual value in real time. When the residual exceeds the preset threshold, a lightweight correction network (such as a small MLP or a filtering module) is triggered to dynamically correct the output result, improving the prediction robustness under abnormal conditions such as holidays, power outages and extreme weather.

[0063] In this embodiment, the dynamic residual monitoring module monitors the difference between the predicted value and the actual value in real time. When the residual is less than the set threshold, the predicted result is directly output. When the residual exceeds the threshold, the lightweight correction network is triggered to correct the result.

[0064] Let the predicted value be , the true value be , and the residual be calculated as ; Set the residual threshold . When , the predicted result is directly output. When , the correction process is entered.

[0065] The correction network performs rapid correction according to the residual value. The correction network can adopt structures such as small-scale multi-layer perceptron (MLP), one-dimensional convolutional filter, or Kalman filter, and its output is ; wherein represents a correction function. The final output result is , which can effectively reduce the deviation under abnormal conditions and ensure the stability of the prediction. Through this mechanism, the application can maintain the stability of the prediction under abnormal conditions such as holidays, sudden power outages, and extreme weather, significantly enhancing the robustness of the method.

[0066] The past K-step load sequence (i.e., the historical sample load energy sequence) is input in a sliding window manner, and after processing by the above modules, the future H-step predicted value is output, realizing multi-step energy consumption prediction.

[0067] Let the input window length be , and the prediction step be . Take the past step load energy sequence as input, and output the future step prediction result: ; In the training phase, the parallel prediction method means that the model simultaneously outputs the prediction results of the future H steps in one forward propagation, without needing to take the prediction value of the previous time as the input of the next time. The core idea is: through training, the model has learned the direct mapping relationship from "past K-step input sequence → future H-step target sequence" through sliding window learning, i.e.: ; wherein is the load energy consumption prediction model, the input is the past K-step true load sequence and external auxiliary features, and the output is the future H-step prediction sequence.

[0068] Therefore, in the training stage, after inputting the historical data of the past K steps, the model can generate the prediction results of the future H steps at one time .

[0069] This way does not rely on the prediction value of the previous moment as input, has high calculation efficiency and fast inference speed, and is suitable for short-term and medium-term prediction (such as energy consumption prediction for the next 24 hours or the next 7 days).

[0070] In the training process, the dynamic residual correction mechanism is used in combination with multi-step prediction. When the prediction result deviates, the dynamic residual correction mechanism corrects it, thereby effectively suppressing the cumulative effect of errors in multi-step prediction.

[0071] This design supports multi-step prediction for short-term and medium-term, such as hourly prediction for the next 24 hours, and can also be extended to daily prediction for the next 30 days, and the prediction result is more accurate and stable.

[0072] Based on the same inventive concept, the embodiments of the present application also provide a device for implementing the above-mentioned load energy consumption prediction method based on TCN-GLU-Attention. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more TCN-GLU-Attention-based load energy consumption prediction device embodiments provided below can be referred to the limitations of the TCN-GLU-Attention-based load energy consumption prediction method in the above, which will not be repeated here.

[0073] In one exemplary embodiment, a TCN-GLU-Attention-based load energy consumption prediction device is provided, comprising: A data acquisition module for acquiring a current load energy consumption sequence.

[0074] A prediction module for inputting the current load energy consumption sequence into a load energy consumption prediction model to predict future load energy consumption and obtain a future load energy consumption sequence; wherein the load energy consumption prediction model is trained on a TCN-GLU-Attention network with historical sample load energy consumption sequences as input and external auxiliary features as labels; the external auxiliary features include temperature, humidity, wind speed, sunshine duration, holidays, and weekdays; the TCN-GLU-Attention network includes a TCN network, a GLU network, a multi-head attention mechanism network, and a position feedforward network.

[0075] The prediction module comprises: A feature extraction module for inputting the current load energy consumption sequence into the TCN network for feature extraction to obtain multi-scale time series features.

[0076] The feature selection module is configured to input the multi-scale time sequence features into the GLU network for dynamic selection to obtain key features.

[0077] The feature fusion module is configured to input the key features into the multi-head attention mechanism network for context information fusion to obtain fusion features.

[0078] In an exemplary embodiment, a computer device is provided, which can be a server or a terminal, and an internal structure diagram thereof can be as shown in Figure 5 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store load energy consumption sequences. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement the load energy consumption prediction method based on TCN-GLU-Attention.

[0079] Those skilled in the art can understand that Figure 5 The structure shown in the above

[0080] In an exemplary embodiment, a computer device is provided, which includes a memory and a processor, and the memory stores a computer program. The processor executes the computer program to implement the steps in the above method embodiments.

[0081] In an exemplary embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0082] In an exemplary embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0083] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0084] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0085] The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0086] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, it should be understood that the application encompasses all possible combinations of the technical features unless such a combination is not technically possible.

[0087] The principles and implementations of the present application have been described in specific examples, and the above descriptions of the embodiments are only used to help understand the method and its core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation and application range can be changed. In summary, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A load energy consumption prediction method based on TCN-GLU-Attention, characterized in that, include: Obtain the current load energy consumption sequence; The current load energy consumption sequence is input into the load energy consumption prediction model to predict future load energy consumption, thus obtaining the future load energy consumption sequence. The load energy consumption prediction model is trained on a TCN-GLU-Attention network using historical sample load energy consumption sequences as input and external auxiliary features as labels. These external auxiliary features include temperature, humidity, wind speed, sunshine duration, holidays, and weekdays. The TCN-GLU-Attention network comprises a TCN network, a GLU network, a multi-head attention mechanism network, and a location feedforward network. Specifically, the current load energy consumption sequence is input into the load energy consumption prediction model to predict future load energy consumption, thereby obtaining the future load energy consumption sequence, which includes: The current load energy consumption sequence is input into the TCN network for feature extraction to obtain multi-scale time-series features; The multi-scale temporal features are input into the GLU network for dynamic selection to obtain key features; The key features are input into the multi-head attention mechanism network for contextual information fusion to obtain fused features; The fused features are input into the location feedforward network to obtain the future load energy consumption sequence.

2. The load energy consumption prediction method based on TCN-GLU-Attention according to claim 1, characterized in that, The TCN network is composed of eight residual dilated convolutional blocks stacked sequentially.

3. The load energy consumption prediction method based on TCN-GLU-Attention according to claim 2, characterized in that, The residual dilated convolutional block comprises a one-dimensional dilated convolutional layer, a normalization layer, a ReLU activation function, and a Dropout layer connected in sequence.

4. The load energy consumption prediction method based on TCN-GLU-Attention according to claim 1, characterized in that, The GLU network includes a gating unit and a residual computation unit; Specifically, the multi-scale temporal features are input into the GLU network for dynamic selection to obtain key features, including: The multi-scale temporal features are input into the gating unit to dynamically filter the features and obtain initial key features. The initial key features and the multi-scale temporal features are input into the residual operation unit for residual operation to obtain the key features.

5. The load energy consumption prediction method based on TCN-GLU-Attention according to claim 4, characterized in that, The gating unit includes two parallel branches, namely a first branch and a second branch; the first branch includes a one-dimensional dilated convolutional layer and a second branch connected in sequence. Activation function; the second branch consists of sequentially connected one-dimensional dilated convolutional layers and Activation function.

6. The load energy consumption prediction method based on TCN-GLU-Attention according to claim 1, characterized in that, The key features are input into the multi-head attention mechanism network for contextual information fusion to obtain fused features, specifically including: The key features are linearly transformed to obtain multiple sets of query matrices, key matrices, and value matrices. For any set of query matrix, key matrix, and value matrix, attention weights are obtained using the query matrix and the key matrix, and the corresponding value matrix is ​​weighted and summed using the attention weights to obtain global features that aggregate global context information. The fused feature is obtained by concatenating multiple sets of global features and performing a linear transformation on the concatenated global features.

7. A load energy consumption prediction device based on TCN-GLU-Attention, characterized in that, include: The data acquisition module is used to acquire the current load energy consumption sequence; The prediction module is used to input the current load energy consumption sequence into the load energy consumption prediction model to predict future load energy consumption, thereby obtaining the future load energy consumption sequence. The load energy consumption prediction model is trained on a TCN-GLU-Attention network using historical sample load energy consumption sequences as input and external auxiliary features as labels. These external auxiliary features include temperature, humidity, wind speed, sunshine duration, holidays, and weekdays. The TCN-GLU-Attention network includes a TCN network, a GLU network, a multi-head attention mechanism network, and a location feedforward network. The prediction module includes: The feature extraction module is used to input the current load energy consumption sequence into the TCN network for feature extraction to obtain multi-scale time series features; The feature selection module is used to input the multi-scale temporal features into the GLU network for dynamic selection to obtain key features; The feature fusion module is used to input the key features into the multi-head attention mechanism network to fuse contextual information and obtain fused features.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the load energy consumption prediction method based on TCN-GLU-Attention as described in any one of claims 1-6.

9. 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 load energy consumption prediction method based on TCN-GLU-Attention as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the load energy consumption prediction method based on TCN-GLU-Attention as described in any one of claims 1-6.