An irregular time series prediction method, device, medium and program product
By expanding irregular time series on orthogonal basis function sets, extracting trend and periodic coefficient vectors and performing fusion modeling, the accuracy and stability problems of irregular time series prediction in existing technologies are solved, and accurate characterization of long-term trends and periodic changes is achieved.
Patent Information
- Application Number
- CN202511105490.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2045-08-07
AI Technical Summary
Existing technologies struggle to effectively handle irregular time series data, especially in cases where long-term reliance on modeling is inefficient, complex time series structures are difficult to decouple from modeling, and models lack generalization ability and robustness.
By expanding irregular time series on an orthogonal basis function set, trend coefficient vectors and periodic coefficient vectors are extracted and fused into a model. The predicted sequence is then reconstructed by combining the corresponding basis function set, avoiding interpolation operations and preserving the original observation data structure information.
It achieves accurate characterization of long-term trends and cyclical changes, improves the accuracy and stability of irregular time series forecasting, and adapts to irregular sampling characteristics with uneven time intervals.
Smart Images

Figure CN120974156B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of time series data processing technology, and in particular to an irregular time series forecasting method, device, medium and program product. Background Technology
[0002] Time series forecasting is widely used in fields such as weather forecasting, power load analysis, and financial market volatility assessment. It is particularly relevant when forecasting trends over extended periods, constituting a long-term time series modeling task. This task places high demands on the model's ability to model long-term dependencies, its pattern recognition capabilities, and its adaptability to data irregularities.
[0003] In existing technologies, time series models are often modeled using Recurrent Neural Networks (RNNs) and their variants, Convolutional Neural Networks (CNNs), or Transformer models driven by self-attention mechanisms. However, existing methods generally suffer from the following problems:
[0004] It is difficult to effectively handle irregular time series data. In actual data acquisition, due to factors such as sensor failure and network latency, time series data often exhibit non-uniform sampling or missing data. Existing models typically assume that the input is a time-interval sequence, requiring preprocessing operations such as interpolation to repair the data. However, such methods may introduce noise, distort the original time series structure, and thus affect the model's prediction accuracy.
[0005] Long-term reliance on modeling leads to inefficiency. In some prediction tasks, the prediction result at the current time point depends on long-term historical information. Recurrent neural networks and their variants struggle to maintain the stability of information transmission over long distances; while the Transformer model can alleviate this problem, its self-attention mechanism has high time and space complexity when processing long sequences, resulting in high computational overhead in practical applications.
[0006] Complex time series structures are difficult to decouple and model. Real time series often contain multiple patterns such as long-term trends, multiple periodicities, and short-term disturbances. Existing methods only use a single decomposition technique (such as Fourier transform), which makes it difficult to accurately model the diverse long-term trends and complex periodic features at the same time, thus limiting the model's representational power and generalization ability.
[0007] The existing methods suffer from insufficient generalization ability and robustness. When the input time series contains uneven sampling, missing values, or external abnormal interference, the existing methods are prone to fluctuations in prediction performance, poor robustness, and difficulty in adapting to complex real-world environments. Summary of the Invention
[0008] To address the shortcomings of existing technologies, this application provides an irregular time series prediction method, electronic device, storage medium, and program product, which at least solves the problem that existing technologies, when dealing with irregular time series with uneven time intervals, lack a highly adaptable modeling mechanism, making it difficult to directly extract effective features and make accurate predictions, thus leading to a significant decrease in prediction accuracy.
[0009] To achieve the above objectives and other advantages, some embodiments of this application provide the following aspects:
[0010] In a first aspect, some embodiments of this application provide a method for predicting irregular time series, including:
[0011] Obtain the irregular time series to be predicted, wherein the irregular time series includes timestamps with uneven time intervals and corresponding observations;
[0012] The irregular time series is expanded on an orthogonal basis function set to obtain the corresponding trend coefficient vector and period coefficient vector, respectively. The orthogonal basis function set includes a trend basis function set and a period basis function set.
[0013] The trend coefficient vector and the period coefficient vector are fused and modeled to extract a deep feature vector that reflects the coupling relationship between trend and period.
[0014] Based on the deep feature vector, the trend coefficient and period coefficient corresponding to the target time period are predicted, and the predicted sequence of the target time period is reconstructed according to the trend coefficient and the period coefficient, combined with the corresponding trend basis function set and the period basis function set.
[0015] Secondly, some embodiments of this application also provide an electronic device, the electronic device comprising:
[0016] One or more processors; and a memory storing computer program instructions that, when executed, cause the processors to perform an irregular time series forecasting method as described above.
[0017] Thirdly, some embodiments of this application also provide a computer-readable storage medium having a computer program and / or instructions stored thereon, which, when executed by a processor, implement the irregular time series prediction method as described above.
[0018] Fourthly, some embodiments of this application also provide a computer program product, including a computer program and / or instructions that, when executed by a processor, implement the irregular time series prediction method as described above.
[0019] Compared with related technologies, the solution provided in this application expands irregular time series onto an orthogonal basis function set composed of a trend basis function set and a periodic basis function set, thereby adopting a direct modeling method without interpolation, effectively avoiding the information loss caused by interpolation preprocessing in existing methods. Through structured modeling and decomposition of irregular time series containing long-term trends and multiple periodic patterns, it effectively adapts to the irregular sampling characteristics with uneven time intervals, and extracts key features while preserving the structural information of the original observation data. Based on this, the extracted trend coefficient vector and periodic coefficient vector are fused for modeling and prediction, and the time series of the target time period is reconstructed by combining the corresponding basis function set. This enables accurate characterization of long-term trends and periodic changes, thereby improving the accuracy and stability of irregular time series prediction. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other implementation methods can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating an irregular time series prediction method provided in an embodiment of this application;
[0022] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] First Embodiment
[0025] The first embodiment of this application relates to a method for predicting irregular time series data, referring to... Figure 1 As shown, the method may include the following steps:
[0026] Step S1: Obtain the irregular time series to be predicted. The irregular time series includes timestamps with uneven time intervals and corresponding observations.
[0027] Specifically, for step S1, an irregular time series refers to an observation data sequence with uneven timestamp intervals. This is common in scenarios where actual data acquisition involves missing data, asynchronous sampling, or equipment malfunctions, such as satellite remote sensing data, medical monitoring data, and industrial sensor data. In this embodiment, no interpolation or completion operations are required on the time series to preserve the original irregular sampling characteristics as input for subsequent modeling.
[0028] Step S2: Expand the irregular time series on the orthogonal basis function set to obtain the corresponding trend coefficient vector and period coefficient vector. The orthogonal basis function set includes the trend basis function set and the period basis function set.
[0029] Specifically, in step S2, the irregular time series obtained in step S1 is expanded on a pre-constructed set of orthogonal basis functions to separate and model the different components of the time series. An orthogonal basis function set consists of a set of mutually orthogonal (i.e., inner product is zero) and linearly independent basis functions. These basis functions together span a function space, used to represent the structural components of any given time series in this space. This orthogonal basis function set includes two parts: first, a set of trend basis functions used to model the overall trend of the time series, typically selected as polynomial functions arranged in ascending order; and second, a set of periodic basis functions used to model the periodic components, typically selected as complex exponential functions or Fourier basis functions with distinct frequency components.
[0030] The aforementioned set of orthogonal basis functions acts similarly to multidimensional coordinate axes in the function space. Each basis function represents a component in a different direction. By expanding the irregular time series onto these basis functions, the original complex signal can be mapped into two independent but complementary substructures: a trend component and a periodic component. This decomposition method ensures that the different components do not interfere with each other in their representation, facilitating the subsequent separate calculation of the corresponding trend coefficient vector and periodic coefficient vector. This enables the joint modeling and accurate extraction of trend and periodic features in irregular time series.
[0031] Step S3: The trend coefficient vector and the cycle coefficient vector are fused and modeled to extract a deep feature vector that reflects the coupling relationship between trend and cycle.
[0032] Specifically, in step S3, the trend coefficient vector and the periodic coefficient vector originate from the expansion results of the irregular time series on the trend basis function set and the periodic basis function set, respectively, representing the explicit structural expressions of the long-term trend and periodic oscillations in the time series. To further model the potential coupling relationship between these two components, this embodiment employs a fusion modeling mechanism in this step, jointly inputting trend and periodic information into a nonlinear feature extraction network to mine their deep-level interaction features and output a deep feature vector representing their coupling relationship. This deep feature vector retains the key features of trend changes and periodic oscillations and enhances its ability to represent their collaborative patterns, providing effective support for subsequent prediction of the trend coefficient and periodic coefficient for the target time period.
[0033] Step S4: Based on the deep feature vector, predict the trend coefficient and period coefficient corresponding to the target time period, and reconstruct the predicted sequence of the target time period based on the trend coefficient and period coefficient, combined with the corresponding trend basis function set and period basis function set.
[0034] Specifically, in step S4, after completing the bibasic expansion and trend-cycle fusion modeling of the irregular time series, the obtained deep feature vector already contains the long-term trend characteristics, periodic oscillation characteristics, and their coupling relationships of the series. In this step, based on this deep feature vector, regression inference of the trend coefficients and cycle coefficients within the target time period is performed, and further used to reconstruct the predicted series. Specifically, the deep feature vector obtained from the fusion modeling is input into a regression network (time series regression prediction model), and the corresponding trend coefficients and cycle coefficients within the future target time period are predicted through nonlinear mapping. These coefficients are used as regression outputs, and then combined with the corresponding trend basis functions and cycle basis functions to perform a linear combination, thereby reconstructing the observations within the target time period and generating the final predicted series.
[0035] Furthermore, the overall system architecture for applying irregular time series forecasting methods mainly includes the following functional modules:
[0036] Data input module: used to receive raw irregular time series, which contain timestamps with uneven time intervals and corresponding observations. The system can standardize the data and select valid observation points for subsequent modeling.
[0037] The dual-basis decomposition module: Based on a predefined set of orthogonal basis functions, it performs function space expansion operations on irregular time series, extracts trend coefficient vectors and period coefficient vectors, and completes the structured decomposition of complex time series;
[0038] The fusion feature modeling module performs nonlinear feature mapping on the trend coefficient and the period coefficient respectively, and performs fusion modeling on the two types of features through a deep sensing structure (such as a multilayer perceptron) to generate a deep feature vector that reflects the coupling characteristics of long-term trends and periods.
[0039] Prediction and Reconstruction Module: Based on deep feature vectors, the module predicts the trend coefficient and periodic coefficient of the target time period respectively, and performs numerical reconstruction by combining the corresponding trend basis function set and periodic basis function set, outputting the complete prediction sequence of the target time period.
[0040] Through the collaborative work of the aforementioned modules, this invention achieves a complete end-to-end prediction process. The end-to-end process integrates the entire process from the original irregular time series input to the predicted sequence output into the system for unified execution, avoiding information loss in intermediate steps and ensuring the integrity and consistency of the prediction results. The predicted output not only serves as the final result for external use but also participates in the supervision feedback of the training process. It is compared with real observation data, the loss function is calculated, and this loss is used as a supervision signal for backpropagation to optimize the robustness and accuracy of the entire system in irregular sampling scenarios.
[0041] Compared with related technologies, the solution provided in this application expands irregular time series onto an orthogonal basis function set composed of a trend basis function set and a periodic basis function set, thereby adopting a direct modeling method without interpolation, effectively avoiding the information loss caused by interpolation preprocessing in existing methods. Through structured modeling and decomposition of irregular time series containing long-term trends and multiple periodic patterns, it effectively adapts to the irregular sampling characteristics with uneven time intervals, and extracts key features while preserving the structural information of the original observation data. Based on this, the extracted trend coefficient vector and periodic coefficient vector are fused for modeling and prediction, and the time series of the target time period is reconstructed by combining the corresponding basis function set. This enables accurate characterization of long-term trends and periodic changes, thereby improving the accuracy and stability of irregular time series prediction.
[0042] Second Embodiment
[0043] The second embodiment of this application relates to a method for predicting irregular time series. The second embodiment is an improvement upon the first embodiment, specifically in that it provides a concrete implementation method based on expanding an orthogonal basis function set using a system of linear equations and a joint least squares optimization model. Specifically, step S2 can further include the following steps:
[0044] Step S201: Construct the first linear equation set for trend modeling, representing the irregular time series as the first linear combination of trend coefficients on the trend basis function set, which uses polynomial basis functions arranged in ascending order of order.
[0045] In this step, within any finite time interval [t0, t1], a subsequence of an irregular time series can be considered as a time series segment f(t), which can be represented on its domain as a superposition of the trend basis function g(t) and the periodic basis function p(t):
[0046] f(t) = g(t) + p(t)
[0047] To model the long-term trend component in irregular time series, a first set of linear equations for trend modeling is constructed. Specifically, a set of polynomial basis functions arranged in ascending order is selected as the trend basis function set, which is defined as:
[0048] φ k (t)=t k k = 0, 1, ..., K
[0049] Where K is the highest order of the basis function, used to adjust the complexity of trend modeling; t represents the timestamp, and φ k (t) represents the basis function of the k-th order polynomial.
[0050] By projecting the observation points of the original time series onto this set of basis functions, a trend modeling formula in the form of a linear combination can be established as follows:
[0051]
[0052] Where g(t) is a function representing the trend term, and c k The trend coefficient vector to be determined reflects the projection intensity of the original time series onto the k-th order polynomial.
[0053] Substituting the N observation points into the above equation yields the first system of linear equations, which is used to solve for the unknown trend coefficient vector, and takes the following form:
[0054]
[0055] These N observation points constitute N linear equations, where the unknowns are c0, c1, ..., c K Write these equations in matrix form:
[0056] T·c=f
[0057] in, This is a trend basis function matrix, where each row corresponds to a polynomial basis function value at a given time point. c = [c0, c1, ..., c K ], where f is the trend coefficient vector to be determined; f = [f(t1), f(t2), ..., f(t)] N], which is a vector composed of the corresponding observations.
[0058] Therefore, each observation point of the irregular time series is substituted into the trend modeling formula, that is, its corresponding timestamp is used as the independent variable and substituted into the trend modeling expression composed of polynomial basis functions, to construct the first linear equation system for trend modeling. This linear equation system establishes an explicit algebraic relationship between the original observation data and the trend basis functions, transforming the entire trend modeling problem into a linear solution problem of the trend coefficient vector. This facilitates subsequent parameter estimation using optimization methods such as least squares, thereby achieving structured modeling of the long-term changing trend in the original time series.
[0059] Step S202: Construct a second set of linear equations for periodic modeling, representing the irregular time series as a second linear combination of periodic coefficients on a set of periodic basis functions. The set of periodic basis functions uses complex exponential basis functions with different frequency components.
[0060] In this step, to effectively capture multiple periodic components in the time series, a set of complex exponential basis functions with different frequencies can be selected as the periodic basis function set. Each basis function corresponds to a specific frequency component, used to model the periodic fluctuation characteristics of the time series at that frequency. Preferably, this set of periodic basis functions can be constructed using Fourier basis functions. Fourier basis functions are a family of functions composed of multiple sine and cosine functions with different frequencies and amplitudes, possessing good periodicity and spectral expressive power. By weighted superposition of multiple Fourier basis functions with different frequencies, the complex periodic change pattern formed by the superposition of multiple periodic components in the time series can be effectively characterized, thereby achieving effective decomposition and reconstruction of the periodic change pattern.
[0061] In the modeling process, the corresponding weighting coefficients, i.e., the periodic coefficient vector, are calculated by projecting the observation points of the original time series onto these periodic basis functions. Specifically, the periodic basis functions can be defined as follows:
[0062] j = 0, 1, ..., J
[0063] Where, ω j ψ represents the frequency component of the basis function in the j-th period; j (t) is the basis function of the j-th period, used to model the periodic fluctuation characteristics at the corresponding frequency.
[0064] Based on the set of periodic basis functions, the periodic function p(t) that characterizes the periodic component in a time series can be expressed as the following periodic function expression:
[0065]
[0066] Where, dj The period coefficient to be determined reflects the projection intensity of the original time series on the j-th frequency dimension; Re(·) represents taking the real part of the complex number to ensure that the final modeling result is a real-valued function and the output is a real-valued time series.
[0067] For an irregular time series containing N observation points, each observation time point t can be... n Substituting the above periodic function expression, we obtain the second system of linear equations in the following form:
[0068]
[0069] The unknowns in this system of equations are the periodic coefficient vectors d = [d0, d1, ..., d2]. J The sum of squared residuals between the predicted and actual observed values can be minimized by using the least squares method.
[0070] By constructing a second set of linear equations for periodic modeling, a structured expression of periodic fluctuations in irregular time series is achieved. This process utilizes a set of complex exponential basis functions with different frequency components as a set of periodic basis functions, modeling the periodic components in the time series through linear combination, effectively capturing periodic patterns at different frequency scales in the signal. Simultaneously, the complex exponential basis functions possess good orthogonality and frequency resolution, improving the interpretability and controllability of the modeling process while ensuring modeling accuracy.
[0071] Step S203: Based on the first and second linear equations, construct a joint least squares optimization model with the goal of minimizing the sum of squared residuals between the predicted values and the original observed values at each time point of the basis function combination. By solving the weighting coefficients in the first and second linear combinations, the trend coefficient vector and the period coefficient vector are obtained respectively, which serve as the structured representation of the irregular time series on the orthogonal function subspace.
[0072] In this step, substituting the basis function expansions of the trend term and the period term into the equation, we obtain the following joint fitting model:
[0073]
[0074] Where t i Timestamps representing irregular time series. Constructing the joint least squares loss function:
[0075]
[0076] Among them, g(t) i p(t) represents the trend term, indicating the linear projection of the original time series onto the set of trend basis functions; i) represents the periodic term, indicating the linear projection of the original time series onto the set of periodic basis functions; vectors c and d represent the trend coefficient vector and the periodic coefficient vector, respectively.
[0077] This loss function measures the fitting error between the reconstructed sequence values (sum of trend and periodic terms) and the original observations. By optimizing this loss function, the optimal trend coefficient vector c = [c0, c1, ..., c2] can be jointly solved. K ] and the periodic coefficient vector d = [d0, d1, ..., d J This ensures that the reconstructed values of the trend basis function and periodic basis function combination at each time point are as close as possible to the original observation data.
[0078] Furthermore, this embodiment also includes:
[0079] A basis function matrix is constructed from the column vectors of each basis function in the trend basis function set and the periodic basis function set, and each basis function matrix is normalized to improve the numerical stability of the coefficient fitting.
[0080] Specifically, the function values of each basis function in the trend basis function set and the periodic basis function set at different time stamps are treated as column vectors and arranged to form a basis function matrix. More specifically, for the polynomial basis function set {φ} used in trend modeling... k (t)=t k}, can be used at each original timestamp t i The values of all trend basis functions are calculated sequentially to construct the trend basis function matrix. Each column corresponds to the value of a basis function at all time points, where N is the length of the time series and K is the order of the trend basis function. Similarly, the set of complex exponential basis functions is used in period modeling. By calculating the real part of the periodic basis function at each time point, a periodic basis function matrix can be constructed. Where J is the number of periodic basis functions.
[0081] In practical modeling, the value ranges of trend basis functions and periodic basis functions may differ significantly across different time scales. For example, polynomial basis functions amplify rapidly with increasing time, while periodic basis functions typically fluctuate within the range of [-1, 1]. This results in significant differences in the numerical scales of different columns in the constructed trend basis function matrix Φ and periodic basis function matrix Ψ, leading to a larger condition number when solving linear equations, causing numerical instability or even solution shift. Therefore, for the constructed trend basis function matrix Φ and periodic basis function matrix Ψ, each column is normalized to ensure that each basis function column vector has a uniform numerical scale. Specifically, standardization methods with a mean of zero and a standard deviation of one can be used, or unit norm normalization (e.g., normalizing each column vector to the unit L2 norm).
[0082] This normalization process helps to mitigate the interference of differences in the range and scale of different basis functions on the fitting results, making the fitted solution closer to the global optimum, improving the numerical stability and convergence speed of the subsequent coefficient solution process, and obtaining more accurate and interpretable modeling coefficients.
[0083] It is easy to see that the solution provided in this application, by introducing a bilinear equation system structure of trend modeling and periodic modeling, and solving the coefficients based on the joint least squares optimization mechanism, not only achieves the decoupling and structured expression of long-term trend and periodic components in irregular time series, but also further improves the accuracy of coefficient estimation and the robustness of model expression.
[0084] Third Embodiment
[0085] The third embodiment of this application relates to a method for predicting irregular time series. The third embodiment is an improvement upon the first embodiment, specifically in that it provides a deep fusion mechanism based on joint modeling of trend coefficient vectors and periodic coefficient vectors. Specifically, step S3 can further include the following steps:
[0086] Step S301: Perform nonlinear feature mapping on the trend coefficient vector and the period coefficient vector respectively to construct a first feature representation tensor for representing the trend component and a second feature representation tensor for representing the period component.
[0087] In this step, the trend coefficient vector c and periodic coefficient vector d obtained from the linear modeling stage are subjected to nonlinear feature mapping operations to extract higher-order structural patterns and latent semantic information. The mapping results are constructed as a first feature representation tensor T1 for representing the trend component and a second feature representation tensor T2 for representing the periodic component.
[0088] To achieve the aforementioned nonlinear mapping process, this embodiment employs an MLP-Mixer (Multi-Layer Perceptron Mixer) network architecture. Unlike the Transformer model which uses attention mechanisms or traditional neural networks which use convolutional kernels, the MLP-Mixer network architecture uses only fully connected layers for modeling. This architecture treats each input coefficient vector (trend coefficient vector or periodic coefficient vector) as a two-dimensional feature matrix, alternately applying fully connected layers in the channel dimension (representing feature type) and the coefficient dimension (representing time or location) to deeply mix the internal information of the trend coefficient vector or periodic coefficient vector, outputting a higher-order nonlinear feature representation tensor. Specifically, modeling in the channel dimension helps to uncover potential semantic relationships between different features, while modeling in the coefficient dimension enhances the model's ability to perceive and represent time-series structures. In this way, semantic information can be fully mixed within the feature dimension, while structural patterns can be captured in the time dimension, thereby improving the internal modeling ability of trend features or periodic features and ensuring the accuracy and richness of the representation of each type of feature.
[0089] Formally, the mapping process can be written as:
[0090] T1 = F trend (c), T2=F period (d)
[0091] Among them, F trend (·) denotes the nonlinear mapping function used for trend modeling, F period (·) denotes the nonlinear mapping function used for periodic modeling, and T1 and T2 are the first feature representation tensor and the second feature representation tensor, respectively.
[0092] Step S302: Concatenate the first feature representation tensor and the second feature representation tensor along a preset dimension, and input the concatenated feature representation tensor into a multilayer perceptron network to perform cross-dimensional modeling and information fusion, thereby obtaining a fused feature vector that reflects the coupling relationship between trends and cycles.
[0093] In this step, the first feature representation tensor T1 and the second feature representation tensor T2 are concatenated according to a preset dimension to form a concatenated feature representation tensor Tconcat, which is used for subsequent coupled modeling. This concatenation operation can be performed in the channel dimension or the time dimension, depending on the specific task configuration and feature space structure.
[0094] The concatenated feature representation tensor Tconcat is input into a multilayer perceptron network with shared parameters to perform nonlinear interaction and cross-dimensional modeling operations. This multilayer perceptron network consists of several fully connected layers, with activation functions (such as ReLU or GELU) and normalization mechanisms (such as LayerNorm or BatchNorm) inserted between layers to enhance representational power and numerical stability. This multilayer perceptron network features parameter sharing during trend and periodicity fusion, meaning that the same set of network weights is repeatedly used for forward propagation at different positions across the fused feature tensor. This applies the same MLP structure across multiple channel dimensions, effectively reducing the total number of network parameters and improving the model's generalization ability and training stability. Unlike traditional independent MLP networks, the parameter sharing mechanism ensures consistency and symmetry in the processing of each sub-position during fusion, avoiding information redundancy and overfitting.
[0095] Step S303: The fused feature vector is processed in parallel on multiple preset periodic scales to extract periodic features of different frequency components, and a deep feature vector representing the multi-scale periodic pattern is generated based on an adaptive aggregation mechanism.
[0096] In this embodiment, step S303 specifically includes:
[0097] Step S3031: Based on the preset periodic scale, construct the corresponding feature modeling branch structure respectively. The periodic scale has different frequency resolutions to cover the periodic change patterns in multiple time ranges.
[0098] Step S3032: Input the fused feature vectors in parallel into each feature modeling branch structure, and extract the feature representation vectors at different period scales respectively;
[0099] Step S3033: Based on the adaptive fusion mechanism, the feature representation vectors corresponding to each periodic scale are weighted and combined to generate a deep feature vector representing the coupling relationship of multiple periodic scales.
[0100] Specifically, the periodic scale is used to characterize the periodic changes at different frequency levels in a time series, covering different time ranges such as short periods (e.g., daily or hourly), medium periods (e.g., weekly or monthly), and long periods (e.g., quarterly or annual).
[0101] Depending on the modeling requirements, the feature modeling branch structure can include, but is not limited to, convolutional neural networks (CNNs), recurrent neural networks (RNNs), frequency domain filters, and multi-head attention mechanisms. Each feature modeling branch structure can be flexibly configured with a modeling method based on the frequency characteristics of its corresponding periodic scale. For example, for short-period modeling, a convolutional neural network (CNN) with a small receptive field can be used to capture local changes; for medium-period modeling, a gated recurrent unit (GRU) or a long short-term memory network (LSTM) can be combined for temporal modeling; for long-period modeling, low-frequency trend components can be extracted based on frequency domain filters or windowed Fourier transforms; and if necessary, a multi-head self-attention mechanism can be introduced to capture periodic dependencies across time ranges. The output of each feature modeling branch structure is a feature representation vector corresponding to its target periodic scale.
[0102] To integrate the feature representations extracted from various periodic scales, this embodiment introduces an adaptive fusion mechanism. Based on the contextual importance of the output features from each periodic scale branch, corresponding weight coefficients are calculated, and a weighted combination operation is performed to generate a unified deep feature vector. This vector characterizes the coupling relationship and periodic behavior patterns of the fused features across multiple periodic scales. This fusion mechanism can be implemented using attention weight allocation strategies, gating mechanisms, or learning-based scoring functions to achieve adaptive modeling of the importance of different periodic scales. The final generated deep feature vector will serve as input to subsequent prediction modules, improving the model's ability to model periodic trend changes and its prediction accuracy.
[0103] It is easy to see that, in the solution provided by the embodiments of this application, by constructing a multi-stage modeling mechanism for trend-cycle decoupling and fusion, it is possible to achieve accurate modeling and deep coupling expression of trend changes and periodic components when facing the complex dynamic characteristics of irregular time series, which significantly improves the ability to identify and generalize multi-scale time series patterns, thereby improving the accuracy and stability of overall prediction.
[0104] It should be noted that the third embodiment of this application may also be an improvement based on any one or more of the first to second embodiments.
[0105] Fourth embodiment
[0106] The fourth embodiment of this application relates to a method for predicting irregular time series. The fourth embodiment is an improvement upon the first embodiment, specifically in that it provides a prediction output mechanism based on decoupling modeling of trend and periodic coefficients. That is, step S4 can further include the following steps:
[0107] Step S401: Input the deep feature vector into the pre-trained linear regression prediction model to predict the trend coefficient and period coefficient corresponding to the target time period respectively;
[0108] Step S402: Based on the timestamp information of the target time period, call each basis function in the trend basis function set and the period basis function set respectively, and expand the values according to the timestamp order to construct the trend basis function matrix and the period basis function matrix;
[0109] Step S403: Perform a linear combination of the trend coefficient and the trend basis function matrix to generate a trend component sequence;
[0110] Step S404: Perform a linear combination of the periodic coefficients and the periodic basis function matrix to generate a periodic component sequence;
[0111] Step S405: Summing the trend component sequence and the periodic component sequence to obtain the prediction sequence for the target time period.
[0112] Specifically, the deep feature vector is input into a pre-trained linear regression prediction model, which may include multiple linear regression layers to output the trend coefficients corresponding to the target time period. With period coefficient Its prediction process does not rely on uniform time sampling, but directly uses a vector representation constructed based on a specific timestamp to achieve joint prediction of future trend changes and cyclical structures.
[0113] The linear regression prediction model is trained using supervised learning. Specifically, the training phase uses historical time-series data as the training dataset. First, the trend coefficient and periodicity coefficient for the corresponding time period are extracted as training labels. A deep representation vector containing multi-scale features is constructed as the input feature. The input and output constitute a set of supervised training samples. The model internally sets up multiple linear regression layers, each used to predict the trend coefficient and periodicity coefficient. The parameters of the regression layers are optimized by minimizing the mean squared error loss function between the predicted and true coefficients. During training, batch gradient descent or its variants can be used for iterative updates until the model converges. After training, the prediction model can output the corresponding trend coefficient and periodicity coefficient for any given deep feature vector within a target time period.
[0114] In prediction scenarios, the prediction result is not a single numerical value, but a time series, that is, multiple future time points t∈[t] L+1 ,t L+H The value of ] is used for prediction. This is based on the set of trend basis functions {φ}. k (t)} and the set of periodic basis functions {ψ j The functions (t) are defined on a continuous time domain or a discrete set of points. To achieve efficient reconstruction in matrix multiplication form, these functions need to be expanded simultaneously at all future time points to form the corresponding trend basis function matrix. and periodic basis function matrix Where H is the prediction step number, i.e., the number of future timestamps.
[0115] When generating trend component sequences, the trend basis functions can be expanded point-by-point according to the timestamps within the prediction period to construct a corresponding trend basis function matrix, where each column represents the value of a basis function at all prediction times. Then, by performing matrix multiplication on the predicted trend coefficients and this basis function matrix, the trend component sequences for the entire prediction period can be generated efficiently. Similarly, when generating periodic component sequences, the periodic basis functions can be expanded at the target timestamps to form a periodic basis function matrix, and then matrix multiplication on the predicted periodic coefficients can be performed to generate the periodic component sequences for the entire prediction period.
[0116] After constructing the trend component sequence and the periodic component sequence, a summation operation is performed, adding the values of the two at each prediction time point to obtain the final prediction sequence. That is, for any time point t∈[t] within the prediction time period... L+1 ,t L+H The predicted value can be expressed as:
[0117]
[0118] in, φ represents the k-th trend coefficient predicted by the model. k (t) represents the value of the k-th trend basis function at time t; ψ represents the coefficient of the j-th period predicted by the model; j (t) represents the value of the j-th periodic basis function at time t; Re(·) represents the operation of taking the real part of the complex number; This represents the estimated value of the final prediction result at time point t.
[0119] Through the above summation operations, the predicted sequence can not only cover the long-term direction of change reflected by the trend term, but also capture the short-term oscillations or repetitive patterns embodied by the cycle term, thereby improving the predictive model's ability to characterize behavior at different time scales and achieving an organic combination of trend and cycle. Furthermore, it possesses good interpretability: the trend component is composed of a linear combination of a set of definable polynomial basis functions, which can correspond to linear growth or slow changes in economic, environmental, and other background contexts; the cycle component is expressed by cycle basis functions (such as Fourier bases), which can reflect seasonal and periodic fluctuation characteristics. Further causal explanations or sensitivity analyses can be conducted through observation and analysis of each coefficient.
[0120] It is readily apparent that the solution provided in this application, by introducing a decoupled prediction and reconstruction mechanism based on trend coefficients and periodic coefficients, can fully utilize the trend and periodic information contained in the aforementioned deep fusion features to achieve efficient prediction of trend coefficients and periodic coefficients at multiple future time points. Simultaneously, by constructing trend basis function matrices and periodic basis function matrices, and generating trend component sequences and periodic component sequences respectively through linear combination, and then summing and reconstructing the complete prediction time series, not only is the interpretability of the prediction process improved, but the separable modeling of the prediction structure is also achieved. This facilitates the model's flexibility and robustness when dealing with complex time structures, thereby improving overall prediction accuracy and generalization ability.
[0121] It should be noted that the fourth embodiment of this application may also be an improvement based on any one or more of the first to third embodiments.
[0122] Furthermore, some embodiments of this application also provide an electronic device. The electronic device can be various forms of digital computer, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, etc. The electronic device can also be various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices.
[0123] The electronic device includes: one or more processors; and a memory storing computer program instructions, which, when executed, cause the processor to perform an irregular time series forecasting method as provided in any one or more of the above embodiments. Figure 2 An exemplary structural diagram of the electronic device is disclosed. The electronic device includes one or more processors 1101, a memory 1102, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are interconnected via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some other embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations. The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0124] The electronic device may further include an input device 1103 and an output device 1104. The processor 1101, memory 1102, input device 1103, and output device 1104 may be connected via a bus or other means. Figure 2 Taking the example of a connection between China and Israel via a bus.
[0125] Input device 1103 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 1104 may include a display device, auxiliary lighting device (e.g., LED), and haptic feedback device (e.g., vibration motor). The display device may include, but is not limited to, a liquid crystal display, a light-emitting diode display, and a plasma display. In some embodiments, the display device may be a touch screen.
[0126] To provide interaction with the user, the electronic device can be a computer. The computer has: a display device (e.g., a cathode ray tube or LCD monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback); and input from the user can be received in any form (e.g., voice input or tactile input).
[0127] In this embodiment, a computer-readable medium stores a computer program / instructions, which, when executed by a processor, implement an irregular time series prediction method provided in any one or more of the above embodiments. The computer-readable medium may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into that device. The computer-readable medium carries one or more computer-readable instructions.
[0128] The memory 1102 can serve as a non-transitory computer-readable storage medium, used to store non-transitory software programs, non-transitory computer-executable programs, and modules. The processor 1101 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 1102, thereby implementing the program instructions / modules corresponding to the methods provided in any one or more of the embodiments described above in this application.
[0129] The memory 1102 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 1102 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1102 may optionally include memory remotely located relative to the processor 1101, and these remote memories can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0130] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0131] Computer-readable media include permanent and non-permanent, removable and non-removable media, which can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory, static random access memory, dynamic random access memory, other types of random access memory, read-only memory, electrically erasable programmable read-only memory, flash memory or other memory technologies, read-only optical discs, digital versatile optical discs or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0132] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including local area networks (LANs) or wide area networks (WANs), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0133] In the above embodiments, all or part of the implementation can be achieved through software, hardware, firmware, or any combination thereof. For example, it can be implemented using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In some embodiments, the software program of this application can be executed by a processor to implement the above steps or functions. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. In addition, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.
[0134] The computer program product provided in this application includes one or more computer programs / instructions. When executed by a processor, these computer programs / instructions generate, in whole or in part, the processes or functions described in this application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0135] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0136] The scope of this application is defined by the appended claims rather than the foregoing description, and is therefore intended to encompass all variations falling within the meaning and scope of equivalents of the claims. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device in software or hardware. Terms such as "first," "second," etc., are used only for distinguishing descriptions and do not indicate any particular order, nor should they be construed as indicating or implying relative importance.
[0137] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily made by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims, and the above embodiments should be regarded as exemplary and non-limiting.
Claims
1. A method for predicting irregular time series, characterized in that, This method is applied to predictive processing of acquired industrial sensor data, which retains its original irregular sampling characteristics without interpolation or completion processing and serves as input for subsequent modeling; it includes: Obtain the irregular time series to be predicted, wherein the irregular time series includes timestamps with uneven time intervals and corresponding observations; The irregular time series is expanded on an orthogonal basis function set to obtain the corresponding trend coefficient vector and period coefficient vector, respectively. The orthogonal basis function set includes a trend basis function set and a period basis function set. The trend coefficient vector and the period coefficient vector are fused and modeled to extract a deep feature vector that reflects the coupling relationship between trend and period. Based on the deep feature vector, the trend coefficient and period coefficient corresponding to the target time period are predicted, and the predicted sequence of the target time period is reconstructed according to the trend coefficient and the period coefficient, combined with the corresponding trend basis function set and the period basis function set. The step of expanding the irregular time series on an orthogonal basis function set to obtain the corresponding trend coefficient vector and period coefficient vector includes: Construct a first set of linear equations for trend modeling, representing the irregular time series as a first linear combination of trend coefficients on the set of trend basis functions, wherein the set of trend basis functions adopts polynomial basis functions arranged in ascending order of order; A second set of linear equations is constructed for periodic modeling, which represents the irregular time series as a second linear combination of periodic coefficients on the set of periodic basis functions, wherein the set of periodic basis functions adopts complex exponential basis functions with different frequency components; Based on the first and second linear equations, a joint least squares optimization model is constructed. The objective is to minimize the sum of squared residuals between the predicted values and the original observed values at each time point of the basis function combination. By solving the weighting coefficients in the first and second linear combinations, the trend coefficient vector and the period coefficient vector are obtained respectively, which serve as the structured representation of the irregular time series on the orthogonal function subspace.
2. The irregular time series prediction method according to claim 1, characterized in that, The step of expanding the irregular time series on an orthogonal basis function set to obtain the corresponding trend coefficient vector and period coefficient vector further includes: The trend basis function set and the column vectors of each basis function in the periodic basis function set are used to construct a basis function matrix, and each basis function matrix is normalized to improve the numerical stability of the coefficient fitting.
3. The irregular time series prediction method according to claim 1, characterized in that, The step of fusing the trend coefficient vector and the period coefficient vector to extract a deep feature vector reflecting the coupling relationship between trend and period includes: Nonlinear feature mapping is performed on the trend coefficient vector and the period coefficient vector respectively to construct a first feature representation tensor for characterizing the trend component and a second feature representation tensor for characterizing the period component. The first feature representation tensor and the second feature representation tensor are concatenated along a preset dimension, and the concatenated feature representation tensor is input into a multilayer perceptron network to perform cross-dimensional modeling and information fusion, thereby obtaining a fused feature vector that reflects the coupling relationship between trends and cycles. The fused feature vector is processed in parallel on multiple preset periodic scales to extract periodic features of different frequency components, and a deep feature vector representing multi-scale periodic patterns is generated based on an adaptive aggregation mechanism.
4. The irregular time series prediction method according to claim 3, characterized in that, The step of processing the fused feature vector in parallel across multiple preset periodic scales to extract periodic features of different frequency components, and generating a deep feature vector representing a multi-scale periodic pattern based on an adaptive aggregation mechanism, includes: Based on a preset periodic scale, corresponding feature modeling branch structures are constructed respectively. The periodic scale has different frequency resolutions to cover periodic change patterns in multiple time ranges. The fused feature vectors are input in parallel into each feature modeling branch structure to extract feature representation vectors at different periodic scales. Based on the adaptive fusion mechanism, the feature representation vectors corresponding to each periodic scale are weighted and combined to generate a deep feature vector representing the coupling relationship of multiple periodic scales.
5. The irregular time series prediction method according to claim 1, characterized in that, The step of predicting the trend coefficient and periodic coefficient corresponding to the target time period based on the deep feature vector, and reconstructing the predicted sequence of the target time period based on the trend coefficient and the periodic coefficient, combined with the corresponding trend basis function set and periodic basis function set, includes: The deep feature vector is input into the pre-trained linear regression prediction model to predict the trend coefficient and periodic coefficient corresponding to the target time period, respectively. Based on the timestamp information of the target time period, each basis function in the trend basis function set and the period basis function set is called respectively, and the values are expanded in the order of timestamps to construct the trend basis function matrix and the period basis function matrix; The trend coefficient is linearly combined with the trend basis function matrix to generate a trend component sequence; The periodic coefficients are linearly combined with the periodic basis function matrix to generate a periodic component sequence; The trend component sequence and the periodic component sequence are summed to obtain the prediction sequence for the target time period.
6. The irregular time series prediction method according to any one of claims 1-5, characterized in that, The set of periodic basis functions is constructed using Fourier basis functions, which consist of multiple sine and cosine functions with different frequencies and amplitudes. These functions are used to characterize the periodic change patterns formed by the superposition of multiple periodic components in the irregular time series through weighted superposition, so as to achieve effective decomposition and reconstruction of the periodic change patterns.
7. An electronic device, characterized in that, The electronic device includes: One or more processors; and a memory storing computer program instructions that, when executed, cause the processors to perform the irregular time series forecasting method as described in any one of claims 1-6.
8. A computer-readable storage medium having a computer program and / or instructions stored thereon, characterized in that, When the computer program and / or instructions are executed by the processor, they implement the irregular time series prediction method as described in any one of claims 1-6.
9. A computer program product, comprising a computer program and / or instructions, characterized in that, When the computer program and / or instructions are executed by the processor, they implement the irregular time series forecasting method as described in any one of claims 1-6.
Citation Information
Patent Citations
Intelligent predicting method for time sequence based on trend and periodic fluctuation
CN104182800A
Time sequence prediction method and system based on decomposition and dual-path architecture
CN120429817A