Power load prediction method based on enhanced channel perception attention frequency mode estimation network
By adopting an enhanced channel perceived attention frequency mode estimation network in power load prediction, the problem of difficulty in accurately predicting power load in the prior art is solved, and a higher accuracy and more explanatory power load prediction is achieved.
Patent Information
- Application Number
- CN202411609209.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art is difficult to accurately predict power loads, especially in the case of renewable energy variability, and traditional prediction methods are difficult to capture nonlinear relationships and time patterns in load data.
The power load prediction method based on the enhanced channel-aware attention frequency mode estimation network is adopted to model the complex relationship between variables through the channel-aware attention network, and the time frequency mode of the network extracts the time series is estimated in combination with the frequency mode.
It achieves higher-precision power load prediction, able to capture local details and global trends, improves the accuracy and interpretability of predictions, and helps the energy management system better understand the drivers of load changes.
Smart Images

Figure CN119598122A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for predicting electric load based on an enhanced channel-aware attention frequency pattern estimation network, and belongs to the field of electric load prediction and artificial intelligence application. Background Art
[0002] The increasing popularity of renewable energy sources such as wind and photovoltaics has brought uncertainty and volatility to power generation compared to traditional fossil fuel power generation. Accurate power load forecasting, especially considering the variability of renewable energy, has become a key factor in ensuring the stability of the power system. The evolving power industry faces escalating challenges, including growing power demand, integration of renewable energy, and the need for efficient system operation. These challenges highlight the importance of accurate power load forecasting, which has become the key to strategic energy.
[0003] Currently, accurate forecasting of power load faces certain challenges due to two major issues. First, real-world load datasets contain a large number of variables, each of which interacts with each other in a highly nonlinear manner, which is difficult to accurately model. The interactions between these variables are complex and are often affected by factors such as weather conditions, different times of the day, seasonality, and consumer behavior. This complexity poses a significant challenge to forecasting, which requires not only identifying relevant variables but also understanding the intricate relationships between them. Traditional forecasting methods and even some advanced machine learning models have difficulty in fully capturing these nonlinear relationships, resulting in suboptimal forecasting results. Second, due to the influence of numerous external factors, the load series itself is subject to complex temporal patterns. These patterns manifest as short-term fluctuations, seasonal trends, and long-term shifts in consumption habits, each of which contributes to the overall variability of the load data. Existing time series forecasting models often attempt to accurately model these temporal patterns, and they usually adopt general sequence modeling methods without considering the unique characteristics of load data, such as the cyclical nature of demand or the impact of sudden, event-driven changes. As a result, these models often perform poorly in practical power load forecasting tasks.
[0004] In view of this, there is an urgent need to conduct research on the dynamic ability to identify and predict load patterns, explore the complex relationships between modeling variables, and analyze and extract time patterns to achieve accurate prediction of power load. Summary of the invention
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention provides a power load forecasting method based on an enhanced channel-aware attention frequency pattern estimation network, which can realize accurate power load forecasting.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] A method for power load forecasting based on enhanced channel-aware attention frequency pattern estimation network, comprising the following steps:
[0008] Step 1, obtaining power load data;
[0009] Step 2: perform data preprocessing based on the acquired data, including data cleaning, data standardization and data analysis;
[0010] Step 3: Based on the preprocessed data, establish and solve the channel-aware attention network, effectively model the dependency relationship of the variables to obtain the characteristic data after the relationship between the variables is analyzed; specifically, it includes the following sub-steps:
[0011] 3-1, using the formula Perform batch normalization, where x is the input power load sequence, δ is the mean of each load sequence in the current batch, σ is the variance of each load sequence in the current batch, ∈ is a very small constant to avoid zero in the denominator, γ is a scaling parameter used to restore the range of activation values after batch normalization, and β is an offset parameter used to adjust the offset of activation values after batch normalization;
[0012] 3-2, use FFN(x) = ReLU(W2·ReLU(W1·x+b1)+b2) to construct a feedforward module consisting of two fully connected layers to learn the complex representation of the input data, where x is the batch normalized power load sequence, W1 is the first layer weight matrix, which is used to map the input feature vector x to a hidden layer, W2 is the second layer weight matrix, b1 is the bias vector of the first layer, which together with W1 determines the output offset of the hidden layer, b2 is the bias vector of the second layer, and ReLU is the activation function, the purpose of which is to enable the network to learn complex power load patterns;
[0013] 3-3, using Q = W q X,K=W k X,V=W v X and Construct a self-attention module, where X is the representation vector of the input sequence, W q , W k and W v is a learnable weight matrix used to transform the input vector X into a query Q, a key K, and a value V, is the normalization coefficient, and softmax is the activation function. The attention score is converted into a weight. By calculating the attention scores between different channels (variables) in the input sequence, the feature data after the relationship between the variables is analyzed is obtained.
[0014] Step 4, based on the characteristic data obtained in step 3 after analyzing the relationship between variables, establish and solve the frequency pattern estimation network, extract the time-frequency pattern necessary to characterize the rhythmicity of the power load data to obtain the prediction result; specifically includes the following sub-steps:
[0015] 4-1, using discrete Fourier transform, Convert the data from the time domain to the frequency domain to obtain the complex value representation of each frequency point, where x n is the value of the input sequence at the nth time point, X k is the kth frequency component of the frequency domain signal, N is the total length of the input sequence, e -i2πkn / N is a complex exponential function term, representing a rotation factor;
[0016] 4-2, use the frequency domain multilayer perceptron to analyze the converted complex data, and analyze the real and imaginary components of the amplitude and phase information represented by the data spectrum, that is, H r =MLP r (X r ),H i =MLP i (X i ), where X r and X i Represents the real and imaginary parts of complex data, MLP r and MLP i is a multi-layer perceptron model, which is used to analyze the real part X r and the imaginary part X i The information is processed, H r and H i high-level features representing the real and imaginary parts, respectively;
[0017] 4-3, using the inverse discrete Fourier transform The new real and imaginary parts obtained after the frequency domain multilayer perceptron analysis are reconstructed into a time series in the time domain, where x n is the value of the reconstructed signal in the time domain at the nth time point, H r and H i are the real and imaginary features of the signal in the frequency domain, e i2πkn / N is a complex exponential term, which represents the relationship between the angle and frequency of the conversion from frequency domain to time domain;
[0018] 4-4, Utilization Project the reconstructed time series, where is the predicted value at the i-th moment, x n is the value of the reconstructed signal in the time domain at the nth time point, and Projection is the projection function used to transform x nMapping to the target prediction space, projecting the data to the preset prediction range.
[0019] Step 5: Based on the prediction results obtained in step 4, reduce the loss function The model is trained and optimized for the target, and the final power load forecast result is obtained. is the predicted value at the i-th moment, y i is the true value at the i-th moment, and N is the total length of the predicted load sequence.
[0020] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for predicting electric power load based on an enhanced channel-aware attention frequency pattern estimation network is implemented.
[0021] A computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the power load prediction method based on an enhanced channel-aware attention frequency pattern estimation network.
[0022] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0023] The present invention acquires power load data and preprocesses it, establishes a channel-aware attention network based on the preprocessed data, and analyzes and models the complex dependencies between variables in the original time series data. Through the combination of the channel-aware attention network and the frequency pattern estimation network, the model can fully model the periodic changes of the time series. On this basis, a frequency pattern estimation network is established to extract the complex features of the time series from different scales, and to extract the time-frequency patterns necessary to characterize the rhythmicity of the power load data, which can not only capture local detail changes, but also identify global trends, thereby achieving higher-precision power load forecasting, which makes power forecasting more accurate. In addition, the frequency pattern estimation network extracts the time-frequency characteristics of the load data, making the prediction results of the model more explanatory, which helps the energy management system to more intuitively understand the driving factors of load changes, and then make more reasonable decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow chart of the method of the present invention.
[0025] Figure 2 It is the overall framework of the method of the present invention.
[0026] Figure 3 These are comparative experimental results of the present invention on different data sets. DETAILED DESCRIPTION
[0027] The technical solution provided by the present invention will be described in detail below in conjunction with specific embodiments. It should be understood that the following specific implementation methods are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0028] Embodiment 1: A method for power load forecasting based on an enhanced channel-aware attention frequency pattern estimation network proposed by the present invention, the process and the architecture thereof are respectively as follows: Figure 1 and Figure 2 As shown, data acquisition and preprocessing are first performed, and then a channel-aware attention network and a frequency pattern estimation network are constructed. Specifically, the present invention includes the following steps:
[0029] Step 1: Obtain power load data.
[0030] Step 2: Perform data preprocessing based on the data in step 1, including data cleaning, data standardization, and data analysis, to obtain preprocessed data x.
[0031] Step 3: Based on the preprocessed data obtained in step 2, a channel-aware attention network is established and solved to effectively model the dependency relationship of the variables and obtain feature data after analyzing the relationship between the variables. Specifically, the following three steps are included:
[0032] (3-1) Use formula (1) to perform batch normalization.
[0033]
[0034] Where x is the input power load sequence, μ is the mean of each load sequence in the current batch, σ is the variance of each load sequence in the current batch, ∈ is a very small constant to avoid zero in the denominator, γ is a scaling parameter used to restore the range of activation values after batch normalization, and β is an offset parameter used to adjust the offset of activation values after batch normalization.
[0035] (3-2) Construct a feedforward module consisting of two fully connected layers to learn the complex representation of the input data, as shown in the following formula:
[0036] FFN(x)=ReLU(W2·ReLU(W1·x+b1)+b2) (2)
[0037] Among them, x is the batch normalized power load sequence, W1 is the first-layer weight matrix, which is used to map the input feature vector x to a hidden layer, W2 is the second-layer weight matrix, b1 is the bias vector of the first layer, which together with W1 determines the output offset of the hidden layer, b2 is the bias vector of the second layer, and ReLU is the activation function, the purpose of which is to enable the network to learn complex power load patterns.
[0038] (3-3) Construct a self-attention module to calculate the attention scores between different channels (variables) in the input sequence, and obtain the feature data after analyzing the relationship between variables, as shown in the following formula:
[0039] Q=W q XK=W k XV=W v X (3)
[0040]
[0041] Among them, X is the representation vector of the input sequence, W q , W k and W v is a learnable weight matrix used to transform the input vector X into a query Q, a key K, and a value V, is the normalization coefficient, and softmax is the activation function, which converts the attention score into a weight.
[0042] Step 4: Based on the characteristic data obtained in step 3 after analyzing the relationship between variables, a frequency pattern estimation network is established and solved to extract the time-frequency pattern necessary to characterize the rhythmicity of power load data to obtain the prediction result, which specifically includes the following four steps:
[0043] (4-1) The discrete Fourier transform (Equation (5)) is used to convert the data from the time domain to the frequency domain to obtain the complex value representation of each frequency point.
[0044]
[0045] Among them, x n is the value of the input sequence at the nth time point, X k is the kth frequency component of the frequency domain signal, N is the total length of the input sequence, e -i2πkn / N is a complex exponential function term, representing a rotation factor.
[0046] (4-2) The frequency domain multilayer perceptron is used to analyze the converted complex data, and the real and imaginary components of the amplitude and phase information represented by the data spectrum are analyzed, as shown in the following formula:
[0047] H r =MLP r (X r ),H i =MLP i (X i ) (6)
[0048] Among them, X r and X i Represents the real and imaginary parts of complex data, MLP r and MLPi is a multi-layer perceptron model, which is used to analyze the real part X r and the imaginary part X i The information is processed, H r and H i Represent the high-level features of the real and imaginary parts respectively.
[0049] (4-3) Using the inverse discrete Fourier transform, i.e., equation (7), the new real and imaginary parts obtained after the frequency domain multilayer perceptron analysis are reconstructed into a time series in the time domain.
[0050]
[0051] Among them, x n is the value of the reconstructed signal in the time domain at the nth time point, H r and H i are the real and imaginary features of the signal in the frequency domain, e i2πkn / N It is a complex exponential term, which represents the relationship between the angle and frequency when converting from frequency domain to time domain.
[0052] (4-4) Project the reconstructed time series to project the data to the preset prediction range, as shown in the following formula:
[0053]
[0054] in, is the predicted value at the i-th moment, x n is the value of the reconstructed signal in the time domain at the nth time point, and Projection is the projection function used to transform x n Mapped into the target prediction space.
[0055] Step 5: Based on the prediction result obtained in step 4, the model is trained and optimized with the goal of reducing the loss function shown in formula (9) to obtain the final power load prediction result.
[0056]
[0057] in, is the predicted value at the i-th moment, y i is the true value at the i-th moment, and N is the total length of the predicted load sequence.
[0058] Embodiment 2:
[0059] The present invention verifies the effectiveness of the model based on two widely used real-world load data sets, as follows:
[0060] First, the power load data is obtained and preprocessed; the two datasets include Electricity LoadDataset and UMass Smart Data Load Dataset. The Electricity Load Dataset contains the electricity consumption of 321 sites / clients. This dataset is frequently used in power load forecasting research due to its comprehensive coverage and availability of long-term historical data. The basic statistical characteristics and time information of the load dataset are shown in Table 1. The UMass SmartData Load dataset includes high-resolution electricity consumption data collected from various buildings and facilities on the University of Massachusetts campus, providing detailed information about electricity consumption patterns at a granular level, allowing for fine-grained analysis and prediction.
[0061] Table 1. Basic statistical characteristics and time information of the Electricity Load Dataset
[0062]
[0063] The selected baselines include 6 advanced models in the field of load forecasting, including Transformer-based models, namely Crossformer (2023) and Pyraformer (2022), FEDformer (2022), Autoformer (2021), Informer (2020), Transformer (2017). Except for Crossformer, other models do not consider the complex variable dependency patterns between multivariate sequences. In addition, only Autoformer and FEDformer solve the modeling of time periodic patterns, although they have difficulty in handling the complex cyclic patterns inherent in load data in a simple way. In the method proposed in this invention, both multivariate dependencies and complex periodic patterns are appropriately modeled. All experiments are implemented with PyTorch on NVIDIA RTX 3090 GPU. During training, the historical window size is set to 96. At the same time, following the standard protocol, all datasets are split into training set, validation set and test set in a 7:1:2 ratio in chronological order. The model in this case is trained using L2 loss, and the Adam optimizer is used to optimize the loss. The initial learning rate is 0.0005, the batch size is set to 32, and the number of training epochs is 10.
[0064] Two commonly used evaluation indicators of power load forecasting models are used: mean square error (MSE) and mean absolute error (MAE). The experimental results are as follows: Figure 3As shown. The results of comparative experiments show that in two different datasets: ElectricityLoad Dataset and UMass Smart Data Load Dataset, the channel-aware attention-enhanced frequency pattern estimation network (CA-FPEN) provided by the present invention shows superior performance in different prediction ranges. In terms of the two indicators of mean square error (MSE) and mean absolute error (MAE), the CA-FPEN model significantly outperforms the Transformer-based benchmark models, including Informer, Transformer, Pyraformer, FEDformer, Autoformer and Crossformer. Compared with the traditional Transformer and Informer models, the method provided by the present invention has the most significant improvement, which shows the effectiveness of CA-FPEN's integrated method in dealing with dependencies between variables and time frequency.
[0065] The technical means disclosed in the scheme of the present invention are not limited to the technical means disclosed in the above-mentioned implementation mode, but also include technical schemes composed of any combination of the above-mentioned technical features. It should be pointed out that for ordinary persons in this technical field, improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also regarded as the protection scope of the present invention.
Claims
1. A method for power load forecasting based on enhanced channel-aware attention frequency pattern estimation network, characterized in that: The following steps are involved: Step 1, obtaining power load data; Step 2: perform data preprocessing based on the acquired data, including data cleaning, data standardization and data analysis; Step 3: Based on the preprocessed data, a channel-aware attention network is established and solved to effectively model the dependency relationship of the variables and obtain feature data after analyzing the relationship between the variables; Step 4: Based on the characteristic data obtained in step 3 after analyzing the relationship between variables, a frequency pattern estimation network is established and solved to extract the time-frequency pattern necessary to characterize the rhythmicity of the power load data to obtain a prediction result; Step 5: Based on the prediction result obtained in step 4, model training and optimization are performed with the goal of reducing the loss function to obtain the final power load prediction result.
2. The method for power load forecasting based on enhanced channel-aware attention frequency pattern estimation network according to claim 1 is characterized in that: Step 3 is as follows: 3-1, using the formula Perform batch normalization, where x is the input power load sequence, μ is the mean of each load sequence in the current batch, σ is the variance of each load sequence in the current batch, ∈ is a very small constant to avoid zero in the denominator, γ is a scaling parameter used to restore the range of activation values after batch normalization, and β is an offset parameter used to adjust the offset of activation values after batch normalization; 3-2, use FFN(x) = ReLU(W2·ReLU(W1·x+b1)+b2) to construct a feedforward module consisting of two fully connected layers to learn the complex representation of the input data, where x is the batch normalized power load sequence, W1 is the first layer weight matrix, which is used to map the input feature vector x to a hidden layer, W2 is the second layer weight matrix, b1 is the bias vector of the first layer, which together with W1 determines the output offset of the hidden layer, b2 is the bias vector of the second layer, and ReLU is the activation function, the purpose of which is to enable the network to learn complex power load patterns; 3-3, using Q = W q X,K=W k X,V=W v X and Construct a self-attention module, where X is the representation vector of the input sequence, W q , W k and W v is a learnable weight matrix used to transform the input vector X into a query Q, a key K, and a value V, is the normalization coefficient, softmax is the activation function, the attention score is converted into a weight, and the characteristic data after the relationship between variables is analyzed is obtained by calculating the attention scores between different channels (variables) in the input sequence.
3. The power load forecasting method based on enhanced channel-aware attention frequency pattern estimation network according to claim 1 is characterized in that: Step 4 specifically includes the following sub-steps: 4-1, using discrete Fourier transform, Convert the data from the time domain to the frequency domain to obtain the complex value representation of each frequency point, where x n is the value of the input sequence at the nth time point, X k is the kth frequency component of the frequency domain signal, N is the total length of the input sequence, is a complex exponential function term, representing a rotation factor; 4-2, use the frequency domain multilayer perceptron to analyze the converted complex data, and analyze the real and imaginary components of the amplitude and phase information represented by the data spectrum, that is, H r =MLP r (X r ),H i =MLP i (X i ), where X r and X i Represents the real and imaginary parts of complex data, MLP r and MLP i is a multi-layer perceptron model, which is used to analyze the real part X r and the imaginary part X i The information is processed, H r and H i high-level features representing the real and imaginary parts, respectively; 4-3, using the inverse discrete Fourier transform The new real and imaginary parts obtained after the frequency domain multilayer perceptron analysis are reconstructed into a time series in the time domain, where x n is the value of the reconstructed signal in the time domain at the nth time point, H r and H i are the real and imaginary features of the signal in the frequency domain, is a complex exponential term, which represents the relationship between the angle and frequency of the conversion from frequency domain to time domain; 4-4, Utilization Project the reconstructed time series, where is the predicted value at the i-th moment, x n is the value of the reconstructed signal in the time domain at the nth time point, and Projection is the projection function used to transform x n Mapping to the target prediction space, projecting the data to the preset prediction range.
4. The method for power load forecasting based on enhanced channel-aware attention frequency pattern estimation network according to claim 1 is characterized in that: In step 5, based on the prediction results obtained in step 4, the loss function is reduced The model is trained and optimized for the target, and the final power load forecast result is obtained. is the predicted value at the i-th moment, y i is the true value at the i-th moment, and N is the total length of the predicted load sequence.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the power load forecasting method based on the enhanced channel-aware attention frequency pattern estimation network as described in any one of claims 1 to 4 above.
6. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by the processor, the power load forecasting method based on the enhanced channel-aware attention frequency pattern estimation network as described in any one of claims 1 to 4 is implemented.
Citation Information
Cited By
Time prediction method and device based on different channel attention mechanisms
CN121350965A