Prediction method based on pyramid decomposition framework and multi-scale stacked LSTMs
Through the pyramid decomposition framework and multi-scale stacked LSTMs method, the problems of nonlinear feature capture and error accumulation in long-term time series prediction are solved, and higher-precision long-term prediction effects are achieved. It is suitable for fields such as electricity, finance, transportation and meteorology.
Patent Information
- Application Number
- CN202511315774.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-09-16
AI Technical Summary
Existing long-term time series prediction methods have difficulty accurately capturing nonlinear time series characteristics when dealing with complex uncertainties and noise interference in industrial scenarios. In addition, the memory units of traditional LSTMs have error accumulation problems in long-term predictions, resulting in a decrease in prediction accuracy.
A method based on pyramid decomposition framework and multi-scale stacked LSTMs is adopted. Through discrete Fourier transform, autocorrelation mechanism and mean smoothing, a multi-scale pyramid structure is constructed. Stacked LSTM is combined for long-term prediction, and cubic spline interpolation is used for information fusion to ensure the stability and accuracy of the prediction results.
It significantly improves the stability of long-term forecasts and the ability to capture periodic patterns, and improves the adaptability and prediction accuracy of complex hydrological time series. It is suitable for long-term forecasting tasks in multiple fields such as electricity, finance, transportation and meteorology.
Smart Images

Figure CN120822666A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a prediction method based on a pyramid decomposition framework and multi-scale stacked LSTMs, and belongs to the technical field of long-term prediction of pyramid decomposition frameworks and multi-scale stacked LSTMs. Background Art
[0002] Long-term forecasting, which relies on historical data to infer long-term trends, holds significant value in the industrial sector. It supports production scheduling optimization, sales demand forecasting, and equipment lifecycle maintenance planning. It is also applicable to financial transactions, influenza forecasting, and environmental prediction. However, industrial scenarios present complex uncertainties such as equipment operating fluctuations and multi-link variables in the supply chain. Combined with the noise interference of real-time data, long-term forecasting requires sophisticated analysis, making processing real-time industrial time series data significantly challenging. Therefore, achieving accurate long-term forecasting in industrial scenarios can provide a scientific basis for business decision-making and has become a research priority in the field of industrial intelligence. Its application prospects are expanding with the advancement of industrial digital transformation. Traditional long-term time series forecasting models, such as ARIMA and exponential smoothing, are built on linear assumptions and struggle to effectively capture the complex nonlinear time series characteristics found in real-world scenarios, including sudden trends and multi-period coupling. Although classic LSTM networks improve their nonlinear modeling capabilities through gating mechanisms, their memory units face the problem of error accumulation in long-term forecasting: as the forecast step size increases, the decay of historical information leads to a gradual loss of periodic patterns and long-term dependencies, significantly reducing forecast accuracy. Existing deep learning solutions attempt to enhance periodic feature extraction through the self-attention mechanism, which includes the Transformer. However, the self-attention mechanism has a key flaw: although it can capture global dependencies, it has high computational complexity and low sensitivity to local temporal dynamics, making it difficult to balance the accuracy of long-term periodic modeling and short-term fluctuation prediction.
[0003] Current technologies have not yet effectively addressed two core issues: 1) Dynamic fusion of frequency domain features: Existing methods lack an adaptive weight allocation mechanism for dominant frequency components, making it impossible to dynamically suppress noise and enhance key periodic signals during the prediction process; 2) Modeling of long-term dependencies: Traditional LSTM memory units have difficulty quantifying the autocorrelation of historical sequences, resulting in insufficient modeling of the correlation between periodic events. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to overcome the defects of the existing technology and provide a prediction method based on a pyramid decomposition framework and multi-scale stacked LSTMs to solve the problem of low accuracy of existing time series long-term prediction methods, thereby improving the stability of long-term predictions and the ability to capture periodic patterns.
[0005] The present invention is based on a prediction method of a pyramid decomposition framework and multi-scale stacked LSTMs, comprising: performing a discrete Fourier transform on a pre-acquired dense detection water level time series to obtain discrete Fourier coefficients; selecting a preset number of squares of the Fourier coefficients from large to small and determining corresponding periods, and using the corresponding periods as candidate smoothing decomposition windows; determining a smoothing decomposition window within the candidate smoothing decomposition windows by using an autocorrelation mechanism and an autocorrelation coefficient; performing multi-scale pyramid decomposition on the dense detection water level time series, eliminating short-term fluctuations in the dense detection water level time series by using mean smoothing, and obtaining multi-scale smoothed data including pyramid subsequences; performing long-term prediction on the pyramid subsequences by using stacked LSTMs to obtain pyramid prediction subsequences; aligning pyramid prediction subsequences at different levels by using cubic spline interpolation; calculating and obtaining coefficients to be solved in the cubic spline interpolation based on preset conditions; and adding and averaging the aligned pyramid prediction subsequences to obtain a final long-term prediction result.
[0006] Prioritizing, performing a discrete Fourier transform on a pre-acquired intensive detection water level time series to obtain discrete Fourier coefficients; selecting a preset number of squares of the Fourier coefficients from large to small and determining corresponding periods, and using the corresponding periods as candidate smoothing decomposition windows, including: calculating a discrete Fourier transform of the intensive detection water level time series: , where F is the discrete Fourier transform of the densely detected water level time series of length L, x(t) is the t-th discrete Fourier coefficient, k\L is the normalized digital frequency, and f k\L The specific frequencies captured by the discrete Fourier coefficients.
[0007] Calculate the square of the discrete Fourier coefficient P(f t ): , where f t =2πt / L is the frequency captured by each frequency component, DFT() is the discrete Fourier transform function; select the square P(f t ) is used as a candidate smoothing decomposition window, and n is a positive integer.
[0008] Preferably, the smooth decomposition window is determined in the candidate smooth decomposition windows by utilizing the autocorrelation mechanism and the autocorrelation coefficient, including: calculating and obtaining an autocorrelation coefficient graph according to the autocorrelation calculation formula: , where R XX (τ) represents the time series of densely detected water levels X t With dense detection of water level time series X t The dense detection of the water level time series X with a lag of τ steps t+τ The time delay similarity between them is determined; the significant peak in the autocorrelation coefficient diagram is screened in the candidate smooth decomposition window, the corresponding lag period is recorded, and the corresponding lag period is used as the smooth decomposition window.
[0009] Prioritize the multi-scale decomposition of the dense detection water level time series, use mean smoothing to eliminate the short-term fluctuations in the dense detection water level time series, and obtain multi-scale smoothed data including pyramid subsequences, including: calculating the i-th water level of the decomposition subsequence and the i-th water level of the decomposition subsequence : , , where τ1 and τ2 represent any two candidate smooth decomposition windows obtained by discrete Fourier transform, X nd =( , ,..., ,..., ) is the decomposition subsequence of the pre-acquired dense detection water level time series with a length of L / τ1, X rd =( , ,..., ,..., ) is X nd The length of the decomposition subsequence is L / τ2; generate [X t ,X nd ,X rd ] is a pyramid subsequence composed of .
[0010] Prioritizing, using cubic spline interpolation to align pyramid prediction subsequences at different levels, including: using stacked LSTM to predict the decomposition subsequences of each level of the pyramid sequence to obtain a multi-scale pyramid prediction sequence; aligning the second-level prediction subsequence Y in the multi-scale pyramid prediction sequence nd and the third-level predictor sequence Y rd Input cubic spline interpolation and use cubic spline interpolation to output the second-level prediction subsequence Y nd and the third-level predictor sequence Y rd The cubic spline interpolation result of each pyramid prediction subsequence has n interpolation nodes (x i ,y i ), where i=0,1,2,...,n; the interpolation interval [x0,x n ] is divided into n intervals, and a cubic spline segment S is obtained in each interval using a cubic polynomial function. i (x): , where a i 、b i 、c i and d i are the coefficients to be solved in cubic spline interpolation, and x is the independent variable.
[0011] Preferably, the preset conditions include interpolation conditions and smoothing conditions; wherein the interpolation conditions include: for a given interpolation node sequence And the corresponding function value , let the cubic spline curve be Include all spline segments S i (x), then at each interpolation node The spline segment at satisfy: The spline interpolation curve passes through all given interpolation nodes. The smoothing conditions include: the spline interpolation curve continues to be smooth at adjacent interpolation nodes; the first-order derivatives of two adjacent spline segments at the interpolation nodes are equal: , the second-order derivatives of two adjacent spline segments at the interpolation nodes are equal: , where For spline segments At the interpolation node The first derivative at , For spline segments At the interpolation node The first derivative at , Interpolation node The second derivative at , Interpolation node The second derivative at , is the i-th spline segment S i (x), is the i+1th spline segment S i+1 (x).
[0012] Preferably, a prediction system based on a pyramid decomposition framework and multi-scale stacked LSTMs includes: a candidate smooth decomposition window determination module, which is used to perform discrete Fourier transform on a pre-acquired dense detection water level time series to obtain discrete Fourier coefficients; select a preset number of Fourier coefficients squared from large to small and determine the corresponding period, and use the corresponding period as a candidate smooth decomposition window; a smooth decomposition window determination module, which uses the autocorrelation mechanism and the autocorrelation coefficient to determine the smooth decomposition window in the candidate smooth decomposition window; a subsequence determination module, which is used to perform multi-scale pyramid decomposition on the dense detection water level time series, use mean smoothing to eliminate short-term fluctuations in the dense detection water level time series, and obtain multi-scale smoothed data including pyramid subsequences; a final long-term prediction result determination module, which is used to perform long-term prediction on the pyramid subsequence using stacked LSTMs to obtain pyramid prediction subsequences; use cubic spline interpolation to align pyramid prediction subsequences at different levels; based on preset conditions, calculate the coefficients to be solved in the cubic spline interpolation; and add and average the aligned pyramid prediction subsequences to obtain the final long-term prediction result.
[0013] Preferably, the present invention provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods when executing the program.
[0014] Preferably, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods when executed by a processor.
[0015] The beneficial effects achieved by the present invention are as follows: 1. The present invention performs discrete Fourier transform on the densely detected water level time series, selects the squares of several Fourier coefficients from large to small and calculates the corresponding periods, and uses the corresponding periods as candidate smoothing decomposition windows. The extracted frequency components can accurately capture the main frequency characteristics of the densely detected water level time series, and provide basic parameters with highly periodic matching for multi-scale decomposition, fundamentally ensuring that the decomposition process fits the essential laws of water level changes, and avoiding feature loss or noise introduction due to improper window selection.
[0016] 2. The present invention utilizes the autocorrelation mechanism and autocorrelation coefficient to screen the lag period corresponding to the significant peak in the autocorrelation coefficient diagram and use it as the smooth decomposition window. In the process of determining the final decomposition window, the frequency energy characteristics and the sequence's own correlation characteristics are integrated, which effectively improves the smooth decomposition window's adaptability to complex water level fluctuation patterns. It is particularly suitable for hydrological time series analysis scenarios with non-stationary and multi-period superposition characteristics.
[0017] 3. The present invention adopts multi-scale pyramid decomposition and mean smoothing processing to construct a pyramid hierarchical structure consisting of the original sequence, the first-level decomposition subsequence and the second-level decomposition subsequence. The mean smoothing algorithm is combined to filter the noise of the pyramid prediction subsequences at each level. The original densely detected water level time series can be decomposed into smooth components of different time scales, covering long-term trend fluctuation characteristics, medium-term cycle fluctuation characteristics and short-term fluctuation characteristics, providing hierarchical and structured input features for subsequent analysis, and significantly enhancing the extraction capability and representation accuracy of multi-time granularity information.
[0018] 4. The present invention uses a stacked LSTM network to independently model each pyramid subsequence, and combines it with a cubic spline interpolation algorithm to achieve information fusion of pyramid prediction subsequences at different levels. While retaining the prediction accuracy of features at each scale, the continuity constraints of the first-order and second-order derivatives of the interpolation function, i.e., the smoothing condition, are used to ensure the continuity and physical rationality of prediction results at different levels in the time dimension. This effectively avoids possible mutations or logical contradictions that may occur during multi-scale information fusion, and improves the overall reliability of the pyramid prediction subsequences.
[0019] 5. Based on preset conditions, the present invention calculates the coefficients to be solved in cubic spline interpolation and achieves precise solution. By strictly defining interpolation conditions, including precise fitting of data points, and smoothing conditions, including continuous derivatives of adjacent intervals, a model for solving the system of linear equations for the cubic spline interpolation coefficients is constructed. This mathematically enables high-precision fitting of the interpolation curve to multi-scale prediction data, ensuring both precise matching of the predicted values of each data point and smooth transitions between adjacent interpolation intervals. This provides theoretical support for the accuracy and stability of the fused pyramid prediction subsequence at the algorithmic level.
[0020] 6. The integration and optimization of the final long-term prediction results in the present invention are achieved by weighted averaging the aligned pyramid prediction subsequences at each level, forming an integrated output of multi-scale prediction information. The principle of ensemble learning is used to effectively reduce the deviation and variance of single-scale predictions, so that the final long-term prediction results have both the complementary advantages of features at different decomposition scales and statistical stability, significantly improving the accuracy, robustness and adaptability of long-term water level predictions to complex hydrological environments, and providing reliable technical support for practical applications such as water resources management and flood warning.
[0021] 7. The proposed forecasting method, based on a pyramid decomposition framework and multi-scale stacked LSTMs (ADMS-LSTM), has been validated in multiple scenarios, including power forecasting, financial exchange rate forecasting, traffic flow forecasting, weather forecasting, and public health forecasting. Compared to existing mainstream forecasting models, it demonstrates superior long-term forecast accuracy and performance across various scenarios, using the core evaluation metrics of MSE and MAE. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0023] Figure 1 It is a principle block diagram in some embodiments of the present application.
[0024] Figure 2 This is the prediction effect diagram of the ETT data set under the condition that the prediction length is 96.
[0025] Figure 3 This is the prediction effect diagram of the ETT dataset under the condition that the prediction length is 192.
[0026] Figure 4 This is the prediction effect diagram of the ETT data set under the condition that the prediction length is 336.
[0027] Figure 5This is the prediction effect diagram of the ETT dataset under the condition that the prediction length is 720. DETAILED DESCRIPTION
[0028] See also Figure 1 This application discloses a prediction method based on a pyramid decomposition framework and multi-scale stacked LSTMs, which is used to solve the problem of low accuracy of existing time series long-term prediction methods and improve the stability of long-term predictions and the ability to capture periodic patterns.
[0029] The difficulty of long-term series forecasting lies in processing complex temporal patterns and finding both long-term and short-term dependencies in the data. To address these two challenges, we propose a long-term forecasting method based on the discrete Fourier transform and autocorrelation mechanism, an adaptive pyramid decomposition framework, and multi-scale stacked LSTMs. This allows deep learning and statistical models to exploit long-term trend features in the data.
[0030] like Figure 1 As shown, given a set of densely detected water level time series X t : (x1, ..., x L ), with a length of L, and we want to predict T future values of the densely detected water level time series (x L+1 ,...,x L+T ). In order to extract the long-term trend, the intensively detected water level time series is averaged with a sliding window. Through multiple smoothing decompositions, a pyramid decomposition sequence is constructed to obtain long-term trend information of different granularities. When selecting the decomposition window, choosing a window that is too small may lead to more serious noise interference. On the contrary, a window that is too large may make the temporal characteristics of the intensively detected water level time series too smooth. Given that the intensively detected water level time series usually exhibits seasonality and periodicity, and the subjective selection of the window may be unstable and arbitrary, the present invention proposes a method for obtaining the optimal decomposition window using the DFT-AutoCorrelation mechanism.
[0031] The densely detected water level time series is processed using a discrete Fourier transform (DFT) to obtain its frequency components. Each frequency component corresponds to a different Fourier coefficient. The frequency components of n Fourier coefficients are selected from largest to smallest, and the corresponding periods are calculated to form candidate smoothing decomposition windows.
[0032] Due to the discontinuity of the densely detected water level time series, the discrete Fourier transform is used to detect the periodicity of the densely detected water level time series. F is the discrete Fourier transform of the densely detected water level time series of length L, x(t) is the tth discrete Fourier coefficient, and the discrete Fourier transform DFT expression is as follows: , where the subscript k\L represents the frequency captured by each discrete Fourier coefficient. DFT represents the densely detected water level time series as a sine curve S f(t) =e i2πkt / L Therefore, the discrete Fourier coefficients record the amplitude and phase of the densely detected water level time series projected onto these sine waves. Through discrete Fourier transform, the frequency components in the densely detected water level time series can be easily detected. Calculate the square of the corresponding discrete Fourier coefficient: , where f t =2πt / L represents the frequency captured by each frequency component. Filter n P(f t ) and serves as a candidate smoothing decomposition window.
[0033] like Figure 1 As shown, the autocorrelation mechanism is used to further screen candidate smoothing decomposition windows obtained by discrete Fourier transform. The smoothing decomposition window is then determined from the candidate smoothing decomposition windows to improve the reliability of the decomposition of the densely detected water level time series. The autocorrelation coefficient (ACF) is the Pearson correlation between two random processes at different moments. When the densely detected water level time series is periodic, its autocorrelation coefficient can also exhibit a certain degree of periodicity. Periodic sequences with the same phase naturally exhibit similar trends, meaning that their first-order derivatives are identical. Therefore, autocorrelation can reveal repetitive patterns, such as periodic signals masked by noise, or identify fundamental frequencies that disappear within the signal's harmonic frequencies.
[0034] When the autocorrelation coefficient is large, it corresponds to the top of the mountain in the autocorrelation coefficient graph, indicating that the data change trends at different locations are more similar, reflecting that the sub-signals at fixed intervals have the same repetitive pattern, indirectly reflecting that the similarity of the data change trends at different historical locations is high; when the autocorrelation coefficient is small, it indicates that the similarity of the data change trends at different historical locations is low, which corresponds to the valley in the autocorrelation coefficient graph. The candidate smooth decomposition windows obtained by discrete Fourier transform are further screened according to the autocorrelation coefficient graph. If the candidate smooth decomposition window is at the top of the autocorrelation coefficient curve, then the candidate smooth decomposition window can be used as the smooth decomposition window. If it is in the valley, then the candidate smooth decomposition window is discarded. If all the candidate smooth decomposition windows are in the valley, the smooth decomposition window is determined according to the order of Fourier coefficient size. According to the autocorrelation calculation formula, the autocorrelation coefficient graph is calculated: , where R XX (τ) represents the time series of densely detected water levels X t With dense detection of water level time series X t The dense detection of the water level time series X with a lag of τ steps t+τThe autocorrelation coefficient graph is generated using the autocorrelation calculation formula. Observe the more significant peaks in the autocorrelation coefficient graph. These peaks represent the significant correlation between the lag time series and the intensive water level detection time series. Identify the most significant peak and record its corresponding lag. If the lag represents the main period of the intensive water level detection time series, the lag can be used as a smoothing decomposition window.
[0035] Perform discrete Fourier transform on the pre-acquired dense detection water level time series, select the square of the Fourier coefficients from large to small and calculate the corresponding period {T1, T2, T3, ..., T n}, T1≥T2≥T3≥T n , and the corresponding period is taken as a candidate smooth decomposition window.
[0036] To address the excessive noise in densely measured water level time series and the error accumulation of traditional LSTM models during long-term predictions, the present invention performs multi-scale decomposition of densely measured water level time series and uses mean smoothing to eliminate short-term fluctuations in the densely measured water level time series, thereby obtaining multi-scale smoothed data. Densely measured water level time series at different scales provide richer trend information and simplify complex temporal patterns within the context, thereby improving the present invention's prediction accuracy.
[0037] The dense detection water level time series is smoothed twice with window average. The window size of the average smoothing is determined by the smoothing decomposition window size. The dense detection water level time series and the two subsequences obtained by decomposition are combined into a pyramid prediction subsequence: , , .
[0038] Where, X t To intensively detect water level time series, X rd For X nd The length of the decomposition subsequence is L / τ2, Decomp() is the mean smoothing decomposition operation function, Concat() is the pyramid sequence level splicing operation function, X t =(x1,x2,...,x i ,...,x L ), x i Indicates the intensive detection water level value measured at timestamp i. nd =( , ,..., ,..., )The specific decomposition process is as follows: , , where τ1 and τ2 represent any two candidate smooth decomposition windows obtained by discrete Fourier transform, X nd =( , ,..., ,..., ) is the decomposition subsequence of the pre-acquired dense detection water level time series with a length of L / τ1, X rd =( , ,..., ,..., ) is X nd The length of the decomposition subsequence is L / τ2; generate [X t ,X nd ,X rd ] is a pyramid subsequence composed of .
[0039] To learn and model multi-scale pyramid sequences using LSTMs, we employ stacked LSTMs for multi-scale prediction. The stacked LSTMs predict the decomposed subsequences at each level of the pyramid subsequence, generating multi-scale pyramid prediction subsequences. Since the pyramid prediction subsequences have varying lengths, cubic spline interpolation is used to align the pyramid prediction subsequences at different levels.
[0040] LSTMs exhibit learning and generalization capabilities, resulting in excellent predictive performance. Therefore, stacked LSTMs are used to learn and predict pyramid prediction subsequences at each level of a pyramid subsequence, resulting in a multi-scale pyramid prediction subsequence. When LSTMs are used to make long-term predictions for each layer of the pyramid subsequence, an iterative prediction approach is employed. That is, predictions are made one time step at a time, with the latest pyramid subsequence added to the LSTM input sequence as the input sequence for the next prediction update and iteration. LSTMs incorporate gate units, combining short-term and long-term memory, cleverly resolving the vanishing gradient problem. LSTMs utilize mechanisms such as forget gates, input gates, and output gates to control the flow and loss of features, selecting important memories and filtering out unimportant ones, thus enabling them to capture dependencies between temporal information.
[0041] Forget Gate: , input gate: , , , output gate: , .
[0042] In these equations: x a is the input vector at time t, h t is the hidden state vector at time t, h t-1is the hidden state vector at time t-1, c t is the cell state vector at time t, c t-1 is the cell state vector at time t-1, f t is the output vector of the forget gate; σ is the gate signal generated by mapping the input to the (0,1) interval using the sigmoid activation function. The gate signal includes the control signal of the forget gate, input gate, and output gate. W f is the forget gate weight matrix, W i is the input gate weight matrix, W c is the candidate cell state weight matrix, W o is the output gate weight matrix; b f ,b i ,b c ,b o are the bias vectors of the forget gate, input gate, candidate cell state, and output gate, respectively, used for bias adjustment after linear transformation; i t is the input gate output vector, is the candidate unit state, o t is the output vector of the output gate, and tanh() is the hyperbolic tangent activation function.
[0043] A stacked LSTM is used to predict pyramid subsequences, obtaining pyramid prediction subsequences with information of varying granularity. Within the pyramid prediction subsequences, sequence information includes shallow and deep sequences. The shallow sequences have high resolution and rich details. After smoothing, the deep sequences lack perceptual detail, but the resulting global sequence information is richer. To fully utilize the information at each level, prediction information from the pyramid sequence is fused. Cubic spline interpolation is used to align pyramid prediction subsequences at different levels, improving the learning and representation capabilities of the prediction network. High-order interpolation can easily lead to Runge's phenomenon, so low-order interpolation is often preferred. In particular, cubic spline interpolation offers improved stability and second-order derivative consistency, and it requires no convolution kernels or training parameters. Cubic spline interpolation preserves details when scaling up or down, while avoiding the oscillations and discontinuities common in other interpolation methods.
[0044] Cubic spline interpolation constructs a set of cubic polynomial functions between adjacent data points to implement the interpolation of the curve to approximate the original dense detection water level time series. In cubic spline interpolation, the input data is the Y of the second level prediction subsequence of the pyramid prediction subsequence. nd , the second-level prediction subsequence and the third-level prediction subsequence Y rd , Y of the third-level prediction subsequence nd and Y of the third-level predictor sequence rd , the cubic spline interpolation results of the second-level prediction subsequence and the third-level prediction subsequence are the same as the Y of the first-level prediction subsequence stThe length is the same. Assume that each subsequence Y has n data points (x i ,y i ), where x i =0,1,2,...,n. n ] is divided into n interpolation intervals, and a cubic polynomial function is used to approximate the dense water level data in each interpolation interval. These cubic polynomial functions are called spline segments, and each spline segment is determined by two adjacent data points and their derivatives. Assume that the i-th spline segment is S i (x), its general form is: , where a i ,b i ,c i ,d i are the coefficients to be solved for the cubic spline interpolation.
[0045] In order to solve these coefficients, the following preconditions need to be met: 1) Interpolation condition: For a given interpolation node sequence And the corresponding function value , let the cubic spline curve be , then at each interpolation node x i Satisfaction: 2) Smoothness condition: The spline interpolation curve is continuously smooth at adjacent interpolation nodes; the first-order derivatives of two adjacent spline segments at the interpolation nodes are equal: .
[0046] The second-order derivatives of two adjacent spline segments at the interpolation nodes are equal: , where For spline segments At the interpolation node The first derivative at , For spline segments At the interpolation node The first derivative at , Interpolation node The second derivative at , Interpolation node The second derivative at , is the i-th spline segment S i (x), is the i+1th spline segment S i+1 (x).
[0047] By solving the above conditions, the coefficient a of each spline segment can be obtained i 、b i 、c i and d i, thus constructing a smooth cubic spline interpolation curve. In summary, after performing cubic spline interpolation on the second-level and third-level prediction subsequences, a sequence with the same prediction length as the first-level prediction subsequence is obtained. The prediction subsequences at each level of the pyramid are averaged to obtain the final long-term prediction result.
[0048] The proposed forecasting method, based on a pyramid decomposition framework and multi-scale stacked LSTMs (ADMS-LSTM), has been validated in various scenarios, including power forecasting (based on ETT and Electricity datasets), financial exchange rate forecasting (based on the Exchange dataset), traffic flow forecasting (based on the Traffic dataset), meteorological forecasting (based on the Weather dataset), and public health forecasting (based on the ILI dataset). Compared to existing mainstream forecasting models, this method demonstrates superior long-term forecast accuracy and performance across various scenarios (covering different forecast durations, such as 96, 192, 336, and 720 minutes), using the core evaluation metrics of Mean Sequential Estimation (MSE) and Mean Average Expected Estimation (MAE).
[0049] The present invention predicts different prediction lengths {96, 192, 336, 720}. Figure 2-Figure 5 To illustrate the effect of long-term prediction of the ETT dataset, the prediction lengths of the ETT dataset are set to {96, 192, 336, 720}. Figure 2-Figure 5 In the figure, the blue curve represents the true value, the red curve represents the predicted value, and the shaded area between the blue dotted lines is the error range of ±15%, which reflects the reasonable fluctuation range of the true value. Figure 2-Figure 5 The horizontal axis in the figure is the time step, the unit of the horizontal axis is step, the vertical axis is the oil temperature, and the unit of the vertical axis is temperature.
[0050] In an embodiment of the present application, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the program.
[0051] In an embodiment of the present application, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.
[0052] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0053] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention as disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not invented herein, and the description and examples are to be considered merely as exemplary.
[0054] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of this application in detail. It should be understood that the above are only specific implementation methods of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of this application should be included in the scope of protection of this application.
Claims
1. A prediction method based on a pyramid decomposition framework and multi-scale stacked LSTMs, characterized by: include: Performing discrete Fourier transform on the pre-acquired dense detection water level time series to obtain discrete Fourier coefficients; Selecting a preset number of squares of Fourier coefficients from large to small and determining corresponding periods, and using the corresponding periods as candidate smoothing decomposition windows; Determine the smooth decomposition window from the candidate smooth decomposition windows by using the autocorrelation mechanism and the autocorrelation coefficient; Multi-scale pyramid decomposition is performed on the densely detected water level time series, and mean smoothing is used to eliminate short-term fluctuations in the densely detected water level time series to obtain multi-scale smoothed data including pyramid subsequences; Use stacked LSTM to perform long-term prediction on the pyramid subsequence to obtain the pyramid prediction subsequence; Use cubic spline interpolation to align pyramid prediction subsequences at different levels; Based on the preset conditions, the coefficients that need to be solved in the cubic spline interpolation are calculated; The aligned pyramid prediction subsequences are added and averaged to obtain the final long-term prediction result.
2. The prediction method based on the pyramid decomposition framework and multi-scale stacked LSTMs according to claim 1, characterized in that: Performing discrete Fourier transform on the pre-acquired dense detection water level time series to obtain discrete Fourier coefficients; Select a preset number of squares of Fourier coefficients from large to small and determine the corresponding period, and use the corresponding period as a candidate smoothing decomposition window, including: Compute the discrete Fourier transform of a densely detected water level time series: , Where F is the discrete Fourier transform of the densely detected water level time series of length L, x(t) is the t-th discrete Fourier coefficient, k\L is the normalized digital frequency, and f k\L The specific frequencies captured by the discrete Fourier coefficients; Calculate the square of the discrete Fourier coefficient P(f t ): , Among them, f t =2πt / L is the frequency captured for each frequency component, DFT() is the discrete Fourier transform function; Select n squares P(f t ) is used as a candidate smoothing decomposition window, and n is a positive integer.
3. The prediction method based on the pyramid decomposition framework and multi-scale stacked LSTMs according to claim 2, characterized in that: The autocorrelation mechanism and the autocorrelation coefficient are used to determine the smooth decomposition window from the candidate smooth decomposition windows, including: According to the autocorrelation calculation formula, the autocorrelation coefficient graph is calculated: , Where R XX (τ) represents the time series of densely detected water levels X t With dense detection of water level time series X t The dense detection of the water level time series X with a lag of τ steps t+τ similarity of time delays between them; The significant peak in the autocorrelation coefficient graph is screened in the candidate smooth decomposition window, the corresponding lag period is recorded, and the corresponding lag period is used as the smooth decomposition window.
4. The prediction method based on the pyramid decomposition framework and multi-scale stacked LSTMs according to claim 1, characterized in that: The densely detected water level time series is decomposed at multiple scales, and the short-term fluctuations in the densely detected water level time series are eliminated by mean smoothing to obtain multi-scale smoothed data including pyramid subsequences, including: Calculate the i-th water level of the decomposition subsequence and the i-th water level of the decomposition subsequence : , , Among them, τ1 and τ2 represent any two candidate smooth decomposition windows obtained by discrete Fourier transform, X nd =( , ,..., ,..., ) is the decomposition subsequence of the pre-acquired dense detection water level time series with a length of L / τ1, X rd =( , ,..., ,..., ) is X nd The length of the decomposition subsequence is L / τ2; Generate [X t ,X nd ,X rd ] is a pyramid subsequence composed of .
5. The prediction method based on the pyramid decomposition framework and multi-scale stacked LSTMs according to claim 1, characterized in that: Use cubic spline interpolation to align pyramid prediction subsequences at different levels, including: Use stacked LSTM to predict the decomposed subsequence of each level of the pyramid sequence to obtain a multi-scale pyramid prediction sequence; The second-level prediction subsequence Y in the multi-scale pyramid prediction sequence nd and the third-level predictor sequence Y rd Input cubic spline interpolation and use cubic spline interpolation to output the second-level prediction subsequence Y nd and the third-level predictor sequence Y rd The cubic spline interpolation result of ; Each pyramid prediction subsequence has n interpolation nodes (x i ,y i ), where i=0,1,2,...,n; the interpolation interval [x0,x n ] is divided into n intervals, and a cubic spline segment S is obtained in each interval using a cubic polynomial function. i (x): , where a i 、b i 、c i and d i are the coefficients to be solved in cubic spline interpolation, and x is the independent variable.
6. The prediction method based on the pyramid decomposition framework and multi-scale stacked LSTMs according to claim 1, characterized in that: The preset conditions include interpolation conditions and smoothing conditions; The interpolation conditions include: For a given sequence of interpolation nodes And the corresponding function value , let the cubic spline curve be Include all spline segments S i (x), then at each interpolation node The spline segment at satisfy: ; The spline interpolation curve passes through all given interpolation nodes; Smoothing conditions include: The spline interpolation curve is continuously smoothed at adjacent interpolation nodes; The first derivatives of two adjacent spline segments at the interpolation nodes are equal: , The second-order derivatives of two adjacent spline segments at the interpolation nodes are equal: , Where, For spline segments At the interpolation node The first derivative at , For spline segments At the interpolation node The first derivative at , Interpolation node The second derivative at , Interpolation node The second derivative at , is the i-th spline segment S i (x), is the i+1th spline segment S i+1 (x).
7. A prediction system based on a pyramid decomposition framework and multi-scale stacked LSTMs, characterized by: include: A candidate smoothing decomposition window determination module is used to perform discrete Fourier transform on the pre-acquired dense detection water level time series to obtain discrete Fourier coefficients; Selecting a preset number of squares of Fourier coefficients from large to small and determining corresponding periods, and using the corresponding periods as candidate smoothing decomposition windows; A smoothing decomposition window determination module determines a smoothing decomposition window from candidate smoothing decomposition windows using an autocorrelation mechanism and an autocorrelation coefficient; A subsequence determination module is used to perform multi-scale pyramid decomposition on the densely detected water level time series, eliminate short-term fluctuations in the densely detected water level time series using mean smoothing, and obtain multi-scale smoothed data including pyramid subsequences; The final long-term prediction result determination module is used to perform long-term prediction on the pyramid subsequences using stacked LSTMs to obtain pyramid prediction subsequences; cubic spline interpolation is used to align pyramid prediction subsequences at different levels; Based on the preset conditions, the coefficients that need to be solved in the cubic spline interpolation are calculated; the aligned pyramid prediction subsequences are added and averaged to obtain the final long-term prediction result.
8. 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, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Multivariable time series prediction method for multi-scale adaptive graph learning
CN114169394A
SAR (Synthetic Aperture Radar) image end-to-end change detection method combining superpixel segmentation and twin network
CN116563308A
Multi-scale hybrid base station flow prediction system based on STL decomposition
CN119402877A
Disaster early warning method and system based on key target detection and image segmentation
CN119649034A
Sewage quality prediction method based on pyramid-shaped three-dimensional model
CN119990481A