An adaptive hybrid multivariate time series data forecasting method
Through the adaptive hybrid multivariate time series data prediction method and the use of subsequence data clustering and classification model construction, the problem of variable correlation being ignored in multivariate time series data prediction is solved, and the prediction accuracy and model adaptability are improved.
Patent Information
- Application Number
- CN202410366271.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-03-28
AI Technical Summary
Existing multivariate time series data prediction methods ignore the correlation between environmental data detected by different sensors, resulting in low prediction accuracy.
The adaptive hybrid multivariate time series data prediction method is adopted, and the multivariate time series data is divided into cluster sets through the construction of subsequence data clustering and classification models, and multivariate prediction models and univariate prediction models are constructed respectively, and Mahalanobis distance is used for prediction evaluation. and model optimization.
It significantly improves the model's adaptability to local patterns and prediction accuracy, makes full use of the component features of each dimension and the correlation information between variables, and improves the prediction accuracy of multivariate time series data.
Smart Images

Figure CN118094338B
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of big data, database, artificial intelligence, data mining, etc., and specifically relates to an adaptive hybrid multivariate time series data prediction method. Background Art
[0002] Multivariate time series data are widely present in people's daily life and industrial production, such as fund or stock trading data, retail market daily sales data, process industry sensor monitoring data, astronomical observation data, aerospace radar, satellite monitoring data, weather temperature and air quality index, etc. In order to ensure the normal operation of various business systems, the industry usually needs to predict the collected multivariate time series data in order to grasp the operating status of the system in a timely manner. Therefore, multivariate time series data prediction methods have a wide range of application needs in the industry.
[0003] Traditional multivariate time series data prediction methods are mainly based on single-variable linear models, such as the early linear autoregressive model and moving average model, as well as the autoregressive moving average model and the difference autoregressive moving average model that integrate the two. However, linear models cannot handle complex situations of nonlinearity and multiple variables, so the academic community has successively proposed autoregressive conditional heteroskedasticity models, threshold autoregressive models, and vector autoregressive models. Nonlinear models proposed in recent years are mainly based on deep learning methods, such as deep recurrent neural networks, long short-term memory networks, gated neural units, convolutional neural networks, graph neural networks, etc. However, these methods ignore the correlation between data as variables (such as different categories of environmental data detected by different sensors at the same time) in the multivariate time series data prediction task, thus affecting the prediction accuracy of the model. Summary of the invention
[0004] In order to solve the shortcomings of the prior art and achieve the purpose of accurately predicting multivariate time series data with complex variable correlation, the present invention adopts the following technical solutions:
[0005] An adaptive hybrid multivariate time series data prediction method comprises the following steps:
[0006] (1) Construction of subsequence data clustering model: construct a multivariate prediction training set and its various dimension prediction training sets for the segmented multivariate time series data, and obtain the corresponding cluster set through clustering;
[0007] (2) Construction of subsequence data classification model: using clusters as category labels, training multivariate classification models and univariate classification models for each dimension;
[0008] (3) Prediction model construction: Based on the prediction training set, the time series prediction model of each cluster is trained separately to obtain the multivariate prediction model and the univariate prediction model of each dimension;
[0009] (4) Prediction evaluation: for the multivariate time series data to be predicted, the multivariate classification model is used to classify the data, and the multivariate prediction model corresponding to the multivariate subsequence data cluster is used to predict the multivariate time series data to obtain multivariate prediction sequence data; the univariate classification model of each dimension is used to classify the data of the corresponding dimension of the multivariate time series data to be predicted, and the univariate prediction model of each dimension corresponding to the univariate subsequence data cluster to which each dimension belongs is used to predict each dimension of the multivariate time series data to obtain univariate prediction sequence data; the univariate prediction sequence data is compared with the multivariate prediction sequence data, and based on the difference between the two, the step (1) is returned to reconstruct the clustering model, classification model, prediction model and prediction evaluation until the prediction requirements are met, and the multivariate prediction result is output.
[0010] The present invention simultaneously utilizes clustering and classification methods to divide subsequences, effectively solving the unsupervised problem of model construction, reducing the complexity of the problem, and improving the usability of the method; constructing prediction models for each sequence cluster separately can significantly improve the adaptability of the model to various local patterns, thereby improving the model prediction accuracy; and simultaneously modeling the multivariate time series itself and the components of each dimension, making full use of the component characteristics of each dimension and the correlation information between variables, thereby improving the model prediction accuracy.
[0011] Furthermore, in the step (1), the multivariate time series data is segmented to obtain a multivariate subsequence data set and a subsequence data set of each dimension. After the multivariate time series data is segmented, a subsequence data is extracted as a prediction label, a multivariate prediction training set and a prediction training set of each dimension are constructed, and clustering is performed on the multivariate prediction training set and the prediction training set of each dimension respectively to obtain a multivariate subsequence data cluster set and a subsequence data cluster set of each dimension.
[0012] Furthermore, the step (1) includes the following sub-steps:
[0013] (1.1) Using the length W The sliding window of the multivariate time series data is split to obtain a multivariate subsequence data set X ={ S 1, S 2, …, S n} and each dimension subsequence data set X 1={ S 1,1 , S 1,2 , …, S 1,n}, …, X d ={S d1 , S d2 , …, S dn};
[0014] (1.2) Extract a subsequence data after each sliding window as the predicted label of the subsequence data in the sliding window { H 1, H 2, …, H n}, based on the multivariate subsequence data and its corresponding prediction labels, construct a multivariate prediction training set P ={( S 1, H 1),( S 2, H 2), …, ( S n , H n )} and prediction training sets for each dimension P 1={( S 1,1 , H 1,1 ), ( S 1,2 , H 1,2 ), …, ( S 1n , H 1n )},…, P d ={( S d1 , H d1 ), ( S d2 , H d2 ), …, ( S dn , H dn )};
[0015] (1.3) Utilization k The mean clustering method is used in multivariate subsequence data sets. X And each dimension subsequence data set X 1~d Clustering is performed on the data to obtain a multivariate subsequence data cluster set { C 1, C 2, …, C k} and each dimension subsequence data cluster set { C1,1 , C 1,2 , …, C 1,k}, …, { C d1 , C d2 , …, C dk}.
[0016] Furthermore, in step (2), the multivariate subsequence data set uses the multivariate subsequence data cluster as the category label to train the multivariate classification model R , each dimension subsequence data set uses each dimension subsequence data cluster as the category label, and trains the univariate classification model of each dimension { R 1, R 2, …, R d};
[0017] Furthermore, the step (2) includes the following sub-steps:
[0018] (2.1) In a multivariate subsequence data set X The cluster labels of each multivariate subsequence data are used as category labels to train the regression tree multivariate classification model. R ;
[0019] (2.2) In each dimension subsequence data set X 1~d On the above, the dimension subsequence data cluster labels are used as category labels to train the regression tree univariate classification model of each dimension { R 1, R 2, …, R d}.
[0020] Furthermore, in the step (3), in each multi-subsequence data cluster { C 1, C 2, …, C k} and each dimension unary subsequence data cluster { C 1,1 , C 1,2 , …, C 1,k}, …, { C d1 , C d2 , …, C dk}, using the multivariate prediction training set P And the prediction training set of each dimensionP 1, …, P d Train the ARIMA time series prediction model for each cluster to obtain a set of multivariate prediction models { F 1, F 2, …, F k} and the univariate prediction model set of each dimension { F 1,1 , F 1,2 , …, F 1,k}, …, { F d1 , F d2 , …, F dk};
[0021] Furthermore, the step (4) includes the following sub-steps:
[0022] (4.1) For the multivariate time series data to be predicted T , using the multivariate classification model R Classify it and get the multivariate subsequence data cluster to which it belongs C T ;
[0023] (4.2) Using multivariate subsequence data clusters C T Corresponding multivariate prediction model F CT Treating and Forecasting Multivariate Time Series Data T Make a prediction and get the length W / 3 multivariate ( d Dimension) Prediction Sequence Data Q ;
[0024] (4.3) Using the univariate classification model of each dimension { R 1, R 2, …, R d Treating forecasting of multivariate time series data T The data of the corresponding dimensions are classified to obtain the univariate subsequence data clusters belonging to each dimension { C 1T , C 2T , …, C dT};
[0025] (4.4) Using the univariate subsequence data clusters of each dimension { C1T , C 2T , …, C dT}The corresponding univariate prediction model for each dimension{ F 1T , F 2T , …, F dT}, to predict multivariate time series data T We can predict the dimensions of d The length is W / 3 unigram prediction sequence data { Oh 1, Oh 2, …, Oh d};
[0026] (4.5) Calculate the matrix formed by the univariate prediction sequence data [ Oh 1; Oh 2; …; Oh d ] and the matrix [Q] formed by the multivariate prediction sequence data, if it is greater than the threshold e , then repeat step (1) to re-cluster to build each model and predictive evaluation, otherwise output the multivariate prediction results Q In the prediction and evaluation stage, the error evaluation based on the Mahalanobis distance can ensure the convexity and differentiability of the problem, laying the foundation for the efficient optimization of the model.
[0027] The advantages and beneficial effects of the present invention are:
[0028] The present invention simultaneously utilizes clustering and classification methods to divide subsequences, effectively solving the unsupervised problem of model construction, reducing the complexity of the problem, and improving the usability of the method; constructing prediction models for each sequence cluster separately can significantly improve the adaptability of the model to various local patterns, thereby improving the model prediction accuracy; modeling is simultaneously performed for the multivariate time series itself and the components of each dimension, making full use of the component characteristics of each dimension and the correlation information between variables, thereby improving the model prediction accuracy; in the prediction evaluation stage, the error evaluation based on the Mahalanobis distance can ensure that the convexity of the problem is differentiable, laying the foundation for the efficient optimization of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flow chart of a method in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0031] like Figure 1 As shown in the figure, an adaptive hybrid multivariate time series data prediction method is proposed. For the multivariate time series data of stock transactions (selecting five dimensions: stock price, trading volume, turnover rate, MACD indicator, and KDJ indicator), using the hourly trading data from 2022 to 2023 (about 480 trading days), the hourly trading price on the last trading day of December 2023 is predicted. Specifically, the following steps are included:
[0032] (1) Construction of subsequence data clustering model, including the following sub-steps:
[0033] (1.1) Using the length W The sliding window of the multivariate time series data is split to obtain a multivariate subsequence set X ={ S 1, S 2, …, S n} and the subsequence sets of each dimension X 1={ S 1,1 , S 1,2 , …, S 1,n}, …, X d ={ S d1 , S d2 , …, S dn};
[0034] In the embodiment of the present invention, the sliding window length is W =20, split the stock trading data to obtain the hourly stock subsequence set for 5 consecutive trading days X ={ S 1, S 2, …, S 480} and the subsequence sets of each dimension X 1={ S 1,1 , S 1,2 , …, S 1,480}, …, X 5={ S 5,1 , S5,2 , …, S 5,480}, where 5 refers to the dimension;
[0035] (1.2) The length of each sliding window after interception is W / 3 as the predicted label of the subsequence in the sliding window, that is, { H 1, H 2,…, H n}, construct a multivariate prediction training set P ={( S 1, H 1), ( S 2, H 2), …, ( S n , H n )} and prediction training sets for each dimension P 1={( S 1,1 , H 1,1 ), ( S 1,2 , H 1,2 ), …, ( S 1n , H 1n )}, …, P d ={( S d1 , H d1 ), ( S d2 , H d2 ), …, ( S dn , H dn )};
[0036] In the embodiment of the present invention, due to W / 3 is a decimal, so a single-day hourly stock price sequence with a length of 4 is proposed as the prediction label of the subsequence in the sliding window, that is, { H 1, H 2, …, H 480}, build a stock prediction training set P ={( S 1, H 1), ( S 2, H 2), …, ( S480 , H 480 )} and prediction training sets for each dimension P 1={( S 1,1 , H 1,1 ), ( S 1,2 , H 1,2 ), …, ( S 1,480 , H 1,480 )}, …, P 5={( S 5,1 , H 5,1 ), ( S 5,2 , H 5,2 ), …, ( S 5,480 , H 5,480 )};
[0037] (1.3) Utilization k The mean clustering method is used in the multivariate subsequence set X And the set of subsequences of each dimension X 1~d Clustering is performed on the , and a multivariate subsequence cluster set { C 1, C 2, …, C k} and the set of subsequence clusters of each dimension { C 1,1 , C 1,2 , …, C 1,k}, …, { C d1 , C d2 , …, C dk};
[0038] In the embodiment of the present invention, the subsequence sets of each dimension are X 1~5 , the obtained stock subsequence cluster set is { C 1, C 2,…, C 6}, the set of subsequence clusters in each dimension is { C 1,1 , C 1,2, …, C 1,6}, …, { C 5,1 , C 5,2 , …, C 5,6};
[0039] (2) Construction of subsequence data classification model, including the following sub-steps:
[0040] (2.1) In a multi-subsequence set X The cluster labels of each multivariate subsequence are used as category labels to train the regression tree multivariate classification model. R ;
[0041] In the embodiment of the present invention, that is, in the stock subsequence set X The cluster labels of each stock subsequence are used as category labels to train a regression tree multivariate classification model. R ;
[0042] (2.2) In each dimension subsequence set X 1~d On the above, the dimension subsequence cluster labels are used as category labels to train the regression tree univariate classification model of each dimension { R 1, R 2, …, R d};
[0043] In the embodiment of the present invention, the subsequence sets of each dimension are X 1~5 , the regression tree univariate classification model of each dimension is { R 1, R 2, R 3, R 4, R 5};
[0044] (3) Prediction model construction, which includes the following sub-steps:
[0045] In each multi-subsequence cluster { C 1, C 2, …, C k} and each dimension has a univariate subsequence cluster { C 1,1 , C 1,2 , …, C 1,k}, …, { C d1 , C d2 , …,C dk}, using the multivariate prediction training set P And each dimension prediction training set P 1, …, P d Train the ARIMA time series prediction model for each cluster to obtain a set of multivariate prediction models { F 1, F 2, …, F k} and the univariate prediction model set of each dimension { F 1,1 , F 1,2 , …, F 1,k}, …, { F d1 , F d2 , …, F dk};
[0046] In the embodiment of the present invention, each stock subsequence cluster is { C 1, C 2, …, C 6} and the univariate subsequence clusters of each dimension are { C 1,1 , C 1,2 , …, C 1,6}, …, { C 5,1 , C 5,2 , …, C 5,6}, the prediction training set of each dimension is P 1, …, P 5. The multivariate prediction model set is { F 1, F 2, …, F 6}, the set of univariate prediction models for each dimension is { F 1,1 , F 1,2 , …, F 1,6}, …, { F 5,1 , F 5,2 , …, F 5,6}.
[0047] (4) Prediction and evaluation, which includes the following sub-steps:
[0048] (4.1) For the multivariate time series to be predicted T , using a multivariate classification model R Classify it and get the multi-subsequence cluster to which it belongs C T ;
[0049] In the embodiment of the present invention, for the stock time series to be predicted T =3, using multivariate classification model R Classify it and get the multi-subsequence cluster to which it belongs C 3;
[0050] (4.2) Using clusters C T Prediction model F CT right T Make a prediction and get the length W / 3 d Dimensional prediction sequence Q ;
[0051] In the embodiment of the present invention, cluster C 3 Prediction Model F 3 pairs T Make a prediction and get a 5-dimensional prediction sequence of length 4 Q ;
[0052] (4.3) Using the univariate classification model of each dimension { R 1, R 2, …, R d}right T The corresponding dimensions are classified to obtain the unary subsequence clusters { C 1T , C 2T , …, C dT};
[0053] In the embodiment of the present invention, the univariate classification model of each dimension is { R 1, R 2, R 3, R 4, R 5}, the univariate subsequence clusters to which each dimension belongs are { C 1,3 , C 2,2 , C 3,2 , C 4,1 , C5,3};
[0054] (4.4) respectively using { C 1T , C 2T , …, C dT Prediction model on { F 1T , F 2T , …, F dT}right T We can predict the dimensions of d The length is W / 3 one-dimensional prediction sequence { Oh 1, Oh 2, …, Oh d};
[0055] In the embodiment of the present invention, { C 1,3 , C 2,2 , C 3,2 , C 4,1 , C 5,3 The prediction model on T , and obtain 5 one-dimensional prediction sequences of length 4 { Oh 1, Oh 2, Oh 3, Oh 4, Oh 5};
[0056] (4.5) Calculate the one-element prediction sequence matrix [ Oh 1; Oh 2; …; Oh d ] and the Mahalanobis distance of the multivariate prediction sequence matrix [Q], if it is greater than the threshold e , then repeat steps (1.2) to (4.3), otherwise output the multivariate prediction result Q .
[0057] In the embodiment of the present invention, the unary prediction sequence matrix is [ Oh 1, Oh 2, Oh 3, Oh 4, Oh 5].
[0058] The present invention proposes an adaptive hybrid multivariate time series data prediction method for high-dimensional multivariate time series data. By adaptively modeling various local patterns, the prediction accuracy of multivariate time series can be significantly improved. The present invention is helpful in predicting data patterns in various application fields and has important guiding significance for industrial production and daily life.
[0059] Multivariate time series data also includes fund transaction data, retail market daily sales data, process industry sensor monitoring data, astronomical observation data, aerospace radar, satellite monitoring data or weather temperature and air quality index, etc. The implementation of the corresponding prediction method is similar to the implementation of the above method embodiment, and will not be repeated here.
[0060] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An adaptive hybrid multivariate time series data forecasting method, Features The steps include: (1) Construction of subsequence data clustering model: For the segmented multivariate time series monitoring data of industrial sensors, a multivariate prediction training set of monitoring data and its prediction training sets for each dimension are constructed, and a subsequence cluster set of the corresponding monitoring data is obtained through clustering. The monitoring data includes environmental data detected by the sensor. (2) Construction of subsequence data classification model: using the clusters of monitoring data subsequences as category labels, training multivariate classification models and univariate classification models for each dimension; (3) Prediction model construction: Based on the prediction training set, the time series prediction model of each cluster is trained separately to obtain the multivariate prediction model and the univariate prediction model of each dimension; (4) Prediction and evaluation: for the multivariate time series monitoring data of the industrial sensor to be predicted, the multivariate classification model is used to classify the data, and the multivariate prediction model corresponding to the multivariate subsequence data cluster is used to predict the multivariate time series monitoring data of the industrial sensor to be predicted, so as to obtain the multivariate prediction sequence data of the monitoring data; the univariate classification model of each dimension is used to classify the data of the corresponding dimension of the multivariate time series monitoring data of the industrial sensor to be predicted, and the univariate prediction model of each dimension corresponding to the univariate subsequence data cluster to which each dimension belongs is used to predict each dimension of the multivariate time series monitoring data of the industrial sensor to be predicted, so as to obtain the univariate prediction sequence data of the monitoring data; the univariate prediction sequence data of the monitoring data is compared with the multivariate prediction sequence data, and based on the difference between the two, the step (1) is returned to reconstruct the clustering model, the classification model, the prediction model and the prediction evaluation until the prediction requirements are met, and the multivariate prediction results of the industrial sensor monitoring data are output; the sub-steps are specifically included: (4.1) For the multivariate time series data to be predicted, classify it using the multivariate classification model to obtain the multivariate subsequence data cluster to which it belongs; (4.2) Use the multivariate prediction model corresponding to the multivariate subsequence data cluster to predict the multivariate time series data to be predicted, and obtain the length of W / 3 multivariate prediction sequence data; (4.3) using the univariate classification model of each dimension to classify the data of the corresponding dimension of the multivariate time series data to be predicted, and obtaining the univariate subsequence data clusters belonging to each dimension; (4.4) Using the univariate prediction models of each dimension corresponding to the univariate subsequence data cluster to which each dimension belongs, predict each dimension of the multivariate time series data to be predicted, and obtain univariate prediction sequence data; (4.5) Calculate the Mahalanobis distance between the matrix formed by the univariate prediction sequence data and the matrix formed by the multivariate prediction sequence data. If it is greater than the threshold, repeat step (1) to re-cluster to construct each model and prediction evaluation. Otherwise, output the multivariate prediction result.
2. The adaptive hybrid multivariate time series data prediction method according to claim 1, Features: In the step (1), the multivariate time series data is segmented to obtain a multivariate subsequence data set and a subsequence data set of each dimension. After the multivariate time series data is segmented, a subsequence data is extracted as a prediction label, a multivariate prediction training set and a prediction training set of each dimension are constructed, and clustering is performed on the multivariate prediction training set and the prediction training set of each dimension respectively to obtain a multivariate subsequence data cluster set and a subsequence data cluster set of each dimension.
3. The adaptive hybrid multivariate time series data prediction method according to claim 2, Features: The step (1) comprises the following sub-steps: (1.1) Use sliding windows to split multivariate time series data to obtain multivariate subsequence data sets and subsequence data sets of each dimension; (1.2) A segment of subsequence data after each sliding window is intercepted as the prediction label of the subsequence data within the sliding window. Based on the multivariate subsequence data and its corresponding prediction labels, a multivariate prediction training set and a prediction training set for each dimension are constructed; (1.3) Utilization k The mean clustering method performs clustering on the multivariate subsequence data set and the subsequence data set of each dimension respectively to obtain the multivariate subsequence data cluster set and the subsequence data cluster set of each dimension.
4. The adaptive hybrid multivariate time series data prediction method according to claim 1, Features: In the step (2), the multivariate subsequence data set uses the multivariate subsequence data cluster as the category label to train the multivariate classification model, and the subsequence data set of each dimension uses the subsequence data cluster of each dimension as the category label to train the univariate classification model of each dimension.
5. The adaptive hybrid multivariate time series data prediction method according to claim 4, Features: The step (2) includes the following sub-steps: (2.1) On the multivariate subsequence data set, the regression tree multivariate classification model is trained using the cluster labels of each multivariate subsequence data as the category label; (2.2) On each dimensional subsequence data set, the dimensional subsequence data cluster label is used as the category label to train the regression tree univariate classification model of each dimension.
6. The adaptive hybrid multivariate time series data prediction method according to claim 1, Features: In the step (3), in each multivariate subsequence data cluster and each dimensional univariate subsequence data cluster, the multivariate prediction training set and each dimensional prediction training set are used to train the time series prediction model of each cluster, thereby obtaining a multivariate prediction model set and a univariate prediction model set of each dimension.
