Multi-dimensional time series prediction method and system based on learning of dynamic dependency relationship between variables

By using one-dimensional dilated convolution and dynamic graph structure in multi-dimensional time series data to extract multi-level time series features and learn dynamic dependencies, it solves the problem of difficulty in capturing long-term dependencies in the existing technology and achieves higher accuracy and robustness. Sticky multidimensional time series forecasting.

CN118551189AActive Publication Date: 2024-08-27YUNNAN MINZU UNIV +1

Patent Information

Application Number
CN202411009738.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-08-27
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

Existing technology cannot fully capture the long-term dependencies and complex interactions between variables in multi-dimensional time series data, and the static graph structure cannot truly reflect dynamic dependencies, resulting in deficiencies in model correlation analysis and affecting robustness.

Method used

A method based on one-dimensional dilated convolution and dynamic graph structure is used to extract multi-level temporal features and generate a dynamic adjacency matrix. It learns the dynamic dependencies between variables through dynamic graph convolution layers and attention mechanisms, and dynamically adjusts connection weights to optimize features. express.

Benefits of technology

It significantly improves the feature extraction and dynamic dependency learning capabilities of time series data, improves the accuracy and robustness of multi-dimensional time series prediction, and can maintain good prediction performance in complex situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551189A
    Figure CN118551189A
Patent Text Reader

Abstract

The invention discloses a multi-dimensional time series prediction method and system based on dynamic dependency relationship learning among variables. The method mainly comprises the following steps: S1, dividing original data into a training sample set and a test sample set; s2, performing feature extraction and fusion on the time series data of the sample set in the S1; s3, extracting key information and global information from the information fused in the step S2, and adaptively adjusting the weight; s4, performing information transmission through node embedding of a dynamic graph structure and node feature updating of a dynamic graph convolutional layer; and S5, evaluating the effectiveness of the model. Compared with an existing method, the method has the advantages that internal attributes which change along with time between variables are utilized, meanwhile, multi-level hidden features are effectively utilized, the correlation analysis capacity is improved, and the method can be used in the fields of macroeconomic analysis, environmental monitoring, epidemiological analysis and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data analysis, and in particular to a multidimensional time series prediction method and system based on learning dynamic dependency relationships between variables. Background Art

[0002] With the rapid development of science and technology, a large amount of multidimensional time series data has been generated in various fields. These data are not only large in scale, but also highly complex, and may contain various noises, seasonal changes, trends, and nonlinear relationships. This information can not only help us better understand and explain complex phenomena and relationships, but also be used to predict and optimize the performance of various systems, thereby providing more valuable information for decision-making. Dynamic relational learning is based on the interdependence between variables in actual data. It further mines time series data and can further improve the prediction ability of the model by learning the time-varying nature of variables, thereby providing more in-depth and valuable information for decision-making in different fields.

[0003] At present, the learning methods of dependencies between variables are mainly divided into two categories: one is the convolution-based method, and the other is the graph neural network (GNN)-based method. The convolution-based method is committed to using models such as CNN or RNN to capture local features in the data and short-term dependency patterns between variables, and combines the attention mechanism to focus on features that are more relevant to the predicted value. However, due to the complex and changeable interdependencies between variables in actual data, this convolution-based method may sometimes fail to fully capture long-term dependencies and complex interactions. Therefore, it is very difficult to extract long-term dependency changes of variables in the data, and it is difficult to obtain reliable results. The core idea of ​​the method based on graph neural network (GNN) is to capture the complex relationship between nodes through GNN, model the interdependencies between variables as a graph structure, and use structures such as graph convolutional neural network (GCN) and graph attention network (GAT) to learn node features and global characteristics of the graph. However, in the real world, the correlation between variables will change over time, and the static graph structure cannot truly reflect the dynamic dependencies in the actual complex system. While using convolution kernels to capture local patterns and introducing attention mechanisms to focus on the main features, ignoring the time-varying nature of variables will lead to deficiencies in the model in association analysis, which in turn affects the enhancement of robustness. Summary of the invention

[0004] In view of the shortcomings of the above existing methods, the purpose of the present invention is to propose a multi-dimensional time series prediction method and system based on learning dynamic dependency relationships between variables. The method extracts and utilizes the dynamic relationships between variables and multi-level hidden features of the original data.

[0005] In order to achieve the above object, the technical solution of the present invention is specifically as follows:

[0006] S1. Divide the original data into training sample set, validation sample set and test sample set in a ratio of 6:2:2.

[0007] S2: Extract and fuse features of the time series data of the training sample set in S1. The specific steps are as follows:

[0008] S2.1. Use one-dimensional dilated convolution to transform the training sample set into input features , from the input features Extract information from the convolution operation to generate parallel and different levels of temporal features. The one-dimensional dilated convolution is of size of The specific expression of the group one-dimensional dilated convolution is as follows: ; ; Where: Represents input features Middle variables at time step The hidden state of is the number of layers, is a variable, is the time step, is the time series feature, Indicated by the size The dilated convolution at time step Time to Layer The hidden state of the time series features extracted by variables, For the The convolution dilation rate of the layer, Indicates the size The dilated convolution kernel, Represents input features Middle The variables in The hidden state at the time step, represents any time step in the whole process, Indicates that at time step Hidden state of dilated convolution, Represents the dilated convolution in hidden state.

[0009] S2.2. Because different dimensions can extract different features, the features containing global information are extracted from the two dimensions of variables and time series. Perform global average pooling (GAP) to extract global features and generate weights corresponding to features at different levels , the weight With timing characteristics Multiply and sum to get the multi-level time series feature fusion result , the specific expression is as follows: ; ; ; Where: is a feature containing global information, is the number of layers, For the The weights of the features extracted by the layer dilation convolution, To pass The convolutional layers generated by the group parallel Characteristic description, It is the result of multi-level feature fusion.

[0010] S3: Extract key information and global information from the time series data fused in S2 and dynamically adjust the connection weights to optimize the feature representation of the time series data. The specific steps are as follows: S3.1. In the channel dimension, use a component consisting of a convolutional layer, a ReLU activation layer, and a convolutional layer. The result of fusing multi-level features Convert to , for the transformed features Perform maximum pooling and average pooling operations to generate feature representations of the maximum pooling layer And the feature representation of the average pooling layer Two sets of features; these two sets of features are represented as a compressed single channel and passed Activation function generates temporal attention weights , the specific expression is as follows: ; ; ; ; Where: It is the result of fusing multi-level features. After the convolution component The transformed features, It is a component consisting of a convolutional layer, a ReLU activation layer, and a convolutional layer. It is the result of multi-level feature fusion. is the feature representation of the maximum pooling of the temporal attention part, is the feature representation of the average pooling of the temporal attention part, is the temporal attention weight, Indicates the features after pooling and concatenation in the temporal attention part Perform convolution operation, Represents the features after temporal attention is partially pooled and concatenated.

[0011] S3.2. Transformed features Apply global maximum pooling and global average pooling layers to generate feature representations of the global maximum pooling layer respectively and the feature representation of the global average pooling layer ; Extract key information of variable features in the channel dimension and capture global timing information, using Activation function generates channel attention weights : ; ; ; Where: It is the result of fusing multi-level features. After the convolution component The transformed features, is the feature representation of the maximum pooling of the channel attention part, is the feature representation of the average pooling of the channel attention part, is the channel attention weight, It is a convolution group consisting of a convolution layer, a ReLU activation layer, and a convolution layer in the channel dimension. Represents the features after the channel attention parts are pooled and concatenated.

[0012] S3.3. Temporal attention weights and channel attention weights The transformed features Multiply and combine to get the output : ; Where: Indicates the output, It is a process of multiplication and combination.

[0013] S4. Information is transferred through node embedding of the dynamic graph structure and node feature updating of the dynamic graph convolution layer to further learn important patterns and changes in the data. The specific steps are as follows: S4.1. In the initial state, the embedding matrix is ​​represented as the initial feature of the node, and the similarity score matrix between nodes is calculated ,use Function pair score matrix Normalize and get the adjacency matrix between nodes and the original adjacency matrix in each dynamic graph convolution layer , the specific expression is as follows: ; ; ; ; ; Where: To randomly initialize the feature representation of the first embedding matrix, To randomly initialize the feature representation embedded in the second matrix, To randomly initialize the network parameters of the fully connected layer when embedding the first matrix, The network parameters of the fully connected layer when randomly initializing the embedding second matrix, To randomly initialize the first matrix of embedding, To randomly initialize the second embedding matrix, is the similarity score matrix between nodes, The feature representation of the transposed matrix of the randomly initialized embedding second matrix, To randomly initialize the feature representation of the transposed matrix embedding the first matrix, is the adjacency matrix between nodes, is the embedding dimension of the graph nodes, is the original adjacency matrix in each dynamic graph convolution layer, is the first model parameter to be learned, is the second model parameter that needs to be learned.

[0014] S4.2, at time step , the first node and the second node Adjacency matrix The update method of the elements in is , the specific expression is as follows: ; Where: For the time step The first node and the second node Adjacency matrix How to update the elements in It is an update function used to calculate new adjacency matrix elements based on the historical adjacency matrix and node feature information; Indicates that at time step The first node and the second node Adjacency matrix How to update the elements in and Respectively represent the first node and the second node At time step The feature vector of .

[0015] Since when the variable node or edge changes, the adjacency matrix It needs to be adjusted accordingly to reflect the latest connection status; therefore, at each time step , define a time-dependent convolution kernel , according to the update method of the dynamic adjacency matrix, calculate the Dynamically update the adjacency matrix on , and perform convolution operation to obtain the Dynamically update the adjacency matrix The feature tensor of , the specific expression is as follows: ; Where: Indicates that at time step Dynamically update the adjacency matrix The feature tensor of is a diagonal matrix, is at the time step The adjacency matrix of with self-loops is is the time step The eigenvectors on is a time-dependent convolution kernel.

[0016] S4.3. The feature tensors of all time steps Concatenate on the channel dimension to get a new tensor , pool it and reduce its dimension into a two-dimensional matrix , get the output feature matrix of each dynamic graph convolution layer , information transmission and feature fusion are performed layer by layer to obtain the final result of dynamic relationship learning ; In particular, when the number of dynamic graph convolutional layers is 1, , the result of learning the feature representation and dynamic relationship of each part Features obtained through compression and skip connections , through the output module to feature Mapping to the final prediction result , the specific expression is as follows: ; ; ; ; Where: represents the output feature matrix of each dynamic graph convolutional layer, represents the number of layers of dynamic graph convolution, is the weight matrix, is the feature tensor of all time steps The two-dimensional matrix obtained by splicing on the channel dimension, is the bias vector, is the result of dynamic relationship learning. Indicates the features after pooling and splicing Perform convolution operation, represents the pooled and concatenated features, is the predicted future time step The predicted value at is the predicted future time step, is the weight of the first convolution kernel of the output module, is the weight of the second convolution kernel of the output module, are the features after compression and skip connection.

[0017] S5. Evaluate the effectiveness of the model by calculating the square root error RRSE and the empirical correlation coefficient CORR. The specific steps are as follows: S5.1. The accuracy of the prediction model is measured by calculating the RRSE, which is a measure of the degree of deviation between the predicted value and the actual value: ; Where: Indicates that at the historical time step The actual value of It means predicting the future time step is The predicted value at Represents the mean of the actual values.

[0018] S5.2. The accuracy of the prediction model is measured by calculating the metric CORR that quantifies the correlation between the rolling prediction step sequence and the true value: ; Where: Represents the mean of the predicted values. The value range of CORR is .

[0019] Another object of the present invention is to provide a multi-dimensional time series prediction system based on dynamic dependency relationship learning between variables, which mainly includes: a time series feature fusion module, a dynamic relationship learning module, and an attention mechanism module; the time series feature fusion module fusions the input multi-level time series feature results Perform feature extraction and fusion; the dynamic relationship learning module combines the hierarchical temporal features after feature extraction and fusion into a fusion result. Generate a dedicated dynamic adjacency matrix to learn and model the dynamic dependency relationship between variables; the attention mechanism module is used to analyze the node connections in the dynamic adjacency matrix generated by the dynamic relationship learning unit and their evolution over time, strengthen more important connections between variables through attention scores, focus on key dependencies, and effectively control the flow and integration of information; The time series feature fusion module is used to extract and fuse the input multidimensional time series data; the original data set is divided into a training sample set, a verification sample set and a test sample set in a ratio of 6:2:2, and the input time series data is fused using the time series feature fusion module. Processing, extracting useful information, generating four parallel and different levels of time series features, adaptively adjusting and selecting the weights of multi-level time series features , and obtain the multi-level temporal feature fusion result , effectively capture key patterns and structures in time series data; The dynamic relationship learning module is used to generate a dedicated dynamic adjacency matrix from the extracted time series features, learn and model the dynamic dependency relationship between the variables; by establishing a dynamic relationship learning unit, a dynamic graph structure, calculating the similarity score matrix between nodes, introducing a dynamic graph convolution layer to automatically adjust the weights in the adjacency matrix and capture the complex dynamic relationship between variables in multi-dimensional time series data, further learning the important patterns and changes in the data; The attention mechanism module is used to analyze the node connections in the dynamic adjacency matrix generated by the dynamic relationship learning unit and its evolution over time, strengthen the more important connections between variables through attention scores, focus on key dependencies, and effectively control the flow and integration of information; by establishing an attention mechanism module, the importance of the connection between each node at each time step is evaluated from the two dimensions of time and channel, and the connection weights are dynamically adjusted to optimize the feature representation of time series data.

[0020] Beneficial Effects of the Invention 1. The multidimensional time series prediction method of the present invention significantly improves the ability of time series data feature extraction, dynamic dependency learning and key dependency strengthening through innovative module design and algorithm optimization, and finally achieves a multidimensional time series prediction effect with higher accuracy and stronger robustness. These improvements not only solve many bottleneck problems in the prior art, but also provide a more effective solution for multidimensional time series prediction in practical applications.

[0021] 2. By comprehensively applying multi-level feature fusion, dynamic relationship learning and attention mechanism, the present invention greatly improves the accuracy and robustness of prediction, can maintain good prediction performance in a variety of complex situations, and is suitable for a wider range of application scenarios.

[0022] 3. Most existing technologies perform feature extraction at a single level, which makes it difficult to fully capture the complex patterns and structures in the data. However, the present invention effectively captures more comprehensive and deeper time series feature information through multi-level time series feature extraction and fusion, thereby improving the model's expressiveness and prediction effect.

[0023] 4. Traditional methods usually assume that the relationship between variables is static, ignoring the dynamic changes in the relationship between variables in time series data. The present invention uses a dynamic relationship learning unit to adjust and learn the dynamic dependency relationship between variables in real time, which more accurately reflects the actual situation in the data and improves the prediction performance of the model.

[0024] 5. Compared with ordinary time series prediction methods, the present invention introduces an attention mechanism module, which dynamically adjusts the connection weights between variables, strengthens important dependencies, optimizes the feature representation of time series data, and improves the effect of the model in processing complex time series data. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solution implemented by the present invention, the various modules required in the embodiment description are briefly introduced below. Obviously, the accompanying drawings described below are only flow charts of the present invention. For ordinary technicians in this field, they can also expand based on this accompanying drawing and obtain other accompanying drawings without paying creative labor.

[0026] Figure 1 A schematic diagram of a method for learning dynamic dependency relationships between variables according to the present invention; Figure 2 The experimental results of the simulation content of the present invention on the Solar-Energy data set; Figure 3 The figure shows the experimental results of the simulation content of the present invention on the Electricity dataset. DETAILED DESCRIPTION

[0027] The present invention is further described in detail below in conjunction with specific embodiments, but the protection scope of the present invention is not limited to the described contents.

[0028] Example 1

[0029] like Figure 1 As shown in Figure 1, a multidimensional time series prediction method based on learning dynamic dependencies between variables is shown in Figure 1. The specific steps are as follows: S1. Divide the original data into training sample set, validation sample set and test sample set in a ratio of 6:2:2.

[0030] S2: Extract and fuse features of the time series data of the training sample set in S1. The specific steps are as follows: S2.1. Use one-dimensional dilated convolution to transform the training sample set into input features , from the input features Extract information from the convolution operation to generate parallel and different levels of temporal features. The one-dimensional dilated convolution is of size of The specific expression of the group one-dimensional dilated convolution is as follows: ; ; Where: Represents input features Middle variables at time step The hidden state of is the number of layers, is a variable, is the time step, is the time series feature, Indicated by the size The dilated convolution at time step Time to Layer The hidden state of the time series features extracted by variables, For the The convolution dilation rate of the layer, Indicates the size The dilated convolution kernel, Represents input features Middle The variables in The hidden state at the time step, represents any time step in the whole process, Indicates that at time step Hidden state of dilated convolution, Represents the dilated convolution in hidden state.

[0031] S2.2. Because different dimensions can extract different features, the features containing global information are extracted from the two dimensions of variables and time series. Perform global average pooling (GAP) to extract global features and generate weights corresponding to features at different levels , the weight With timing characteristics Multiply and sum to get the multi-level time series feature fusion result , the specific expression is as follows: ; ; ; Where: is a feature containing global information, is the number of layers, For the The weights of the features extracted by the layer dilation convolution, To pass The convolutional layers generated by the group parallel Characteristic description, It is the result of multi-level feature fusion.

[0032] S3: Extract key information and global information from the time series data fused in S2 and dynamically adjust the connection weights to optimize the feature representation of the time series data. The specific steps are as follows: S3.1. In the channel dimension, use a component consisting of a convolutional layer, a ReLU activation layer, and a convolutional layer. The result of fusing multi-level features Convert to , for the transformed features Perform maximum pooling and average pooling operations to generate feature representations of the maximum pooling layer And the feature representation of the average pooling layer Two sets of features; these two sets of features are represented as a compressed single channel and passed Activation function generates temporal attention weights , the specific expression is as follows: ; ; ; ; Where: It is the result of fusing multi-level features. After the convolution component The transformed features, It is a component consisting of a convolutional layer, a ReLU activation layer, and a convolutional layer. It is the result of multi-level feature fusion. is the feature representation of the maximum pooling of the temporal attention part, is the feature representation of the average pooling of the temporal attention part, is the temporal attention weight, Indicates the features after pooling and concatenation in the temporal attention part Perform convolution operation, Represents the features after temporal attention is partially pooled and concatenated.

[0033] S3.2. Transformed features Apply global maximum pooling and global average pooling layers to generate feature representations of the global maximum pooling layer respectively and the feature representation of the global average pooling layer ; Extract key information of variable features in the channel dimension and capture global timing information, using Activation function generates channel attention weights : ; ; ; Where: It is the result of fusing multi-level features. After the convolution component The transformed features, is the feature representation of the maximum pooling of the channel attention part, is the feature representation of the average pooling of the channel attention part, is the channel attention weight, It is a convolution group consisting of a convolution layer, a ReLU activation layer, and a convolution layer in the channel dimension. Represents the features after the channel attention parts are pooled and concatenated.

[0034] S3.3. Temporal attention weights and channel attention weights The transformed features Multiply and combine to get the output : ; Where: Indicates the output, It is a process of multiplication and combination.

[0035] S4. Information is transferred through node embedding of the dynamic graph structure and node feature updating of the dynamic graph convolution layer to further learn important patterns and changes in the data. The specific steps are as follows: S4.1. In the initial state, the embedding matrix is ​​represented as the initial feature of the node, and the similarity score matrix between nodes is calculated ,use Function pair score matrix Normalize and get the adjacency matrix between nodes and the original adjacency matrix in each dynamic graph convolution layer , the specific expression is as follows: ; ; ; ; ; Where: To randomly initialize the feature representation of the first embedding matrix, To randomly initialize the feature representation embedded in the second matrix, To randomly initialize the network parameters of the fully connected layer when embedding the first matrix, The network parameters of the fully connected layer when randomly initializing the embedding second matrix, To randomly initialize the first matrix of embedding, To randomly initialize the second embedding matrix, is the similarity score matrix between nodes, The feature representation of the transposed matrix of the randomly initialized embedding second matrix, To randomly initialize the feature representation of the transposed matrix embedding the first matrix, is the adjacency matrix between nodes, is the embedding dimension of the graph nodes, is the original adjacency matrix in each dynamic graph convolution layer, is the first model parameter to be learned, is the second model parameter that needs to be learned.

[0036] S4.2, at time step , the first node and the second node Adjacency matrix The update method of the elements in is , the specific expression is as follows: ; Where: For the time step The first node and the second node Adjacency matrix How to update the elements in It is an update function used to calculate new adjacency matrix elements based on the historical adjacency matrix and node feature information; Indicates that at time step The first node and the second node Adjacency matrix How to update the elements in and Respectively represent the first node and the second node At time step The feature vector of .

[0037] Since when the variable node or edge changes, the adjacency matrix It needs to be adjusted accordingly to reflect the latest connection status; therefore, at each time step , define a time-dependent convolution kernel , according to the update method of the dynamic adjacency matrix, calculate the Dynamically update the adjacency matrix on , and perform convolution operation to obtain the Dynamically update the adjacency matrix The feature tensor of , the specific expression is as follows: ; Where: Indicates that at time step Dynamically update the adjacency matrix The feature tensor of is a diagonal matrix, is at the time step The adjacency matrix of with self-loops is is the time step The eigenvectors on is a time-dependent convolution kernel.

[0038] S4.3. The feature tensors of all time steps Concatenate on the channel dimension to get a new tensor , pool it and reduce its dimension into a two-dimensional matrix , get the output feature matrix of each dynamic graph convolution layer , information transmission and feature fusion are performed layer by layer to obtain the final result of dynamic relationship learning ; In particular, when the number of dynamic graph convolutional layers is 1, , the result of learning the feature representation and dynamic relationship of each part Features obtained through compression and skip connections , through the output module to feature Mapping to the final prediction result , the specific expression is as follows: ; ; ; ; Where: represents the output feature matrix of each dynamic graph convolutional layer, represents the number of layers of dynamic graph convolution, is the weight matrix, is the feature tensor of all time steps The two-dimensional matrix obtained by splicing on the channel dimension, is the bias vector, is the result of dynamic relationship learning. Indicates the features after pooling and splicing Perform convolution operation, represents the pooled and concatenated features, is the predicted future time step The predicted value at is the predicted future time step, is the weight of the first convolution kernel of the output module, is the weight of the second convolution kernel of the output module, are the features after compression and skip connection.

[0039] S5. Evaluate the effectiveness of the model by calculating the square root error RRSE and the empirical correlation coefficient CORR. The specific steps are as follows: S5.1. The accuracy of the prediction model is measured by calculating the RRSE, which is a measure of the degree of deviation between the predicted value and the actual value: ; Where: Indicates that at the historical time step The actual value of It means predicting the future time step is The predicted value at represents the mean of the actual values;

[0040] S5.2. The accuracy of the prediction model is measured by calculating the metric CORR that quantifies the correlation between the rolling prediction step sequence and the true value: ; Where: Represents the mean of the predicted values. The value range of CORR is .

[0041] A multi-dimensional time series prediction system based on learning dynamic dependency relationships between variables, mainly including: a time series feature fusion module, a dynamic relationship learning module, and an attention mechanism module; the time series feature fusion module fusions the input multi-level time series feature results Perform feature extraction and fusion; the dynamic relationship learning module combines the hierarchical temporal features after feature extraction and fusion into a fusion result. Generate a dedicated dynamic adjacency matrix to learn and model the dynamic dependency relationship between variables; the attention mechanism module is used to analyze the node connections in the dynamic adjacency matrix generated by the dynamic relationship learning unit and its evolution over time, strengthen more important connections between variables through attention scores, focus on key dependencies, and effectively control the flow and integration of information.

[0042] The time series feature fusion module is used to extract and fuse the input multidimensional time series data; the original data set is divided into a training sample set, a verification sample set and a test sample set in a ratio of 6:2:2, and the input time series data is fused using the time series feature fusion module. Processing, extracting useful information, generating four parallel and different levels of time series features, adaptively adjusting and selecting the weights of multi-level time series features , and obtain the multi-level temporal feature fusion result , effectively capturing key patterns and structures in time series data.

[0043] The dynamic relationship learning module is used to generate a dedicated dynamic adjacency matrix from the extracted time series features, learn and model the dynamic dependency relationship between the variables; by establishing a dynamic relationship learning unit, a dynamic graph structure, calculating the similarity score matrix between nodes, introducing a dynamic graph convolution layer to automatically adjust the weights in the adjacency matrix and capture the complex dynamic relationship between variables in multidimensional time series data, further learning important patterns and changes in the data.

[0044] The attention mechanism module is used to analyze the node connections in the dynamic adjacency matrix generated by the dynamic relationship learning unit and its evolution over time, strengthen the more important connections between variables through attention scores, focus on key dependencies, and effectively control the flow and integration of information; by establishing an attention mechanism module, the importance of the connection between each node at each time step is evaluated from the two dimensions of time and channel, and the connection weights are dynamically adjusted to optimize the feature representation of time series data.

[0045] The effect of the present invention can be further illustrated by the following experiments, which are specifically as follows: The present invention uses Python 3.8 software and PyTorch 15.1 deep learning framework for simulation. Four public real data sets are used in the experiment. Table 1 gives the relevant statistical information of the data sets.

[0046] Table 1 Dataset related statistics

[0047] First, the algorithm of the present invention is used on four data sets. In order to prove the effectiveness of the algorithm, considering the popularity and novelty of the algorithm, four comparative methods, VAR-MLP, LST-Attn, TPA-LSTM, and MTGNN, are selected for comparison. In this experiment, all data sets are divided into training set (60%), validation set (20%), and test set (20%) in a ratio of 6:2:2. The input sequence length is 168, the output sequence length is 1, the selected prediction ranges are 3, 6, 12, and 24, and the learning rate is The Adam (Adaptive Moment Estimation) optimizer is used to optimize the network parameters.

[0048] Secondly, all experimental data sets are trained for 100 iterations, and the square root error and empirical correlation coefficient are calculated according to the formula in step 5. The results are shown in Table 2. The best result is shown in bold, and the second best result is underlined.

[0049] Table 2 Prediction results of different models

[0050] As can be seen from Table 2, the prediction effect of the present invention is better than that of the current popular methods. Among them, from the perspective of CORR index, the present invention is significantly higher than other methods in all data sets; compared with other methods, the present invention has lower RRSE indicators. This shows that the present invention can better extract the changing trend of the variables themselves and the dynamic dependency relationship between variables, so the present method is more effective and more robust than other methods.

[0051] Figure 2 and Figure 3 The experimental results of the multidimensional time series prediction method based on learning dynamic dependencies between variables described in the simulation content of the present invention on two representative data sets: Solar-Energy and Electricity. The Solar-Energy data set records the solar power generation records of 137 photovoltaic power stations in Alabama, USA every 10 minutes in 2006; the Electricity data set records the electricity consumption (kWh) of 321 users in Portugal every 1 / 4 hour from 2012 to 2014. For the convenience of processing, the present invention converts the consumption data every 15 minutes into the consumption data per hour.

[0052] In the figure, DRM represents the method of the present invention, and w / o-DRM is a prediction method without a dynamic relationship learning unit. The prediction ranges are selected as 3, 6, and 12, and 50 cycles are run on each validation set. The required running time and the average value of CORR are recorded every 10 cycles.

[0053] like Figure 2 As shown in the figure, in the Solar-Energy dataset, since the dataset does not contain night readings and the power generation of the power station is mainly related to the weather conditions of the day, the dynamic dependence between the variables is not obvious. In this case, the prediction effect with DRM is not significantly different from that without DRM. Figure 3 As shown in the figure, in the Electricity dataset, the prediction method with DRM performs more significantly under different prediction ranges. As the prediction range increases, the average CORR value of the model at each time span is significantly improved. In addition, the training time of the model is reduced in both datasets, indicating that the invention has better performance and efficiency when dealing with a wider prediction range.

[0054] The present invention realizes the effectiveness of using dynamic relationships between variables for prediction in multidimensional time series. In order to extract and utilize as much hidden information as possible from the data, multi-level feature extraction and adaptive weight adjustment are used to capture key patterns and structures; dynamic graph convolution layers are introduced to capture the complex dynamic relationships between variables, and a gating mechanism is used to selectively combine historical dependency graphs based on the degree of relevance between nodes and the current time step. Figure 2 and Figure 3 The numerical results show the effectiveness of the present invention in incorporating captured dynamic dependencies between variables into the prediction.

[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the essence and scope of the technical solution of the present invention.

Claims

1. A multidimensional time series prediction method based on learning dynamic dependencies between variables, characterized in that: The main steps include: S1, divide the original data into training set, verification sample set and test sample set; S2, extract and fuse features from the time series data of the training sample set in S1; S3, extract key information and global information from the time series data fused in S2 and dynamically adjust the connection weights to optimize the feature representation of the time series data; S4, through the node embedding of the dynamic graph structure and the node feature update of the dynamic graph convolution layer, information is transferred to further learn the important patterns and changes in the data; S5. Evaluate the model validity by calculating the square root error RRSE and the empirical correlation coefficient CORR.

2. The multidimensional time series prediction method based on learning dynamic dependencies between variables according to claim 1 is characterized by: The original data set of S1 is divided into a training sample set, a test sample set, and a validation sample set in a ratio of 6:2:

2.

3. The multidimensional time series prediction method based on learning dynamic dependency relationships between variables according to claim 1 is characterized in that: The specific steps of S2 are as follows: S2.

1. Use one-dimensional dilated convolution to transform the training sample set into input features , from the input features Extract information from the , and generate parallel and different levels of time series features. The specific expression is as follows: ; ; Where: Represents input features Middle variables at time step The hidden state of is the number of layers, is a variable, is the time step, is the time series feature, Indicated by the size The dilated convolution at time step Time to Layer The hidden state of the time series features extracted by variables, For the The convolution dilation rate of the layer, Indicates the size The dilated convolution kernel, Represents input features Middle The variables in The hidden state at the time step, represents any time step in the whole process, Indicates that at time step Hidden state of dilated convolution, Represents the dilated convolution in The hidden state of S2.

2. Features containing global information from two dimensions: variables and time series Perform global average pooling to extract global features and generate weights corresponding to features at different levels , the weight With timing characteristics Multiply and sum to get the multi-level time series feature fusion result , the specific expression is as follows: ; ; ; Where: is a feature containing global information, is the number of layers, For the The weights of the features extracted by the layer dilation convolution, To pass The convolutional layers generated by the group parallel Characteristic description, It is the result of multi-level feature fusion.

4. The multidimensional time series prediction method based on learning dynamic dependency relationships between variables according to claim 1, characterized in that: The specific steps of S3 are as follows: S3.

1. Using components consisting of convolutional layers, ReLU activation layers, and convolutional layers The result of fusing multi-level features Convert to , for the transformed features Perform maximum pooling and average pooling operations to generate feature representations of the maximum pooling layer And the feature representation of the average pooling layer Two sets of features; these two sets of features are represented as a compressed single channel and passed Activation function generates temporal attention weights , the specific expression is as follows: ; ; ; ; Where: It is the result of fusing multi-level features. After the convolution component The transformed features, It is a component consisting of a convolutional layer, a ReLU activation layer, and a convolutional layer. It is the result of multi-level feature fusion. is the feature representation of the maximum pooling of the temporal attention part, is the feature representation of the average pooling of the temporal attention part, is the temporal attention weight, Indicates the features after pooling and concatenation in the temporal attention part Perform convolution operation, Represents the features after temporal attention is partially pooled and concatenated; S3.

2. Transformed features Apply global maximum pooling and global average pooling layers to generate feature representations of the global maximum pooling layer respectively and the feature representation of the global average pooling layer ; Extract key information of variable features in the channel dimension and capture global timing information, using Activation function generates channel attention weights : ; ; ; Where: It is the result of fusing multi-level features. After the convolution component The transformed features, is the feature representation of the maximum pooling of the channel attention part, is the feature representation of the average pooling of the channel attention part, is the channel attention weight, It is a convolution group consisting of a convolution layer, a ReLU activation layer, and a convolution layer in the channel dimension. Represents the features after the channel attention parts are pooled and concatenated; S3.

3. Temporal attention weights and channel attention weights The transformed features Multiply and combine to get the output : ; Where: Indicates the output, It is a process of multiplication and combination.

5. The multidimensional time series prediction method based on learning dynamic dependency relationships between variables according to claim 1, characterized in that: The specific steps of S4 are as follows: S4.

1. In the initial state, the embedding matrix is ​​represented as the initial feature of the node, and the similarity score matrix between nodes is calculated ,use Function pair score matrix Normalize and get the adjacency matrix between nodes and the original adjacency matrix in each dynamic graph convolution layer , the specific expression is as follows: ; ; ; ; ; Where: To randomly initialize the feature representation of the first embedding matrix, To randomly initialize the feature representation embedded in the second matrix, To randomly initialize the network parameters of the fully connected layer when embedding the first matrix, The network parameters of the fully connected layer when randomly initializing the embedding second matrix, To randomly initialize the first matrix of embedding, To randomly initialize the second embedding matrix, is the similarity score matrix between nodes, The feature representation of the transposed matrix of the randomly initialized embedding second matrix, To randomly initialize the feature representation of the transposed matrix embedding the first matrix, is the adjacency matrix between nodes, is the embedding dimension of the graph nodes, is the original adjacency matrix in each dynamic graph convolution layer, is the first model parameter to be learned, is the second model parameter that needs to be learned; S4.2, at time step , the first node and the second node Adjacency matrix The update method of the elements in is , the specific expression is as follows: ; Where: For the time step The first node and the second node Adjacency matrix How to update the elements in It is an update function used to calculate new adjacency matrix elements based on the historical adjacency matrix and node feature information; Indicates that at time step The first node and the second node Adjacency matrix How to update the elements in and Respectively represent the first node and the second node At time step The eigenvector of Since when the variable node or edge changes, the adjacency matrix It needs to be adjusted accordingly to reflect the latest connection status; therefore, at each time step , define a time-dependent convolution kernel , according to the update method of the dynamic adjacency matrix, calculate the Dynamically update the adjacency matrix on , and perform convolution operation to obtain the Dynamically update the adjacency matrix The feature tensor of , the specific expression is as follows: ; Where: Indicates that at time step Dynamically update the adjacency matrix The feature tensor of is a diagonal matrix, is at the time step The adjacency matrix of with self-loops is is the time step The eigenvectors on is a time-dependent convolution kernel; S4.

3. The feature tensors of all time steps Concatenate on the channel dimension to get a new tensor , pool it and reduce its dimension into a two-dimensional matrix , get the output feature matrix of each dynamic graph convolution layer , information transmission and feature fusion are performed layer by layer to obtain the final result of dynamic relationship learning ; In particular, when the number of dynamic graph convolutional layers is 1, , the result of learning the feature representation and dynamic relationship of each part Features obtained through compression and skip connections , through the output module to feature Mapping to the final prediction result , the specific expression is as follows: ; ; ; ; Where: represents the output feature matrix of each dynamic graph convolutional layer, represents the number of layers of dynamic graph convolution, is the weight matrix, is the feature tensor of all time steps The two-dimensional matrix obtained by splicing on the channel dimension, is the bias vector, is the result of dynamic relationship learning. Indicates the features after pooling and splicing Perform convolution operation, represents the pooled and concatenated features, is the predicted future time step The predicted value at is the predicted future time step, is the weight of the first convolution kernel of the output module, is the weight of the second convolution kernel of the output module, are the features after compression and skip connection.

6. The multidimensional time series prediction method based on learning dynamic dependency relationships between variables according to claim 1, characterized in that: The specific steps of S5 are as follows: S5.

1. The accuracy of the prediction model is measured by calculating the RRSE, which is a measure of the degree of deviation between the predicted value and the actual value: ; Where: Indicates that at the historical time step The actual value of It means predicting the future time step is The predicted value at represents the mean of the actual values; S5.

2. The accuracy of the prediction model is measured by calculating the metric CORR that quantifies the correlation between the rolling prediction step sequence and the true value: ; Where: Represents the mean of the predicted values. The value range of CORR is .

7. A multidimensional time series prediction system based on learning dynamic dependencies between variables, characterized by: Mainly include: Time series feature fusion module, dynamic relationship learning module, attention mechanism module; The temporal feature fusion module integrates the input multi-level temporal feature results Perform feature extraction and fusion; The dynamic relationship learning unit extracts and fuses the hierarchical temporal features. Generate a dedicated dynamic adjacency matrix to learn and model the dynamic dependencies between variables; The attention mechanism module is used to analyze the node connections in the dynamic adjacency matrix generated by the dynamic relationship learning module and their evolution over time.

Citation Information

Patent Citations

  • Multi-dimensional time sequence prediction method based on self-attention mechanism and graph convolutional network

    CN114818515A

  • Attention and multivariate graph convolution fusion space-time traffic speed prediction method and system

    CN116504075A

  • Traffic prediction method and system based on adaptive hypergraph

    CN116739170A

  • Traffic flow prediction method and system based on time-space synchronization dynamic graph attention network

    CN117671952A

  • Multivariable time sequence prediction method and system based on wavelet denoising and multi-scale feature extraction

    CN117909384A

Cited By

  • Integrated management method and system for computing power platform resources

    CN118760533A

  • Lithium battery state intelligent estimation method suitable for light storage charge and discharge detection wide temperature range scene

    CN118795373A

  • Battery pack health state prediction method and device

    CN120122018A

  • Battery Pack State of Health Prediction Method and Device

    CN120122018B

  • Trout scene traffic prediction method and device, equipment, storage medium and program product

    CN120181337A