Multivariable time sequence prediction method and device based on spatio-temporal feature fusion
By employing a multivariate time series prediction method that integrates spatiotemporal features, and utilizing bimodal temporal attention and learnable Fourier transform branches, this method addresses the shortcomings of existing technologies in providing a unified framework for long-range dependence, local patterns, dynamic graph structures, and frequency domain features, thereby improving the accuracy and robustness of traffic flow prediction.
Patent Information
- Application Number
- CN202511445257.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-10-11
AI Technical Summary
Existing technologies have not yet formed a unified framework that can take into account long-range dependence, local patterns, dynamic graph structures and frequency domain features, which makes it difficult to improve the accuracy and robustness of multivariate traffic spatiotemporal sequence prediction.
By employing a multivariate time series prediction method based on spatiotemporal feature fusion, this method utilizes bimodal temporal attention to capture global long-range dependencies and local short-range patterns. It combines trainable node embedding and multi-head graph attention to generate an adaptive adjacency matrix, introduces a learnable Fourier transform branch, performs adaptive weighted fusion of time-domain and frequency-domain features, and introduces residual connections and layer normalization after each sub-module to improve the model's sensitivity to sudden traffic congestion and trend changes.
It significantly improves the sensitivity to sudden traffic congestion and trend changes, enhances the model's ability to express multi-periodic and high-order fluctuations, alleviates overfitting and gradient vanishing problems, and improves the accuracy and robustness of predictions.
Smart Images

Figure CN120910514A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of deep learning and time series analysis, and particularly relates to a multivariate time series prediction method and device based on spatiotemporal feature fusion. BACKGROUND
[0002] Multivariate time series prediction is a classic machine learning task, which is to reveal the internal correlation between variables by using historical observation data and to predict the future evolution trend. Compared with univariate prediction, multivariate prediction needs to consider the interaction between channels and the coexistence of short-term fluctuations and long-term trends, which makes the model face higher complexity in topology structure and time dependence modeling. Taking urban traffic monitoring as an example, the multivariate time series signals such as traffic flow, speed, signal phase at different intersections are often accompanied by peak congestion, accident outbreak and holiday travel mode change. The noise, short-term fluctuations and long-term trends are intertwined with each other. It is difficult to capture the global traffic flow trend by simply relying on linear statistical models or shallow networks, which seriously restricts the accuracy and robustness of long-range prediction. In order to cope with these challenges, it is necessary to build a unified framework that can dynamically depict the dependence between nodes in the road network and balance the long-term and short-term features.
[0003] Traditional prediction methods such as autoregressive integrated moving average model (ARIMA), vector autoregressive model (VAR) and other statistical models have certain effect on stationary sequences, but they lack effective modeling ability for non-stationary, seasonal and complex dependence between multivariate; the recurrent neural network (RNN) and its variants (LSTM, GRU) based on deep learning can capture nonlinear time series patterns to some extent, and are good at modeling short-term dependence, but they will have problems of gradient disappearance or excessive smoothing when encountering long-range dependence; at the same time, the RNN structure is difficult to parallelize, and the traffic data is large and real-time requirement is high, which limits the efficiency of industrial deployment; in recent years, convolutional neural network (CNN) and time convolution network (TCN) have been introduced into the field of time series prediction, which improves the parallelism and stability through parallelizable convolution operation, but its fixed receptive field still cannot cover short-term mutations and long-term trends at the same time. The Transformer-based method is good at modeling long-range dependence, but it pays little attention to the dynamic topology structure between nodes and local short-range patterns. At the same time, pure time domain models cannot fully utilize the periodic information in the frequency domain of the data, and graph neural network (GNN) has advantages in capturing the relationship between nodes, but it is weak in modeling global dependence and local patterns. The existing technology has not formed a unified framework that can consider long-range dependence, local patterns, dynamic graph structure and frequency domain features, which makes it difficult to further improve the accuracy and robustness of multivariate traffic spatiotemporal sequence prediction. SUMMARY
[0004] In order to overcome the problems in the prior art, the present application proposes a multivariate time series prediction method and device based on spatio-temporal feature fusion.
[0005] The technical solution of the present application to solve the above technical problems is as follows: In a first aspect, the present application provides a multivariate time series prediction method based on spatio-temporal feature fusion, comprising the following steps: Step 100: Obtain multivariate traffic time series data, normalize and standardize the traffic time series data, and obtain normalized traffic time series data; Step 200: Divide the normalized traffic time series data into overlapping patches according to a sliding window, and generate patch embedding sequences through linear mapping; Step 300: Apply bimodal temporal attention to the patch embedding sequences to capture the temporal patterns in the traffic time series data, and obtain fused attention features; Step 400: Based on the learnable node embedding matrix, generate a time-varying adjacency matrix through dynamic graph construction, and perform graph convolution on the fused attention features to obtain a time-domain graph propagation result; perform a fast Fourier transform on the time-domain graph propagation result, multiply it by a learnable scaling factor, and then inverse transform it to obtain an inverse transformed time-frequency result; add the time-domain graph propagation result and the inverse transformed time-frequency result, and output through a multi-layer perception fusion; Step 500: Alternately execute steps 300-400, and add layer normalization after each output to obtain the final spatio-temporal features; Step 600: Flatten the final spatio-temporal features, and generate prediction values of each variable within a future prediction window through a linear prediction head.
[0006] Further, in step 100, the traffic time series data is normalized and standardized to obtain normalized traffic time series data, comprising: For each sample and each variable in the traffic time series data, calculate the mean and standard deviation in the time dimension respectively; Standardize the traffic time series data using the mean and standard deviation to obtain the normalized traffic time series data.
[0007] Further, in step 200, the normalized traffic time series data is divided into overlapping patches according to a sliding window, comprising: The patch length is , and the sliding window is , the normalized traffic time series data is cut along the sliding step in the time dimension to obtain wherein T represents the length of the original traffic time series data.
[0008] Further, in step 300, a bimodal temporal attention is applied to the patch embedding sequence to capture temporal patterns in the traffic time series data, to obtain fused attention features, including: The patch embedding sequence is projected into query, key, and value through three groups of trainable linear transformations respectively; Based on the query and the key, a dot product score matrix is calculated; based on the score matrix, a global attention weight is calculated, and based on the attention weight and the value, an output of a global pattern branch is calculated; A sliding local mask is constructed, and after applying a local mask to the same score matrix, a local attention weight is calculated; based on the local attention weight and the value, an output of a local pattern branch is calculated; The output of the global pattern branch and the output of the local pattern branch are added element by element to obtain the fused attention features.
[0009] Further, in step 400, a time-varying adjacency matrix is generated by dynamic graph construction based on the learnable node embedding matrix, including: Two learnable node embedding matrices are constructed; a similarity matrix between the two learnable node embedding matrices is calculated , and a Sigmoid function is applied element by element to normalize to obtain a time-varying adaptive adjacency matrix : ; wherein represents the Sigmoid function.
[0010] Further, in step 400, graph convolution is performed on the fused attention features to obtain a time-domain graph propagation result, including: The fused attention features are reorganized into initial node features , and the initial nodes are split into , according to the node dimension Based on the graph depth, the graph propagation is performed in turn ; In the above formula, represents the time-domain graph propagation result of the layer; represents the adjacent node index; represents the time-varying adaptive adjacency matrix; represents the feature representation of the node in the layer; B represents the number of samples; N represents the number of variables.
[0011] Further, in step 500, steps 300-400 are executed alternately, and a normalization layer is added after each output to obtain the final spatiotemporal features, including: Based on the fused attention features obtained in step 300 and the multilayer perceptron fusion output obtained in step 400, residual fusion and normalization are performed to obtain the final spatiotemporal features.
[0012] Further, in step 600, the final spatiotemporal features are flattened, and predicted values for each variable within a future prediction window are generated using a linear prediction head, including: The final encoded output is sorted by time dimension. L Flattened F The flattened features are input into a trainable fully connected layer to obtain the prediction vector for each node. : ; In the above formula, To predict the length of the time window; This represents the weight matrix of a trainable fully connected layer; This represents the bias term of the fully connected layer; Will Remodeling To match the original input dimension order; using the mean and standard deviation cached in step 100, for Each sample and variable undergoes denormalization to restore its original dimensions, completing the final prediction output for the multivariate time series.
[0013] Secondly, a multivariate time series prediction device based on spatiotemporal feature fusion is provided, comprising: The instance normalization module is used to acquire multivariate traffic time series data, and to perform normalization and standardization processing on the traffic time series data to obtain normalized traffic time series data. The patch embedding module is used to divide the normalized traffic time series data into overlapping patches according to the sliding window, and generate patch embedding sequences through linear mapping. A bimodal temporal attention module is used to apply bimodal temporal attention to the patch embedding sequence to capture temporal patterns in traffic time series data and obtain fused attention features; The adjacency building module is used to generate a time-varying adjacency matrix by constructing a dynamic graph based on a learnable node embedding matrix. The graph convolution propagation module is used to perform graph convolution on the fused attention features to obtain the temporal graph propagation result; A frequency domain enhancement module is configured to perform a fast Fourier transform on the time domain graph propagation result, multiply by a learnable scaling factor, and then perform an inverse transform to obtain an inverse transform time-frequency result; A multi-order fusion module is configured to add the time domain graph propagation result and the inverse transform time-frequency result, and output a fusion result through a multi-layer perception. A residual normalization module is configured to perform residual fusion and normalization on the fusion result output by the multi-layer perception to obtain a final spatio-temporal feature. A prediction head module is configured to flatten the final spatio-temporal feature, and generate prediction values of each variable in a future prediction window through a linear prediction head.
[0014] Compared with the prior art, the present application has the following technical effects: The present application can simultaneously capture global long-range dependencies and local short-range patterns through the dual-modal time attention, without switching the model between different scales, thereby significantly improving the sensitivity to sudden traffic jams and trend changes. The use of trainable node embedding and multi-head graph attention can generate an adaptive adjacency matrix online, which can adjust the weights between nodes according to the changes in traffic state, and effectively reflect the dynamic correlation between real-time road segments. The use of a learnable Fourier transform branch based on graph convolution propagation can realize adaptive weighted fusion of time domain and frequency domain features, enhance the expression ability of the model for multi-periodicity, first-order and high-order fluctuations, and is particularly suitable for traffic data containing daily and weekly cycles. Residual connections and layer normalization are introduced after each sub-module, and Dropout is applied before and after graph convolution, thereby improving the stability of gradient flow, and effectively alleviating the problems of overfitting and gradient vanishing. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings needed in the description of the embodiments or the prior art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0016] Figure 1 A flowchart of the multi-variable time series prediction method based on spatio-temporal feature fusion of the present application; Figure 2 A fitting graph of prediction results for a traffic data set; Figure 3 A structural schematic diagram of the multi-variable time series prediction device based on spatio-temporal feature fusion of the present application. DETAILED DESCRIPTION
[0017] In order to further illustrate the technical means and effects taken by the present application to achieve the predetermined inventive objectives, the specific implementation, structure, features and effects of the technical solutions according to the present application are described in detail below in combination with the drawings and preferred embodiments. The specific features, structures or characteristics in one or more embodiments can be combined in any suitable form. Unless otherwise defined, all technical and scientific terms used in the present application have the same meaning as understood by those skilled in the art to which the present application belongs.
[0018] In one embodiment of the present application, referring to Figures 1-2 , a multivariate time series prediction method based on spatio-temporal feature fusion is provided, which comprises: Step 100: obtaining multivariate traffic time series data, normalizing and standardizing the traffic time series data to obtain normalized traffic time series data; Step 200: dividing the normalized traffic time series data into overlapping patches according to a sliding window, and generating patch embedding sequences through linear mapping; Step 300: applying bimodal temporal attention to the patch embedding sequences to capture the temporal patterns in the traffic time series data, and obtaining fused attention features; Step 400: generating a time-varying adjacency matrix through dynamic graph construction based on a learnable node embedding matrix, and performing graph convolution on the fused attention features to obtain a time-domain graph propagation result, performing a fast Fourier transform on the time-domain graph propagation result, multiplying it by a learnable scaling factor and then inverse transforming it to obtain an inverse transformed time-frequency result; adding the time-domain graph propagation result and the inverse transformed time-frequency result, and fusing them through a multi-layer perception; Step 500: alternately executing steps 300-400 in a hierarchical encoder and adding layer normalization after each output to obtain final spatio-temporal features; Step 600: flattening the final spatio-temporal features and generating prediction values of each variable within a future prediction window through a linear prediction head.
[0019] The above steps are described in detail as follows: Step 100: obtaining multivariate traffic time series data, normalizing and standardizing the traffic time series data to obtain normalized traffic time series data.
[0020] In the present application, one specific implementation of step 100 can be: Step 101: calculating the mean and standard deviation b of each sample n and each variable in the traffic time series data in the time dimension respectively. , to capture the local statistical properties of each instance; where B denotes the batch size, M denotes the number of independent time series instances in the data; N denotes the number of variables, T denotes the length of the original traffic time series data; R denotes the real number field.
[0021] Step 102: Standardize the original traffic time series data using the mean and standard deviation to obtain normalized traffic time series data .
[0022] The normalized traffic time series data is used as input for subsequent feature extraction or model modeling to improve numerical stability in the training process and reduce scale differences and non-stationarity in traffic flow data; the mean and standard deviation of each sample are saved for the inverse standardization operation of the model output result to achieve reversibility.
[0023] Step 200: Divide the normalized traffic time series data into overlapping patches with a sliding window of length P , and generate patch embedding sequences through linear mapping.
[0024] In the present application, a specific implementation of step 200 can be: Step 201: Divide the normalized traffic time series data P into overlapping patches with a sliding window of length and sliding step , and cut out overlapping patches in the time dimension of the traffic time series data , each patch size is , wherein the patch length is used to control the number of time steps covered by each window, and the sliding step is used to control the degree of overlap between patches. Step 202: Flatten each patch along the time dimension to obtain a tensor with shape , and then pass it through a trainable linear mapping layer: Linear: ; Project each patch of length into a patch embedding with dimension , and then reshape all patch embeddings by batch and variable dimension to shape to be sent to the subsequent bimodal temporal attention mechanism for parallel computation. Wherein the model hidden dimension is consistent with the input and output dimensions of the subsequent attention layer.
[0025] Step 300: applying a dual-modal temporal attention to the patch embedding sequence to capture temporal patterns in the traffic time series data, to obtain fused attention features; Wherein, the dual-modal temporal attention includes a global pattern branch and a local pattern branch, the global pattern branch is used for capturing global long-range dependencies, and the local pattern branch captures short-range local patterns in a window with a size of w, and then the output of the global pattern branch and the output of the local pattern branch are added element by element to obtain fused attention features.
[0026] In the application, a specific implementation manner of step 300 can be: Step 301: projecting the patch embedding sequence into query Q, key K and value V through three groups of trainable linear transformations respectively: ; ; ; And reshape into , Wherein, is a trainable linear transformation weight matrix, which is used for generating query (Q), key (K) and value (V) respectively, is the dimension of a single attention head, is the number of attention heads.
[0027] Step 302: the global pattern branch is used for capturing global long-range dependencies, and the output of the global pattern branch is obtained.
[0028] Based on the query Q and the key K, the dot product score matrix is calculated : ; Based on the score matrix, the global attention weight is calculated according to the "scaled dot product" formula : ; Based on the attention weight and the value V, the output of the global pattern branch is calculated : .
[0029] Step 303: the local pattern branch captures short-range local patterns in a window with a size of w, and the output of the local pattern branch is obtained.
[0030] The sliding local mask with a window size of w is constructed , wherein each query position i is connected only with the keys within ; to the same score matrix applying a local mask then, the local attention weight is calculated : ; based on the local attention weight and the value V, the output of the local mode branch is calculated : .
[0031] Step 304: Element-wise add the output of the global mode branch and the output of the local mode branch to obtain the fused attention feature.
[0032] The output of the global mode branch is element-wise added with the output of the local mode branch in the same dimension, and the final time sequence attention feature is output through Dropout.
[0033] Step 400: Based on the learnable node embedding matrix, a time-varying adjacency matrix is generated through dynamic graph construction, and graph convolution is performed on the fused attention feature to obtain a time-domain graph propagation result. The time-domain graph propagation result is subjected to fast Fourier transform, multiplied by a learnable scaling factor and then inverse transformed to obtain an inverse transformed time-frequency result. The time-domain graph propagation result is added to the inverse transformed time-frequency result, and is fused through a multi-layer perception.
[0034] In the present application, one specific implementation of step 400 can be: Step 401: Based on the learnable node embedding matrix, a time-varying adjacency matrix is generated through dynamic graph construction.
[0035] Let the learnable node embedding matrix be: ; In the above formula, denotes the node embedding dimension; The similarity matrix between the two learnable node embedding matrices is calculated , and the Sigmoid function is applied element by element to normalize to obtain the time-varying adaptive adjacency matrix : ; wherein, denotes the Sigmoid function.
[0036] Step 402: Perform graph convolution on the fused attention feature to obtain a time-domain graph propagation result.
[0037] The fused attention feature is reorganized into the initial node feature and split it along the node dimension as , ; for graph depth G, sequentially perform times graph propagation: ; In the above formula, denotes the time-domain graph propagation result at the layer; denotes the adjacent node index; denotes the time-varying adaptive adjacency matrix; denotes the feature representation of the node in the layer.
[0038] Step 403: Perform fast Fourier transform on the time-domain graph propagation result, multiply by a learnable scaling factor, and then inverse transform to obtain enhanced time-frequency features; perform inverse Fourier transform on the enhanced frequency domain coefficients to obtain enhanced time-frequency results.
[0039] For each time-domain graph propagation output , perform Fourier transform (FFT) along the time dimension, and multiply the obtained frequency domain coefficients by a learnable scalar to obtain enhanced frequency domain coefficients: , ; In the above formula, denotes the enhanced frequency domain coefficients; denotes the frequency domain coefficients; denotes the learnable scalar.
[0040] Perform inverse FFT (IFFT) on the enhanced frequency domain coefficients to obtain enhanced time-frequency results: ; In the above formula, denotes the enhanced time-frequency results.
[0041] Step 404: Add the time-domain graph propagation result and the inverse-transformed time-frequency result, and fuse through a multi-layer perception.
[0042] Collect all time-domain graph propagation results and enhanced time-frequency results , concatenate these features along the last dimension to obtain concatenated features : ; Fuse the concatenated features through a multi-layer perception (MLP) : ; Reshape back to and passed to step 500.
[0043] Step 500: Alternately execute steps 300-400 in the hierarchical encoder, and add layer normalization after each output.
[0044] In the present application, one specific implementation of step 500 can be: Step 501: For each layer, sequentially execute the following sub-steps: Encoding layer, sequentially execute the following sub-steps: Temporal attention calculation: Let the current layer input be , call the dual-modal temporal attention in step 300 to get the fused attention feature ; Graph convolution and frequency domain fusion: reshape the fused attention feature and divide it into according to the nodes; call the module in step 400 to calculate the multi-order propagation and frequency domain enhancement for each node, and finally get .
[0045] Step 502: Residual fusion and normalization to get the final spatio-temporal feature: ; Wherein, is the patch embedding sequence output by step 200, and LayerNorm performs normalization on the last dimension.
[0046] The above steps are repeated for L layers to get the final spatio-temporal feature , which is the input of step 600.
[0047] Step 600: Flatten the final spatio-temporal feature and generate the predicted value of each variable in the future prediction window through the linear prediction head.
[0048] In the present application, one specific implementation of step 600 can be: Step 601: Flatten the final encoding output according to the time dimension L to F , and input the flattened feature into a trainable fully connected layer to get the prediction vector of each node: ; In the above formula, is the prediction time window length; represents the weight matrix of the trainable fully connected layer; represents the bias term of the fully connected layer.
[0049] Step 602: Reshape to with the mean and standard deviation cached in step 100, the dimension order of the original input is matched; and inverse normalization is performed on each sample and variable to restore to the original dimension, and the final prediction output of the multivariate time series is completed.
[0050] Based on the same inventive concept, the embodiments of the present application also provide a kind of based on space-time feature fusion Multivariate Time Series Prediction Transposition for realizing the Multivariate Time Series Prediction based on space-time feature fusion involved above. The implementation scheme for solving problem provided by the device is similar to the implementation scheme described in the above method, so the specific definition in one or more device embodiments provided below can be referred to the definition of Multivariate Time Series Prediction based on space-time feature fusion in the above, which will not be repeated here.
[0051] In one embodiment, referring to Figure 3 , a Multivariate Time Series Prediction based on space-time feature fusion device is provided, comprising: an instance normalization module, configured to obtain multivariate traffic time series data, and perform normalization and standardization processing on the traffic time series data to obtain normalized traffic time series data; a patch embedding module, configured to divide the normalized traffic time series data into overlapping patches according to a sliding window, and generate patch embedding sequences through linear mapping; a dual-modal time attention module, configured to apply dual-modal time attention to the patch embedding sequences to capture time patterns in the traffic time series data, and obtain fused attention features; an adjacency construction module, configured to generate a time-varying adjacency matrix based on a learnable node embedding matrix through dynamic graph construction; a graph convolution propagation module, configured to perform graph convolution on the fused attention features to obtain time-domain graph propagation results; a frequency domain enhancement module, configured to perform fast Fourier transform on the time-domain graph propagation results, multiply by a learnable scaling factor, and then inverse transform to obtain inverse transform time-frequency results; a multi-order fusion module, configured to add the time-domain graph propagation results and the inverse transform time-frequency results, and output through a multi-layer perception fusion; a residual normalization module, configured to perform residual fusion and normalization on the fused attention features after multi-layer perception fusion output to obtain final space-time features; a prediction head module, configured to flatten the final space-time features, and generate prediction values of each variable in a future prediction window through a linear prediction head.
[0052] The above examples are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalent features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A multivariate time series prediction method based on spatiotemporal feature fusion, characterized in that, The method comprises the following steps: Step 100: obtaining multivariate traffic time series data, normalizing and standardizing the traffic time series data to obtain normalized traffic time series data; Step 200: dividing the normalized traffic time series data into overlapping patches according to a sliding window, and generating patch embedding sequences through linear mapping; Step 300: applying bimodal time attention to the patch embedding sequences to capture time patterns in the traffic time series data to obtain fused attention features; Step 400: generating a time-varying adjacency matrix through dynamic graph construction based on a learnable node embedding matrix, and performing graph convolution on the fused attention features to obtain a time-domain graph propagation result; performing fast Fourier transform on the time-domain graph propagation result, multiplying by a learnable scaling factor, and then inverse transforming to obtain an inverse transformed time-frequency result; adding the time-domain graph propagation result and the inverse transformed time-frequency result, and outputting through a multi-layer perception fusion; Step 500: alternately performing steps 300-400 and adding layer normalization after each output to obtain final spatio-temporal features; Step 600: flattening the final spatio-temporal features and generating prediction values of each variable within a future prediction window through a linear prediction head. 2.The method of claim 1, wherein, In step 100, the traffic time series data is normalized and standardized to obtain normalized traffic time series data, which comprises: Calculating the mean and standard deviation of each sample and each variable in the traffic time series data in the time dimension respectively; Standardizing the traffic time series data using the mean and standard deviation to obtain normalized traffic time series data. 3.The method of claim 1, wherein, In step 200, the normalized traffic time series data is divided into overlapping patches according to a sliding window, which comprises: a sliding window with patch length P and sliding step , the normalized traffic time series data is sequentially divided into overlapping patches along the time dimension with sliding step , where T represents the length of the original traffic time series data.
4. The multivariate time series prediction method based on spatiotemporal feature fusion according to claim 1, characterized in that, In step 300, the bimodal time attention is applied to the patch embedding sequences to capture the time patterns in the traffic time series data to obtain the fused attention features, which comprises: Projecting the patch embedding sequences into queries, keys and values through three groups of trainable linear transformations respectively; Based on the queries and keys, a dot product score matrix is calculated; based on the score matrix, global attention weights are calculated, and based on the attention weights and values, the output of the global mode branch is calculated; Constructing a sliding local mask, calculating the local attention weights after applying the local mask to the same score matrix; based on the local attention weights and values, the output of the local mode branch is calculated; Adding the outputs of the global mode branch and the local mode branch element by element to obtain the fused attention features.
5. The multivariate time series prediction method based on spatiotemporal feature fusion according to claim 1, characterized in that, In step 400, the time-varying adjacency matrix is generated through dynamic graph construction based on the learnable node embedding matrix, which comprises: constructing two learnable node embedding matrices; computing a similarity matrix between the two learnable node embedding matrices and element-wise applying a sigmoid function for normalization, resulting in a time-varying adaptive adjacency matrix : ; wherein, denotes a Sigmoid function.
6. The multivariate time series prediction method based on spatiotemporal feature fusion according to claim 1, characterized in that, In step 400, the graph convolution is performed on the fused attention features to obtain the time-domain graph propagation result, which comprises: reorganize the fused attention features into initial node features , and split the initial nodes into , ; Based on the depth of the graph, in turn Subgraph propagation: ; In the above formula, represents the first layer time domain graph propagation result; represents the adjacent node index; represents the time-varying adaptive adjacent matrix; represents the first layer feature representation of the node ; B represents the number of samples; N represents the number of variables.
7. The multivariate time series prediction method based on spatiotemporal feature fusion according to claim 1, characterized in that, In step 500, the steps 300-400 are alternately performed, and layer normalization is added after each output to obtain the final spatio-temporal features, which comprises: Based on the fused attention features obtained in step 300 and the multi-layer perception fusion output obtained in step 400, residual fusion and normalization are performed to obtain the final spatio-temporal features. 8.The method of claim 1, wherein, In the step 600, the final spatio-temporal features are flattened, and the predicted values of each variable within a future prediction window are generated through a linear prediction head, including: output the final encoding along the time dimension L flattening F input the flattened features into a trainable fully connected layer to obtain the prediction vector for each node : ; In the above formula, to predict the length of the time window; denotes a weight matrix of the trainable fully connected layer; denotes a bias term of the fully connected layer; will be reshaped to match the original input dimension order; with the mean and standard deviation cached by step 100, de-normalize each sample and variable in to recover to the original dimension, complete the final prediction output of the multivariate time series.
9. A multivariate time series prediction device based on spatiotemporal feature fusion, characterized in that, including: An example normalization module is configured to obtain multivariate traffic time series data, normalize and standardize the traffic time series data, and obtain normalized traffic time series data; A patch embedding module is configured to divide the normalized traffic time series data into overlapping patches according to a sliding window, and generate patch embedding sequences through linear mapping; A dual-modal temporal attention module is configured to apply dual-modal temporal attention to the patch embedding sequences to capture time patterns in the traffic time series data, and obtain fused attention features; An adjacency construction module is configured to generate a time-varying adjacency matrix based on a learnable node embedding matrix through dynamic graph construction; A graph convolution propagation module is configured to perform graph convolution on the fused attention features to obtain a time-domain graph propagation result; A frequency domain enhancement module is configured to perform a fast Fourier transform on the time-domain graph propagation result, multiply it by a learnable scaling factor, and then perform an inverse transform to obtain an inverse transform time-frequency result; A multi-order fusion module is configured to add the time-domain graph propagation result and the inverse transform time-frequency result, and output through a multi-layer perception fusion; A residual normalization module is configured to perform residual fusion and normalization on the fused attention features output through the multi-layer perception fusion to obtain final spatio-temporal features; A prediction head module is configured to flatten the final spatio-temporal features, and generate predicted values of each variable within a future prediction window through a linear prediction head.
Citation Information
Patent Citations
Traffic flow prediction method considering space-time similarity
CN115762160A
White spirit packaging defect detection method and system
CN116681673A
Information propagation prediction method of sequence hypergraph neural network based on common attention fusion
CN118364185A
Periodically perceived space-time adaptive hypergraph neural network traffic prediction method
CN118747960A
Broadband link traffic prediction method and system based on spectral domain graph neural network
CN118984304A
Cited By
Seismic source positioning method and system based on spatial-temporal feature fusion and transfer learning
CN121559589A
ETC traffic flow prediction method based on microscopic trajectory reconstruction and time-frequency spectrum fusion
CN121564994A
Irregular multivariable time sequence prediction method based on space-time diagram convolutional neural network
CN121834275A