Load forecasting method based on frequency domain data enhancement and TimesNet

By using frequency domain data augmentation and TimesNet load forecasting methods, the problem of insufficient spectral structure modeling in load forecasting is solved, achieving high-precision short-term load forecasting, which is suitable for power system load forecasting under complex operating conditions.

CN122136802APending Publication Date: 2026-06-02SICHUAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN UNIV
Filing Date
2026-01-30
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies in load forecasting lack the ability to explicitly model the complexity of the spectral structure and multi-scale coupling characteristics of load sequences, and the frequency domain enhancement methods lack synergy with downstream forecasting models, which limits the improvement of forecasting performance.

Method used

We employ frequency domain data augmentation and TimesNet's load prediction method. Training samples are generated by mixing frequency domain masks and spectra, and a multi-period feature extraction network is constructed. Feature extraction and fusion are performed using multi-scale convolution and attention mechanisms to achieve end-to-end load prediction.

Benefits of technology

It improves the accuracy and robustness of load forecasting, especially under complex operating conditions, and can effectively model dependencies across multiple time scales, outputting high-precision short-term load forecast results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122136802A_ABST
    Figure CN122136802A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of power system operation, and discloses a load prediction method based on frequency domain data enhancement and TimesNet, which comprises the following steps: performing data enhancement on historical consistent data based on frequency domain masks and spectrum mixing to generate enhanced training samples; constructing and training a deep multi-period feature extraction network; and using the enhanced training samples to train the network to predict future load; wherein the multi-period feature extraction network is configured to: convert an input one-dimensional time sequence into multiple two-dimensional period tensors; perform multi-scale convolution feature extraction on each two-dimensional period tensor; fuse different period features through an attention mechanism; and output load prediction values of a specified time period in the future. The application has the advantages that through two key steps of frequency domain data enhancement and multi-period feature modeling, high-precision and high-robustness short-term prediction of a complex spectrum structure load sequence is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system operation technology, and in particular to a load forecasting method based on frequency domain data augmentation and TimesNet. Background Technology

[0002] With the ongoing energy transition, new loads such as distributed photovoltaics and electric vehicles are being connected to the grid on a large scale. Load curves are exhibiting significant nonlinearity, non-stationarity, and complex multi-timescale coupling characteristics, leading to a significant increase in fluctuation amplitude and uncertainty. This is particularly true in scenarios with high-proportion renewable energy integration, park-level loads, or newly commissioned substations, where the sample size available for model training is often limited due to short historical data accumulation periods and frequent load condition changes. To effectively address the challenge posed by insufficient utilization of key structural information in load sequences to load forecasting, short-term load forecasting, based on historical and real-time load data, models key structures such as multi-scale periods, trends, and random disturbances inherent in the time-domain sequence. The aim is to obtain accurate estimates of load changes over the next few hours to days under complex frequency domain mixing and multi-timescale coupling. Currently, when facing the problem of modeling complex spectral structures in load forecasting, traditional deep learning methods, represented by RNNs, CNNs, and Transformers, mainly learn from the time domain, which has the problem of insufficient ability to explicitly model key frequency domain components such as periodicity and trends. While frequency domain enhancement methods, such as signal decomposition (e.g., wavelet analysis), expand the data at the spectral level, they are usually treated as an independent preprocessing step and lack coordination with the architecture of downstream prediction models, resulting in a disconnect between enhancement and perception, which restricts further improvement in prediction performance. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a load forecasting method based on frequency domain data augmentation and TimesNet.

[0004] The objective of this invention is achieved through the following technical solution: a load forecasting method based on frequency domain data augmentation and TimesNet, the method comprising,

[0005] Data augmentation of historical composite data is performed based on frequency domain masking and spectrum mixing to generate enhanced training samples;

[0006] A deep multi-period feature extraction network is constructed and trained using augmented training samples to predict future loads; the multi-period feature extraction network is configured as follows:

[0007] The input one-dimensional time series is converted into multiple two-dimensional periodic tensors;

[0008] Multi-scale convolutional feature extraction is performed on each two-dimensional periodic tensor;

[0009] Integrate different periodic features through attention mechanisms;

[0010] Output the load forecast for a specified future period.

[0011] Specifically, the process of augmenting historical coincidence data based on frequency domain masking and spectral mixing to generate augmented training samples includes:

[0012] Construct a local sample vector containing both historical fragments and future labels at time t:

[0013] ;

[0014] In the formula, The length of the history window; To predict the step size; For time The endpoint is and the length is Historical load fragments; From arrive The future load vector, the enhanced k-th subsample is represented as:

[0015] ;

[0016] In the formula, The total number of augmented samples generated; , These represent the historical input segment obtained after enhancement operations and the corresponding future H-load vector, respectively. The local sample vector containing the historical segment and the future label is transformed to the frequency domain using a discrete Fourier transform to obtain its complex spectrum:

[0017] ;

[0018] In the formula, For time-domain sampling point index; ; Let be the value of the joint sequence at the nth time point; k is the frequency index; let the sampling interval be . The sampling frequency is The actual frequency corresponding to the k-th frequency point is The corresponding amplitude spectrum is defined as follows: .

[0019] Frequency domain masking and frequency domain mixing are performed using FrAug's enhanced methods:

[0020] Frequency domain masking: Randomly select some frequency components and set their corresponding spectral coefficients to zero. The enhanced complex spectrum is represented as:

[0021] ;

[0022] In the formula, For frequency domain mask; For mask ratio; Inverse transformation and separation at the original split point yield the corresponding enhanced subsamples. ;

[0023] Frequency domain mixing: This involves linearly weighting and superimposing the spectra of two different training samples to generate a mixed spectrum.

[0024] ;

[0025] In the formula, Let it be a hybrid mask; let it be a complementary mask. ,right Inverse transformation and separation at the original split point yield the mixed enhanced subsamples. .

[0026] Specifically, the multi-period feature extraction network is represented as follows:

[0027] ;

[0028] In the formula, Input fragments for history; For mapping functions; For the future The load forecast value for the step.

[0029] Specifically, the process of converting the input one-dimensional time series into multiple two-dimensional periodic tensors includes:

[0030] For the input one-dimensional time series Perform a Fast Fourier Transform and select the first K principal frequency components based on the amplitude spectrum A. Map it to the candidate period length:

[0031] ;

[0032] In the formula, L is the sequence length; The dominant frequency component;

[0033] For candidate period length By reconstructing the operator Rearrange a one-dimensional sequence into a two-dimensional tensor:

[0034] ;

[0035] In the formula, It is a one-dimensional time series; .

[0036] Specifically, the multi-scale convolution feature extraction for each two-dimensional periodic tensor includes,

[0037] For each two-dimensional tensor The Inception-2D convolutional neural network with shared parameters is used to perform multi-scale convolution operations to extract features that simultaneously contain local details and global trends.

[0038] ;

[0039] In the formula, Shared convolution parameters; This represents the number of output channels.

[0040] Specifically, the fusion of different periodic features through an attention mechanism includes,

[0041] Introducing an attention mechanism layer to integrate multi-scale features Integrate into a unified representation The query is obtained through linear mapping. ,key ,value :

[0042] ;

[0043] In the formula, is the trainable projection matrix; d is the input dimension of the unified feature representation. Given the projection dimension of the attention space, compute the self-attention weight matrix of the unified feature representation. To dynamically aggregate key time-series information:

[0044] ;

[0045] Output passed To achieve explicit fusion of cross-cycle features, where, This represents the feature representation after fusion.

[0046] Specifically, the output load forecast value for a specified future period includes:

[0047] Normalized weights are calculated based on the significance of each two-dimensional periodic component in the amplitude spectrum, and adaptive weighted fusion is performed on different periodic features:

[0048] ;

[0049] In the formula, For normalized weights; This represents the amplitude value at the j-th dominant frequency point; These are the normalized weighting coefficients;

[0050] The fused features are mapped to the final predicted sequence through a fully connected layer. .

[0051] The present invention has the following advantages:

[0052] 1. This invention addresses the problem of insufficient feature learning caused by the complex spectral structure and multi-scale coupling of load sequences. The proposed frequency domain enhancement strategy achieves controllable expansion of training samples and enhanced preservation of key periodic components in the frequency dimension through masking and mixing operations. This improves the diversity and representativeness of input data from the essence of the signal, solves the problem of limited historical sample size, and provides a better spectral foundation for subsequent model learning.

[0053] 2. To overcome the shortcomings of traditional time series models in modeling explicit periodic structures, this invention decouples and explicitly expresses the implicit intra-periodic patterns and periodic evolution in the sequence through the structural transformation from one-dimensional time series to two-dimensional periodic tensors. This effectively improves the modeling accuracy and robustness of complex time series dependencies such as holiday effects and continuous weather influences in application scenarios with frequent changes in operating conditions.

[0054] 3. This invention constructs an end-to-end prediction framework from frequency domain data augmentation to multi-cycle feature modeling, realizing spectrum alignment and collaborative optimization between the data layer and the model layer. Considering the increased complexity brought about by multi-cycle parallel computing and feature fusion, the model achieves efficient computing through feature extraction and fusion mechanisms, and finally outputs a high-precision short-term load prediction sequence that maintains stable performance under complex operating conditions. Attached Figure Description

[0055] Figure 1 This is a framework diagram for electricity load forecasting. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention; that is, the described embodiments are merely some embodiments of the invention, and not all embodiments. The components of the embodiments of the invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0057] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0058] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0059] The present invention will be further described below with reference to the accompanying drawings, but the scope of protection of the present invention is not limited to the following description.

[0060] like Figure 1 As shown, a load forecasting method based on frequency domain data augmentation and TimesNet is presented. This method includes,

[0061] Data augmentation is performed on historical data based on frequency domain masking and spectral mixing to generate enhanced training samples. The purpose of frequency domain augmentation is to expand the frequency domain diversity of training samples while maintaining the physical consistency of key periodic components, thus providing a better data foundation for subsequent modeling.

[0062] Specifically, this includes constructing local sample vectors that simultaneously contain historical fragments and future labels:

[0063] ;

[0064] In the formula, The length of the history window; To predict the step size; For time The endpoint is and the length is Historical load fragments; From arrive The future load vector, represented by the enhanced subsample, is as follows:

[0065] ;

[0066] In the formula, The total number of augmented samples generated; , These represent the historical input segment obtained after enhancement operations and the corresponding future H-step load vector, respectively. The local sample vector containing the historical segment and the future label is transformed to the frequency domain using a discrete Fourier transform to obtain its complex spectrum:

[0067] ;

[0068] In the formula, For time-domain sampling point index; ; Let be the value of the joint sequence at the nth time point; k is the frequency index; let the sampling interval be . The sampling frequency is The actual frequency corresponding to the k-th frequency point is The corresponding amplitude spectrum is defined as follows: .

[0069] Building upon this, frequency domain masking and frequency domain mixing are performed using FrAug's enhanced methods:

[0070] Frequency domain mask FreqMask: Randomly selects a subset of frequency components and sets their corresponding spectral coefficients to zero, represented as:

[0071] ;

[0072] In the formula, For frequency domain mask; For mask ratio; Inverse transformation and separation at the original split point yield the corresponding enhanced subsamples. ;

[0073] FreqMix, a frequency domain mixing algorithm, linearly weights and superimposes the spectra of two different training samples to construct a new spectral sample with mixed periodic characteristics. Let's assume another sample is taken... And calculate its spectrum. The generated mixed spectrum is:

[0074] ;

[0075] In the formula, For a mixing mask, its sparsity is determined by the mixing ratio. Control; make complementary mask ,right Inverse transformation and separation at the original split point yield the mixed enhanced subsamples. .

[0076] FrAug is the spliced ​​version To achieve frequency domain alignment using a unified carrier, FreqMask and FreqMix are used to perform controllable perturbations in the frequency dimension. Finally, through inverse transformation and segmentation, the lookback window and prediction window of each training sample are concatenated into a complete sequence in the time domain according to the original window length, generating an augmented sample pair consistent with the original task format.

[0077] To achieve an effective transformation from data diversity to model expressive power, this embodiment constructs and trains a deep multi-period feature extraction network, using enhanced training samples for training, to predict future loads;

[0078] The deterministic mapping from enhanced historical sequences to future load values ​​by a multi-period feature extraction network is represented as follows:

[0079] ;

[0080] In the formula, Input fragments for history; For mapping functions; For the future The load forecast value is calculated step by step. Parameters are optimized by minimizing the forecast error (such as mean square error). The driving model extracts key time-series patterns from the data.

[0081] The multi-period feature extraction network is configured as follows:

[0082] Based on the frequency domain enhanced samples, the input one-dimensional time series is converted into multiple two-dimensional periodic tensors; the one-dimensional sequence to two-dimensional periodic tensor is to explicitly separate and model the intra-period variation and inter-period variation, and transform the original one-dimensional time series into a representation space composed of multiple two-dimensional tensors;

[0083] Specifically, it includes:

[0084] For the input one-dimensional time series Perform a Fast Fourier Transform and select the first K principal frequency components based on the amplitude spectrum A. Map it to the candidate period length:

[0085] ;

[0086] In the formula, L is the sequence length; The dominant frequency component;

[0087] For each candidate period length By reconstructing the operator Rearrange a one-dimensional sequence into a two-dimensional tensor:

[0088] ;

[0089] In the formula, It is a one-dimensional time series; In the two-dimensional structure, the row direction corresponds to the changes during the period, and the column direction corresponds to the changes within the period, thus forming a decoupled temporal feature representation.

[0090] Considering the complexity of modeling two-dimensional periodic structures and the need to characterize long-range dependencies, TimesNet was selected and improved as the core architecture to leverage its frequency domain awareness and efficient two-dimensional modeling capabilities. This architecture achieves feature extraction and cross-period information integration through the following steps: multi-scale convolutional feature extraction is performed on each two-dimensional periodic tensor.

[0091] For each two-dimensional tensor The Inception-2D convolutional neural network with shared parameters is used to perform multi-scale convolution operations to extract features that simultaneously contain local details and global trends.

[0092] ;

[0093] In the formula, Shared convolution parameters; This represents the number of output channels.

[0094] By fusing features from different periods through an attention mechanism, this approach aims to model long-term cross-period dependencies caused by factors such as holidays and persistent weather. An attention mechanism layer is introduced on top of convolutional features to integrate multi-scale features. Integrate into a unified representation The query is obtained through linear mapping. ,key ,value :

[0095] ;

[0096] In the formula, is the trainable projection matrix; d is the input dimension of the unified feature representation. Given the projection dimension of the attention space, compute the self-attention weight matrix of the unified feature representation. To dynamically aggregate key time-series information:

[0097] ;

[0098] Output passed To achieve explicit fusion of cross-cycle features, where, This represents the feature representation after fusion.

[0099] Output the load forecast for the specified future period:

[0100] Normalized weights are calculated based on the significance of each two-dimensional periodic component in the amplitude spectrum, and adaptive weighted fusion is performed on different periodic features:

[0101] ;

[0102] In the formula, This represents the amplitude value at the j-th dominant frequency point; These are the normalized weighting coefficients;

[0103] The fused features are mapped to the final predicted sequence through a fully connected layer. .

[0104] The above description is merely a preferred embodiment of the present invention and does not constitute any limitation on the present invention. Any person skilled in the art can make many possible variations and modifications to the technical solution of the present invention, or modify it into equivalent embodiments, without departing from the scope of the present invention. Therefore, any modifications, equivalent changes, and alterations made to the above embodiments based on the technology of the present invention without departing from the scope of the present invention are within the protection scope of the present invention.

Claims

1. A load forecasting method based on frequency domain data augmentation and TimesNet, characterized in that: The method includes, Data augmentation of historical composite data is performed based on frequency domain masking and spectrum mixing to generate enhanced training samples; A deep multi-period feature extraction network is constructed and trained using augmented training samples to predict future loads; the multi-period feature extraction network is configured as follows: The input one-dimensional time series is converted into multiple two-dimensional periodic tensors; Multi-scale convolutional feature extraction is performed on each two-dimensional periodic tensor; Integrate different periodic features through attention mechanisms; Output the load forecast for a specified future period.

2. The load forecasting method based on frequency domain data augmentation and TimesNet according to claim 1, characterized in that: The method of data augmentation of historical composite data based on frequency domain masking and spectral mixing to generate augmented training samples includes: Given a historical window length L and a prediction step size H, construct a local sample vector at time t that simultaneously contains historical segments and future labels: ; In the formula, For time The endpoint is and the length is Historical load fragments; From arrive The future load vector, represented by the enhanced subsample, is as follows: ; In the formula, , These are the historical input segments obtained after enhancement operations and the corresponding future H-step load vectors, respectively. The local sample vectors containing historical segments and future labels are transformed to the frequency domain using discrete Fourier transform to obtain their complex spectrum. ; In the formula, For time-domain sampling point index; ; Let be the value of the joint sequence at the nth time point; k is the frequency index; let the sampling interval be . The sampling frequency is The actual frequency corresponding to the k-th frequency point is: The corresponding amplitude spectrum is defined as: ; Frequency domain masking and frequency domain mixing are performed using FrAug's enhanced methods: Frequency domain masking: Randomly select some frequency components and set their corresponding spectral coefficients to zero. The enhanced complex spectrum is represented as: ; In the formula, For frequency domain mask; For mask ratio; The inverse transformation is performed and the samples are separated according to the original split points to obtain the corresponding enhanced sub-samples; Frequency domain mixing; generating a mixed spectrum by linearly weighting and superimposing the spectra of two different training samples: ; In the formula, Let it be a hybrid mask; let it be a complementary mask. ,right The inverse transformation is performed and the samples are separated at the original split points to obtain the mixed enhanced subsamples.

3. The load forecasting method based on frequency domain data augmentation and TimesNet according to claim 1, characterized in that: The multi-period feature extraction network is represented as follows: ; In the formula, Input fragments for history; For mapping functions; For the future The load forecast value for the step.

4. The load forecasting method based on frequency domain data augmentation and TimesNet according to claim 1, characterized in that: The process of converting the input one-dimensional time series into multiple two-dimensional periodic tensors specifically includes: Perform a Fast Fourier Transform on the input one-dimensional time series, and select the first K principal frequency components based on the amplitude spectrum A. Map it to the candidate period length: ; In the formula, L is the sequence length; This is the j-th dominant frequency component; For candidate period length The one-dimensional sequence is rearranged into a two-dimensional tensor by the reconstruction operator: ; In the formula, To reconstruct the operator; It is a one-dimensional time series; .

5. The load forecasting method based on frequency domain data augmentation and TimesNet according to claim 4, characterized in that: The multi-scale convolution feature extraction for each two-dimensional periodic tensor includes... For each two-dimensional tensor The Inception-2D convolutional neural network with shared parameters is used to perform multi-scale convolution operations to extract features that simultaneously contain local details and global trends. ; In the formula, Shared convolution parameters; This represents the number of output channels.

6. The load forecasting method based on frequency domain data augmentation and TimesNet according to claim 4, characterized in that: The fusion of different periodic features through an attention mechanism includes, Introducing an attention mechanism layer to integrate multi-scale features Integrate into a unified representation The query is obtained through linear mapping. ,key ,value : ; In the formula, is the trainable projection matrix; d is the input dimension of the unified feature representation; Given the projection dimension of the attention space, compute the self-attention weight matrix of the unified feature representation. : ; Output passed To achieve explicit fusion of cross-cycle features, whereby, This represents the feature representation after fusion.

7. The load forecasting method based on frequency domain data augmentation and TimesNet according to claim 6, characterized in that: The output load forecast values ​​for a specified future period include: Normalized weights are calculated based on the significance of each two-dimensional periodic component in the amplitude spectrum, and adaptive weighted fusion is performed on different periodic features: ; In the formula, Let j be the amplitude value of the j-th dominant frequency point; These are the normalized weight coefficients; the fused features are mapped to the final predicted sequence through a fully connected layer. .