Multivariable time sequence prediction method, system and device and storage medium
By using polynomial interpolation and min-max standardization to process data, combined with an integrated approach of time networks and the Prophet model, this method solves the problems of multivariate processing, long-term dependence, and mutation point capture in multivariate time series forecasting, improving the accuracy and stability of forecasts and making it suitable for business decision support in internet companies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CTRIP TRAVEL NETWORK TECH SHANGHAI0
- Filing Date
- 2026-01-20
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies for multivariate time series forecasting suffer from insufficient multivariate processing capabilities, difficulty in modeling long-term dependencies, insensitivity to change points, and poor stability, resulting in insufficient forecast accuracy and stability.
We employ multinomial interpolation to fill in missing values, min-max standardization to process dimensions, construct a multidimensional feature set, use a temporal network for feature extraction and residual connection, and integrate it with the Prophet model to capture trend changes and holiday effects, forming an end-to-end multivariate multi-step prediction model.
It enables simultaneous processing of multivariate inputs, avoids error accumulation, effectively models long-term dependencies and captures abrupt change points, significantly improving the accuracy and stability of multi-indicator time series forecasting, and is suitable for marketing strategies and resource planning of Internet companies.
Smart Images

Figure CN121996960A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of customized travel itineraries, and more specifically, to multivariate time series forecasting methods, systems, devices, and storage media. Background Technology
[0002] In the internet industry, key metrics such as daily active users (DAU), order volume, and sales revenue directly impact a company's strategic decisions and operational planning. Accurately predicting the future trends of these metrics can help companies proactively plan marketing campaigns and optimize resource allocation, thereby maximizing revenue. This is essentially a time series forecasting problem—predicting future values based on historical data for each metric.
[0003] Currently, methods for solving time series forecasting problems mainly fall into two categories: traditional time series models and machine learning models. Traditional models, such as moving averages, autoregressive integral moving averages (ARIMA), and exponential smoothing, have advantages such as mature theory and strong interpretability. However, these models are usually limited to univariate forecasting and have difficulty handling multivariate inputs and the interactions between variables. In the multiple key indicator forecasting scenarios involved in this invention, if traditional models are used, a separate model needs to be built and optimized for each indicator, resulting in high workload and cost. Furthermore, when performing multi-step forecasts, traditional models often employ a rolling forecasting strategy, using the predicted value of the previous period as the actual value input to predict the next period. This method leads to the continuous accumulation of forecast errors and a decline in long-term forecast accuracy.
[0004] Deep learning-based methods, such as recurrent neural networks (RNNs), temporal convolutional networks (TCNs), and Transformers, have been widely applied to temporal prediction tasks. These methods support multivariate inputs and outputs, can adaptively extract features, and can directly perform multi-step predictions. However, methods like RNNs and TCNs have limited ability to capture long-term temporal dependencies. While Transformers excel at modeling long-term dependencies, their reliance on attention mechanisms between discrete time points may make them less effective at uncovering robust temporal dependencies in the complex and ever-changing temporal patterns of the real world.
[0005] In recent years, with the rise of large model technology, large time series prediction models (such as Time-LLM and Chronos) have emerged. These models can integrate multimodal information and provide predictive interpretations. However, the "illusion" problem that is common in large models makes their prediction results extremely sensitive to input perturbations, posing a challenge to their stability and reliability in real-world industrial scenarios.
[0006] Therefore, the present invention provides a multivariate time series forecasting method, system, device and storage medium. Summary of the Invention
[0007] To address the problems in the prior art, the present invention aims to provide a multivariate time series forecasting method, system, device, and storage medium that overcomes the difficulties of the prior art, can simultaneously handle multivariate inputs, avoid error accumulation, effectively model long-term dependencies, and capture abrupt change points, thus significantly improving the accuracy and stability of multi-indicator time series forecasting.
[0008] Embodiments of the present invention provide a multivariate time series forecasting method, comprising the following steps: S110. Perform missing value completion and dimension unification processing on the original time series data containing multiple key indicators. The missing values are completed using a polynomial interpolation algorithm, and the dimension unification processing uses a min-max standardization method. S120. Based on the preprocessed data, construct a multidimensional feature set, which includes time features, holiday features, and historical value features of each key indicator. The time features include at least whether the predicted day is a holiday, whether the predicted day is a working day, which day of the holiday the predicted day is, the number of days until the next holiday, the day of the week the predicted day is, the week number of the year the predicted day is, and the season the predicted day is. S130. A temporal network is used as the core prediction model. This temporal network consists of multiple sequentially connected time blocks. Each time block performs the following operations: a fast Fourier transform is performed on the input one-dimensional temporal features to extract the k most significant periods; the one-dimensional temporal data segment corresponding to each period is reshaped into a two-dimensional tensor; a two-dimensional convolution operation is applied to each two-dimensional tensor to extract its feature representation; the extracted two-dimensional features are reduced back to one dimension; a weighted sum is performed based on the frequency intensity corresponding to each period, and the output of the time block is obtained by fusion; information is transmitted between the time blocks through residual connections. S140. Integrate the Prophet model with the aforementioned time network to jointly capture trend change points and holiday effect characteristics in the time series; and S150. Using the trained ensemble model, output the predicted values of all key indicators for a specified future time period.
[0009] Preferably, in step S110, the formula for the polynomial interpolation completion algorithm is:
[0010] Where P(x) is the interpolation polynomial, and x is the x-coordinate of the point to be completed. These are the x-coordinates of the known data points. These are polynomial coefficients.
[0011] Preferably, in step S110, the formula for the minimum-maximum normalization is:
[0012] Where x is the original feature value, x' is the standardized feature value, and min(x) and max(x) are the minimum and maximum values of the feature in all samples, respectively.
[0013] Preferably, in step S130, the internal processing of each time block specifically includes: S131. Applying Fast Fourier Transform to the input one-dimensional time-series features Extracting the period, select the k frequencies with the highest intensity. and its corresponding cycle And convert one-dimensional data into two-dimensional tensors:
[0014] in, The frequency component is represented by its intensity, Period represents the Fast Fourier Transform and the process of selecting the top-k frequencies and periods, Reshape represents the operation of reshaping one-dimensional data into a two-dimensional tensor, and Padding represents the zero-padding operation before convolution. S132, For each two-dimensional tensor A two-dimensional convolutional neural network is used to extract features, resulting in a represented two-dimensional tensor:
[0015] Inception indicates the adoption of the Inception network structure; S133, Intermediate Dimensionality Reduction Sub-step: Transform the two-dimensional features back into one-dimensional space:
[0016] Here, Trunc represents the operation of removing the zeros added by Padding; S134. The weighted summation of the one-dimensional representation after dimensionality reduction is performed based on the intensity of each frequency component to obtain the output of this time block:
[0017] Where A is the frequency intensity and  is the normalized weight.
[0018] Preferably, in step S140, a stacking method is used to integrate the prediction results of the temporal network with those of the Prophet model.
[0019] Preferably, in step S140, the Inception network structure is Inception. _ v3 network architecture.
[0020] Preferably, in step S150, the specified time period is the next 30 days.
[0021] Embodiments of the present invention also provide a multivariate time series forecasting method system for implementing the above-described multivariate time series forecasting method, the multivariate time series forecasting method system comprising: The data preprocessing module performs missing value completion and dimension unification processing on the raw time series data containing multiple key indicators. The missing values are completed using a polynomial interpolation algorithm, and the dimension unification processing uses a min-max standardization method.
[0022] The feature extraction module constructs a multidimensional feature set based on the preprocessed data. The multidimensional feature set includes time features, holiday features, and historical value features of each key indicator. The time features include at least whether the predicted day is a holiday, whether the predicted day is a working day, which day of the holiday the predicted day is, the number of days until the next holiday, the day of the week the predicted day is, the week number of the year the predicted day is, and the season the predicted day is.
[0023] The model training module uses a temporal network as the core prediction model. This temporal network consists of multiple sequentially connected time blocks. Each time block performs the following operations: performing a Fast Fourier Transform on the input one-dimensional temporal features to extract the k most significant periods; reshaping the one-dimensional temporal data segment corresponding to each period into a two-dimensional tensor; applying a two-dimensional convolution operation to each two-dimensional tensor to extract its feature representation; reducing the extracted two-dimensional features back to one dimension; performing a weighted sum based on the frequency intensity corresponding to each period and fusing them to obtain the output of the time block; and transmitting information between time blocks through residual connections.
[0024] The model integration module integrates the Prophet model with the time network to jointly capture trend change points and holiday effect characteristics in the time series.
[0025] The prediction output module uses the trained ensemble model to output the predicted values of all key indicators for a specified future time period.
[0026] Embodiments of the present invention also provide a multivariate time series prediction method apparatus, comprising: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the multivariate time series prediction method described above by executing the executable instructions.
[0027] Embodiments of the present invention also provide a computer-readable storage medium for storing a program that, when executed, implements the steps of the above-described multivariate time series prediction method.
[0028] The purpose of this invention is to provide a multivariate time series forecasting method, system, device, and storage medium that can simultaneously process multivariate inputs, avoid error accumulation, effectively model long-term dependencies, and capture abrupt change points, thereby significantly improving the accuracy and stability of multi-indicator time series forecasting.
[0029] The beneficial effects of this invention are as follows: 1. Multivariate collaborative prediction: It can process the input of multiple key indicators at the same time and model the mutual influence between indicators, avoiding the tedious work of modeling each indicator separately.
[0030] 2. Strong ability to model long-term dependencies: By adopting the TimesNet model, it effectively captures long-term dependency patterns in time series data by transforming one-dimensional time series data into two-dimensional space to analyze multi-period changes.
[0031] 3. Resistance to sudden change interference: By integrating the Prophet model, the ability to capture sudden changes caused by holidays, policy changes, etc. is specifically enhanced, improving the model's predictive robustness during special periods.
[0032] 4. High prediction efficiency: The model outputs the predicted values of all indicators for multiple future periods at once, avoiding the error accumulation problem caused by rolling prediction and improving the accuracy of long-term prediction.
[0033] 5. High practicality: The algorithm has a clear process and modular design, making it easy to deploy and integrate into existing business systems, providing strong data support for internet companies' marketing strategy formulation and resource planning. Attached Figure Description
[0034] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0035] Figure 1 This is a flowchart of the multivariate time series prediction method of the present invention.
[0036] Figure 2 This is a schematic diagram illustrating the implementation process of the multivariate time series prediction method of the present invention.
[0037] Figure 3 This is a schematic diagram of the time network model structure in the multivariate time series prediction method of the present invention.
[0038] Figure 4This is a schematic diagram of the online inference process using the multivariate time series prediction method of this invention.
[0039] Figure 5 This is a schematic diagram illustrating the monitoring and backtesting using the multivariate time series forecasting method of this invention.
[0040] Figure 6 This is a schematic diagram of the structure of the multivariate time series prediction method system of the present invention.
[0041] Figure 7 This is a schematic diagram of the structure of the device for the multivariate time series prediction method of the present invention.
[0042] Figure 8 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation
[0043] The following specific examples illustrate the implementation methods of this application. Those skilled in the art can easily understand the other advantages and effects of this application from the content disclosed herein. This application can also be implemented or applied through other different specific embodiments, and various details in this application can be modified or changed according to different viewpoints and application systems without departing from the spirit of this application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0044] The embodiments of this application will now be described in detail with reference to the accompanying drawings, so that those skilled in the art can easily implement the application. This application may be embodied in many different forms and is not limited to the embodiments described herein.
[0045] In this application, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics represented in connection with that embodiment or example, which are included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics represented 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 different embodiments or examples represented in this application, as well as features of different embodiments or examples.
[0046] Furthermore, the terms "first" and "second" are used for illustrative 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 representation of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0047] For the purpose of clearly describing this application, devices that are not relevant to the description are omitted, and the same or similar components throughout the specification are given the same reference numerals.
[0048] Throughout this specification, when it is said that a device is "connected" to another device, this includes not only "direct connection" but also "indirect connection" by placing other components in between. Furthermore, when it is said that a device "comprises" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather implies that other constituent elements may be included.
[0049] When we say that a device is "above" another device, this can mean that it is directly above the other device, or it can mean that other devices are present in between. Conversely, when we say that a device is "directly" "above" another device, there are no other devices present in between.
[0050] Although the terms first, second, etc., are used in some instances herein to refer to various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, first interface and second interface, etc., are used. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0051] The technical terms used herein are for reference only to specific embodiments and are not intended to limit the scope of this application. The singular form used herein includes the plural form unless the statement explicitly indicates otherwise. The word "comprising" as used in the specification means to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.
[0052] Although not explicitly defined, all terms, including technical and scientific terms used herein, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. Terms defined in commonly used dictionaries shall be further interpreted as having a meaning consistent with the relevant technical literature and the content of this present application, and shall not be over-interpreted as having an ideal or overly formulaic meaning unless otherwise defined.
[0053] Existing technologies suffer from limitations in handling multivariate forecasting tasks in the internet industry, which involve multiple key indicators, medium- to long-term forecasts, and the need to consider the impact of change points. These limitations include insufficient multivariate processing capabilities, difficulty in modeling long-term dependencies, insensitivity to change points, and poor stability. Therefore, the industry urgently needs a multivariate time series forecasting solution that can simultaneously address these issues.
[0054] Figure 1 This is a flowchart of the multivariate time series prediction method of the present invention. For example... Figure 1 As shown, the multivariate time series prediction method of the present invention includes: S110. The original time-series data containing multiple key indicators is processed for missing value completion and dimensional unification. Missing values are completed using a polynomial interpolation algorithm, and dimensional unification is performed using a min-max standardization method. The polynomial interpolation completion in this invention can maintain the trend and smoothness of data changes near missing points, avoiding distortion caused by simple filling; min-max standardization eliminates dimensional differences between indicators, enabling the model to handle features of different scales more fairly and improving training stability.
[0055] S120. Based on the preprocessed data, a multidimensional feature set is constructed. This set includes time features, holiday features, and historical values of key indicators. Time features include at least whether the predicted date is a holiday, whether the predicted date is a workday, which day of the holiday the predicted date falls on, the number of days until the next holiday, the day of the week the predicted date falls on, the week number of the year the predicted date falls on, and the season the predicted date falls on. This invention, by constructing rich temporal context features, enables the model to explicitly learn periodic patterns, holiday effects, and workday patterns in business scenarios, enhancing the model's ability to capture special dates and periodic fluctuations, and improving the interpretability and accuracy of predictions.
[0056] S130. A temporal network is used as the core prediction model. This temporal network consists of multiple sequentially concatenated time blocks. Each time block performs the following operations: A Fast Fourier Transform is applied to the input one-dimensional temporal features to extract the k most significant periods; the one-dimensional temporal data segment corresponding to each period is reshaped into a two-dimensional tensor; a two-dimensional convolution operation is applied to each two-dimensional tensor to extract its feature representation; the extracted two-dimensional features are reduced back to one dimension; a weighted sum is performed based on the frequency intensity corresponding to each period, and the output of the time block is obtained by fusion. Information is passed between time blocks through residual connections. The temporal network adaptively discovers the main periods in the data through Fourier Transform and simultaneously models both "intra-period patterns" and "cross-period evolution" temporal dependencies using two-dimensional convolution. This design enables the model to automatically learn multi-scale temporal patterns, the weighted fusion mechanism allows the model to focus on the most important periodic components, and the residual connections ensure effective training of the deep network.
[0057] S140. Integrating the Prophet model with a time network to jointly capture trend change points and holiday effect characteristics in time series. This invention integrates a classic time series decomposition model, combining Prophet's inherent advantages in trend change detection and holiday effect modeling with the complex pattern learning capabilities of deep learning models, thereby improving the model's ability to capture deterministic patterns and the robustness of overall prediction.
[0058] S150. Using the trained ensemble model, output the predicted values of all key indicators for a specified future time period. This invention achieves end-to-end multivariate multi-step prediction, generating coordinated prediction results for all relevant indicators at multiple future time points in one go, providing a comprehensive and consistent forward-looking view for business decisions, and supporting practical applications such as resource planning and risk assessment.
[0059] In a preferred embodiment, in step S110, the formula for the polynomial interpolation completion algorithm is:
[0060] Where P(x) is the interpolation polynomial, and x is the x-coordinate of the point to be completed. These are the x-coordinates of the known data points. These are the polynomial coefficients. Interpolation formulas provide a stable recursive calculation method that can construct polynomials of appropriate order based on known data points, ensuring fitting accuracy while avoiding overfitting and numerical instability problems that may arise from higher-order polynomials.
[0061] In a preferred embodiment, in step S110, the formula for minimum-maximum normalization is:
[0062] Where x is the original feature value, x' is the standardized feature value, and min(x) and max(x) are the minimum and maximum values of the feature in all samples, respectively. This min-max standardization transformation maps all feature values to a fixed interval, ensuring that each feature has the same numerical range during training, avoiding optimization difficulties caused by differences in feature scale during gradient updates, while maintaining the relative relationships of the original data.
[0063] In a preferred embodiment, step S130 specifically includes the following internal processing procedures for each time block: S131. Applying Fast Fourier Transform to the input one-dimensional time-series features Extracting the period, select the k frequencies with the highest intensity. and its corresponding cycle And convert one-dimensional data into two-dimensional tensors:
[0064] in, The frequency component is represented by its intensity, Period represents the Fast Fourier Transform and the process of selecting the top-k frequencies and periods, Reshape represents the operation of reshaping one-dimensional data into a two-dimensional tensor, and Padding represents the zero-padding operation before convolution. S132, For each two-dimensional tensor A two-dimensional convolutional neural network is used to extract features, resulting in a represented two-dimensional tensor:
[0065] Inception indicates the adoption of the Inception network structure; S133, Intermediate Dimensionality Reduction Sub-step: Transform the two-dimensional features back into one-dimensional space:
[0066] Here, Trunc represents the operation of removing the zeros added by Padding; S134. The weighted summation of the one-dimensional representation after dimensionality reduction is performed based on the intensity of each frequency component to obtain the output of this time block:
[0067] Where A is the frequency intensity and  is the normalized weight.
[0068] This embodiment combines frequency domain analysis with spatiotemporal modeling, extracts local correlations and global evolution patterns from the reconstructed periodic tensor through two-dimensional convolution, and uses Softmax weighting to ensure that important periodic components dominate feature fusion, forming a hierarchical periodic feature learning mechanism.
[0069] In a preferred embodiment, in step S140, a stacking method is used to integrate the prediction results of the temporal network and the Prophet model. In this embodiment, stacking integration can also be used to learn the optimal combination of the prediction results of the two base models through a meta-learner (such as linear regression or a simple neural network), which can adaptively balance the predictive advantages of both and usually achieve better generalization performance than a single model or simple averaging.
[0070] In a preferred embodiment, in step S140, the Inception network structure is the inception_v3 network structure. The Inception_v3 structure employs multi-scale convolutional kernel parallel processing and convolution decomposition techniques, enabling it to capture spatiotemporal features under different receptive fields, improving the richness and efficiency of feature extraction, while controlling the growth of model parameters.
[0071] In a preferred embodiment, in step S150, the specified time period is the next 30 days. This 30-day forecast span in this embodiment balances the accuracy of short-term forecasts with the needs of medium- and long-term planning, providing directly usable forecast results for application scenarios such as monthly business planning and inventory management, while ensuring that the forecasts remain within the effective forecast range of the model.
[0072] The specific embodiments of the present invention are as follows: Figure 2 This is a schematic diagram illustrating the implementation process of the multivariate time series forecasting method of the present invention. Referring to Figures 1 and 2, the implementation process of the multivariate time series forecasting method of the present invention includes the following steps S110 to S150.
[0073] S110, Data preprocessing steps.
[0074] Raw data often contains missing values, and the dimensions and numerical ranges of different key indicators (such as DAU and sales revenue) vary greatly. Preprocessing is necessary to provide high-quality, scale-uniform input for subsequent model training.
[0075] For missing values, polynomial interpolation is used for completion. Polynomial interpolation constructs a polynomial function that passes through all known data points, and uses this function to estimate the value of the missing points. The formula is as follows:
[0076] Where P(x) is the constructed interpolation polynomial, and x is the x-coordinate of the data point to be completed (such as the time index). These are the x-coordinates of the known data points. These are the polynomial coefficients calculated using known data points.
[0077] To address the issue of inconsistent dimensions, a min-max normalization method is used to map all eigenvalues to the interval [0, 1]. The formula for this method is as follows:
[0078] Here, x is the original value of a feature, min(x) and max(x) are the minimum and maximum values of the feature in all samples, respectively, and x' is the standardized value. After standardization, the features of different indicators are on the same order of magnitude, which helps to accelerate model convergence and improve training stability.
[0079] S120, Feature extraction step.
[0080] Based on the preprocessed time-series data, a rich feature set is constructed to enhance the model's understanding of time-series patterns. The features mainly include three categories: Historical indicator values: The values of each key indicator over a period of time (such as the past 90 days) are the most important feature.
[0081] Time features: extracted from date information, including: Predict whether the date is a holiday (Boolean value).
[0082] Whether the predicted date is a working day (Boolean value).
[0083] The predicted day is the current holiday period (integer, or 0 if it is not a holiday).
[0084] Predict the number of days (integer) between the current day and the next holiday (or workday).
[0085] The predicted day of the week is represented by 1-7 (Sunday is 1).
[0086] The week number (integer) of the year in which the predicted date falls.
[0087] Predict the season of the day (categorical variable, such as spring, summer, autumn, winter).
[0088] External features (optional): Other external factors that may affect key metrics can be added as needed for business operations, such as weather data and marketing campaign tags.
[0089] These constructed features, together with historical index values, constitute the multidimensional input feature vector of the model.
[0090] S130, Model Training Steps.
[0091] Figure 3 This is a schematic diagram of the time network model structure in the multivariate time series prediction method of this invention. (See diagram below.) Figure 3 As shown, the core of this step is training the TimesNet model. TimesNet is an innovative deep learning architecture that transforms time-series data from a one-dimensional space to a two-dimensional space, providing a unified model of changes within and between periods from a multi-period perspective.
[0092] The TimesNet model consists of L concatenated time blocks with the same structure. The input sequence X first passes through an embedding layer, which transforms it into a deep feature representation. , where T is the sequence length and d_model is the feature dimension. For the ... Layer time block, input is: The output is obtained after processing within the time block: Note that residual connections are made between each time block. Residual connections help alleviate the vanishing gradient problem in deep networks and accelerate model convergence.
[0093] The internal processing of each time block consists of four sub-steps: Time series data dimensionality upgrade: One-dimensional features of the input Perform a Fast Fourier Transform (FFT) to obtain its frequency domain representation, and calculate the intensity of each frequency component. Select the k frequencies with the highest intensity. and its corresponding cycle (Period pi = T / fi). This process can be formally represented as:
[0094] Next, based on each period pi, the one-dimensional sequence after padding (zero-padding) is... Reshape into a two-dimensional tensor Its shape can be understood as (pi, fi), which means that the time series data is folded according to its natural period. The rows represent the changes within the period, and the columns represent the changes during the period.
[0095]
[0096] Two-dimensional convolution extraction of representations: For the obtained k two-dimensional tensors { Each feature is extracted using a two-dimensional convolutional neural network. In a preferred embodiment of the invention, the Inception network structure is used as the convolutional module because it can process features of different scales in parallel. This step is represented as follows:
[0097] By using two-dimensional convolution, the model can simultaneously capture complex patterns of change within a cycle (such as each day within a week) and between cycles (such as this week and last week).
[0098] Dimensionality reduction of intermediate results: Two-dimensional features after convolution Reshape the sequence back to a one-dimensional sequence, removing the zeros added during padding in the first step to restore the original sequence length. This step is represented as:
[0099] Trunc is the truncation operation, used to remove padding with zeros.
[0100] Adaptive fusion: Different periodic components have varying degrees of importance for the current prediction. This step is based on the frequency intensities obtained in the first step. For k dimensionality-reduced one-dimensional representations Weighted fusion is performed. First, the frequency intensity is normalized using Softmax to obtain the weights:
[0101] Then, a weighted sum is performed to obtain the output of this time block:
[0102] Ultimately, through the stacking of multiple time blocks, the model learns multi-level abstract representations of time-series data at different time scales. The model output layer is typically a fully connected layer, responsible for mapping the final feature representation to the prediction target dimension, i.e., the predicted values of all key indicators in the future multiple steps.
[0103] S140, Model Integration Steps.
[0104] While TimesNet excels at capturing complex cyclical patterns, its predictive ability may still be insufficient for drastic abrupt changes caused by sudden events or extreme holidays. To further enhance the model's robustness, this invention integrates the Prophet model. Prophet, an open-source prediction library developed by Facebook, explicitly models trend changes and holiday effects, and is particularly adept at handling outliers and abrupt changes in time series.
[0105] The ensemble method employs a stacking strategy. Specifically, the TimesNet model and the Prophet model are used separately to predict the same training data, yielding two sets of predictions. These two sets of predictions are then used as new features and fed into a meta-learner (such as a simple linear regression or ridge regression model) for training. The meta-learner learns how to optimally combine the strengths of the two base models. The final prediction is generated by this meta-learner. This ensemble process can be concisely represented as: Final Prediction = Stacking(TimesNet Prediction, Prophet Prediction), i.e.:
[0106] Through this integration, the model possesses both the powerful periodic pattern learning and multivariate relationship modeling capabilities of TimesNet and the sensitive capture capabilities of Prophet for mutation points and special events.
[0107] S150, Predicting Output Steps.
[0108] The latest data after preprocessing and feature construction is input into the trained ensemble model, which will output the values of all key indicators to be predicted for a specified time period in the future.
[0109] Figure 4 This is a schematic diagram illustrating the online inference process using the multivariate time series forecasting method of this invention. (Reference) Figure 4 As shown, in a typical application scenario of this invention, the specified time period is the next 30 days (T+30D). This one-step multi-step forecasting method avoids the problem of error accumulating step by step in traditional rolling forecasting methods, and is especially suitable for medium- and long-term business planning and early warning, which will not be elaborated here.
[0110] Figure 5 This is a schematic diagram illustrating the monitoring and backtesting using the multivariate time series forecasting method of this invention. For example... Figure 5 As shown, after the model is launched, a monitoring and backtesting mechanism needs to be established. For example, the consistency between the online data distribution and the training data distribution should be checked regularly, and the deviation of different prediction periods such as T+3D, T+7D, T+14D, T+21D, and T+30D should be monitored to ensure the continuous stability of the model's prediction effect. This will not be elaborated here.
[0111] In summary, the multivariate time series forecasting method system of the present invention can simultaneously handle multivariate inputs, avoid error accumulation, effectively model long-term dependencies and capture abrupt change points, significantly improving the accuracy and stability of multi-indicator time series forecasting.
[0112] Figure 6 This is a schematic diagram of the multivariate time series prediction method system of the present invention. Figure 6 As shown, embodiments of the present invention also provide a multivariate time series forecasting method system for implementing the above-described multivariate time series forecasting method. The multivariate time series forecasting method system 5 includes: The data preprocessing module 51 performs missing value completion and dimension unification processing on the raw time series data containing multiple key indicators. The missing values are completed using a polynomial interpolation algorithm, and the dimension unification processing uses a min-max standardization method. The feature extraction module 52 constructs a multi-dimensional feature set based on the preprocessed data. The multi-dimensional feature set includes time features, holiday features, and historical value features of each key indicator. The time features include at least whether the predicted day is a holiday, whether the predicted day is a working day, which day of the holiday the predicted day is, the number of days until the next holiday, the day of the week the predicted day is, the week number of the year the predicted day is, and the season the predicted day is. Model training module 53 uses a temporal network as the core prediction model. This temporal network consists of multiple sequentially connected time blocks. Each time block performs the following operations: performs a Fast Fourier Transform on the input one-dimensional temporal features to extract the k most significant periods; reshapes the one-dimensional temporal data segment corresponding to each period into a two-dimensional tensor; applies a two-dimensional convolution operation to each two-dimensional tensor to extract its feature representation; reduces the extracted two-dimensional features back to one dimension; performs a weighted summation based on the frequency intensity corresponding to each period, and fuses them to obtain the output of the time block; information is passed between the time blocks through residual connections. Model integration module 54 integrates the Prophet model with the time network to jointly capture trend change points and holiday effect characteristics in the time series; and The prediction output module 55 uses the trained ensemble model to output the predicted values of all key indicators for a specified future time period.
[0113] The multivariate time series forecasting method system of the present invention can simultaneously process multivariate inputs, avoid error accumulation, effectively model long-term dependencies and capture abrupt change points, significantly improving the accuracy and stability of multi-index time series forecasting.
[0114] This invention also provides an apparatus for a multivariate time series forecasting method, including a processor and a memory storing executable instructions for the processor. The processor is configured to execute steps of a multivariate time series forecasting method by executing the executable instructions.
[0115] As shown above, the multivariate time series forecasting method and device of this invention in this embodiment can simultaneously process multivariate inputs, avoid error accumulation, effectively model long-term dependencies and capture abrupt change points, significantly improving the accuracy and stability of multi-indicator time series forecasting.
[0116] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."
[0117] Figure 7 This is a schematic diagram of the structure of the device for the multivariate time series prediction method of the present invention. See below for reference. Figure 7 To describe an electronic device 600 according to this embodiment of the present invention. Figure 7 The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0118] like Figure 7 As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.
[0119] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.
[0120] Storage unit 620 may include readable media in the form of volatile storage units, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include read-only memory (ROM) 6203.
[0121] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0122] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.
[0123] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0124] This invention also provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of a multivariate time series forecasting method. In some possible implementations, various aspects of the invention can also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the above-described method section of this specification according to various exemplary embodiments of the invention.
[0125] As shown above, the multivariate time series forecasting method system of the present invention in this embodiment can simultaneously process multivariate inputs, avoid error accumulation, effectively model long-term dependencies and capture abrupt change points, significantly improving the accuracy and stability of multi-index time series forecasting.
[0126] Figure 8 This is a schematic diagram of the structure of the computer-readable storage medium of the present invention. (Reference) Figure 8 As shown, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described. It may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0127] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0128] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0129] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0130] In summary, the purpose of this invention is to provide a multivariate time series forecasting method, system, device, and storage medium that can simultaneously process multivariate inputs, avoid error accumulation, effectively model long-term dependencies, and capture abrupt change points, thereby significantly improving the accuracy and stability of multi-indicator time series forecasting.
[0131] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A multivariate time series forecasting method, characterized in that, Includes the following steps: S110. Perform missing value completion and dimension unification processing on the original time series data containing multiple key indicators. The missing values are completed using a polynomial interpolation algorithm, and the dimension unification processing uses a min-max standardization method. S120. Based on the preprocessed data, construct a multidimensional feature set, which includes time features, holiday features, and historical value features of each key indicator. The time features include at least whether the predicted day is a holiday, whether the predicted day is a working day, which day of the holiday the predicted day is, the number of days until the next holiday, the day of the week the predicted day is, the week number of the year the predicted day is, and the season the predicted day is. S130. A temporal network is used as the core prediction model. This temporal network consists of multiple sequentially connected time blocks. Each time block performs the following operations: a fast Fourier transform is performed on the input one-dimensional temporal features to extract the k most significant periods; the one-dimensional temporal data segment corresponding to each period is reshaped into a two-dimensional tensor; a two-dimensional convolution operation is applied to each two-dimensional tensor to extract its feature representation; the extracted two-dimensional features are reduced back to one dimension; a weighted sum is performed based on the frequency intensity corresponding to each period, and the output of the time block is obtained by fusion; information is transmitted between the time blocks through residual connections. S140. Integrate the Prophet model with the aforementioned time network to jointly capture trend change points and holiday effect characteristics in the time series; and S150. Using the trained ensemble model, output the predicted values of all key indicators for a specified future time period.
2. The multivariate time series forecasting method as described in claim 1, characterized in that, In step S110, the formula for the polynomial interpolation completion algorithm is: Where P(x) is the interpolation polynomial, and x is the x-coordinate of the point to be completed. These are the x-coordinates of the known data points. These are polynomial coefficients.
3. The multivariate time series forecasting method as described in claim 2, characterized in that, In step S110, the formula used in the minimum-maximum standardization method is: Where x is the original feature value, x' is the standardized feature value, and min(x) and max(x) are the minimum and maximum values of the feature in all samples, respectively.
4. The multivariate time series forecasting method as described in claim 3, characterized in that, In step S130, the internal processing of each time block specifically includes: S131. Applying Fast Fourier Transform to the input one-dimensional time-series features Extracting the period, select the k frequencies with the highest intensity. and its corresponding cycle And convert one-dimensional data into two-dimensional tensors: in, The frequency component is represented by its intensity, Period represents the Fast Fourier Transform and the process of selecting the top-k frequencies and periods, Reshape represents the operation of reshaping one-dimensional data into a two-dimensional tensor, and Padding represents the zero-padding operation before convolution. S132, For each two-dimensional tensor A two-dimensional convolutional neural network is used to extract features, resulting in a represented two-dimensional tensor: Inception indicates the adoption of the Inception network structure; S133, Intermediate Dimensionality Reduction Sub-step: Transform the two-dimensional features back into one-dimensional space: Here, Trunc represents the operation of removing the zeros added by Padding; S134. The weighted summation of the one-dimensional representation after dimensionality reduction is performed based on the intensity of each frequency component to obtain the output of this time block: Where A is the frequency intensity and  is the normalized weight.
5. The multivariate time series forecasting method as described in claim 4, characterized in that, In step S140, a stacking method is used to integrate the prediction results of the temporal network with those of the Prophet model.
6. The multivariate time series forecasting method as described in claim 4, characterized in that, In step S140, the Inception network structure is Inception. _ v3 network architecture.
7. The multivariate time series forecasting method as described in claim 1, characterized in that, In step S150, the specified time period is the next 30 days.
8. A multivariate time series forecasting method system, used to implement the multivariate time series forecasting method of claim 1, characterized in that, include: The data preprocessing module performs missing value completion and dimension unification processing on the raw time series data containing multiple key indicators. The missing values are completed using a polynomial interpolation algorithm, and the dimension unification processing uses a min-max standardization method. The feature extraction module constructs a multidimensional feature set based on the preprocessed data. The multidimensional feature set includes time features, holiday features, and historical value features of each key indicator. The time features include at least whether the predicted day is a holiday, whether the predicted day is a working day, which day of the holiday the predicted day is, the number of days until the next holiday, the day of the week the predicted day is, the week number of the year the predicted day is, and the season the predicted day is. The model training module uses a temporal network as the core prediction model. This temporal network consists of multiple sequentially concatenated time blocks. Each time block performs the following operations: performs a Fast Fourier Transform on the input one-dimensional temporal features to extract the k most significant periods; reshapes the one-dimensional temporal data segment corresponding to each period into a two-dimensional tensor; applies a two-dimensional convolution operation to each two-dimensional tensor to extract its feature representation; reduces the extracted two-dimensional features back to one dimension; performs a weighted summation based on the frequency intensity corresponding to each period, and fuses the results to obtain the output of the time block; information is passed between the time blocks through residual connections. The model integration module integrates the Prophet model with the time network to jointly capture trend changes and holiday effect characteristics in the time series; and The prediction output module uses the trained ensemble model to output the predicted values of all key indicators for a specified future time period.
9. A device for multivariate time series forecasting, characterized in that, include: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the multivariate time series prediction method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps of the multivariate time series prediction method according to any one of claims 1 to 7.