Power load prediction method and system based on multi-stage time sequence preprocessing and double-branch wavelet Mamba

By employing a multi-stage time series preprocessing method and a bi-branch wavelet Mamba approach, the problem of insufficient long-sequence feature extraction capability in power load forecasting is solved, achieving efficient and accurate power load forecasting, which is suitable for smart grid dispatching and demand-side management.

CN122451335APending Publication Date: 2026-07-24JIANGNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610554043.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-24
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing power load forecasting technologies suffer from several drawbacks when dealing with highly non-stationary, noisy, and multivariate coupled power load data. These include insufficient long-sequence feature extraction capabilities, poor forecast robustness, low accuracy, and insufficient computational efficiency. Furthermore, they cannot simultaneously address the issues of global trend fitting and local mutation capture.

Method used

A multi-stage time series preprocessing and bi-branch wavelet Mamba method is adopted, including outlier identification and repair, time-varying noise smoothing, and key feature screening. Low-frequency trend and high-frequency detail features are decoupled by discrete wavelet transform, and global long-range and multi-scale local dependency features are extracted by bi-directional trend Mamba module and detail Mamba module respectively. Finally, feature fusion is performed to output the power load prediction results.

Benefits of technology

It significantly improves the model's generalization ability and the reliability of prediction results, reduces computational complexity, achieves a balance between global trend fitting and local mutation, improves the accuracy and robustness of long sequence prediction, and lowers the computing power threshold for engineering deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122451335A_ABST
    Figure CN122451335A_ABST
Patent Text Reader

Abstract

The application discloses a power load prediction method and system based on multi-stage time sequence preprocessing and double-branch wavelet Mamba, and relates to the technical field of intelligent power grids and time sequence analysis. In view of the problems that the existing power load prediction technology has insufficient long sequence modeling capability, low prediction robustness and precision, and cannot simultaneously consider global trend fitting and local mutation capturing when facing high-noise non-stationary data, a high-quality target sequence is first constructed through multi-stage time sequence preprocessing, and after channel independence and block embedding processing, the high and low frequency characteristic components are decoupled through discrete wavelet transform, the global long-range dependence is extracted through a bidirectional trend Mamba module, the local mutation characteristics are purified through a detail Mamba module, and noise is suppressed, and finally, the prediction result is output through inverse wavelet reconstruction. The application significantly improves the precision and robustness of long sequence power load prediction and reduces the computational complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of smart grid and time series analysis technology, and in particular to a power load forecasting method and system based on multi-stage time series preprocessing and bi-branch wavelet Mamba. Background Technology

[0002] With the increasing prominence of high-proportion grid integration of new energy sources and diversified load interaction in new power systems, accurate and efficient power load time-series forecasting has become a core supporting technology for safe and economical grid dispatch, refined demand-side management, and enhanced new energy absorption capacity. Power load sequences are influenced by multiple factors, including meteorology, economics, and user behavior, exhibiting strong non-stationarity, nonlinearity, high-frequency abrupt changes, and noise contamination. Especially in long-term load forecasting scenarios, balancing global trend fitting accuracy with local abrupt change capture capabilities while ensuring model computational efficiency has become a critical technical challenge that the industry urgently needs to address.

[0003] Existing power load forecasting technologies can be broadly categorized into three types: traditional statistical methods, classical machine learning methods, and deep learning methods. Traditional statistical methods, such as ARIMA and exponential smoothing models, are only suitable for modeling linear stationary sequences. When faced with non-stationary and strongly nonlinear real-world load data, their prediction accuracy decreases significantly. Classical machine learning methods, such as support vector machines and random forests, can handle nonlinear problems, but their ability to capture long-term time-series dependencies is limited, resulting in insufficient generalization performance. Deep learning models based on LSTM and Transformer have improved the ability to fit nonlinearities and model long sequences. However, LSTM suffers from the inherent flaw of vanishing gradients in long sequences, and the computational complexity of Transformer's self-attention mechanism increases quadratically with sequence length, leading to low prediction efficiency for long sequences. Furthermore, they are highly sensitive to noise and outliers in load data, easily exhibiting problems such as prediction phase lag and large fitting deviations at abrupt change points.

[0004] In recent years, linear complexity state-space models, represented by Mamba, have provided a new technical path for long-sequence time-series forecasting. However, existing load forecasting schemes based on Mamba still have many technical shortcomings: they lack targeted multi-stage time-series preprocessing mechanisms, cannot effectively remove local outliers and smooth time-varying noise in the original data, and have prominent multivariate feature coupling interference problems; they adopt a single time-domain modeling approach, which cannot decouple the low-frequency trend and high-frequency detail components of the load sequence, making it difficult to balance trend fitting and abrupt change capture; and the single-branch network structure cannot simultaneously achieve global long-range dependency modeling and local abrupt change feature purification. In high-noise, non-stationary real-world application scenarios, the robustness and accuracy of long-sequence forecasting are difficult to meet the actual operation requirements of the power grid. Summary of the Invention

[0005] To address these issues, this invention provides a power load forecasting method and system based on multi-stage time series preprocessing and bi-branch wavelet Mamba. This method solves the technical problems of existing power load forecasting schemes when faced with highly non-stationary, noisy, and multivariate coupled power load data. These problems include insufficient long-sequence feature extraction capability, poor prediction robustness, low accuracy, insufficient computational efficiency, and an inability to simultaneously consider global trend fitting and local mutation capture.

[0006] To address the aforementioned technical problems, this invention provides a power load forecasting method based on multi-stage time-series preprocessing and dual-branch wavelet Mamba, comprising the following steps: Step S1: Obtain the original multivariate power load sequence, perform multi-stage time series preprocessing, and sequentially complete outlier identification and repair, time-varying noise smoothing, and key feature screening to construct a high-quality target sequence; Step S2: Perform channel independence and block embedding processing on the high-quality target sequence to reshape the multivariate sequence into an independent univariate sequence, and divide it into local time-series patches through a sliding window and map them into high-dimensional patch embedding sequences; Step S3: Perform discrete wavelet transform on the patch embedding sequence to decouple it into low-frequency feature components that reflect long-term evolution trends and high-frequency feature components that reflect instantaneous changes and noise; Step S4: Input the low-frequency feature components into the bidirectional trend Mamba module to extract global long-range dependency features, and input the high-frequency feature components into the detail Mamba module to extract multi-scale local dependency features and filter background noise; Step S5: Upsample and adaptively fuse the processed low-frequency and high-frequency features using inverse discrete wavelet transform, and output the multivariate power load prediction results for the future time step through the prediction head.

[0007] Preferably, in step S1, the method for performing multi-stage timing preprocessing specifically includes: The local outlier factor score of each data point is calculated based on the local reachability density. When the score is greater than the preset threshold, it is determined to be an outlier. A time-weighted linear interpolation method is used to repair outliers and missing values. Based on the information sequence of the load sequence, the observation noise covariance is estimated online using an exponentially weighted moving average strategy, and the time-varying noise is smoothed by an adaptive Kalman filter on the repaired sequence. Calculate the Pearson correlation coefficients between each covariate and the smoothed target sequence, and select the Top-K key features in descending order of absolute value to construct a high-quality target sequence.

[0008] Preferably, the formula for calculating the local anomaly factor score is: ; in: ; In the formula, For point The local anomaly factor score, representing the point The average of the ratios of the local density of a given element to the local densities of all its neighbors. The current data point to be evaluated corresponds to the time step. Electricity load observations For point The neighboring point belongs to of -Nearest neighbor sample set, For the number of nearest neighbors, For point The set of k-nearest neighbors, The number of neighboring samples, For point to his neighbor The reachable distance, For point The local reachability density is such that the larger the value, the denser the area around the point, and the more likely it is to be a normal point.

[0009] Preferably, in step S2, the method for performing channel-independent and block-based embedding processing on the high-quality target sequence specifically includes: Dimension is The input multivariate sequence, where For batch size, For sequence length, For the number of variables, reshape to A univariate sequence forces the model to share parameters among all variables; with a preset block length. With step size The temporal patch sequence is extracted by a sliding window, and then superimposed with a learnable positional code through linear projection to generate a patch embedding sequence.

[0010] Preferably, in step S3, the method of performing discrete wavelet transform on the patch embedding sequence specifically includes: Haar wavelets are used as a filter bank. The patch embedding sequence is convolved and downsampled by low-pass and high-pass filters to obtain low-frequency feature components containing the smoothing trend of the sequence and high-frequency feature components containing sequence mutation and noise information.

[0011] Preferably, the bidirectional trend Mamba module includes two independent Mamba encoders, forward and backward. The specific processing procedure for the bidirectional trend Mamba module to extract global long-range dependency features is as follows: Low-frequency feature components are input into two Mamba encoders in forward and reverse order, respectively. Each encoder employs a multi-layered, densely connected Dense-Conv module to enhance local context awareness. The features output from the forward and backward encoders are adaptively weighted and fused through a gating network composed of linear layers and a sigmoid function to obtain global long-range dependent features.

[0012] Preferably, the specific processing steps for the detailed Mamba module to extract multi-scale local dependency features and filter background noise are as follows: High-frequency feature components are input into multiple sets of dynamic convolutional layers with different receptive fields. Attention weights are generated through global average pooling and a Softmax network, and then aggregated to obtain dynamic convolutional kernels that adapt to the input features. Multi-scale local dependency features are extracted. The SimAM parameterless attention mechanism is adopted, and the significance of features at each time step is evaluated based on the energy function of least squares error. Abrupt features are weighted and enhanced while background noise is suppressed, and the purified high-frequency features are output.

[0013] Preferably, the energy function is expressed as: ; In the formula, For the minimum energy value, For the input features in the th The value at each time step This represents the mean of the feature sequences in the current channel. The variance of the feature sequences in the current channel. This is the regularization coefficient.

[0014] This invention also provides a power load forecasting system based on multi-stage time series preprocessing and two-branch wavelet Mamba, used to implement the power load forecasting method based on multi-stage time series preprocessing and two-branch wavelet Mamba described above. The system includes: The multi-stage time series preprocessing module is used to acquire the original multivariate power load sequence, perform multi-stage time series preprocessing, and sequentially complete outlier identification and repair, time-varying noise smoothing, key feature screening, and construct a high-quality target sequence. The channel-independent and block-embedded module is used to perform channel-independent and block-embedded processing on the high-quality target sequence, reshape the multivariate sequence into an independent univariate sequence, and divide it into local time-series patches through a sliding window and map them into high-dimensional patch embedding sequences. The discrete wavelet transform module is used to perform discrete wavelet transform on the patch embedding sequence, decoupling it into low-frequency feature components that reflect long-term evolution trends and high-frequency feature components that reflect instantaneous changes and noise. The dual-branch wavelet Mamba module is used to input the low-frequency feature components into the bidirectional trend Mamba module to extract global long-range dependency features, and input the high-frequency feature components into the detail Mamba module to extract multi-scale local dependency features and filter background noise. The inverse discrete wavelet transform module is used to upsample and adaptively fuse the processed low-frequency and high-frequency features using inverse discrete wavelet transform, and outputs the multivariate power load prediction results for the future time step through the prediction head.

[0015] This invention also provides a computer storage medium storing a computer software product, the computer software product including several instructions to cause a computer device to execute the power load forecasting method based on multi-stage time-series preprocessing and bi-branch wavelet Mamba as described above.

[0016] As can be seen from the above technical solutions, this invention application has the following beneficial effects: (1) This invention integrates three core steps—LOF local anomaly identification and repair, adaptive Kalman time-varying noise smoothing, and Pearson key feature screening—through a multi-stage time-series preprocessing mechanism. It specifically addresses the industry pain points of local extreme outliers, time-varying Gaussian noise, and redundant feature interference commonly found in power grid measured data, and significantly improves the signal-to-noise ratio of the original load data. At the same time, by combining channel independence and block embedding strategies, it not only eliminates feature pollution caused by dimensional differences and distribution shifts among multiple variables, but also transforms long sequence point-by-point modeling into semantic block modeling. While reducing data redundancy and computational overhead, it avoids noise distribution that the model fits incorrectly, and significantly improves the model's generalization ability and the reliability of prediction results from the data input end.

[0017] (2) This invention achieves low-frequency trend-high-frequency detail decoupling of load sequences based on discrete wavelet transform, completely solving the feature aliasing problem of traditional single time-domain modeling; it innovatively designs a dual-branch differentiated Mamba architecture, using bidirectional Trend-Mamba to construct a global non-causal receptive field for low-frequency trend components, eliminating the phase lag problem of long-period trend prediction; for high-frequency detail components, it designs Detail-Mamba that integrates multi-scale dynamic convolution and SimAM attention, accurately amplifying load mutation signals and suppressing background noise, achieving a balance between global trend fitting and local mutation capture. Actual measurements show that in 720-step ultra-long sequence prediction, this invention reduces MSE by up to 49.9% compared to mainstream models, and effectively suppresses error accumulation in long sequence prediction, maintaining stable and excellent prediction performance in high-noise, non-stationary real-world power grid scenarios.

[0018] (3) Based on the linear computational complexity advantage of the Mamba state-space model, this invention further compresses the effective length of the sequence by combining a block embedding strategy. Compared with Transformer-type models, it completely solves the computational bottleneck of long sequence prediction computation increasing quadratically with the sequence length. At the same time, the model architecture is adapted to power load datasets with multiple sampling intervals and multiple variable scales. It can maintain excellent performance in power grid measured data with different sampling frequencies such as hourly and minute-level data. There is no need to make large-scale architecture adjustments for different application scenarios. It significantly reduces the computational threshold and scenario adaptation cost of engineering deployment. It can better meet the real-time and universal requirements of long sequence load prediction in actual business such as smart grid scheduling and demand-side refined management. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Referring to the drawings will make the features and advantages of the present invention clearer. The drawings are illustrative and should not be construed as limiting the present invention in any way. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart of a power load forecasting method based on multi-stage time series preprocessing and bi-branch wavelet Mamba provided by the present invention; Figure 2 This is an overall framework diagram of a power load forecasting system based on multi-stage time series preprocessing and bi-branch wavelet Mamba provided by the present invention; Figure 3 This is a schematic diagram of the sequence reconstructed after identifying outliers and missing values ​​based on the local anomaly factor algorithm in this invention; Figure 4 This is a schematic diagram of the power load sequence based on adaptive Kalman filtering in this invention; Figure 5 This is a schematic diagram of the Pearson correlation coefficient matrix between each covariate and the target sequence, as well as the normalized weights, in this invention. Figure 6 These are schematic diagrams of the original sequence after processing and the high-frequency and low-frequency sequences after discrete wavelet transform decomposition in this invention; Figure 7 This is a framework diagram of the bidirectional trend Mamba module in this invention; Figure 8 This is a framework diagram of the detailed Mamba module in this invention; Figure 9 This is a comparison chart of the mean squared error of the model of this invention with other models under different datasets and step sizes. Figure 10This is a comparison chart of the prediction results of the model of this invention with other models in this invention; Figure 11 This is a graph showing the prediction results under different backtracking step sizes in this invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] To address the technical problems of existing power load forecasting schemes when faced with highly non-stationary, noisy, and multivariate coupled power load data, such as insufficient long-sequence feature extraction capability, poor prediction robustness, low accuracy, insufficient computational efficiency, and inability to simultaneously consider global trend fitting and local mutation capture.

[0022] It should be noted in advance that the power load forecasting method and system based on multi-stage time series preprocessing and bi-branch wavelet Mamba provided in this embodiment of the invention can be applied to various power load time series forecasting scenarios such as smart grid dispatching, power system operation planning, and demand-side response management, and is particularly suitable for power load data forecasting scenarios with high noise, non-stationarity, and long sequences. In this embodiment, the overall architecture of the system is as follows: Figure 2 As shown, the method mainly includes a multi-stage time series preprocessing module, a Channel-Independent Patch Embedding (CIPE) module, a Discrete Wavelet Transform (DWT) module, a Bi-branch Wavelet Mamba (BIWD-Mamba) module, and an Inverse Wavelet Reconstruction (IDWT) module; the overall process is as follows. Figure 1 As shown, it specifically includes steps S1 to S5.

[0023] In step S1, multi-stage time-series preprocessing is performed: the original multivariate power load sequence is obtained, and extreme outliers or missing values ​​are identified and repaired using the Local Outlier Factor (LOF) algorithm; time-varying noise is smoothed using an adaptive Kalman filter; and Pearson correlation coefficients are calculated to screen key feature variables, thus constructing a high-quality target sequence. The specific execution flow of this step is as follows: 1. Outlier identification and repair based on the LOF algorithm The Local Anomaly Factor (LOF) algorithm is used to identify local anomalies for any data point in the original power load sequence. Calculate its relationship with The Local Reachability Density (LRD) of the nearest neighbor set reflects... The density of surrounding data is calculated using the following formula: ; point The LOF score is defined as the average of the ratios of the local reachability of all its neighbors to the local reachability of the point itself, and the formula is: ; In the formula, For point The local anomaly factor score, representing the point The average of the ratios of the local density of a given element to the local densities of all its neighbors. The current data point to be evaluated corresponds to the time step. Electricity load observations For point The neighboring point belongs to of -Nearest neighbor sample set, For the number of nearest neighbors, For point The set of k-nearest neighbors, The number of neighboring samples, For point to his neighbor The reachable distance is used to smooth out random fluctuations in distance calculations. For point The local reachability density is such that the larger the value, the denser the area around the point, and the more likely it is to be a normal point.

[0024] when ( When a threshold is set, the data is considered an anomaly, and then linear interpolation is performed to repair the anomaly and missing values; for each time point marked as an anomaly... Search along the time axis forward and backward to find the nearest normal observation point, denoted as . and We use these two reliable anchor points to perform time-weighted filling of missing values ​​in the sequence.

[0025] like Figure 3As shown, taking 2000 sequence points of transformer oil temperature (OT) from July 1, 2016 to September 15, 2016 in the ETTh1 dataset as an example, the blue curve in the figure represents the OT fluctuation trend. Outlier points and missing points are marked with orange dots and reconstructed by linear interpolation.

[0026] 2. Time-varying noise smoothing based on adaptive Kalman filtering This invention designs an adaptive Kalman filter that adjusts the observation noise covariance matrix online by monitoring the statistical properties of new sequences. Define new information For the current observation value Compared with the predicted value of the prior state The deviation between them, i.e. Based on the innovation sequence, an exponentially weighted moving average strategy is used to estimate the current observation noise covariance online. When load fluctuations intensify, leading to When it increases As the load increases, the filter will automatically reduce the Kalman gain; when the load fluctuation is in a stable period, Automatic reduction, calculated using the following formula: ; In the formula, Indicates time The actual load condition, For a moment The predicted value of the prior state. Reflecting the new information and noise level contained in the current observations, For a moment The adaptive observation noise covariance is a quantity that varies with time. The prior estimate error covariance represents the uncertainty of the current prediction. The forgetting factor, with a value range of (0,1), determines the length of memory for historical noise information.

[0027] like Figure 4 As shown, the result after the above adaptive Kalman filtering is obtained. After the adaptive Kalman filtering is processed, the data is moderately smoothed at the peaks. While ensuring that it does not deviate from the dynamic change trend of the original load sequence, the signal-to-noise ratio of the data is significantly improved.

[0028] 3. Key feature screening based on Pearson correlation coefficient To evaluate the strength of the linear correlation between candidate features and power load, this invention employs the Pearson Correlation Coefficient (PCC), assuming that the smoothed target load sequence is... A candidate covariate sequence to be evaluated is The Pearson correlation coefficient between the two The calculation is as follows: ; In the formula, and They are respectively Covariate values ​​and target load values ​​at time points. and Sequences and The mean, The range of values ​​for the correlation coefficient is: , Indicates a positive correlation. Indicates a negative correlation. The closer to 1, the stronger the correlation.

[0029] Iterate through all candidate covariates in the dataset, calculate their Pearson correlation coefficients with the smoothed target sequence, sort them in descending order of absolute correlation coefficient value, and select the Top-K features to reduce data redundancy and construct a high-quality target sequence. For example... Figure 5 As shown, the left figure displays the Pearson correlation coefficient matrix between each covariate and the target variable, while the right figure displays the descending order of the normalized weights of each covariate.

[0030] In step S2, channel independence and block embedding processing are performed. A channel independence strategy is applied to the high-quality target sequence, reshaping the multivariate sequence into an independent univariate sequence. Then, a sliding window is used to segment the univariate sequence into multiple local time-series patches, and linear projection is used to map the patches into a high-dimensional patch embedding sequence. The specific execution flow of this step is as follows: 1. Independent Channel Strategy For the input multivariate time series ,in For batch size, For sequence length, To determine the number of variables, reshape them as follows: A single, independent univariate sequence, meaning the input dimension becomes This approach forces the model to share the same set of parameters across all variables, eliminating feature interference and noise pollution caused by differences in dimensions and distribution shifts between different physical variables, and avoiding contamination of the target predictor variable by low-correlation or high-noise channels.

[0031] 2. Timing block embedding For the input sequence of each channel Set the block length to Step size is By using a sliding window operation, the original sequence is expanded into a series of patch sequences. ,in The total number of patches is calculated using the following formula: ; Subsequently, a learnable linear projection layer is used to map each length of... The patch is mapped to a higher-dimensional latent space. Then, learnable positional encodings are superimposed to obtain the final patch embedding representation. : ; In the formula, For learnable location encoding, It is a linear projection layer. By using block embedding operations, the "point-by-point modeling" of long sequences is transformed into "semantic block modeling", which significantly reduces the effective length of the sequence, reduces computational complexity, and enhances the model's ability to recognize local semantic features such as "peaks" and "troughs" of the load curve.

[0032] In step S3, sequence decoupling based on discrete wavelet transform is performed. The patch embedded sequence is subjected to discrete wavelet transform (DWT) to decouple it into low-frequency feature components reflecting long-term evolution trends and high-frequency feature components reflecting instantaneous changes and noise.

[0033] This invention uses discrete wavelet transform as the feature decomposition module to perform discrete wavelet transform on the generated patch embedding sequence, specifically employing Haar wavelets as the filter bank. For the input feature sequence... DWT is obtained by convolving a set of low-pass filters g and a set of high-pass filters h, and then performing downsampling. and ,in It contains low-frequency approximate components in the signal, reflecting the smoothing trend of the sequence; It contains high-frequency detail components of the signal, reflecting abrupt changes and noise in the sequence.

[0034] like Figure 6 As shown, taking 600 load sequences from September 1, 2016 to September 25, 2016 in the ETTh1 dataset as an example, Figure 6 In the middle (a), the original sequence of the input DWT is shown. Figure 6 In (b), the low-frequency components after decomposition are shown, preserving the fluctuation trend of the original sequence. Figure 6 In the diagram (c), the high-frequency components after decomposition retain the noise and mutation information of the original sequence. By using DWT decoupling, the feature aliasing problem caused by traditional single temporal modeling is completely solved, laying the foundation for subsequent differential feature extraction.

[0035] In step S4, dual-branch Mamba differential feature extraction is performed. The low-frequency feature components are input into the Trend-Mamba module to extract global long-range dependency features; the high-frequency feature components are input into the Detail-Mamba module to extract multi-scale local dependency features and filter background noise. The specific execution flow of this step is as follows: 1. The Trend-Mamba module processes low-frequency feature components. Given an input low-frequency sequence Two independent Mamba encoders, forward and backward, are constructed. The forward encoder processes the original sequence, and the backward encoder processes the reversed sequence. The overall module framework is as follows: Figure 7 As shown.

[0036] The input goes into the main branch and auxiliary branches. After entering the main branch, it passes through a linear projection layer and then into the Dense-Conv module. This module consists of multiple layers of dense connections. Each layer performs normalization, activation functions, and convolution operations. The output of the previous layer is fed into the output of all subsequent layers. Assuming... For the output of the previous layer, the first Layer output The final output is calculated as follows: ; ; In the formula, It is a convolution operation with a kernel of 3. For batch normalization operations, It is a ReLU nonlinear activation function. For the concatenation operation, the outputs of all previous layers are concatenated to obtain the final output. The Dense-Conv module significantly enhances the model's ability to perceive local context in low-frequency sequences, compensating for the shortcomings of traditional Mamba point-to-point modeling in local feature extraction.

[0037] After the input enters the auxiliary branch, it undergoes a linear projection, then passes through a SiLU activation function, and finally is compared with the output of the SSM (State-Space Model). Element-wise multiplication is performed, and then the output of a single Mamba encoder is obtained by fusing the results through a linear projection layer. The outputs of the forward and backward Mamba encoders are then adaptively weighted and fused through a gated network consisting of a linear layer and a sigmoid function to obtain the final low-frequency feature output. By employing a bidirectional scanning structure, the model is endowed with a global non-causal receptive field, effectively eliminating the phase lag problem in long-term trend prediction.

[0038] 2. The Detail-Mamba module processes high-frequency feature components. For high frequency components The Detail-Mamba module with dynamic convolutional branches is fed in, and the overall framework of the module is as follows: Figure 8 As shown. Each dynamic convolutional branch... A static set of convolutional kernels Composition, in this embodiment , corresponding to kernel sizes k=11, k=21, and k=31 respectively, are used to capture short-range, medium-range, and long-range local dependencies.

[0039] High-frequency features of the input The input features are simultaneously fed into three dynamic convolutional layers with different receptive fields. After being compressed into a context vector using Global Average Pooling (GPA), it is then passed through a fully connected and Softmax network to generate a specific... Attention weight vector of each expert Next, the generated attention weights are used to... A linear weighted aggregation of static convolutional kernels yields a dynamic convolutional kernel specific to the current sample. Then utilize the generated dynamic convolution kernel With input Perform a convolution operation to obtain the output of the current dynamic convolution branch. The outputs of the three branches are concatenated along the channel dimension, and finally added to the output of the SSM through a linear layer and the SiLU activation function.

[0040] The high-frequency load components extracted by dynamic convolution branches often contain some random noise. Therefore, this invention incorporates a parameter-free SimAM attention mechanism before the high-frequency component output. This mechanism automatically identifies and amplifies truly important "abrupt signals" in the high-frequency data, while suppressing meaningless "random fluctuations." Specifically, for each channel in the input features, SimAM defines an energy function based on least squares error to measure the features at each time step. The degree of difference from the background distribution of this channel, the minimum energy value The calculation is as follows: ; In the formula, For the input features in the th The value at each time step This represents the mean of the feature sequences in the current channel. The variance of the feature sequences in the current channel. This is the regularization coefficient.

[0041] Finally, the Sigmoid function is used to activate this energy value, and the original features are weighted and enhanced to obtain the final output of the Detail-Mamba module. .

[0042] In step S5, inverse wavelet reconstruction and prediction results are output. The processed low-frequency and high-frequency features are upsampled and adaptively fused using inverse discrete wavelet transform (IDWT), and finally, the multivariate power load prediction results for the future time step are output through the prediction head.

[0043] The specific execution process of this step is as follows: First, process the low-frequency output after dual-branch processing. With high frequency output Upsampling to the reconstruction length is performed in the time dimension; then a reconstruction low-pass filter is used. and reconstructed high-pass filter The upsampled sequences are convolved and then summed to achieve adaptive fusion of multi-frequency band features, resulting in a reconstructed feature sequence. Finally, the reconstructed feature sequence is fed into the Flatten prediction head, which maps it to a prediction sequence for future time steps, and the dimension is reduced from [previous time step] through a reshaping operation. Restore to The final output is a multivariate power load forecast.

[0044] To verify the effectiveness of the method proposed in this invention, this embodiment uses multiple sets of comparative experiments. In terms of the rating criteria for prediction error, mean absolute error (MAE) and mean squared error (MSE) are used to evaluate model performance. The smaller the MSE and MAE values, the higher the model prediction accuracy.

[0045] 1. Experimental Dataset The example analysis uses five widely used real-world benchmark datasets, including four ETT datasets (ETTh1, ETTh2, ETTm1, and ETTm2) and one ECL dataset. The ETT datasets were collected from power transformers in two different regions of China, spanning from July 2016 to July 2018. The sampling interval for ETTh1 and ETTh2 datasets is 1 hour, while the sampling interval for ETTm1 and ETTm2 datasets is 15 minutes. Each data point includes six power load characteristics and a target oil temperature. The ECL dataset records the power consumption of 321 customers, collected from 2012 to 2014, with a sampling interval of 15 minutes. In this embodiment, the training, test, and validation sets are divided in a 6:2:2 ratio.

[0046] 2. Experimental Environment In this embodiment, all model training and testing were performed on a Linux server running Ubuntu 22.04.3 LTS, equipped with an NVIDIA RTX A5000 GPU with 24GB of video memory. The programming language used in the experiment was Python 3.11, CUDA version 12.4, and the deep learning framework used was PyTorch 2.5.1.

[0047] 3. Comparative experiment with the Transformer class model The comparison and prediction results of the model of this invention with the current mainstream Transformer-based models (iTransformer, Crossformer, ETSformer, FEDformer, Autoformer) are shown in Table 1. The best value is marked in bold.

[0048] Table 1. Detailed prediction results of the model of this invention and the Transformer-based model.

[0049] As shown in Table 1, this model demonstrates excellent predictive performance across different datasets and step sizes. Regardless of the strength of correlation between variables in the dataset, the model maintains high prediction accuracy. In the ETTh1 dataset, when the prediction step size reaches 720, this model significantly reduces MSE by 26.7% and MAE by 15.7% compared to FEDformer. On the highly correlated electricity dataset, compared to the classic Autoformer model, this model reduces MSE by approximately 26.6% and MAE by approximately 19.9% ​​at a prediction step size of 720. On the ETTh2 dataset, this model reduces MSE by 12.7% compared to FEDformer at a step size of 192, and significantly reduces MSE by 24.3% compared to ETSformer. This result demonstrates that this model successfully overcomes the performance bottleneck of traditional Transformer in predicting long-sequence, high-noise loads.

[0050] 4. Comparative experiments with other deep learning models To further verify the model's universality and applicability, the prediction results of the model of this invention compared with other commonly used deep learning prediction models in recent years (native Mamba, DLinear, PATtn, TimesNET, MICN) are shown in Table 2, with the best value marked in bold.

[0051] Table 2. Detailed prediction results of the model of this invention compared with other deep learning models.

[0052] As shown in Table 2, this model still demonstrates exceptionally high long-sequence prediction performance compared to various non-Transformer architectures, particularly excelling in overcoming long-range error accumulation. For example, in the ETTh1 dataset, when the prediction step size reaches 720, this model significantly reduces MSE by 22.5% and MAE by 16.7% compared to the native Mamba. When facing the more structurally complex and trend-driven ETTh2 dataset (step size 720), the linear model DLinear exhibits severe performance degradation (MSE as high as 0.840), while this model, thanks to its strong feature decoupling capabilities, reduces MSE by 49.9% compared to DLinear. Furthermore, in ultra-long predictions (step size 720) on the electricity dataset, this model reduces MSE by 21.6% compared to the general-purpose TimesNET architecture and by 10.8% compared to the pure Mamba model.

[0053] 5. Visualized Results Analysis Figure 9 The visualization visually illustrates the mean squared error (MSE) trends of our model and other models across different prediction step sizes on the ETTh1 and electricity datasets. The graph clearly shows that as the prediction step size increases, the prediction error of all models inevitably rises; however, our model consistently maintains the lowest MSE level across all prediction step sizes on both datasets, and its error growth slope is the smoothest. Particularly on the electricity dataset, our model outperforms other baseline models across all lengths. This visualization strongly demonstrates that our model effectively suppresses the "error accumulation" phenomenon common in long sequence prediction, exhibiting exceptional robustness in long sequence prediction.

[0054] Figure 10 The diagram shows a comparison of the prediction performance of the model of this invention and other models with a backtracking step size of 96 and a prediction step size of 192. It can be seen that the model of this invention is significantly better than the prediction performance of other models. It can accurately capture extreme values ​​and high-frequency abrupt changes, eliminate phase lag, and perfectly restore complex multi-frequency band features.

[0055] Figure 11 The figure illustrates the impact of the model of this invention on prediction accuracy at different backtracking step lengths. Taking the ETTh2 dataset as an example, with a prediction step length of 192, the experimental comparison shows that when the backtracking step length is 48, 96, 192, and 336, the prediction accuracy is higher and the prediction curve can better fit the original curve.

[0056] This embodiment provides a power load forecasting system based on multi-stage time series preprocessing and dual-branch wavelet Mamba, used to implement the power load forecasting method described in the above method embodiment. The system includes: The multi-stage time series preprocessing module is used to acquire the original multivariate power load sequence, perform multi-stage time series preprocessing, and sequentially complete outlier identification and repair, time-varying noise smoothing, key feature screening, and construct a high-quality target sequence. The channel-independent and block-embedded module is used to perform channel-independent and block-embedded processing on the high-quality target sequence, reshape the multivariate sequence into an independent univariate sequence, and divide it into local time-series patches through a sliding window and map them into high-dimensional patch embedding sequences. The discrete wavelet transform module is used to perform discrete wavelet transform on the patch embedding sequence, decoupling it into low-frequency feature components that reflect long-term evolution trends and high-frequency feature components that reflect instantaneous changes and noise. The dual-branch wavelet Mamba module is used to input the low-frequency feature components into the bidirectional trend Mamba module to extract global long-range dependency features, and input the high-frequency feature components into the detail Mamba module to extract multi-scale local dependency features and filter background noise. The inverse discrete wavelet transform module is used to upsample and adaptively fuse the processed low-frequency and high-frequency features using inverse discrete wavelet transform, and outputs the multivariate power load prediction results for the future time step through the prediction head.

[0057] The specific implementation methods of each module of the system in this embodiment can be found in the corresponding parts of the method embodiments above, and will not be repeated here.

[0058] This invention provides a computer storage medium storing a computer software product, which includes several instructions to cause a computer device to execute the above-described power load forecasting method based on multi-stage time-series preprocessing and bi-branch wavelet Mamba.

[0059] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0060] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0061] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0062] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A power load forecasting method based on multi-stage time series preprocessing and bi-branch wavelet Mamba, characterized in that, Includes the following steps: Step S1: Obtain the original multivariate power load sequence, perform multi-stage time series preprocessing, and sequentially complete outlier identification and repair, time-varying noise smoothing, and key feature screening to construct a high-quality target sequence; Step S2: Perform channel independence and block embedding processing on the high-quality target sequence to reshape the multivariate sequence into an independent univariate sequence, and divide it into local time-series patches through a sliding window and map them into high-dimensional patch embedding sequences; Step S3: Perform discrete wavelet transform on the patch embedding sequence to decouple it into low-frequency feature components that reflect long-term evolution trends and high-frequency feature components that reflect instantaneous changes and noise; Step S4: Input the low-frequency feature components into the bidirectional trend Mamba module to extract global long-range dependency features, and input the high-frequency feature components into the detail Mamba module to extract multi-scale local dependency features and filter background noise; Step S5: Upsample and adaptively fuse the processed low-frequency and high-frequency features using inverse discrete wavelet transform, and output the multivariate power load prediction results for the future time step through the prediction head.

2. The power load forecasting method based on multi-stage time series preprocessing and bi-branch wavelet Mamba as described in claim 1, characterized in that, In step S1, the method for performing multi-stage timing preprocessing specifically includes: The local outlier factor score of each data point is calculated based on the local reachability density. When the score is greater than the preset threshold, it is determined to be an outlier. A time-weighted linear interpolation method is used to repair outliers and missing values. Based on the information sequence of the load sequence, the observation noise covariance is estimated online using an exponentially weighted moving average strategy, and the time-varying noise is smoothed by an adaptive Kalman filter on the repaired sequence. Calculate the Pearson correlation coefficients between each covariate and the smoothed target sequence, and select the Top-K key features in descending order of absolute value to construct a high-quality target sequence.

3. The power load forecasting method based on multi-stage time series preprocessing and bi-branch wavelet Mamba as described in claim 2, characterized in that, The formula for calculating the local anomaly factor score is as follows: ; in: ; In the formula, For point The local anomaly factor score, representing the point The average of the ratios of the local density of a given element to the local densities of all its neighbors. The current data point to be evaluated corresponds to the time step. Electricity load observations For point The neighboring point belongs to of -Nearest neighbor sample set, For the number of nearest neighbors, For point The set of k-nearest neighbors, The number of neighboring samples, For point to his neighbor The reachable distance, For point The local reachability density is such that the larger the value, the denser the area around the point, and the more likely it is to be a normal point.

4. The power load forecasting method based on multi-stage time series preprocessing and bi-branch wavelet Mamba as described in claim 1, characterized in that, In step S2, the method for performing channel-independent and block-based embedding processing on the high-quality target sequence specifically includes: Dimension is The input multivariate sequence, where For batch size, For sequence length, For the number of variables, reshape to A univariate sequence forces the model to share parameters among all variables; with a preset block length. With step size The temporal patch sequence is extracted by a sliding window, and then superimposed with a learnable positional code through linear projection to generate a patch embedding sequence.

5. The power load forecasting method based on multi-stage time series preprocessing and bi-branch wavelet Mamba as described in claim 1, characterized in that, In step S3, the method of performing discrete wavelet transform on the patch embedding sequence specifically includes: Haar wavelets are used as a filter bank. The patch embedding sequence is convolved and downsampled by low-pass and high-pass filters to obtain low-frequency feature components containing the smoothing trend of the sequence and high-frequency feature components containing sequence mutation and noise information.

6. The power load forecasting method based on multi-stage time series preprocessing and bi-branch wavelet Mamba as described in claim 1, characterized in that, The bidirectional trend Mamba module includes two independent Mamba encoders, forward and backward. The specific processing procedure for extracting global long-range dependency features by the bidirectional trend Mamba module is as follows: Low-frequency feature components are input into two Mamba encoders in forward and reverse order, respectively. Each encoder employs a multi-layered, densely connected Dense-Conv module to enhance local context awareness. The features output from the forward and backward encoders are adaptively weighted and fused through a gating network composed of linear layers and a sigmoid function to obtain global long-range dependent features.

7. The power load forecasting method based on multi-stage time series preprocessing and bi-branch wavelet Mamba as described in claim 1, characterized in that, The specific processing steps for the Mamba module to extract multi-scale local dependency features and filter background noise are as follows: High-frequency feature components are input into multiple sets of dynamic convolutional layers with different receptive fields. Attention weights are generated through global average pooling and a Softmax network, and then aggregated to obtain dynamic convolutional kernels that adapt to the input features. Multi-scale local dependency features are extracted. The SimAM parameterless attention mechanism is adopted, and the significance of features at each time step is evaluated based on the energy function of least squares error. Abrupt features are weighted and enhanced while background noise is suppressed, and the purified high-frequency features are output.

8. The power load forecasting method based on multi-stage time series preprocessing and bi-branch wavelet Mamba as described in claim 7, characterized in that, The energy function is expressed as: ; In the formula, For the minimum energy value, For the input features in the th The value at each time step This represents the mean of the feature sequences in the current channel. The variance of the feature sequences in the current channel. This is the regularization coefficient.

9. A power load forecasting system based on multi-stage time series preprocessing and bi-branch wavelet Mamba, characterized in that, The system for implementing the power load forecasting method based on multi-stage time-series preprocessing and bi-branch wavelet Mamba as described in any one of claims 1 to 8, the system comprising: The multi-stage time series preprocessing module is used to acquire the original multivariate power load sequence, perform multi-stage time series preprocessing, and sequentially complete outlier identification and repair, time-varying noise smoothing, key feature screening, and construct a high-quality target sequence. The channel-independent and block-embedded module is used to perform channel-independent and block-embedded processing on the high-quality target sequence, reshape the multivariate sequence into an independent univariate sequence, and divide it into local time-series patches through a sliding window and map them into high-dimensional patch embedding sequences. The discrete wavelet transform module is used to perform discrete wavelet transform on the patch embedding sequence, decoupling it into low-frequency feature components that reflect long-term evolution trends and high-frequency feature components that reflect instantaneous changes and noise. The dual-branch wavelet Mamba module is used to input the low-frequency feature components into the bidirectional trend Mamba module to extract global long-range dependency features, and input the high-frequency feature components into the detail Mamba module to extract multi-scale local dependency features and filter background noise. The inverse discrete wavelet transform module is used to upsample and adaptively fuse the processed low-frequency and high-frequency features using inverse discrete wavelet transform, and outputs the multivariate power load prediction results for the future time step through the prediction head.

10. A computer storage medium, characterized in that, The computer storage medium stores a computer software product, which includes several instructions to cause a computer device to execute the power load forecasting method based on multi-stage time-series preprocessing and bi-branch wavelet Mamba as described in any one of claims 1 to 8.