Time series data prediction method and device based on dynamic error modeling
By generating historical error sequences using an LSTM model, combining CEEMDAN mode decomposition and nearest neighbor propagation algorithm for clustering, and dynamically allocating weights using Spearman rank correlation coefficient, a parallel error correction architecture is constructed. This solves the real-time and accuracy problems in time series prediction and improves the prediction performance of edge computing devices.
Patent Information
- Application Number
- CN202511677661.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-03-10
AI Technical Summary
Existing time series forecasting methods struggle to meet real-time requirements in long-series data processing, and traditional solutions fail to effectively utilize historical forecast error sequences, leading to the accumulation of forecast biases, especially with memory and computing power bottlenecks on edge computing devices.
A dynamic error modeling architecture is constructed by generating historical error sequences using an LSTM model, clustering and fusing error mode components through CEEMDAN mode decomposition and nearest neighbor propagation algorithm, analyzing dynamic weight allocation using Spearman rank correlation coefficient, and performing error correction using a parallel LSTM network.
It significantly improves the accuracy and real-time performance of time series forecasting by explicitly modeling the dynamic characteristics of errors and an adaptive weight allocation mechanism, thereby achieving synergistic optimization of forecasting and error correction.
Smart Images

Figure CN121637113A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of time series prediction, and in particular to a time series data prediction method and device based on dynamic error modeling. BACKGROUND
[0002] As a core technology of modern data analysis, time series prediction is widely used in marine meteorology, industrial monitoring, financial risk control and other fields. In related technologies, a complete prediction system from data preprocessing to error compensation is constructed through the collaborative work of statistical models and deep learning algorithms. Specifically, this technology covers the evolution process from traditional methods such as ARMA, SVM to neural network models such as LSTM, including key signal processing links such as empirical mode decomposition (EMD) and ensemble empirical mode decomposition (EEMD). The existing hybrid model generally adopts a serial architecture of "decomposition-prediction-reconstruction", among which the EMD-LSTM scheme realizes the preliminary processing of nonlinear and non-stationary signals by decomposing the original data into multiple IMF components and modeling them respectively. However, the existing method has significant defects in the modal decomposition and error correction links. Specifically, it is difficult to meet the real-time requirements in long sequence data processing, and new data needs to re-execute the complete decomposition process, resulting in a delay in the response of the prediction system. At the same time, the traditional scheme only indirectly reduces the prediction error by decomposing the original data, and does not decompose the historical prediction error sequence as an independent object, which may cause the accumulation of prediction bias due to the correction lag effect. In addition, the fixed weight allocation mechanism (such as entropy weight method, PCA) is difficult to adapt to the non-Gaussian and non-stationary characteristics of error components, resulting in a decay of correction effect over time, especially on edge computing devices, the processing of high-dimensional modal components has significant memory and computing power bottlenecks. SUMMARY
[0003] The present application aims to at least partially solve one of the technical problems in the related art.
[0004] To this end, a first object of the present application is to propose a time series data prediction method based on dynamic error modeling.
[0005] A second object of the present application is to propose a time series data prediction device based on dynamic error modeling.
[0006] A third object of the present application is to propose an electronic device.
[0007] A fourth object of the present application is to propose a computer-readable storage medium.
[0008] A fifth object of the present application is to propose a computer program product.
[0009] To achieve the above object, the first aspect of the present application provides a time series data prediction method based on dynamic error modeling, comprising: S1, using an LSTM model to predict the original time series data to generate a historical error sequence between the predicted value and the true value; S2, performing CEEMDAN mode decomposition on the historical error sequence to extract a plurality of error modal components containing non-stationary characteristics; S3, using a near neighbor propagation algorithm to cluster and fuse the error modal components to generate a representative error modal cluster after dimension reduction; S4, analyzing the non-linear correlation between the historical error sequence and each error modal cluster based on the Spearman rank correlation coefficient, and obtaining a dynamic weight distribution result through normalization processing; S5, using a parallel LSTM network to predict the future error value of each error modal cluster, and weighting and correcting the prediction result according to the dynamic weight to generate a final prediction value.
[0010] Optionally, S11, the formula is:
[0011] The point-by-point difference between the observed value and the predicted value is calculated to generate a historical error sequence WHE; S12, performing volatility detection on the generated WHE sequence, and when the error absolute value change rate of adjacent points is detected to exceed a preset threshold, triggering a dynamic update mechanism of the error sequence.
[0012] Optionally, S21, when CEEMDAN decomposition is used, white noise is added iteratively and the residual is calculated to ensure that the decomposed modal component IMF=[IMF1, IMF2, …, IMFn] meets the integrity constraint; S22, performing stationarity test on the decomposed IMF component, and retaining the first 7 IMF components with a fluctuation amplitude greater than a set threshold as effective error modes.
[0013] Optionally, S31, the formula is:
[0014] The clustering result SC=[0, 1, 2, …, m] is fused with the corresponding modal component, wherein SC is a clustering class identifier; S32, performing feature extraction on the fused AIMF component, and calculating the mutual information between the original error sequence and the fused AIMF component as a clustering quality evaluation index.
[0015] Optionally, S41, the formula is:
[0016] Spearman correlation coefficient CC=[CC0,CC1,CC2,…,CCm] is normalized as weight vector W=[W1,W2,…,Wm]; S42, set the weight update frequency to 1 / 3 of the prediction period, and trigger the weight recalculation immediately when the mutation of the fluctuation mode of the error sequence is detected.
[0017] Optionally, S51, the formula is used:
[0018] The normalized AIMFi is denormalized to obtain the actual error prediction value NAIMFi(t+1); S52, set the confidence threshold of the error correction term, and start the secondary correction process when the absolute value of the weighted correction value exceeds the threshold.
[0019] Optionally, S6, a parallel LSTM network architecture sharing hidden layer features is constructed, wherein the main prediction LSTM and the error prediction LSTM share at least two hidden layers, and the capture ability of the model to the time series dependence is improved through feature sharing; S7, the sliding window mechanism is used to synchronize the error correction process, so that the prediction window length of the main prediction and the error correction is consistent, and the correction result is calculated before the end of the prediction window.
[0020] To achieve the above purpose, the second aspect of the embodiment of the application provides a time series data prediction device based on dynamic error modeling, comprising: The LSTM prediction module is used for predicting the original time series data by using the LSTM model, and generating a historical error sequence between the prediction value and the true value; The error mode decomposition module is used for CEEMDAN mode decomposition of the historical error sequence, and extracting a plurality of error mode components containing non-stationary characteristics; The clustering fusion module is used for clustering and fusing the error mode components by using the affinity propagation algorithm, and generating a representative error mode cluster after dimension reduction; The dynamic weight distribution module is used for analyzing the nonlinear correlation between the historical error sequence and each error mode cluster based on the Spearman rank correlation coefficient, and obtaining a dynamic weight distribution result through normalization processing; The error correction prediction module is used for predicting the future error value of each error mode cluster by using the parallel LSTM network, and performing weighted correction on the prediction result according to the dynamic weight, and generating a final prediction value.
[0021] To achieve the above purpose, the third aspect of the embodiment of the application provides an electronic device, comprising: a processor, and a memory connected with the processor in communication; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of the first aspect.
[0022] To achieve the above object, the fourth aspect of the present application provides a computer readable storage medium, the computer readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method according to any one of the first aspect.
[0023] To achieve the above object, the fifth aspect of the present application provides a computer program product, the computer program is executed by a processor to implement the method according to any one of the first aspect.
[0024] The embodiments of the present application provide at least the following beneficial effects: The method, device, electronic equipment and computer readable storage medium provided by the embodiments of the present application can significantly improve the accuracy and real-time performance of time series prediction, and realize the cooperative optimization of prediction and error correction through explicit modeling of error dynamic characteristics, parallel prediction architecture and adaptive weight distribution mechanism.
[0025] Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following and / or can be learned by practice of the application. BRIEF DESCRIPTION OF DRAWINGS
[0026] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description, taken in conjunction with the drawings, in which: Figure 1 A flowchart of a time series data prediction method based on dynamic error modeling provided by an embodiment of the present application; Figure 2 A specific flowchart of a time series data prediction method based on dynamic error modeling provided by an embodiment of the present application; FIG. 3(a) and FIG. 3(b) are experimental data diagrams of wave height time series data sites 52211 and 41159 provided by an embodiment of the present application; FIG. 4(a) and FIG. 4(b) are error sequence decomposition diagrams corresponding to FIG. 3(a) and FIG. 3(b) respectively provided by an embodiment of the present application; Figure 5 A specific flowchart of historical error sequence decomposition provided by an embodiment of the present application; Figure 6 A structural diagram of a time series data prediction device based on dynamic error modeling provided by an embodiment of the present application. DETAILED DESCRIPTION
[0027] Embodiments of the present application are described below in detail, examples of which are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.
[0028] In view of the problems of low error information utilization and insufficient dynamic characteristics capture in time series prediction, embodiments of the present application provide a time series data prediction method based on dynamic error modeling, Figure 1 A flowchart of a time series data prediction method based on dynamic error modeling provided by an embodiment of the present application is shown in FIG. 1. Figure 2 A detailed flowchart of a time series data prediction method based on dynamic error modeling provided by an embodiment of the present application is shown in FIG. 2. FIG. 3(a) and FIG. 3(b) are experimental data diagrams of wave height time series data sites 52211 and 41159 provided by an embodiment of the present application. FIG. 4(a) and FIG. 4(b) are error sequence decomposition diagrams corresponding to FIG. 3(a) and FIG. 3(b), respectively, provided by an embodiment of the present application. Figure 5 A detailed flowchart of historical error sequence decomposition provided by an embodiment of the present application is shown in FIG. 5. As shown in FIG. 5, the method comprises the following steps: Figures 1-5 S1, using an LSTM model to predict the original time series data to generate a historical error sequence between the predicted value and the true value. S2, decomposing the historical error sequence into a plurality of error components.
[0029] Specifically, in step one, the present application uses an LSTM (Long Short-Term Memory) model to predict the original time series data to generate a historical error sequence between the predicted value and the true observation value (Wave Height Error), which provides basic data for subsequent error correction. LSTM is a special recurrent neural network (RNN) that can effectively capture long-term dependencies in time series data by introducing input gates, forget gates, and output gates. It is particularly suitable for time series modeling with nonlinear and non-stationary characteristics. In a specific implementation, the original time series data is first input into the LSTM model for training and prediction. The predicted value is denoted as
[0030] , where represents the prediction result at the current time , and the true observation value is denoted as . The historical error sequence can be calculated by the following formula:
[0031] The error sequence The prediction bias of the LSTM model at different time points is reflected, with significant volatility and non-stationarity. In practical applications, this step is usually performed in scenarios such as marine wave height prediction, industrial equipment state monitoring, etc., with historical observations as input data, predicted values as output, and error sequences for subsequent error mode decomposition and correction.
[0032] From the technical effect, this step provides high-quality input data for subsequent CEEMDAN decomposition and AP clustering by constructing the prediction error sequence of the LSTM model. By explicitly extracting the time series features of the prediction error, it lays the foundation for dynamic modeling and compensation of the error, thereby effectively improving the overall prediction accuracy. In addition, this step provides data support for the implementation of the "prediction-correction" parallel processing architecture, which helps to reduce system response delay and improve the real-time performance and robustness of the prediction system.
[0033] Further, S1 includes: S11, calculating the point-by-point difference between the observed value and the predicted value to generate a historical error sequence WHE by the formula:
[0034]
[0035] Specifically, in step three, the Affinity Propagation (AP) algorithm is used to cluster and reduce the dimensionality of the multiple modal components (IMF) obtained by CEEMDAN decomposition in step two, thereby reducing the computational complexity of subsequent processing and improving the running efficiency of the model. The AP algorithm is an unsupervised clustering method, which adaptively determines the cluster center through the responsibility and availability information transmission mechanism between data points, without the need to pre-set the number of clusters, and has good robustness and adaptability.
[0036] In specific implementation, first, the modal components decomposed by CEEMDAN are regarded as high-dimensional time series feature vectors, which are input into the AP algorithm for clustering processing. The AP algorithm iteratively updates the responsibility matrix and the availability matrix to finally determine the cluster category to which each modal component belongs SC = [0, 1, 2,..., m]. Wherein, represents the category number to which the th modal component belongs. In some implementations, in order to improve the clustering efficiency, the similarity measurement method of the modal components can be optimized, such as using Euclidean distance or dynamic time warping (DTW) as the similarity measurement standard.
[0037] Further, for the modal components belonging to the same category, the following formula is used for fusion:
[0038] In the formula, represents the modal component after fusion of the th cluster category, is the modal component obtained by original decomposition, is the index of the modal component. Through this fusion operation, multiple modal components with similar characteristics can be combined into a representative component, thereby reducing the total number of modal components , significantly reducing the computational burden of the model.
[0039] This step plays a key role in the present application. On the one hand, through the unsupervised clustering mechanism of the AP algorithm, the inherent similarity between modal components can be effectively identified, avoiding information loss caused by manual selection or fixed threshold; on the other hand, the fused modal component retains the non-stationary characteristics of the original error sequence, providing structured and dimension-reduced input data for subsequent Spearman correlation analysis and weight allocation. This technical means not only improves the real-time performance of the model, but also enhances the adaptive ability of the error correction process, laying a foundation for constructing a three-level linkage error compensation architecture of “decomposition-clustering-weight”.
[0040] S12, volatility detection is performed on the generated WHE sequence, and when the error absolute value change rate of adjacent points exceeds a preset threshold, a dynamic updating mechanism of the error sequence is triggered.
[0041] Specifically, in some implementations, the volatility detection on the generated WHE (Wave Height Error) sequence is one of the key steps of the error dynamic correction in the ASLM model. This step aims to identify the area of abnormal fluctuations in the error sequence, thereby triggering the dynamic updating mechanism of the error sequence, ensuring that the input data of the subsequent prediction model has higher stability and representativeness. Specifically, volatility detection is achieved by calculating the error absolute value change rate of adjacent points, and its technical principle is based on local sensitive analysis of the time series characteristics of the error sequence to capture the moments of error mutation or non-stationary enhancement.
[0042] In terms of technical implementation, this step first performs sliding window processing on the WHE sequence to calculate the error absolute value change rate of adjacent points. Let the length of the WHE sequence be , then for any time , the error change rate of its adjacent points can be expressed as:
[0043] Further, the relative fluctuation index of the error change rate is defined as:
[0044] wherein, represents the normalized error variation rate, which is used to measure the fluctuation intensity of the current point. When exceeds the preset fluctuation threshold , it is determined that the point is an abnormal fluctuation point, triggering the dynamic updating mechanism of the error sequence. This mechanism can include reacquiring data, updating the CEEMDAN decomposition result, reperforming AP clustering and Spearman weight allocation, and other operations, thereby realizing adaptive adjustment of the error correction model.
[0045] In terms of parameter setting, the fluctuation threshold can be set according to the statistical characteristics of the historical error sequence, and is usually in the range of [0.05, 0.2], and the specific value needs to be optimized in combination with the error fluctuation frequency and amplitude in the application scenario. In addition, the size of the sliding window is usually set to , in order to balance the real-time performance and the sensitivity of fluctuation detection.
[0046] This step is particularly suitable for non-stationary time series scenarios such as ocean wave height prediction and wind speed prediction in practical applications. In edge computing devices or real-time prediction systems, fluctuation detection can effectively identify the mutation area of the error sequence, avoiding the decline of the overall prediction accuracy caused by local abnormalities. Its technical value lies in realizing the dynamic response mechanism of the error correction process, improving the adaptability of the model to non-stationary errors, and thus enhancing the robustness and real-time performance of the prediction system.
[0047] S2, performing CEEMDAN modal decomposition on the historical error sequence to extract a plurality of error modal components containing non-stationary characteristics.
[0048] Specifically, in step two, the historical error sequence is subjected to CEEMDAN (Complete Ensemble Empirical Mode Decomposition with Adaptive Noise) modal decomposition, aiming to extract a plurality of error modal components (IMF) containing non-stationary characteristics. CEEMDAN is an improved adaptive signal decomposition method, which, compared with traditional EMD and EEMD, effectively alleviates the problems of mode mixing and reconstruction error by introducing adaptive noise mechanism and iterative reconstruction strategy, and has higher decomposition accuracy and stability.
[0049] In a specific implementation, CEEMDAN first adds a set of adaptive noise signals to the original error sequence, and through multiple iterations of decomposition, gradually extracts intrinsic mode functions (IMFs) with different frequency characteristics. Each IMF component represents the local characteristics of the error sequence at a certain time scale, where IMF1 to IMF7 usually exhibit greater volatility, corresponding to high-frequency, non-stationary error components; while IMF8 to IMF12 have smaller fluctuations and tend to be stationary, reflecting low-frequency or trend errors. This decomposition process is adaptive, does not require pre-set decomposition levels, and can automatically terminate according to the complexity of the error sequence, thus achieving multi-scale representation of the error sequence.
[0050] In terms of parameter settings, the number of iterations of CEEMDAN is usually set to 10-50 times, and the noise amplitude coefficient is generally taken as 0.1-0.2 times the standard deviation of the original signal, to ensure that the disturbance of noise to the signal is controllable. The number of IMF components obtained after decomposition is usually between 5-15, related to the length and complexity of the original error sequence. When running on edge computing devices, this step can be combined with parallel computing strategies to reduce computational delay and improve real-time performance.
[0051] This step plays a key role in the ASLM model, by decomposing the non-stationary error sequence into multiple modal components with clear physical meaning, providing a structured input for subsequent clustering fusion and dynamic weight allocation. This decomposition method can effectively separate the instantaneous fluctuations and long-term trends in the error, providing more detailed feature descriptions for error correction, thereby significantly improving the accuracy and robustness of time series prediction.
[0052] Further, S2 includes: S21, when using CEEMDAN decomposition, by iteratively adding white noise and calculating the residual, to ensure that the modal components IMF=[IMF1, IMF2, …, IMFn] after decomposition satisfy the completeness constraint.
[0053] Specifically, in step two, CEEMDAN (Complete Ensemble Empirical Mode Decomposition with Adaptive Noise) is used to adaptively decompose the historical error sequence to extract its inherent nonlinear and non-stationary characteristics. CEEMDAN is an improved EMD (Empirical Mode Decomposition) method that effectively alleviates the mode mixing problem in traditional EMD by adding adaptive noise and calculating the residual in each iteration, while improving the completeness and stability of the decomposition.
[0054] In a specific implementation, the decomposition process of CEEMDAN includes the following key operations: first, a set of white noise is added to the original error sequence and EMD decomposition is performed to obtain a set of IMF (Intrinsic Mode Function) components. Then, the current residual is calculated and compared with the original sequence. If the residual still contains decomposable high-frequency components, new white noise is added to the residual, and EMD decomposition is repeated until the residual tends to be monotonic or meets the preset decomposition termination condition. This process can be represented as:
[0055] where, to The fluctuation is large, mainly reflecting the instantaneous change and high-frequency disturbance in the error sequence; while to The waveform tends to be stable, representing the low-frequency trend or long-term deviation in the error sequence. By iteratively adding white noise and calculating the residual, CEEMDAN can adaptively adjust the noise intensity to ensure that the decomposed IMF components have good separation in the frequency domain, thereby providing a clear structure for modal basis for subsequent error modeling.
[0056] In terms of parameter setting, the noise amplitude of CEEMDAN is usually set to of the standard deviation of the original error sequence, where is the noise proportion coefficient, generally taking a value range of to balance the introduction of noise and modal separation effect. The decomposition termination condition can be judged based on the IMF characteristics of the residual, such as the number of extreme points of the residual being less than 3 or meeting the preset upper limit of the number of iterations.
[0057] This step plays a key role in the entire ASLM model, by decomposing the error sequence into multiple modal components with physical meaning, providing structured input data for subsequent clustering, dimensionality reduction and Spearman dynamic weight allocation. The adaptive noise mechanism and completeness constraint of CEEMDAN ensure the full exploitation of error information, thereby improving the accuracy and robustness of the error correction model.
[0058] S22, smoothness test is performed on the decomposed IMF components, and the first 7 IMF components with a fluctuation amplitude greater than a set threshold are retained as effective error modes.
[0059] Specifically, in step three, the decomposed IMF components are subjected to stationarity test, and the first 7 IMF components with fluctuation amplitude greater than a set threshold are retained as effective error modes, which is the key link of error mode optimization processing in the present application. This step aims to screen out non-stationary modal components that have significant contribution to the prediction error, thereby improving the efficiency and accuracy of subsequent error modeling and correction.
[0060] In terms of technical implementation, stationarity test usually adopts statistical methods such as Kolmogorov-Smirnov test, Augmented Dickey-Fuller (ADF) test or Hurst index analysis to determine whether the IMF component has long-term trend or periodic fluctuation. In the present scheme, a threshold screening mechanism based on fluctuation amplitude is preferred, i.e. the fluctuation amplitude index of each IMF component is calculated, such as the difference between the maximum value and the minimum value ( ) or the standard deviation ( ), and compared with the preset fluctuation threshold. In some implementations, the threshold can be set to 0.3 times the standard deviation of the original error sequence WHE, i.e. , to ensure that the retained IMF components have sufficient dynamic characteristics.
[0061] Further, in the present scheme, the first 7 IMF components are retained as effective error modes, which is based on the comprehensive consideration of CEEMDAN decomposition characteristics and practical application experience. As an improved adaptive noise ensemble empirical mode decomposition method, CEEMDAN can decompose the original error sequence into multiple IMF components with different frequency characteristics, among which the first 7 IMF components usually contain high-frequency, non-stationary error fluctuation information, while the latter components tend to be stationary and have less contribution to error correction. By retaining the first 7 IMF components, the dimension of subsequent processing can be effectively reduced, and the computational efficiency of the model can be improved.
[0062] In application scenarios, this step is applicable to non-stationary time series data processing scenarios such as ocean wave height prediction and meteorological data prediction. By modal decomposition and screening of the error sequence, representative error features can be extracted to provide high-quality input data for subsequent clustering fusion and Spearman correlation analysis.
[0063] The technical effect of this step lies in removing low-fluctuation and high-redundancy modal components, significantly reducing the complexity of the error correction model, while retaining non-stationary modal information that has a significant impact on the prediction error, laying a foundation for constructing a three-level linkage error compensation architecture of "decomposition-clustering-weight", and improving the real-time performance and dynamic adaptability of the system.
[0064] S3, using the affinity propagation algorithm to cluster and fuse the error modal components to generate representative error modal clusters after dimension reduction.
[0065] Specifically, in step three, the Affinity Propagation (AP) algorithm is used to cluster and fuse the error mode components obtained from CEEMDAN decomposition to generate a dimensionality-reduced representative error mode cluster (AIMF). The core of this step is to merge mode components with similar characteristics into more representative clusters through unsupervised clustering, thereby reducing the dimensionality and computational complexity of subsequent processing, while retaining the key dynamic information in the error sequence.
[0066] In some implementations, the AP algorithm achieves adaptive clustering by passing two key pieces of information—responsibility and availability—between data points. (Attractivity matrix) The degree matrix represents the suitability of each data point as a cluster center. This represents the preference for selecting a cluster center for each data point. The algorithm iteratively updates these two matrices to ultimately determine a representative set of cluster centers. In this scheme, the AP algorithm is applied to the error mode components. Similar modal components are clustered into the same category to form a representative error mode cluster after dimensionality reduction. ,in This significantly reduces the number of modal components.
[0067] In practice, the input to the AP algorithm is a similarity matrix of modal components, typically constructed using negative Euclidean distance or a Gaussian similarity function. In this scheme, a Gaussian similarity function may be optionally used. ,in This is an adjustable parameter used to control the sensitivity of similarity. It allows for setting appropriate similarity thresholds and preference parameters. The AP algorithm can automatically determine the optimal number of clusters without human intervention.
[0068] Furthermore, for each category All modal components belonging to this category The components are fused to generate new representative modal components. The calculation method is as follows:
[0069] in Clustering labels representing modal components, This is the index of the original modal components. This fusion process preserves the temporal characteristics of the original modes through linear superposition, while reducing redundant information and improving the efficiency of subsequent correlation analysis and error correction.
[0070] This step is particularly suitable for processing high-dimensional, non-stationary error mode data in practical applications. For example, in ocean wave height prediction, error sequences often contain wave components of multiple frequencies and scales. Through AP clustering fusion, representative error mode clusters can be effectively extracted, providing structured input for subsequent Spearman correlation analysis and dynamic weight allocation, thereby improving the accuracy and real-time performance of error correction.
[0071] In terms of technical effectiveness, this step significantly reduces the dimensionality of modal components, decreasing the training burden on the LSTM model. Simultaneously, clustering preserves local similarity patterns in the error sequences, enhancing the model's adaptability to non-stationary errors. In edge computing devices or real-time prediction systems, this dimensionality reduction strategy helps improve the overall system's response speed and resource utilization.
[0072] Furthermore, S3 includes: S31, through the formula:
[0073] The modal components corresponding to the clustering results SC=[0,1,2,…,m] are fused, where SC is the clustering category identifier.
[0074] Specifically, in step three, the Affinity Propagation (AP) algorithm is used to cluster and reduce the dimensionality of the multiple modal components (IMFs) obtained from CEEMDAN decomposition in step two, thereby reducing the computational complexity of subsequent processing and improving the model's running efficiency. The AP algorithm is an unsupervised clustering method whose core lies in adaptively determining cluster centers through the iterative transmission of responsibility and availability information between data points. It does not require pre-setting the number of clusters and is suitable for structured analysis of high-dimensional time series data.
[0075] In its implementation, the IMF sequences obtained from CEEMDAN decomposition are first used as input samples to construct a data matrix. Each IMF component is treated as an independent temporal feature vector. The AP algorithm defines a similarity matrix... ,in Representing data points With candidate cluster centers The similarity between them is usually represented by a negative Euclidean distance. During the iteration process, the attractiveness... Representing data points choose The degree of preference for cluster centers, belonging degree Representing data points choose Suitability of cluster centers. By continuously updating these two matrices, the optimal set of cluster centers is finally determined.
[0076] In this scheme, the clustering result of the AP algorithm is defined as follows: ,in Indicates the first The IMF component was assigned to the first There are several categories. IMF components belonging to the same category will be merged into a new modal component. The calculation method is as follows:
[0077] in, , ,and This fusion process effectively reduces data dimensionality by preserving the local similarity of modal components, while avoiding the structural damage to non-stationary signals caused by traditional linear dimensionality reduction methods such as PCA.
[0078] In practical applications, this step is suitable for edge computing devices or resource-constrained embedded systems. Through AP clustering fusion, the number of training samples and model complexity of the LSTM model can be significantly reduced, thereby improving the real-time response capability of the prediction system. Furthermore, the adaptive nature of the AP algorithm allows it to automatically adjust the clustering structure according to the dynamic changes in the error sequence, enhancing the model's robustness and generalization ability.
[0079] This step plays a crucial role in the entire ASLM model, and its technical effects are reflected in the following aspects: on the one hand, it reduces the redundancy of modal components through clustering and fusion, thereby improving the efficiency of subsequent Spearman correlation analysis; on the other hand, it preserves the key non-stationary features in the error sequence, providing high-quality input data for subsequent dynamic weight allocation and error correction, thus significantly improving the overall prediction accuracy and system stability.
[0080] S32, feature extraction is performed on the fused AIMF components, and the mutual information between them and the original error sequence is calculated as a clustering quality evaluation index.
[0081] Specifically, in step four, features are extracted from the fused AIMF (Adaptive Intrinsic Mode Function) components, and the mutual information between them and the original error sequence WHE (Wave Height Error) is calculated as a clustering quality evaluation index. This is one of the key steps in realizing dynamic error compensation in the ASLM model of this invention. The core of this step lies in quantifying the nonlinear correlation between the fused mode components and the error sequence using the nonparametric statistical method—Spearman's rank correlation coefficient—thereby providing an adaptive weight allocation basis for subsequent error correction.
[0082] At the technical implementation level, this step first extracts features from the AIMF components after AP (Affinity Propagation) clustering and fusion. Since the AIMF components have already merged IMF components with similar temporal characteristics through clustering algorithms, their dimensionality is significantly reduced compared to the original IMFs, which is beneficial for improving subsequent processing efficiency. The feature extraction process may optionally employ a sliding window mechanism to extract the temporal feature vector of each AIMFi, including but not limited to mean, variance, energy, and spectral distribution, to enhance its representational ability. Subsequently, the correlation between AIMFi and WHE is calculated using the Spearman correlation coefficient, mathematically expressed as:
[0083] in, Let represent the correlation coefficient between the i-th fused component AIMFi and the error sequence WHE. The Spearman correlation coefficient is based on the rank rather than the original value, and is suitable for time series data with non-normal distribution and non-linear relationships. It can effectively capture the dynamic relationship between error components and prediction bias.
[0084] Furthermore, to achieve adaptive weight allocation, the correlation coefficient vector is... Normalize the vector to convert it into a weight vector. The calculation formula is as follows:
[0085] The weight vector must satisfy the normalization constraint:
[0086] In practical applications, this step is typically deployed on edge computing devices or distributed prediction systems to perform real-time correlation assessment and weight allocation of multiple fused error mode components. For example, in an ocean wave height prediction system, this step can perform Spearman analysis on the WHE sequence and multiple AIMF components for station 52211, dynamically adjusting the contribution of each component in error correction, thereby improving the robustness and adaptability of the prediction model.
[0087] The technical value of this step lies in providing a data-driven weight allocation mechanism for error correction by quantifying the nonlinear correlation between the fused components and the original error sequence. This avoids the fixed weights or variance-based static fusion strategies used in traditional methods, significantly improving the accuracy and real-time performance of error compensation. Simultaneously, this method introduces statistical correlation analysis into the multimodal fusion framework, enhancing the model's adaptability to non-stationary errors and providing a scientific basis for subsequent LSTM prediction and correction of error components.
[0088] S4. Based on the Spearman rank correlation coefficient analysis, the nonlinear correlation between the historical error sequence and each error mode cluster is analyzed, and the dynamic weight allocation result is obtained through normalization processing.
[0089] Specifically, in step four, the system analyzes the historical error sequence based on the Spearman rank correlation coefficient. With each error mode family The nonlinear correlation between the errors is analyzed, and the dynamic weight allocation result is obtained through normalization. This step is the core of the error correction mechanism in the ASLM model. Its technical implementation principle is based on nonparametric statistical methods, which can effectively deal with the non-stationarity and non-normal distribution characteristics of the error sequence.
[0090] In some implementations, the Spearman correlation coefficient measures the monotonic relationship between two variables by calculating the Pearson correlation coefficient between their ranks, making it suitable for nonlinear and non-normally distributed data. Specifically, it involves processing historical error sequences... With each fused error mode cluster As inputs to the Spearman correlation analysis module, two time series data are used to calculate their correlation coefficients. The correlation coefficient ranges from [-1, 1], where... Approaching 1 indicates and There is a strong positive correlation between them, meaning that the modal component has a significant impact on the prediction error; a value close to -1 indicates a strong negative correlation, while a value close to 0 indicates no significant correlation.
[0091] Furthermore, to achieve dynamic weight allocation, the system will allocate all... correlation coefficient Normalization is performed to ensure that the sum of the weights is 1 and that each weight is non-negative. The normalization formula is:
[0092] in, Indicates the first The weights of each modal cluster, This represents the number of modal clusters after clustering. This formula ensures the adaptability and dynamism of the weight allocation, and can be adjusted according to the real-time correlation between the error sequence and the modal clusters, thereby improving the accuracy and robustness of error correction.
[0093] In practical applications, this step is commonly used in scenarios such as ocean wave height prediction and industrial time series monitoring. Especially when dealing with error sequences with complex nonlinear characteristics, Spearman correlation analysis offers advantages over the traditional Pearson correlation coefficient. Through this step, the system can establish an explicit correlation between error modal components and prediction bias, providing a scientific basis for subsequent parallel error correction and significantly improving the prediction performance and adaptability of the ASLM model in dynamic environments.
[0094] Furthermore, S4 includes: S41, using the formula:
[0095] The Spearman correlation coefficient CC=[CC0,CC1,CC2,…,CCm] is normalized to the weight vector W=[W1,W2,…,Wm].
[0096] Specifically, in step three, the Affinity Propagation (AP) algorithm is used to cluster and reduce the dimensionality of the multiple modal components (IMFs) obtained from CEEMDAN decomposition in step two, thereby reducing the computational complexity of subsequent processing and improving the model's running efficiency. The AP algorithm is an unsupervised clustering method. Its core lies in automatically determining the optimal cluster centers and the number of categories through the iterative transmission of attraction and availability information between data points. It does not require manual setting of the number of clusters and is suitable for high-dimensional time-series data with complex distribution characteristics.
[0097] In its implementation, the IMF sequences obtained from CEEMDAN decomposition are first used as input samples to construct a similarity matrix between modal components. The AP algorithm then iteratively updates the attraction matrix. With the degree of belonging matrix Finally, the cluster category SC = [0, 1, 2, ..., m] to which each modal component belongs is determined, where Indicates the first The algorithm assigns the category number to each modal component. During the iteration process, it uses a preset similarity threshold. and preference parameters This is used to control the granularity and stability of clustering. Typically, It can be set to the average similarity of data points or adjusted according to the actual data distribution to ensure the rationality and interpretability of the clustering results.
[0098] In some implementations, the iteration termination condition of the AP algorithm can be set to the change in attraction and belonging being less than a preset convergence threshold. ,For example After clustering is complete, modal components belonging to the same category are merged to generate a new set of modal components. The fusion method is as follows:
[0099] This formula shows that for each category All IMF components belonging to this category are linearly superimposed to form a fusion modal component representing the characteristics of this category. By combining AP clustering with modal fusion, the dimensionality of modal components is effectively reduced, decreasing the computational burden of subsequent Spearman correlation analysis and LSTM prediction. Simultaneously, key non-stationary features in the original error sequence are preserved, laying a solid foundation for subsequent dynamic weight allocation and error correction. This step plays a crucial role in dimensionality reduction and feature compression in the ASLM model, significantly improving the model's real-time processing capabilities and resource utilization on edge computing devices.
[0100] S42, set the weight update frequency to 1 / 3 of the prediction period, and immediately trigger weight recalculation when a sudden change in the fluctuation pattern of the error sequence is detected.
[0101] Specifically, in some implementations, the step of "setting the weight update frequency to 1 / 3 of the prediction period and immediately triggering weight recalculation when a sudden change in the fluctuation pattern of the error sequence is detected" is one of the key mechanisms for achieving dynamic error correction in the ASLM model. This step significantly improves the model's adaptability to non-stationary error sequences by introducing a weight update strategy that combines time-driven and event-driven approaches.
[0102] From a technical implementation perspective, the weight update frequency is set based on the time granularity of the prediction task. For example, if the prediction period is 30 minutes, the weight update period is set to 10 minutes. This setting ensures that the weights have a certain update frequency before the error sequence experiences significant drift, thus maintaining the timeliness of the corrected model. Simultaneously, the system monitors the fluctuation pattern of the error sequence in real time and uses a sliding window mechanism to calculate the rate of change of the Spearman correlation coefficient of the error sequence within the current window. When this rate of change exceeds a preset threshold (e.g., 0.15), it is determined to be a sudden change in the fluctuation pattern, triggering an immediate update of the weights. This event detection mechanism can be calculated based on the following formula:
[0103] in, Represents the Spearman rank correlation coefficient. For historical error sequences, For the first The fused modal components. Through continuous calculation... By observing the rate of change, the system can identify the increased non-stationarity or structural abrupt changes in the error sequence, and thus adjust the weight allocation in a timely manner.
[0104] At the parameter level, the setting of the weight update frequency needs to consider both the real-time requirements of the prediction task and the dynamic characteristics of the error sequence. Typically, the prediction period... With weight update cycle satisfy This ensures that weight adjustments are completed before the error patterns become completely mismatched. Furthermore, it is recommended that the calculation window length for the Spearman correlation coefficient be set to [value missing]. Integer multiples (e.g.) This improves the stability of pattern recognition. The formula for calculating the normalized weights is as follows:
[0105] This formula ensures that the total weight is 1, and that the weight of each modal component is proportional to its correlation with the error sequence, thereby achieving dynamic optimization.
[0106] In application scenarios, this step is suitable for time-series tasks with strong non-stationarity and sudden error characteristics, such as ocean wave height prediction, power load prediction, and traffic flow prediction. Especially when running on edge computing devices, this mechanism can achieve efficient and accurate error correction with limited resources.
[0107] The technical advantage of this step is that by dynamically adjusting the weights, the corrected model can quickly respond to structural changes in the error sequence, avoiding the correction lag problem caused by fixed weights, thereby significantly improving prediction accuracy and system robustness.
[0108] S5. The future error values of each error mode cluster are predicted by using a parallel LSTM network, and the prediction results are weighted and corrected according to the dynamic weights to generate the final prediction value.
[0109] Specifically, in step five, this invention uses a parallel LSTM network to predict the future error values of the error mode cluster (AIMF) after AP clustering and fusion, and performs weighted correction on the prediction results of each mode based on Spearman dynamic weights, finally generating the corrected prediction value (ASLM). This step is the core link in realizing dynamic error compensation in the entire ASLM model, and its technical implementation has significant advantages in parallelization and real-time optimization capabilities.
[0110] In some implementations, this step first normalizes each fused AIMFi to eliminate differences in numerical scales between different modal components, thereby improving the convergence efficiency and prediction stability of the LSTM model. The normalization formula is:
[0111] The normalized AIMFi values are then fed into independent LSTM prediction models, each responsible for predicting the error value of its corresponding mode at future time steps. The LSTM model structure optionally includes a multi-layer stacked structure, with an input dimension of time step × number of features and an output dimension of single-step prediction error. The models are trained using the Adam optimizer with a learning rate set to [value missing]. The batch size is 64, the number of training rounds is 100, and the early stopping mechanism is set to terminate training if there is no improvement after 10 rounds.
[0112] Furthermore, the future error prediction value (NAIMFi) output by each LSTM model needs to be denormalized to restore its original numerical range. The denormalization formula is:
[0113] In practical applications, this step is typically deployed on edge computing devices or in distributed computing environments to support multimodal parallel prediction. Each LSTM model can be deployed independently on different computing nodes, synchronizing prediction results through message queues or shared memory mechanisms. This parallel architecture significantly reduces the computational latency of error prediction, meeting the real-time prediction requirements for minute-level or high-frequency sampled data.
[0114] Finally, the prediction error values of each modality are weighted and fused using Spearman dynamic weights. The weight calculation formula is as follows:
[0115] in, is the Spearman correlation coefficient between AIMFi and the historical error sequence WHE. This step, through a dynamic weight allocation mechanism, enables the error correction process to adaptively respond to the contribution of different modal components to the prediction error, thereby improving prediction accuracy and enhancing the model's robustness to non-stationary errors.
[0116] The time series data prediction method based on dynamic error modeling in this invention significantly improves the accuracy and real-time performance of time series prediction. Through adaptive mode decomposition, cluster dimensionality reduction and dynamic weight allocation of error sequences, it achieves refined modeling and parallel correction of prediction errors.
[0117] Furthermore, S5 includes: S51, using the formula:
[0118] The normalized AIMFi is denormalized to obtain the actual error prediction value NAIMFi(t+1).
[0119] Specifically, in step three, the Affinity Propagation (AP) algorithm is used to cluster and reduce the dimensionality of the multiple modal components (IMFs) obtained from CEEMDAN decomposition in step two, thereby reducing the computational complexity of subsequent processing and improving the model's running efficiency. The AP algorithm is an unsupervised clustering method. Its core lies in adaptively determining cluster centers through the information transmission mechanism of attraction (responsibility) and availability (availability) between data points. It does not require pre-setting the number of clusters and is suitable for high-dimensional time-series data with complex distribution characteristics.
[0120] In its implementation, the IMF sequences obtained from CEEMDAN decomposition are first used as input samples to construct a sample matrix. Each IMF component is treated as an independent temporal feature vector. The AP algorithm calculates the similarity matrix between samples and iteratively updates the attraction matrix. With the degree of belonging matrix Finally, the cluster centers are determined. In this scheme, the set of cluster categories is defined as follows: ,in This represents the number of clusters after clustering. Each IMF component is assigned to a cluster, and IMF components belonging to the same cluster are merged into a new modal component. The calculation method is as follows:
[0121] In the formula, , ,and This fusion process reduces the number of modalities by retaining IMF components with similar temporal characteristics, thereby reducing the training and prediction burden of subsequent LSTM models.
[0122] Regarding parameter settings, key parameters of the AP algorithm include the similarity threshold. and maximum number of iterations In this scheme, the similarity threshold... The maximum number of iterations is typically set to a negative Euclidean distance between samples to enhance sensitivity to local structures. The number of iterations is typically set to 100-200 to ensure algorithm convergence. Furthermore, to improve clustering performance, a Gaussian kernel function can be optionally introduced to weight the similarity matrix, enhancing its adaptability to nonlinear structures.
[0123] This step plays a crucial role in the entire ASLM model. Clustering and fusing the IMF components using the AP algorithm not only reduces the modal dimensionality but also preserves modal information with similar dynamic characteristics in the error sequences, providing structured input for subsequent Spearman correlation analysis and weight allocation. Simultaneously, this dimensionality reduction strategy effectively alleviates the memory and computing power bottlenecks of edge computing devices when processing high-dimensional data, improving the model's real-time prediction capabilities.
[0124] S52, set the confidence threshold for the error correction item. When the absolute value of the weighted correction value exceeds the threshold, start the secondary correction process.
[0125] Specifically, in some implementations, setting a confidence threshold for the error correction term is a key control mechanism for achieving dynamic error correction in the ASLM model. The core of this step lies in setting a reasonable threshold and monitoring the absolute value of the weighted correction value in real time. When the value exceeds the preset threshold, a secondary correction process is triggered to further improve prediction accuracy and enhance the system's robustness.
[0126] From a technical implementation perspective, this threshold is typically set based on the historical statistical characteristics of the error series. Specifically, optionally, the threshold can be a linear combination of the mean and standard deviation of the error series, such as... ,in This represents the mean of the historical error sequence. Indicates its standard deviation, This is the confidence coefficient, typically ranging from [2, 3], to ensure the threshold covers most normal error fluctuations while remaining sensitive to anomalous errors. Furthermore, this threshold can be dynamically updated, for example, every [percentage missing]. The calculation is repeated every time step to accommodate the non-stationarity of the error distribution.
[0127] At the parameter level, the main parameters involved in this step include: the statistical characteristics of the error series (mean, standard deviation), and confidence coefficient. Weighted sum of correction values and the absolute value of the correction value .in, The weights are obtained by normalization using the Spearman correlation coefficient. This represents the prediction error of the fused modal components. When If the system determines that the current prediction error has a significant deviation, a secondary correction process needs to be initiated.
[0128] At the application level, this step is widely applicable to time-series data processing scenarios with high prediction accuracy requirements, such as ocean wave height prediction, power load prediction, and financial time series analysis. In edge computing devices or real-time prediction systems, this mechanism can effectively avoid prediction distortion caused by sudden error changes, ensuring the stability and accuracy of the system in highly dynamic environments.
[0129] From a technical perspective, this step, by introducing a confidence threshold mechanism, achieves intelligent control over the error correction process. On the one hand, it avoids unnecessary secondary corrections for all predicted points, thereby reducing computational overhead; on the other hand, it ensures that the correction process is initiated promptly when the error significantly deviates from the normal range, improving the predictive model's adaptability and real-time response performance. This mechanism, combined with the subsequent parallel correction process, constitutes the core of the "prediction-correction" collaborative optimization in the ASLM model, significantly enhancing the model's dynamic compensation capability for non-stationary errors.
[0130] S6. Construct a parallel LSTM network architecture with shared hidden layer features, in which the master prediction LSTM and the error prediction LSTM share at least two hidden layers, thereby improving the model's ability to capture temporal dependencies through feature sharing.
[0131] Specifically, this step involves constructing a parallel LSTM network architecture that shares hidden layer features. The master prediction LSTM and the error prediction LSTM share at least two hidden layers, enhancing the model's ability to capture temporal dependencies through a feature-sharing mechanism. This architecture is one of the core innovations of the ASLM model, aiming to achieve synergistic optimization of master prediction and error correction, thereby improving overall prediction accuracy and system response efficiency.
[0132] At the technical implementation level, this parallel LSTM architecture adopts the concept of Multi-Task Learning (MTL), fusing features between the primary prediction task and the error prediction task in a shared hidden layer. Specifically, the input layer receives the raw time-series data, which is then processed by the shared first two LSTM layers for feature extraction, generating hidden layer states with temporal dependencies. These shared hidden layer states serve as inputs to both the primary prediction LSTM and the error prediction LSTM, outputting the primary prediction value and the error prediction value, respectively. The design of the shared hidden layer enables the model to extract time-series features from the raw data that are discriminative for both the primary and error predictions, thereby improving the model's ability to model the dynamic characteristics of the error.
[0133] Regarding parameter settings, the LSTM units sharing the hidden layer are typically configured as a multi-layer stacked structure, with each layer containing several memory cells. The number of memory cells can be adjusted according to the data dimensionality and complexity, for example, set to 64, 128, or 256 cells. The activation function uses a combination of Tanh and Sigmoid, used for cell state updates and gating mechanisms, respectively. The error prediction LSTM and the main prediction LSTM can use independent output layers after the shared hidden layer to adapt to the output space of their respective tasks. Furthermore, a joint loss function is used during model training, such as:
[0134] in, To predict the loss of the primary task, The loss for the error prediction task, This is a balancing coefficient, usually set between 0.1 and 0.5, to control the weight of the impact of error prediction on the overall training.
[0135] In application scenarios, this architecture is particularly suitable for high-precision, low-latency time series forecasting systems, such as ocean wave height forecasting and financial time series forecasting. By sharing a hidden layer, the model can run efficiently on edge computing devices, while establishing an explicit correlation between the main forecast and error forecasts to avoid the cumulative effect of error propagation.
[0136] The technical advantage of this step lies in the fact that, by sharing hidden layer features, the model can uniformly model the temporal dependency between the original data and the error sequence, thereby improving its ability to capture non-stationary and nonlinear error patterns. Compared to the traditional serial prediction-correction process, this scheme achieves parallelization and decoupling of prediction and error correction, significantly enhancing the system's real-time performance and dynamic adaptability.
[0137] S7 employs a sliding window mechanism to synchronously control the error correction process, ensuring that the prediction window lengths of the main prediction and the error correction are consistent, and that the correction results are calculated before the prediction window ends.
[0138] Specifically, this step employs a sliding window mechanism to synchronously control the error correction process. Its core objective is to ensure strict alignment between the main prediction process and the error correction process in the time dimension, thereby achieving real-time feedback and correction of prediction errors. In time-series prediction systems, the main prediction model (such as LSTM) and the error correction model typically suffer from temporal coupling issues, meaning the error correction result lags behind the main prediction output. This prevents the correction from being applied to the current prediction window in a timely manner, impacting overall prediction accuracy and system response efficiency.
[0139] In some implementations, the sliding window mechanism uses a fixed-length prediction window. At each time step Above, the main prediction model is based on the previous Historical data at each point in time Make a prediction and output the predicted value at a future point in time. Meanwhile, the error correction model is also based on a window of the same length. For historical error sequences The process is performed to calculate the predicted error value for future time points. Synchronous control ensures that error correction results are calculated before the main prediction window ends, thus enabling them to promptly correct the main prediction output.
[0140] Specifically, the length of the sliding window This setting is typically based on the data sampling frequency and prediction delay requirements; for example, in minute-level wave height prediction. It can be set to 60, corresponding to a 1-hour historical data window. The calculation delay of the error correction model should be controlled within... Within a time step, to meet real-time requirements. In the implementation, the prediction window of the error correction model shares the time step index with the main prediction model, and through parallel computing or asynchronous scheduling mechanisms, it is ensured that the error correction results are completed before the main prediction output.
[0141] The technical value of this step lies in achieving temporal decoupling and collaborative optimization between prediction and correction, avoiding the accumulation of prediction bias caused by lag in error correction. Through synchronous control, the error correction model can make predictions based on the latest error information, improving correction accuracy and system dynamic adaptability, making it particularly suitable for applications such as edge computing devices or marine environmental monitoring with high real-time requirements.
[0142] The time-series data prediction method based on dynamic error modeling in this invention enhances the ability to model the feature consistency and temporal dependency relationship between the main prediction and error prediction by constructing a parallel LSTM network architecture with shared hidden layer features, thereby further improving the collaborative efficiency of prediction and correction. The method also combines a sliding window mechanism to achieve synchronous control of the main prediction and error correction process, ensuring that the correction results are fed back to the prediction output in a timely manner, thus significantly optimizing the real-time response performance of the system while maintaining high accuracy.
[0143] To achieve the above embodiments, the present invention also proposes a time series data prediction device based on dynamic error modeling. Figure 6 This is a schematic diagram of a time-series data prediction device based on dynamic error modeling, provided as an embodiment of the present invention. Figure 6 As shown, the device includes: The LSTM prediction module 100 is used to predict the original time series data using the LSTM model and generate a historical error sequence between the predicted value and the true value. Error mode decomposition module 200 is used to perform CEEMDAN mode decomposition on the historical error sequence and extract multiple error mode components containing non-stationary characteristics. The clustering and fusion module 300 is used to cluster and fuse the error mode components using the nearest neighbor propagation algorithm to generate a representative error mode cluster after dimensionality reduction. The dynamic weight allocation module 400 is used to analyze the nonlinear correlation between the historical error sequence and each error mode cluster based on the Spearman rank correlation coefficient, and obtain the dynamic weight allocation result through normalization processing. The error correction prediction module 500 is used to predict the future error values of each error mode cluster using a parallel LSTM network, and to perform weighted correction on the prediction results according to the dynamic weights to generate the final prediction value.
[0144] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0145] To implement the above embodiments, the present invention also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method provided in the foregoing embodiments.
[0146] To implement the above embodiments, the present invention also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.
[0147] To implement the above embodiments, the present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.
[0148] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this invention all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0149] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.
[0150] This invention is intended to provide implementation schemes for users to selectively prevent the use or access to personal information data. That is, this disclosure is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information can be de-identified to protect user privacy.
[0151] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0152] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0153] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.
[0154] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0155] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0156] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0157] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0158] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
[0159] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0160] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for time series data prediction based on dynamic error modeling, characterized in that, The method comprises the following steps: S1, predicting the original time series data by using an LSTM model to generate a historical error sequence between the predicted value and the true value; S2, performing CEEMDAN modal decomposition on the historical error sequence to extract a plurality of error modal components containing non-stationary characteristics; S3, performing clustering fusion on the error modal components by using a near neighbor propagation algorithm to generate a representative error modal cluster after dimension reduction; S4, analyzing the nonlinear correlation between the historical error sequence and each error modal cluster based on a Spearman rank correlation coefficient, and obtaining a dynamic weight distribution result through normalization processing; S5, predicting the future error value of each error modal cluster by using a parallel LSTM network, and correcting the prediction result according to the dynamic weight to generate a final prediction value.
2. The method of claim 1, wherein, The S1, predicting the original time series data by using an LSTM model to generate a historical error sequence between the predicted value and the true value, further comprises: S11, calculating the point-by-point difference between the observation value and the predicted value by using the formula: to generate a historical error sequence WHE; S12, performing volatility detection on the generated WHE sequence, and triggering a dynamic update mechanism of the error sequence when the error absolute value change rate of adjacent points is detected to exceed a preset threshold. The S2, performing CEEMDAN modal decomposition on the historical error sequence to extract a plurality of error modal components containing non-stationary characteristics, further comprises:
3. The method of claim 1, wherein, S21, when performing CEEMDAN decomposition, adding white noise iteratively and calculating the residual to ensure that the decomposed modal components IMF=[IMF1, IMF2, …, IMFn] meet the integrity constraint; S22, performing stationarity test on the decomposed IMF components, and retaining the first 7 IMF components with a fluctuation amplitude greater than a set threshold as effective error modes. The S3, performing clustering fusion on the error modal components by using a near neighbor propagation algorithm to generate a representative error modal cluster after dimension reduction, further comprises:
4. The method of claim 1, wherein, S31, fusing the corresponding modal components of the clustering result SC=[0, 1, 2, …, m] by using the formula:, wherein SC is a clustering category identifier; S32, extracting features of the fused AIMF components, and calculating the mutual information between the original error sequence and the fused AIMF components as a clustering quality evaluation index. The S4, analyzing the nonlinear correlation between the historical error sequence and each error modal cluster based on a Spearman rank correlation coefficient, and obtaining a dynamic weight distribution result through normalization processing, further comprises: S41, normalizing the Spearman correlation coefficient CC=[CC0, CC1, CC2, …, CCm] to a weight vector W=[W1, W2, …, Wm] by using the formula:
5. The method of claim 1, wherein, S42, setting the weight update frequency to 1 / 3 of the prediction period, and triggering weight recalculation immediately when a fluctuation mode mutation of the error sequence is detected. The S5, predicting the future error value of each error modal cluster by using a parallel LSTM network, and correcting the prediction result according to the dynamic weight to generate a final prediction value, further comprises: S51, using the formula: 6. The method of claim 1, wherein, The normalized AIMFi is denormalized to obtain an actual error prediction value NAIMFi(t+1). S52, a confidence threshold of the error correction term is set, and when the absolute value of the weighted correction value exceeds the threshold, a secondary correction process is started.
7. The method of claim 1, wherein, Also includes: S6, a parallel LSTM network architecture sharing hidden layer features is constructed, wherein the main prediction LSTM and the error prediction LSTM share at least two hidden layers, and the capture ability of the model for time series dependence is improved through feature sharing; S7, a sliding window mechanism is used to synchronize the error correction process, ensuring that the prediction window length of the main prediction and the error correction is consistent, and the correction result is calculated before the end of the prediction window.
8. A device for time series data prediction based on dynamic error modeling, characterized by, Including: The LSTM prediction module is used for predicting the original time series data by using the LSTM model, generating a historical error sequence between the prediction value and the true value; The error modal decomposition module is used for CEEMDAN modal decomposition of the historical error sequence to extract a plurality of error modal components containing non-stationary characteristics; The clustering fusion module is used for clustering and fusion of the error modal components by using the affinity propagation algorithm to generate a representative error modal cluster after dimension reduction; The dynamic weight distribution module is used for analyzing the nonlinear correlation between the historical error sequence and each error modal cluster based on the Spearman rank correlation coefficient, and obtaining a dynamic weight distribution result through normalization processing; The error correction prediction module is used for predicting the future error value of each error modal cluster by using the parallel LSTM network, and performing weighted correction on the prediction result according to the dynamic weight to generate the final prediction value.
9. An electronic device, comprising: Including: A processor, and a memory connected with the processor in communication; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to realize the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to realize the method of any one of claims 1-7.