Prediction methods based on pyramid decomposition framework and multi-scale stacked LSTMs
By employing a pyramid decomposition framework and multi-scale stacked LSTMs, the problems of nonlinear characteristics and long-period dependencies in long-term time series forecasting are addressed, achieving higher accuracy and more stable long-term forecasts, which can be applied in fields such as power, finance, transportation, and meteorology.
Patent Information
- Application Number
- CN202511315774.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-16
AI Technical Summary
Existing long-term time series forecasting methods struggle to accurately capture nonlinear time series characteristics and long-period dependencies when dealing with complex uncertainties and noise interference in industrial scenarios, leading to a decrease in forecast accuracy.
We employ a pyramid decomposition framework and multi-scale stacked LSTMs approach. By using discrete Fourier transform, autocorrelation mechanism and mean smoothing, we construct a multi-scale pyramid structure and combine it with stacked LSTMs for long-term prediction. We then use cubic spline interpolation 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, enhances the adaptability to complex hydrological time series and forecast accuracy, and is applicable to multiple fields such as power, finance, transportation and meteorology.
Smart Images

Figure CN120822666B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a prediction method based on a pyramid decomposition framework and multi-scale stacked LSTMs, belonging to the field of long-term prediction technology of pyramid decomposition framework and multi-scale stacked LSTMs. Background Technology
[0002] Long-term time series forecasting, relying on historical data to predict future trends, is of significant value in the industrial sector. It supports production scheduling optimization, sales demand forecasting, and equipment lifecycle maintenance planning, and is also applicable to fields such as financial transactions, influenza forecasting, and environmental forecasting. However, industrial scenarios involve complex uncertainties such as equipment operation fluctuations and variables in multiple links of the supply chain, coupled with real-time data noise interference, making long-term time series forecasting require meticulous analysis and significantly challenging to process real-time industrial time series data. Therefore, achieving accurate long-term forecasting in industrial scenarios can provide a scientific basis for enterprise decision-making and has become a key research focus in the field of industrial intelligence. Furthermore, its application prospects are becoming increasingly broad with the advancement of industrial digital transformation. Traditional long-term time series forecasting models, including ARIMA and exponential smoothing, are built on linear assumptions and struggle to effectively capture the complex nonlinear time series characteristics in real-world scenarios. These nonlinear time series characteristics include abrupt trends and multi-period coupling. Although classic LSTM networks improve nonlinear modeling capabilities through gating mechanisms, their memory units face error accumulation problems in long-term forecasting: as the prediction step size increases, the decay of historical information leads to the gradual loss of periodic patterns and long-term dependencies, resulting in a significant decrease in prediction accuracy. Existing deep learning solutions attempt to enhance periodic feature extraction through self-attention mechanisms, including Transformer. However, these mechanisms have key drawbacks: while they can capture global dependencies, they are computationally complex and have low sensitivity to local temporal dynamics, making it difficult to balance the accuracy of long-term period modeling with that of short-term fluctuation prediction.
[0003] Current technologies have not yet effectively solved two core problems: 1) Dynamic fusion of frequency domain features: Existing methods lack an adaptive weight allocation mechanism for the dominant frequency components, and cannot dynamically suppress noise and strengthen key periodic signals during the prediction process; 2) Long-period dependency modeling: The memory cells of traditional LSTMs are difficult to quantify the autocorrelation of historical sequences, resulting in insufficient modeling of the correlation of periodic events. Summary of the Invention
[0004] The technical problem to be solved by this invention is to overcome the defects of the prior art and provide a prediction method based on the pyramid decomposition framework and multi-scale stacked LSTMs to solve the problem of low accuracy of existing long-term time series prediction methods, and improve the stability of long-term prediction and the ability to capture periodic patterns.
[0005] This invention relates to a prediction method based on a pyramid decomposition framework and multi-scale stacked LSTMs, comprising: performing a discrete Fourier transform on a pre-acquired densely detected water level time series to obtain discrete Fourier coefficients; selecting a preset number of Fourier coefficients from largest to smallest and determining their corresponding periods, using these periods as candidate smoothing decomposition windows; determining a smoothing decomposition window within the candidate smoothing decomposition window using an autocorrelation mechanism and autocorrelation coefficients; performing multi-scale pyramid decomposition on the densely detected water level time series, using mean smoothing to eliminate short-term fluctuations in the densely detected water level time series, obtaining multi-scale smoothed data including pyramid subsequences; using stacked LSTMs to perform long-term prediction on the pyramid subsequences, obtaining pyramid prediction subsequences; aligning the pyramid prediction subsequences at different levels using cubic spline interpolation; calculating the coefficients to be solved in the cubic spline interpolation based on preset conditions; and summing and averaging the aligned pyramid prediction subsequences to obtain the final long-term prediction result.
[0006] Firstly, a Discrete Fourier Transform (DFT) is performed on the pre-acquired densely monitored water level time series to obtain the DFT coefficients. A predetermined number of Fourier coefficients are selected from largest to smallest, and their squares are used to determine the corresponding periods. These periods are then used as candidate smoothing decomposition windows. This includes: calculating the DFT of the densely monitored 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 frequency captured by the discrete Fourier coefficients.
[0007] Calculate the square of the discrete Fourier coefficients P(f) t ): , where f t =2πt / L is the frequency captured for each frequency component, and DFT() is the Discrete Fourier Transform function; select the square P(f) from largest to smallest. t The corresponding period of ) is used as the candidate smooth decomposition window, where n is a positive integer.
[0008] Firstly, using the autocorrelation mechanism and autocorrelation coefficient, the smoothing decomposition window is determined within the candidate smoothing decomposition window, including: calculating the autocorrelation coefficient plot according to the autocorrelation calculation formula. In the formula, R XX (τ) represents the time series of intensively monitored water levels X t With dense detection of water level time series X t Dense detection water level time series X with lag τ steps t+τ The time delay similarity between them; the significant peak value in the autocorrelation coefficient plot is obtained by screening in the candidate smoothing decomposition window, the corresponding lag period is recorded, and the corresponding lag period is used as the smoothing decomposition window.
[0009] Firstly, the densely monitored water level time series is decomposed into multiple scales, and mean smoothing is used to eliminate short-term fluctuations in the densely monitored water level time series, obtaining multi-scale smoothed data including pyramid subsequences, including: calculating the i-th water level of the decomposed subsequences. The i-th water level of the decomposition subsequence : , Where τ1 and τ2 represent any two candidate smooth decomposition windows obtained by the discrete Fourier transform, X nd =( , ,..., ,..., X is a pre-acquired decomposition subsequence of length L / τ1 from a densely detected water level time series. rd =( , ,..., ,..., ) is X nd A subsequence of length L / τ²; generating [X t ,X nd ,X rd The pyramid subsequence composed of ]
[0010] Prioritizes aligning pyramid prediction subsequences at different levels using cubic spline interpolation, including: using stacked LSTM to predict the decomposed subsequences of each level of the pyramid sequence to obtain a multi-scale pyramid prediction sequence; and aligning the second-level prediction subsequence Y in the multi-scale pyramid prediction sequence. nd and the third-level predicted subsequence Y rd Input cubic spline interpolation, and output the second-level predicted subsequence Y using cubic spline interpolation. nd and the third-level predicted subsequence Y rd The cubic spline interpolation results; each pyramid prediction subsequence has n interpolation nodes (x i y i ), where i = 0, 1, 2, ..., n; the interpolation interval [x0, x n Divide the data into n intervals, and calculate the cubic spline segment S in each interval using a cubic polynomial function. i (x): , where a i b i c i and d i These are the coefficients to be solved in cubic spline interpolation, where x is the independent variable.
[0011] Preferably, the preset conditions include interpolation conditions and smoothing conditions; wherein, the interpolation conditions include: for a given sequence of interpolation nodes and corresponding function values Let the cubic spline curve be... Including all spline segments S i (x), then at each interpolation node spline segment at the location satisfy: The spline interpolation curve passes through all given interpolation nodes; the smoothing conditions include: the spline interpolation curve remains smooth at adjacent interpolation nodes; and the first derivatives of two adjacent spline segments at the interpolation nodes are equal. The second derivatives of two adjacent spline segments at the interpolation nodes are equal: In the formula, spline segment At interpolation nodes The first derivative at that point, spline segment At interpolation nodes The first derivative at that point, interpolation nodes The second derivative at that point, interpolation nodes The second derivative at that point, For the i-th spline segment S i (x), For the (i+1)th spline segment S i+1 (x).
[0012] Prior to this, a prediction system based on a pyramid decomposition framework and multi-scale stacked LSTMs includes: a candidate smoothing decomposition window determination module, used to perform discrete Fourier transform on a pre-acquired densely detected water level time series to obtain discrete Fourier coefficients; selecting a preset number of Fourier coefficients from largest to smallest and determining the corresponding periods, using the corresponding periods as candidate smoothing decomposition windows; a smoothing decomposition window determination module, using an autocorrelation mechanism and autocorrelation coefficient to determine a smoothing decomposition window within the candidate smoothing decomposition window; a subsequence determination module, used to perform multi-scale pyramid decomposition on the densely detected water level time series, using mean smoothing to eliminate short-term fluctuations in the densely detected water level time series, obtaining multi-scale smoothed data including pyramid subsequences; a final long-term prediction result determination module, used to perform long-term prediction on the pyramid subsequences using stacked LSTMs to obtain pyramid prediction subsequences; aligning pyramid prediction subsequences at different levels using cubic spline interpolation; calculating the coefficients to be solved in cubic spline interpolation based on preset conditions; and summing and averaging the aligned pyramid prediction subsequences to obtain the final long-term prediction result.
[0013] Preferably, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described herein.
[0014] Preferably, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described herein.
[0015] The beneficial effects achieved by this invention are as follows: 1. This invention performs discrete Fourier transform on 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 features of the densely detected water level time series, providing basic parameters with high periodic matching for multi-scale decomposition. This fundamentally ensures that the decomposition process conforms to the essential laws of water level changes and avoids feature loss or noise introduction problems caused by improper window selection.
[0016] 2. This invention utilizes the autocorrelation mechanism and autocorrelation coefficient to screen the lag period corresponding to the significant peak in the autocorrelation coefficient graph and use it as a smoothing decomposition window. In the process of determining the final decomposition window, frequency energy characteristics and sequence self-correlation characteristics are integrated, which effectively improves the adaptability of the smoothing decomposition window to complex water level fluctuation patterns. It is especially suitable for hydrological time series analysis scenarios with non-stationarity and multi-period superposition characteristics.
[0017] 3. This invention employs multi-scale pyramid decomposition and mean smoothing to construct a pyramid-like hierarchical structure consisting of the original sequence, first-level decomposition subsequences, and second-level decomposition subsequences. Combined with the mean smoothing algorithm, noise is filtered out from the pyramid prediction subsequences at each level. This decomposes the original densely detected water level time series into smoothed components at different time scales, covering long-term trend fluctuation characteristics, medium-term periodic fluctuation characteristics, and short-term fluctuation characteristics. This provides hierarchical and structured input features for subsequent processing, significantly enhancing the extraction capability and representation accuracy of multi-time granular information.
[0018] 4. In this invention, a stacked LSTM network is used to independently model each pyramid subsequence. Combined with cubic spline interpolation algorithm, information fusion of pyramid prediction subsequences at different levels is achieved. While preserving the prediction accuracy of features at each scale, the continuity constraints of the first and second derivatives of the interpolation function, i.e., the smoothing condition, ensure the continuity and physical rationality of prediction results at different levels in the time dimension. This effectively avoids abrupt changes or logical contradictions that may occur during multi-scale information fusion, and improves the overall reliability of pyramid prediction subsequences.
[0019] 5. Based on preset conditions, this invention calculates the coefficients that need to be solved in cubic spline interpolation, achieving accurate solutions. By constructing a linear equation system solution model for cubic spline interpolation coefficients, including strictly defined interpolation conditions for accurate fitting of data points and smoothing conditions including continuous derivatives in adjacent intervals, it can achieve high-precision fitting of interpolation curves to multi-scale prediction data at the mathematical level. This ensures both accurate matching of predicted values for each data point and smooth transition between adjacent interpolation intervals, providing theoretical support for the accuracy and stability of the fused pyramid prediction subsequence at the algorithm level.
[0020] 6. The integration and optimization of the final long-term prediction results in this invention are achieved by weighted averaging of the aligned pyramid prediction subsequences at each level, forming an integrated output of multi-scale prediction information. By utilizing the principle of ensemble learning, the bias and variance of single-scale predictions are effectively reduced, so that the final long-term prediction results have the complementary advantages of features from different decomposition scales and statistical stability. This significantly improves the accuracy, robustness, and adaptability to complex hydrological environments of long-term water level prediction, providing reliable technical support for practical applications such as water resource management and flood early warning.
[0021] 7. The prediction method proposed in this invention, based on the pyramid decomposition framework and multi-scale stacked LSTMs (ADMS-LSTM), has been applied and validated in multiple fields, including power forecasting, financial exchange rate forecasting, traffic flow forecasting, meteorological forecasting, and public health forecasting. Compared with existing mainstream prediction models, it demonstrates superior long-term prediction accuracy and performance in long-term prediction tasks across various fields, based on the core evaluation indicators MSE and MAE. Attached Figure Description
[0022] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 These are schematic diagrams of some embodiments of this application.
[0024] Figure 2 This is a graph showing the prediction results for the ETT dataset with a prediction length of 96.
[0025] Figure 3 This is a graph showing the prediction results for the ETT dataset with a prediction length of 192.
[0026] Figure 4 This is a graph showing the prediction results for the ETT dataset with a prediction length of 336.
[0027] Figure 5This is a graph showing the prediction results for the ETT dataset with a prediction length of 720. Detailed Implementation
[0028] See 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 long-term time series prediction methods and improve the stability of long-term prediction and the ability to capture periodic patterns.
[0029] The challenge of long-term series forecasting lies in handling complex temporal patterns and identifying long-term and short-term dependencies in the data. To address these challenges, an adaptive pyramid decomposition framework based on discrete Fourier transform and autocorrelation mechanisms, along with a multi-scale stacked LSTMs method for long-term forecasting, is proposed. This method enables deep learning and statistical models to uncover long-term trend features in the data.
[0030] like Figure 1 As shown, assuming a set of densely detected water level time series X is given t : (x1, ..., x L Given a time series of densely detected water levels of length L, we want to predict T future values (xt, x ...) of the time series. L+1 ,...,x L+T To extract long-term trends, a sliding window average is applied to the densely detected water level time series. A pyramid decomposition sequence is constructed through multiple smoothing decompositions to obtain long-term trend information at different granularities. When selecting the decomposition window, choosing too small a window may lead to more severe noise interference. Conversely, a window that is too large may make the temporal characteristics of the densely detected water level time series overly smoothed. Given that densely detected water level time series typically exhibit seasonality and periodicity, and that subjective window selection can be unstable and arbitrary, this invention proposes a method utilizing the DFT-AutoCorrelation mechanism to obtain the optimal decomposition window.
[0031] The densely monitored water level time series is processed by Discrete Fourier Transform (DFT) to obtain the frequency components of the densely monitored water level time series. Each frequency component corresponds to a different Fourier coefficient. The frequency components with n Fourier coefficients are selected from largest to smallest, and the period corresponding to the frequency components is calculated as candidate smoothing decomposition windows.
[0032] Due to the discontinuous nature of densely detected water level time series, the Discrete Fourier Transform (DFT) is used to detect the periodicity of such series. F is the DFT of a densely detected water level time series of length L, and x(t) is the t-th DFT coefficient. The DFT expression is as follows: Where the subscript k\L represents the frequency captured by each Discrete Fourier coefficient. The DFT represents the densely detected water level time series as a sine curve S. f(t) =e i2πkt / L A linear combination of these. Therefore, the Discrete Fourier coefficients record the amplitude and phase of the densely detected water level time series projected onto these sinusoids. Frequency components in the densely detected water level time series can be easily detected using the Discrete Fourier Transform. Calculate the squares of the corresponding Discrete Fourier coefficients: , where f t =2πt / L represents the frequency captured by each frequency component. N P(f) components are selected from largest to smallest. t The corresponding period is used as a candidate smooth decomposition window.
[0033] like Figure 1 As shown, an autocorrelation mechanism is used to further screen candidate smoothing decomposition windows obtained from the discrete Fourier transform, and the smoothing decomposition window is determined within the candidate smoothing decomposition windows to improve the reliability of the densely detected water level time series decomposition. The autocorrelation coefficient (ACF) is the Pearson correlation between different times in two random processes. When the densely detected water level time series is periodic, its autocorrelation coefficient can also show a certain periodicity. Periodic sequences with the same phase naturally provide similar trends, i.e., the same first derivative. Therefore, autocorrelation can identify recurring patterns, such as periodic signals masked by noise, or identify fundamental frequencies hidden in signal harmonic frequencies.
[0034] A large autocorrelation coefficient corresponds to a mountain peak in the autocorrelation coefficient graph, indicating that the data change trends at different locations are more similar. This reflects that sub-signals with fixed staggered intervals have the same repetition pattern, indirectly reflecting a high similarity in the data change trends at different historical locations. Conversely, a small autocorrelation coefficient indicates a lower similarity in the data change trends at different historical locations, corresponding to a valley in the autocorrelation coefficient graph. Further screening of candidate smoothing decomposition windows obtained from the discrete Fourier transform based on the autocorrelation coefficient graph is performed. If a candidate smoothing decomposition window is located at a mountain peak in the autocorrelation coefficient curve, it can be used as a smoothing decomposition window; otherwise, it is discarded. If all candidate smoothing decomposition windows are located in valleys, the smoothing decomposition window is determined according to the order of the Fourier coefficients. The autocorrelation coefficient graph is then calculated using the autocorrelation calculation formula. In the formula, R XX (τ) represents the time series of intensively monitored water levels X t With dense detection of water level time series X t Dense detection water level time series X with lag τ steps t+τThe similarity of time delays between the time series is analyzed. The autocorrelation coefficient plot is generated using the autocorrelation calculation formula. Significant peaks in the autocorrelation coefficient plot are observed; these peaks indicate a significant correlation between the time series with the lag and the densely monitored water level time series. The most significant peaks are identified, and their corresponding lag periods are recorded. If the lag period represents the main period of the densely monitored water level time series, it can be used as a smoothing decomposition window.
[0035] Perform a Discrete Fourier Transform on the pre-acquired densely monitored water level time series, select the squares of the Fourier coefficients from largest to smallest, and calculate the corresponding periods {T1, T2, T3, ..., T}. n}, T1≥T2≥T3≥T n The corresponding period is used as a candidate smooth decomposition window.
[0036] To address the issues of excessive noise in densely detected water level time series and the error accumulation in traditional LSTM for long-term prediction, this invention performs multi-scale decomposition on the densely detected water level time series and utilizes mean smoothing to eliminate short-term fluctuations, obtaining multi-scale smoothed data. Densely detected water level time series at different scales provide richer trend information and simplify complex time patterns within the context, thereby improving the prediction accuracy of this invention.
[0037] The densely detected water level time series is subjected to two window averaging smoothing processes. The window size for averaging smoothing is determined by the smoothing decomposition window size. The densely detected water level time series and the two subsequences obtained from the decomposition are combined to form the pyramid prediction subsequence. , , .
[0038] In the formula, X t To intensively monitor water level time series, X rd For X nd Given a subsequence of length L / τ², Decomp() is the mean smoothing decomposition function, and Concat() is the pyramid sequence level concatenation function. t =(x1,x2,...,x i ,...,x L ), x i This represents the densely detected water level value measured at timestamp i. X nd =( , ,..., ,..., The specific decomposition process is as follows: , Where τ1 and τ2 represent any two candidate smooth decomposition windows obtained by the discrete Fourier transform, X nd =( , ,..., ,..., X is a pre-acquired decomposition subsequence of length L / τ1 from a densely detected water level time series. rd =( , ,..., ,..., ) is X nd A subsequence of length L / τ²; generating [X t ,X nd ,X rd The pyramid subsequence composed of ]
[0039] To learn and model multi-scale pyramid sequences using LSTM, stacked LSTMs were employed for multi-scale prediction. The stacked LSTMs were used to predict the decomposed subsequences at each level of the pyramid subsequence, resulting in multi-scale pyramid predicted subsequences. Subsequently, due to the varying lengths of the pyramid predicted subsequences, cubic spline interpolation was used to align the pyramid predicted subsequences at different levels.
[0040] LSTMs exhibit strong learning and generalization abilities, resulting in excellent predictive performance. Therefore, stacked LSTMs are used to learn and predict pyramid prediction subsequences at each level of the pyramid subsequence, thus obtaining multi-scale pyramid prediction subsequences. When LSTMs are used for long-term prediction of pyramid subsequences at each level, an iterative prediction approach is adopted. That is, prediction is performed one time step at a time, and the latest pyramid subsequence is added to the LSTM's input sequence as the input sequence for the next prediction process update and iteration. LSTMs incorporate gate units, combining short-term and long-term memory to cleverly solve the gradient vanishing problem. LSTMs utilize mechanisms such as forget gates, input gates, and output gates to control feature flow and loss, selecting important memories and filtering out unimportant ones, thus possessing the ability to capture temporal information dependencies.
[0041] Forgotten Gate: Input gate: , , Output gate: , .
[0042] In these equations: x a The input vector h at time t t The hidden state vector h at time t t-1It is the hidden state vector at time t-1, c t It is the unit state vector at time t, c t-1 f is the unit state vector at time t-1. t W is the output vector of the forget gate; σ is the gating signal generated by mapping the input to the (0,1) interval using the sigmoid activation function, which includes the control signals for the forget gate, input gate, and output gate. f W is the forget gate weight matrix. i W is the input gate weight matrix. c W is the candidate cell state weight matrix. o b is the output gate weight matrix; f ,b i ,b c ,b o These are the bias vectors for the forget gate, input gate, candidate cell state, and output gate, respectively, used for bias adjustment after linear transformation; i t The input gate output vector, For candidate cell state, o t is the output vector of the output gate, and tanh() is the hyperbolic tangent activation function.
[0043] Stacked LSTM is used to predict pyramid subsequences, obtaining pyramid predicted subsequences with different granularities of information. The sequence information in the pyramid predicted subsequences includes shallow and deep sequences. Shallow sequences have high resolution and rich details. After smoothing, deep sequences have poor detail perception but obtain richer global sequence information. To fully utilize the information from each layer, the prediction information of the pyramid sequences is fused. Cubic spline interpolation is used to align the pyramid predicted subsequences at different levels and improve the learning and expressive capabilities of the prediction network. High-order interpolation easily leads to Runge's phenomenon, so low-order interpolation is usually chosen, especially cubic spline interpolation, which has better stability and second-derivative consistency, and does not require convolution kernels or training parameters. The advantage of cubic spline interpolation is that it preserves details during scaling or downscaling 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 interpolate the curve, thus approximating the original densely detected water level time series. In cubic spline interpolation, the input data is the Y-axis of the second-level prediction subsequence of the pyramid prediction subsequence. nd Y-sequences of the second-level and third-level prediction subsequences rd Y-sequence of the third-level prediction subsequence nd And the Y of the third-level predicted subsequence rd The cubic spline interpolation results of the second-level and third-level prediction subsequences are compared with the Y-axis of the first-level prediction subsequence. stThe lengths are consistent. Let each subsequence Y have n data points (x... i y i ), where x i =0,1,2,...,n. The interval [x0,x...] is... n The data is divided into n interpolation intervals, and a cubic polynomial function is used to approximate the dense water level data in each interval. These cubic polynomial functions are called spline segments, and each spline segment is determined by two adjacent data points and their derivatives. Assume the i-th spline segment is S... i (x), its general form is: , where a i ,b i ,c i ,d i These are the coefficients that need to be solved using cubic spline interpolation.
[0045] To solve for these coefficients, the following preconditions must be met: 1) Interpolation condition: for a given sequence of interpolation nodes and corresponding function values Let the cubic spline curve be... Then at each interpolation node x i The following conditions must be met: 2) Smoothing conditions: The spline interpolation curve remains smooth at adjacent interpolation nodes; the first derivatives of two adjacent spline segments at the interpolation nodes are equal. .
[0046] The second derivatives of two adjacent spline segments at the interpolation nodes are equal: In the formula, spline segment At interpolation nodes The first derivative at that point, spline segment At interpolation nodes The first derivative at that point, interpolation nodes The second derivative at that point, interpolation nodes The second derivative at that point, For the i-th spline segment S i (x), For the (i+1)th 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 iThis allows for the construction of 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 final long-term prediction result is obtained by summing and averaging the pyramid prediction subsequences at each level.
[0048] The prediction method proposed in this invention, based on a pyramid decomposition framework and multi-scale stacked LSTMs (ADMS-LSTM), has been successfully applied and validated in multiple fields, including power forecasting (based on the ETT and Electricity datasets), financial exchange rate forecasting (based on the Exchange dataset), traffic flow forecasting (based on the Traffic dataset), weather forecasting (based on the Weather dataset), and public health forecasting (based on the ILI dataset). Compared to existing mainstream prediction models, in long-term prediction tasks across various fields (covering different prediction durations such as 96, 192, 336, and 720), it demonstrates superior long-term prediction accuracy and performance based on the core evaluation metrics of MSE and MAE.
[0049] This invention performs predictions for different prediction lengths {96, 192, 336, 720}. Figures 2-5 To illustrate the performance of long-term predictions on the ETT dataset, the prediction lengths for the ETT dataset are set to {96, 192, 336, 720}. Figures 2-5 In the diagram, the blue curve represents the actual value, the red curve represents the predicted value, and the shaded area between the blue dashed lines represents the error range of ±15%, reflecting the reasonable fluctuation range of the actual value. Figures 2-5 The horizontal axis represents time steps, with the unit being steps; the vertical axis represents oil temperature, with the unit being temperature.
[0050] In this embodiment of the application, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.
[0051] In this application embodiment, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0052] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0053] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention described herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not invented herein. The specification and embodiments are to be considered exemplary only.
[0054] The above specific embodiments further illustrate the purpose, technical solution and beneficial effects of this application. It should be understood that the above are only specific embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of this application should be included within the scope of protection of this application.
Claims
1. A prediction method based on a pyramid decomposition framework and multi-scale stacked LSTMs, characterized in that, include: The discrete Fourier transform is performed on the pre-acquired densely detected water level time series to obtain the discrete Fourier coefficients; The squares of a preset number of Fourier coefficients are selected from largest to smallest and the corresponding periods are determined. The corresponding periods are then used as candidate smoothing decomposition windows. The smooth decomposition window is determined from the candidate smooth decomposition window using the autocorrelation mechanism and autocorrelation coefficient; Multi-scale pyramid decomposition is performed on densely monitored water level time series, and mean smoothing is used to eliminate short-term fluctuations in the densely monitored water level time series, resulting in multi-scale smoothed data including pyramid subsequences. Long-term prediction of pyramid subsequences is performed using stacked LSTM to obtain pyramid predicted subsequences; Cubic spline interpolation is used to align pyramids at different levels to predict subsequences; Based on preset conditions, the coefficients that need to be solved in cubic spline interpolation are calculated; The aligned pyramid prediction subsequences are summed and averaged to obtain the final long-term prediction result; The discrete Fourier transform is performed on the pre-acquired densely detected water level time series to obtain the discrete Fourier coefficients; A preset number of Fourier coefficients are selected from largest to smallest, and their corresponding periods are determined. These periods are then used as candidate smoothing decomposition windows, including: Calculate the discrete Fourier transform of the 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 frequencies captured by the discrete Fourier coefficients; Calculate the square of the discrete Fourier coefficients P(f) t ): , Among them, f t =2πt / L is the frequency captured for each frequency component, and DFT() is the Discrete Fourier Transform function; Select n squares P(f) from largest to smallest t The corresponding period of ) is used as the candidate smooth decomposition window, where n is a positive integer; Multi-scale decomposition is performed on the densely monitored water level time series, and mean smoothing is used to eliminate short-term fluctuations in the densely monitored water level time series, resulting in multi-scale smoothed data including pyramid subsequences, including: Calculate the i-th water level of the decomposed subsequence The i-th water level of the decomposition subsequence : , , Where τ1 and τ2 represent any two candidate smooth decomposition windows obtained by the discrete Fourier transform, X nd =( , ,..., ,..., X is a pre-acquired decomposition subsequence of length L / τ1 from a densely detected water level time series. rd =( , ,..., ,..., ) is X nd A subsequence of length L / τ²; Generate [X] t ,X nd ,X rd The pyramid subsequence composed of ] 2. The prediction method based on the pyramid decomposition framework and multi-scale stacked LSTMs according to claim 1, characterized in that, Using the autocorrelation mechanism and autocorrelation coefficient, the smooth decomposition window is determined within the candidate smooth decomposition window, including: The autocorrelation coefficient plot is obtained by calculating the autocorrelation coefficient using the autocorrelation calculation formula: , In the formula, R XX (τ) represents the time series of intensively monitored water levels X t With dense detection of water level time series X t Dense detection water level time series X with lag τ steps t+τ The similarity of time delay between them; The significant peak values in the autocorrelation coefficient plot are obtained by screening within the candidate smoothing decomposition window, and the corresponding lag periods are recorded. The corresponding lag periods are then used as the smoothing decomposition window.
3. The prediction method based on the pyramid decomposition framework and multi-scale stacked LSTMs according to claim 1, characterized in that, Using cubic spline interpolation to align pyramid prediction subsequences at different levels, including: By using stacked LSTM to predict the decomposition subsequences of each level of the pyramid sequence, a multi-scale pyramid prediction sequence is obtained. The second-level prediction subsequence Y in the multi-scale pyramid prediction sequence nd and the third-level predicted subsequence Y rd Input cubic spline interpolation, and output the second-level predicted subsequence Y using cubic spline interpolation. nd and the third-level predicted subsequence Y rd The results of cubic spline interpolation; Each pyramid prediction subsequence has n interpolation nodes (x i y i ), where i = 0, 1, 2, ..., n; the interpolation interval [x0, x n Divide the data into n intervals, and calculate the cubic spline segment S in each interval using a cubic polynomial function. i (x): , Where a i b i c i and d i These are the coefficients to be solved in cubic spline interpolation, where x is the independent variable.
4. 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 corresponding function values Let the cubic spline curve be... Including all spline segments S i (x), then at each interpolation node spline segment at the location satisfy: , ; The spline interpolation curve passes through all given interpolation nodes; Smoothing conditions include: The spline interpolation curve remains smooth at adjacent interpolation nodes; The first derivatives of two adjacent spline segments at the interpolation nodes are equal: , The second derivatives of two adjacent spline segments at the interpolation nodes are equal: , In the formula, spline segment At interpolation nodes The first derivative at that point, spline segment At interpolation nodes The first derivative at that point, interpolation nodes The second derivative at that point, interpolation nodes The second derivative at that point, For the i-th spline segment S i (x), For the (i+1)th spline segment S i+1 (x).
5. A prediction system based on a pyramid decomposition framework and multi-scale stacked LSTMs, characterized in that, The prediction method based on the pyramid decomposition framework and multi-scale stacked LSTMs as described in claim 1 includes: The candidate smoothing decomposition window determination module is used to perform discrete Fourier transform on the pre-acquired densely detected water level time series to obtain discrete Fourier coefficients; selects the squares of a preset number of Fourier coefficients from large to small and determines the corresponding period, and uses the corresponding period as the candidate smoothing decomposition window; The smooth decomposition window determination module uses the autocorrelation mechanism and autocorrelation coefficient to determine the smooth decomposition window from the candidate smooth decomposition windows. The subsequence determination module is used to perform multi-scale pyramid decomposition on the densely detected water level time series, and use mean smoothing to eliminate short-term fluctuations in the densely detected water level time series to 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 subsequence using stacked LSTM to obtain the pyramid prediction subsequence; to align the pyramid prediction subsequences at different levels using cubic spline interpolation; to calculate the coefficients that need to be solved in the cubic spline interpolation based on preset conditions; and to sum and average the aligned pyramid prediction subsequences to obtain the final long-term prediction result.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 4.
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