A short-term power load prediction method, system, device and medium based on wavelet decomposition and parallel gated attention network

CN123018772APending Publication Date: 2026-10-30NANJING UNIV OF AERONAUTICS & ASTRONAUTICS +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610874425.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0007]因此,本发明提供了一种基于小波分解与并行门控注意力网络的短期电力负荷预测方法、系统、设备及介质解决现有短期电力负荷预测技术在面对强非平稳、多尺度电力负荷数据时,存在的特征解耦与异构融合能力不足,以及高精度预测模型缺乏内在可解释性的问题

Benefits of technology

[0013]本优选技术方案的有益效果为,通过为周期编码分支配置层数更少的第二多头注意力网络,在精准捕捉短期高频波动模式与局部时序依赖的同时,有效避免了模型冗余,实现了计算效率与预测精度的最佳平衡。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123018772A_ABST
    Figure CN123018772A_ABST
Patent Text Reader

Abstract

The application discloses a short-term power load prediction method, system, device and medium based on wavelet decomposition and parallel gate attention network, comprising: acquiring multi-source heterogeneous data and performing cleaning, alignment and standardization processing, and constructing a multi-source heterogeneous feature matrix; using maximum overlap discrete wavelet transform to decompose the historical load sequence into a low-frequency trend component and a high-frequency periodic component; constructing a heterogeneous parallel multi-head attention encoding network, inputting the low-frequency trend component and the external environment feature matrix into the trend encoding branch after fusion, extracting long-term trend feature representation, inputting the high-frequency periodic component into the periodic encoding branch, and extracting short-term periodic feature representation; based on context information, the dynamic weights of the two are adaptively calculated and fused, and the short-term power load prediction value is output. The application improves the short-term power load prediction accuracy and long-step stability, and gives the model double explainability based on the attention mechanism and the SHAP framework.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of load forecasting technology, and in particular to a short-term power load forecasting method, system, device and medium based on wavelet decomposition and parallel gated attention network. Background Technology

[0002] In the context of new power systems, power load exhibits strong non-stationarity and multi-scale characteristics. Existing short-term power load forecasting technologies face the following four main technical bottlenecks when dealing with this complex task: First, traditional statistical and machine learning methods lack generalization ability. Traditional methods struggle to effectively handle the increasingly significant nonlinear and non-stationary load data after the integration of new energy sources, and they heavily rely on manual feature engineering, failing to automatically extract deep abstract features from massive high-dimensional data.

[0003] Second, existing deep learning methods have shortcomings in feature decoupling and fusion. A single network structure is difficult to independently model both low-frequency macro trends and high-frequency local mutations in the load, and the coarse splicing and fusion of multi-dimensional heterogeneous features can easily lead to high-frequency noise drowning out low-frequency trend information.

[0004] Third, the hybrid models based on signal decomposition have limitations in their mathematical mechanisms. Existing decomposition algorithms generally suffer from problems such as endpoint effects, mode aliasing, and hyperparameter sensitivity, and lack translation invariance, which makes the decomposition results prone to distortion and affects the stability of prediction.

[0005] Fourth, high-precision deep learning models lack inherent interpretability. The inherent "black box" nature of deep learning models makes it difficult to trace the decision-making logic, while existing ex-post interpretation methods are computationally complex and not deeply coupled with the model, making it difficult to meet the requirements of power grid dispatch for transparency in auxiliary decision-making. Summary of the Invention

[0006] In view of the aforementioned existing problems, the present invention is proposed.

[0007] Therefore, this invention provides a short-term power load forecasting method, system, device, and medium based on wavelet decomposition and parallel gated attention network to solve the problems of insufficient feature decoupling and heterogeneous fusion capabilities, as well as the lack of inherent interpretability of high-precision forecasting models, when facing strongly non-stationary, multi-scale power load data.

[0008] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a short-term power load forecasting method based on wavelet decomposition and parallel gated attention networks, comprising: Acquire multi-source heterogeneous data, clean, align and standardize the multi-source heterogeneous data, and construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices; The historical load sequence is decoupled in time using the maximum overlap discrete wavelet transform, and the historical load sequence is decomposed into low-frequency trend components and high-frequency periodic components. A heterogeneous parallel multi-head attention encoding network is constructed. The low-frequency trend component is fused with the external environment feature matrix and then input into the first multi-head attention network of the trend encoding branch to extract long-term trend feature representation. The high-frequency periodic component is input into the second multi-head attention network of the period encoding branch to extract short-term periodic feature representation. Based on the contextual information formed by the long-term trend feature representation and the short-term cycle feature representation, the dynamic weights of the long-term trend feature representation and the short-term cycle feature representation are adaptively calculated, the features are fused according to the dynamic weights, and the short-term power load forecast value is output through the forecast head.

[0009] As a preferred embodiment of the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network described in this invention, wherein: the multi-source heterogeneous data includes historical power load data, micro-meteorological data and calendar attribute data; The step of cleaning, aligning, and standardizing the multi-source heterogeneous data to construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices includes: The sliding window mean interpolation algorithm is used to correct missing values ​​and outlier data points that exceed the preset value range in the original multi-source heterogeneous data. The corrected data from different sources are then aligned based on a unified timestamp index to obtain the original feature sequence with time synchronization. The original feature sequence of the time synchronization is scaled using the standard fractional normalization algorithm to eliminate the dimensional differences in the global input matrix containing the target load and multidimensional meteorological variables, thereby obtaining a standardized feature matrix; Based on the time backtracking window length determined by autocorrelation analysis, the standardized feature matrix is ​​sliced ​​and recombined to construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices.

[0010] As a preferred embodiment of the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network described in this invention, the step of using maximum overlap discrete wavelet transform to decouple the historical load sequence in time, decomposing the historical load sequence into low-frequency trend components and high-frequency periodic components, includes: The Dabusi wavelet is selected as the mother wavelet, and the number of decomposition layers is set. Based on the mother wavelet and the number of decomposition layers, the corresponding low-pass filter and high-pass filter are constructed. The historical load sequence is filtered using the low-pass filter to extract a low-frequency approximate sequence characterizing the long-term evolution baseline as a low-frequency trend component. The historical load sequence is filtered using the high-pass filter to extract high-frequency detail sequences that characterize short-term fluctuations and local mutations as high-frequency periodic components.

[0011] As a preferred embodiment of the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network described in this invention, the step of fusing the low-frequency trend component with the external environment feature matrix and inputting it into the first multi-head attention network of the trend coding branch to extract long-term trend feature representation includes: The low-frequency trend component is spliced ​​and fused with the full external environment feature matrix in a high-dimensional latent space to obtain the fused feature matrix. The fused feature matrix is ​​dimensionally aligned by a fully connected layer, mapping features from different sources to a unified feature space to obtain the dimensionally aligned fused features. The fused features after dimensional alignment are input into a multi-head self-attention network with a first preset number of layers to capture the long-term smooth evolution pattern constrained by the macro environment and output a long-term trend feature representation.

[0012] As a preferred embodiment of the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network described in this invention, wherein: the step of inputting the high-frequency periodic component into the second multi-head attention network with periodic coding branch to extract short-term periodic feature representation includes: For the periodic encoding branch, the external environment feature matrix is ​​subjected to dimensionality reduction mapping through a fully connected layer to obtain a compressed feature representation; The compressed feature representation is fused with the high-frequency periodic component; The fused features are input into a lightweight multi-head self-attention subnetwork with a second preset number of layers. By generating query, key and value matrices and using scaled dot product attention to calculate temporal dependency weights, short-term fluctuation patterns and local temporal dependencies are captured, and short-term periodic feature representations are output. The first preset number of layers is greater than the second preset number of layers.

[0013] The beneficial effect of this preferred technical solution is that by configuring a second multi-head attention network with fewer layers for the periodic coding branch, it can accurately capture short-term high-frequency fluctuation patterns and local temporal dependencies while effectively avoiding model redundancy, thus achieving the best balance between computational efficiency and prediction accuracy.

[0014] As a preferred embodiment of the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network described in this invention, the step of adaptively calculating the dynamic weights of the long-term trend feature representation and the short-term periodic feature representation based on the context information constituted by the long-term trend feature representation and the short-term periodic feature representation, and fusing the features according to the dynamic weights, includes: Long-term trend features and short-term cycle features are stacked on the feature dimension to form a context feature matrix; The context feature matrix is ​​nonlinearly mapped using a learnable single-layer feedforward network, and gating weights representing the importance of each feature component are generated via a sigmoid activation function. The generated gating weights are used to perform element-level weighted summation on the corresponding long-term trend feature representation and short-term cycle feature representation to generate a unified fusion feature representation containing full-band information.

[0015] The beneficial effect of this preferred technical solution is that by adaptively calculating and allocating dynamic weights through a learnable gating mechanism, it achieves accurate on-demand fusion of long-term trends and short-term cyclical characteristics, thereby significantly improving the model's predictive robustness to complex load changes while retaining key information across the entire frequency band.

[0016] As a preferred embodiment of the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network described in this invention, the method further includes: after outputting the short-term power load forecast value via the forecast head, the method further includes: Extract the attention weight matrix inside the heterogeneous parallel multi-head attention encoding network to generate weight distribution data representing the attention patterns of the model at key historical time nodes; The Shapley additive attribution framework is invoked to quantify the marginal contribution of each input feature to the prediction results, generating attribution analysis results that characterize the physical driving logic of each feature.

[0017] Secondly, the present invention provides a short-term power load forecasting system based on wavelet decomposition and parallel gated attention network, comprising: A multi-source heterogeneous feature construction module is used to acquire multi-source heterogeneous data, clean, align and standardize the multi-source heterogeneous data, and construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices. The time-series decoupling decomposition module is used to decouple the historical load sequence in time using the maximum overlap discrete wavelet transform, and decompose the historical load sequence into low-frequency trend components and high-frequency periodic components. The heterogeneous parallel feature encoding module is used to construct a heterogeneous parallel multi-head attention encoding network. After fusing the low-frequency trend component with the external environment feature matrix, it is input into the first multi-head attention network of the trend encoding branch to extract long-term trend feature representation, and the high-frequency periodic component is input into the second multi-head attention network of the periodic encoding branch to extract short-term periodic feature representation. The dynamic fusion prediction module is used to adaptively calculate the dynamic weights of the long-term trend feature representation and the short-term cycle feature representation based on the context information composed of the long-term trend feature representation and the short-term cycle feature representation, fuse the features according to the dynamic weights, and output the short-term power load prediction value through the prediction head.

[0018] Thirdly, the present invention provides an electronic device, comprising: Memory, used to store programs; A processor for executing the computer-executable instructions, which, when executed by the processor, implement the steps of the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network.

[0019] Fourthly, the present invention provides a computer-readable storage medium, comprising: when the program is executed by a processor, the steps of implementing the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network.

[0020] The beneficial effects of this invention are as follows: This invention uses maximum overlap discrete wavelet transform to decouple historical load sequences in time, and combines a heterogeneous parallel multi-head attention coding network to extract long-term trend and short-term periodic features respectively, achieving targeted in-depth mining of different frequency components in power load data; by differentiating the number of layers of the multi-head attention network in the trend coding branch and the periodic coding branch, and combining a gated attention dynamic fusion module to adaptively calculate feature weights, it achieves accurate capture of key information across the entire frequency band while significantly reducing the computational redundancy of the model, achieving the best balance between prediction accuracy and computational efficiency; by introducing the Shapley additive attribution framework to quantify the attention weights and feature marginal contributions within the model, it provides physically interpretable data support and driving logic for power system scheduling decisions. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1A schematic diagram of the basic process of a short-term power load forecasting method based on wavelet decomposition and parallel gated attention network provided in an embodiment of the present invention; Figure 2 A complete network structure diagram of a short-term power load forecasting method based on wavelet decomposition and parallel gated attention network is provided as an embodiment of the present invention. Figure 3 The following is a time series diagram of a short-term power load forecasting method based on wavelet decomposition and parallel gated attention network, provided as an embodiment of the present invention. Detailed Implementation

[0022] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0023] Example 1, referring to Figure 1 As an embodiment of the present invention, a short-term power load forecasting method based on wavelet decomposition and parallel gated attention network is provided, comprising: S100: Acquire multi-source heterogeneous data, clean, align and standardize the multi-source heterogeneous data, and construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices; S200: The historical load sequence is decoupled in time using the maximum overlap discrete wavelet transform, and the historical load sequence is decomposed into low-frequency trend components and high-frequency periodic components. S300: Construct a heterogeneous parallel multi-head attention encoding network, fuse the low-frequency trend component with the external environment feature matrix and input it into the first multi-head attention network of the trend encoding branch to extract long-term trend feature representation, and input the high-frequency periodic component into the second multi-head attention network of the periodic encoding branch to extract short-term periodic feature representation. S400: Based on the context information formed by the long-term trend feature representation and the short-term cycle feature representation, adaptively calculate the dynamic weights of the long-term trend feature representation and the short-term cycle feature representation, fuse the features according to the dynamic weights, and output the short-term power load forecast value through the forecast head.

[0024] It should be noted that during operation, short-term power load data is subject to the combined influence of multiple factors such as sudden changes in meteorological conditions, patterns of social activities, and holiday effects. As a result, the data exhibits strong non-stationarity and multi-scale characteristics, which means that the load sequence simultaneously contains low-frequency trends that characterize the long-term evolution baseline and high-frequency periodic components that reflect short-term fluctuations and changes, posing a significant challenge to accurate modeling. At the same time, existing prediction models often struggle to effectively decouple and integrate macro trends and micro fluctuations when dealing with multi-source heterogeneous data, leading to insufficient prediction accuracy at load inflection points and peak times. Furthermore, the internal decision-making logic of the model lacks interpretability, making it difficult to meet the stringent requirements of power grid dispatch for transparency and reliability of auxiliary decision-making tools.

[0025] Therefore, addressing the issues of insufficient feature decoupling and heterogeneous fusion capabilities, and the lack of inherent interpretability in high-precision prediction models when facing highly non-stationary, multi-scale power load data, existing short-term power load forecasting technologies employ steps S100-S400. By introducing maximum overlap discrete wavelet transform to perform lossless multi-scale decoupling of the load sequence, and combining heterogeneous parallel attention networks with gated dynamic fusion mechanisms, accurate collaborative modeling of long-term trends and short-term fluctuations is achieved. This significantly improves prediction accuracy and long-step stability, while leveraging attention visualization and Shapley additive interpretation (SHAP) attribution analysis to endow the model with excellent physical interpretability.

[0026] Example 2, this is an embodiment of the present invention, which provides a short-term power load forecasting method based on wavelet decomposition and parallel gated attention network, based on the previous embodiment, including: like Figure 2 As shown, the network structure mainly consists of four core stages. The first stage is multi-scale decoupling of input, which decouples the historical load sequence into a high-frequency detail sequence and a low-frequency approximate sequence through maximum overlap discrete wavelet transform. The second stage is parallel multi-head attention encoding, where high-frequency components enter multiple parallel multi-head attention sub-networks to capture periodic features, while low-frequency components are concatenated with macro-environment features and injected into a deep multi-head attention network to extract long-term trend features. The third stage is gated attention dynamic fusion, which uses gated context units to generate importance weights and performs weighted summation of trend and periodic representations through an adaptive aggregation layer to obtain fused features. The fourth stage is prediction output, where the fused features are mapped through a multilayer perceptron to obtain the final load prediction value.

[0027] like Figure 3As shown, the overall processing flow of this method unfolds sequentially in chronological order. Data preprocessing is performed, including cleaning, alignment, and standardization, constructing historical load and environmental feature matrices, and inputting them into the system. Then, the wavelet decomposition stage is entered, using a Darbusch wavelet high-pass filter to perform maximum overlap discrete wavelet transform, decoupling the signal into low-frequency trend components and high-frequency periodic components. Next, the parallel attention processing stage employs a heterogeneous parallel coding network. Deep networks process low-frequency trends and full environmental features to generate long-term trend representations, while shallow networks process high-frequency periodic and dimensionality-reduced environmental features to generate short-term periodic representations. In the fusion and output stage, the above features are stacked and fused using Sigmoid gating weighting, outputting the results through a prediction head. Attention weights can be further extracted for SHAP attribution explanation.

[0028] In this embodiment of the application, the multi-source heterogeneous data in step S100 includes historical power load data, micro-meteorological data, and calendar attribute data; The step of cleaning, aligning, and standardizing the multi-source heterogeneous data to construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices includes: The sliding window mean interpolation algorithm is used to correct missing values ​​and outlier data points that exceed the preset value range in the original multi-source heterogeneous data. The corrected data from different sources are then aligned based on a unified timestamp index to obtain the original feature sequence with time synchronization. The original feature sequence of the time synchronization is scaled using the Z-score normalization algorithm to eliminate the dimensional differences in the global input matrix containing the target load and multidimensional meteorological variables, thereby obtaining the standardized feature matrix. Based on the time backtracking window length determined by autocorrelation analysis, the standardized feature matrix is ​​sliced ​​and recombined to construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices.

[0029] Specifically, Pearson cross-correlation and autocorrelation analysis are used to quantify the influence of various meteorological factors and historical loads on the target sequence and the periodic lag effect; based on the autocorrelation analysis results (for example, the autocorrelation coefficient shows a significant peak at nodes that are multiples of 24 hours in delay), a time backtracking window (specifically, the past 72 hours) is set to construct a high-quality multi-source heterogeneous feature matrix for supervised learning. Define historical load sequence External environment feature matrix Where S is the backtracking window length, This refers to the environmental characteristics dimension.

[0030] In this embodiment of the application, step S200 utilizes maximum overlap discrete wavelet transform to perform time-series decoupling on the historical load sequence, decomposing the historical load sequence into low-frequency trend components and high-frequency periodic components, including: The Daubechies 2 wavelet was selected as the mother wavelet, and the number of decomposition layers was set. Based on the mother wavelet and the number of decomposition layers, the corresponding low-pass and high-pass filters were constructed. The historical load sequence is filtered using the low-pass filter to extract a low-frequency approximate sequence characterizing the long-term evolution baseline as a low-frequency trend component. The historical load sequence is filtered using the high-pass filter to extract high-frequency detail sequences that characterize short-term fluctuations and local mutations as high-frequency periodic components.

[0031] In an optional implementation, the time-series decoupling method in step S200 can also utilize a variational mode decomposition algorithm. By setting the number of modes and the penalty factor, the historical load sequence is adaptively decomposed into several intrinsic mode functions with specific center frequencies. The mode component with the lowest center frequency is taken as the low-frequency trend component, and the superposition of the remaining mode components is taken as the high-frequency periodic component, so as to achieve frequency domain decoupling of the load sequence.

[0032] In an optional implementation, the time-series decoupling method in step S200 can also use Fourier transform to convert the historical load sequence from the time domain to the frequency domain, perform low-pass filtering by setting a cutoff frequency to extract the low-frequency trend component characterizing the long-term evolution baseline, and restore the remaining high-frequency spectrum after filtering out the low-frequency component by inverse transform, thereby obtaining the high-frequency periodic component characterizing short-term fluctuations.

[0033] Specifically, the maximum overlap discrete wavelet transform has translation invariance and non-downsampling characteristics, which can ensure that the length of each subsequence after decomposition is consistent with the original sequence and maintain time alignment; The number of decomposition layers J=1 is determined based on the input sequence length and the filter length; the decomposition process is performed through a low-pass filter. and high-pass filter The recursive implementation, its discrete mathematical expression is as follows: in, Indicates the first Low-frequency approximation coefficients (trend components) of the layer, subscript Indicates a discrete-time index; Indicates the first High-frequency detail coefficients (periodic components) of the layer; Indicates the number of decomposition levels; Indicates the length of the filter; Indicates the coefficients of the low-pass filter; Indicates the coefficients of the high-pass filter; This indicates the length of the original load sequence, in this embodiment. ; This represents the modulo operation, which implements circular convolution and ensures translation invariance.

[0034] After one layer of decomposition, the original load sequence Losslessly decoupled into a low-frequency approximate sequence (Trend component) and a high-frequency detail sequence (Cyclical component). The trend component filters out instantaneous noise and is used to characterize the long-term load evolution baseline; the cyclical component is used to capture short-term fluctuations caused by sudden weather changes or peak electricity consumption.

[0035] In this embodiment of the application, step S300, which involves fusing the low-frequency trend component with the external environment feature matrix and inputting the result into the first multi-head attention network of the trend encoding branch to extract long-term trend feature representation, includes: To avoid mutual interference between features of different frequency bands during transmission, this step designs a parallel heterogeneous coding path; The low-frequency trend component is spliced ​​and fused with the full external environment feature matrix in a high-dimensional latent space to obtain the fused feature matrix. The fused feature matrix is ​​dimensionally aligned by a fully connected layer, mapping features from different sources to a unified feature space to obtain the dimensionally aligned fused features. The fused features after dimensional alignment are input into a multi-head self-attention network with a first preset number of layers to capture long-term smooth evolution patterns constrained by the macroscopic environment and output long-term trend feature representations. .

[0036] In the embodiments of this application, the first multi-head attention network can also be called a deep attention network, which is used to process low-frequency trend components; the second multi-head attention network can also be called a shallow attention network, which is used to process high-frequency periodic components.

[0037] Specifically, the number of network layers in the first multi-head attention network is defined as a first preset number of layers, and the number of network layers in the second multi-head attention network is defined as a second preset number of layers.

[0038] It should be noted that the first and second preset number of layers are configured differently based on the feature frequency characteristics. Since long-term trend features need to capture time-series dependencies with a large span, the first preset number of layers is configured with a larger value (e.g., 4-8 layers); since short-term cycle features mainly focus on local fluctuations, the second preset number of layers is configured with a smaller value (e.g., 1-3 layers). That is, the relationship is: first preset number of layers > second preset number of layers.

[0039] This heterogeneous layer configuration, namely the deep-shallow structure, ensures that the trend branch has sufficient fitting ability while avoiding overfitting of the periodic branch due to too many parameters, thus achieving a balance between model complexity and prediction accuracy.

[0040] In this embodiment of the application, step S300, which involves inputting high-frequency periodic components into the second multi-head attention network of the periodic coding branch to extract short-term periodic feature representations, includes: For the periodic encoding branch, the external environment feature matrix is ​​subjected to dimensionality reduction mapping through a fully connected layer to obtain a compressed feature representation; The compressed feature representation is fused with the high-frequency periodic component; The fused features are input into a lightweight multi-head self-attention subnetwork with a second preset number of layers. By generating query, key and value matrices and using scaled dot product attention to calculate temporal dependency weights, short-term fluctuation patterns and local temporal dependencies are captured, and short-term periodic feature representations are output. The first preset number of layers is greater than the second preset number of layers.

[0041] In an optional implementation, the multi-source feature fusion mechanism in step S300 can also use the low-frequency trend component as a query vector, map the external environment feature matrix into a key vector and a value vector, and perform weighted aggregation on the value vector by calculating the scaling dot product attention weight of the query vector and the key vector, thereby adaptively extracting the long-term trend feature representation that is dynamically constrained by environmental factors.

[0042] In an optional implementation, the multi-source feature fusion mechanism in step S300 can also map the low-frequency trend component and the external environment feature matrix to a unified feature dimension through a fully connected layer, and then add the two element by element to use the environmental features to correct the offset of the load features, thereby obtaining the fused feature matrix.

[0043] In an optional implementation, step S300 can also extract temporal features by inputting the features into a temporal convolutional network (TCN) composed of alternating stacks of multi-layer one-dimensional causal convolutions and dilated convolutions. The receptive field is expanded by an exponentially increasing dilatation rate, thereby efficiently extracting long and short-term temporal feature representations from the sequence.

[0044] In an optional implementation, step S300 can also extract time-series features by using a moving average filter to decouple the input features into trend components and seasonal components. The historical backtracking window is directly mapped to the prediction window through an independent single-layer linear layer, and the outputs of the two parts are added together, thereby efficiently extracting time-series feature representations.

[0045] Specifically, for high-frequency detail components Based on its fused features, this lightweight multi-head self-attention subnetwork generates query (Q), key (K), and value (V) matrices through linear mapping: in Represents the query matrix; Represents the key matrix; Represents a value matrix; The learnable linear transformation weight matrix maps the input to different representation subspaces.

[0046] And use scaled dot product attention to compute temporal dependency weights: in, The attention output is represented by a weighted summation matrix of values. The normalized exponential function converts the scores into a probability distribution. This means that the attention score matrix is ​​obtained by multiplying the query matrix by the transpose of the key matrix; Indicates the scaling factor. The dimension of the key vector is used to prevent the gradient from vanishing due to an excessively large dot product.

[0047] A multi-head mechanism is employed to concatenate and linearly transform the outputs of multiple independent attention heads, resulting in a periodic feature representation. .

[0048] In this embodiment of the application, in order to achieve adaptive and efficient fusion of multi-source features and prevent feature overload, the following further methods are included: For the low-frequency approximation component A, an independent trend encoding path is constructed. This path also uses a multi-head self-attention network as its core, but with deeper network layers to obtain a larger receptive field, which is used to capture long-term smooth evolution patterns. Simultaneously, a macro-environment information injection mechanism is designed: the low-frequency trend component A is combined with the full external environment feature matrix. The feature matrix is ​​spliced ​​together in the high-dimensional latent space and then fused. Specifically: in, This represents the unified characteristic representation after fusion; This represents a concatenation operation along the feature dimension; This represents the learnable linear transformation weight matrix.

[0049] The fused matrix is ​​then dimensionally aligned using a fully connected layer and used as input to the trend encoder, outputting a trend feature representation. .

[0050] In this embodiment of the application, step S400 adaptively calculates the dynamic weights of the long-term trend feature representation and the short-term cycle feature representation based on the context information constituted by the long-term trend feature representation and the short-term cycle feature representation, and fuses the features according to the dynamic weights, including: Long-term trend features and short-term cycle features are stacked on the feature dimension to form a context feature matrix; The context feature matrix is ​​nonlinearly mapped using a learnable single-layer feedforward network, and gating weights representing the importance of each feature component are generated via a sigmoid activation function. The generated gating weights are used to perform element-wise weighted summation of the corresponding long-term trend feature representations and short-term cycle feature representations to generate a unified fused feature representation containing information across the entire frequency band. .

[0051] In an optional implementation, the multi-scale feature fusion strategy in step S400 can also concatenate the long-term trend feature representation and the short-term cycle feature representation in the feature dimension, and input the concatenated context feature matrix into the gated linear unit (GLU). A linear transformation is performed through one branch, and a dynamic gating signal is generated through the Swish activation function on the other branch. The two are multiplied element by element, thereby implicitly realizing the adaptive nonlinear fusion of multi-scale features.

[0052] In an optional implementation, the multi-scale feature fusion strategy in step S400 can also directly concatenate the long-term trend feature representation and the short-term cycle feature representation in the feature dimension, and input the concatenated unified feature matrix into the fully connected prediction head for nonlinear mapping and dimension transformation, thereby outputting the final short-term power load prediction value.

[0053] Specifically, gating weights The calculation formula is as follows: in, Indicates the first The gating weights for each feature component (trend or cycle), with a value range of... The sigmoid activation function compresses the output to... interval; Represents the learnable linear transformation weight matrix; Hidden layer representations that represent trend or cyclical characteristics; This represents the learnable bias term. The unified fusion feature representation is as follows: in, This represents the unified characteristic representation after fusion; Gating weights representing trend components; The gating weights represent the periodic components; The feature representation of the trend encoding path output; The feature representation of the output of the periodic coding path; This represents element-wise multiplication (Hadamard product).

[0054] This mechanism enables the model to dynamically adjust the contribution weights of trend and periodic components based on the input context. The fused unified feature representation The information encompasses the entire frequency band, from global evolution to local fluctuations. It is input into a prediction head consisting of two multilayer perceptrons. The first layer performs nonlinear dimensionality reduction using the ReLU activation function, and the second layer outputs the final target time step power load prediction value through linear mapping. .

[0055] In this embodiment of the application, the short-term power load forecasting method further includes a model training stage: the model training uses mean squared error as the loss function, uses the Adam optimizer to update parameters, and introduces Dropout, L2 regularization and early stopping strategies to prevent overfitting.

[0056] In this embodiment of the application, after outputting the short-term power load forecast value via the forecast head, the method further includes: Extract the attention weight matrix inside the heterogeneous parallel multi-head attention encoding network to generate weight distribution data representing the attention patterns of the model at key historical time nodes; The Shapley additive attribution framework is invoked to quantify the marginal contribution of each input feature to the prediction results, generating attribution analysis results that characterize the physical driving logic of each feature.

[0057] Example 3 is an embodiment of the present invention. This embodiment differs from the first embodiment in that it provides a short-term power load forecasting system based on wavelet decomposition and parallel gated attention network.

[0058] It should be noted that the technical solution of the short-term power load forecasting system based on wavelet decomposition and parallel gated attention network is based on the same concept as the technical solution of the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network described above. For details not described in detail in the technical solution of the short-term power load forecasting system based on wavelet decomposition and parallel gated attention network in this embodiment, please refer to the description of the technical solution of the short-term power load forecasting method based on wavelet decomposition and parallel gated attention network described above.

[0059] This embodiment presents a short-term power load forecasting system based on wavelet decomposition and parallel gated attention networks, comprising: A multi-source heterogeneous feature construction module is used to acquire multi-source heterogeneous data, clean, align and standardize the multi-source heterogeneous data, and construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices. The time-series decoupling decomposition module is used to decouple the historical load sequence in time using the maximum overlap discrete wavelet transform, and decompose the historical load sequence into low-frequency trend components and high-frequency periodic components. The heterogeneous parallel feature encoding module is used to construct a heterogeneous parallel multi-head attention encoding network. After fusing the low-frequency trend component with the external environment feature matrix, it is input into the first multi-head attention network of the trend encoding branch to extract long-term trend feature representation, and the high-frequency periodic component is input into the second multi-head attention network of the periodic encoding branch to extract short-term periodic feature representation. The dynamic fusion prediction module is used to adaptively calculate the dynamic weights of the long-term trend feature representation and the short-term cycle feature representation based on the context information composed of the long-term trend feature representation and the short-term cycle feature representation, fuse the features according to the dynamic weights, and output the short-term power load prediction value through the prediction head.

[0060] This embodiment also provides an electronic device applicable to a short-term power load forecasting method based on wavelet decomposition and parallel gated attention networks, including: The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement a short-term power load forecasting method based on wavelet decomposition and parallel gated attention networks, as proposed in the above embodiments.

[0061] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a short-term power load forecasting method based on wavelet decomposition and parallel gated attention network as proposed in the above embodiment.

[0062] The storage medium proposed in this embodiment and the method for short-term power load forecasting based on wavelet decomposition and parallel gated attention network proposed in the above embodiment belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0063] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0064] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A short-term power load forecasting method based on wavelet decomposition and parallel gated attention network, characterized in that, include: Acquire multi-source heterogeneous data, clean, align and standardize the multi-source heterogeneous data, and construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices; The historical load sequence is decoupled in time using the maximum overlap discrete wavelet transform, and the historical load sequence is decomposed into low-frequency trend components and high-frequency periodic components. A heterogeneous parallel multi-head attention encoding network is constructed. The low-frequency trend component is fused with the external environment feature matrix and then input into the first multi-head attention network of the trend encoding branch to extract long-term trend feature representation. The high-frequency periodic component is input into the second multi-head attention network of the period encoding branch to extract short-term periodic feature representation. Based on the contextual information formed by the long-term trend feature representation and the short-term cycle feature representation, the dynamic weights of the long-term trend feature representation and the short-term cycle feature representation are adaptively calculated, the features are fused according to the dynamic weights, and the short-term power load forecast value is output through the forecast head.

2. The short-term power load forecasting method based on wavelet decomposition and parallel gated attention network as described in claim 1, characterized in that: The multi-source heterogeneous data includes historical power load data, micro-meteorological data, and calendar attribute data; The step of cleaning, aligning, and standardizing the multi-source heterogeneous data to construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices includes: The sliding window mean interpolation algorithm is used to correct missing values ​​and outlier data points that exceed the preset value range in the original multi-source heterogeneous data. The corrected data from different sources are then aligned based on a unified timestamp index to obtain the original feature sequence with time synchronization. The original feature sequence of the time synchronization is scaled using the standard fractional normalization algorithm to eliminate the dimensional differences in the global input matrix containing the target load and multidimensional meteorological variables, thereby obtaining a standardized feature matrix; Based on the time backtracking window length determined by autocorrelation analysis, the standardized feature matrix is ​​sliced ​​and recombined to construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices.

3. The short-term power load forecasting method based on wavelet decomposition and parallel gated attention network as described in claim 1 or 2, characterized in that: The step of using maximum overlap discrete wavelet transform to decouple the historical load sequence in time, decomposing the historical load sequence into low-frequency trend components and high-frequency periodic components, includes: The Dabusi wavelet is selected as the mother wavelet, and the number of decomposition layers is set. Based on the mother wavelet and the number of decomposition layers, the corresponding low-pass filter and high-pass filter are constructed. The historical load sequence is filtered using the low-pass filter to extract a low-frequency approximate sequence characterizing the long-term evolution baseline as a low-frequency trend component. The historical load sequence is filtered using the high-pass filter to extract high-frequency detail sequences that characterize short-term fluctuations and local mutations as high-frequency periodic components.

4. The short-term power load forecasting method based on wavelet decomposition and parallel gated attention network as described in claim 3, characterized in that: The process of fusing the low-frequency trend component with the external environment feature matrix and inputting it into the first multi-head attention network of the trend encoding branch to extract long-term trend feature representation includes: The low-frequency trend component is spliced ​​and fused with the full external environment feature matrix in a high-dimensional latent space to obtain the fused feature matrix. The fused feature matrix is ​​dimensionally aligned by a fully connected layer, mapping features from different sources to a unified feature space to obtain the dimensionally aligned fused features. The fused features after dimensional alignment are input into a multi-head self-attention network with a first preset number of layers to capture the long-term smooth evolution pattern constrained by the macro environment and output a long-term trend feature representation.

5. The short-term power load forecasting method based on wavelet decomposition and parallel gated attention network as described in claim 4, characterized in that: The step of inputting the high-frequency periodic components into the second multi-head attention network of the periodic coding branch to extract short-term periodic feature representations includes: For the periodic encoding branch, the external environment feature matrix is ​​subjected to dimensionality reduction mapping through a fully connected layer to obtain a compressed feature representation; The compressed feature representation is fused with the high-frequency periodic component; The fused features are input into a lightweight multi-head self-attention subnetwork with a second preset number of layers. By generating query, key and value matrices and using scaled dot product attention to calculate temporal dependency weights, short-term fluctuation patterns and local temporal dependencies are captured, and short-term periodic feature representations are output. The first preset number of layers is greater than the second preset number of layers.

6. The short-term power load forecasting method based on wavelet decomposition and parallel gated attention network as described in claim 5, characterized in that: The process of adaptively calculating the dynamic weights of the long-term trend feature representation and the short-term cycle feature representation based on contextual information constituted by the long-term trend feature representation and the short-term cycle feature representation, and fusing the features according to the dynamic weights, includes: Long-term trend features and short-term cycle features are stacked on the feature dimension to form a context feature matrix; The context feature matrix is ​​nonlinearly mapped using a learnable single-layer feedforward network, and gating weights representing the importance of each feature component are generated via a sigmoid activation function. The generated gating weights are used to perform element-level weighted summation on the corresponding long-term trend feature representation and short-term cycle feature representation to generate a unified fusion feature representation containing full-band information.

7. The short-term power load forecasting method based on wavelet decomposition and parallel gated attention network as described in claim 6, characterized in that: After the short-term power load forecast value is output via the forecast head, it also includes: Extract the attention weight matrix inside the heterogeneous parallel multi-head attention encoding network to generate weight distribution data representing the attention patterns of the model at key historical time nodes; The Shapley additive attribution framework is invoked to quantify the marginal contribution of each input feature to the prediction results, generating attribution analysis results that characterize the physical driving logic of each feature.

8. A short-term power load forecasting method system based on wavelet decomposition and parallel gated attention network, using the method described in any one of claims 1-7, characterized in that, include: A multi-source heterogeneous feature construction module is used to acquire multi-source heterogeneous data, clean, align and standardize the multi-source heterogeneous data, and construct a multi-source heterogeneous feature matrix containing historical load sequences and external environment feature matrices. The time-series decoupling decomposition module is used to decouple the historical load sequence in time using the maximum overlap discrete wavelet transform, and decompose the historical load sequence into low-frequency trend components and high-frequency periodic components. The heterogeneous parallel feature encoding module is used to construct a heterogeneous parallel multi-head attention encoding network. After fusing the low-frequency trend component with the external environment feature matrix, it is input into the first multi-head attention network of the trend encoding branch to extract long-term trend feature representation, and the high-frequency periodic component is input into the second multi-head attention network of the periodic encoding branch to extract short-term periodic feature representation. The dynamic fusion prediction module is used to adaptively calculate the dynamic weights of the long-term trend feature representation and the short-term cycle feature representation based on the context information composed of the long-term trend feature representation and the short-term cycle feature representation, fuse the features according to the dynamic weights, and output the short-term power load prediction value through the prediction head.

9. An electronic device, characterized in that, include: Memory, used to store programs; A processor for loading the program to perform the steps of the method as claimed in any one of claims 1-7.

10. A computer-readable storage medium storing a program, characterized in that, When the program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.