Multivariate time series prediction method and device based on spatiotemporal feature fusion

By employing a multivariate time series prediction method that integrates spatiotemporal features, and combining bimodal temporal attention and graph convolutional propagation with learnable Fourier transform, this method addresses the lack of a unified framework for long-range dependence, local patterns, and dynamic graph structures with frequency domain features in existing technologies, thereby improving the prediction accuracy and robustness of traffic data.

CN120910514BActive Publication Date: 2026-01-06LUDONG UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511445257.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2026-01-06
Estimated Expiration
2045-10-11

AI Technical Summary

Technical Problem

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.

Method used

A multivariate time series prediction method based on spatiotemporal feature fusion is adopted. It captures global long-range dependencies and local short-range patterns through bimodal temporal attention, generates an adaptive adjacency matrix by using trainable node embedding and multi-head graph attention, and achieves adaptive weighted fusion of time domain and frequency domain features by combining graph convolutional propagation and learnable Fourier transform branches. Residual connections and layer normalization are introduced after each sub-module to improve model stability.

Benefits of technology

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, and is particularly suitable for traffic data containing daily and weekly cycles. It alleviates overfitting and gradient vanishing problems, and improves prediction accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910514B_ABST
    Figure CN120910514B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of deep learning and time series analysis technology, specifically relating to a multivariate time series prediction method and apparatus based on spatiotemporal feature fusion. The method includes: acquiring multivariate traffic time series data; processing the traffic time series data; dividing the processed traffic time series data into overlapping patches, and generating patch embedding sequences through linear mapping; applying bimodal temporal attention to the patch embedding sequences to obtain fused attention features; generating a time-varying adjacency matrix based on a learnable node embedding matrix through dynamic graph construction, performing graph convolution to obtain a time-domain graph propagation result, and performing a fast Fourier transform, multiplying by a learnable scaling factor, and then performing an inverse transform to obtain an inverse transform time-frequency result; adding the time-domain graph propagation result and the inverse transform time-frequency result to obtain the final spatiotemporal features; flattening the final spatiotemporal features, and generating predicted values ​​for each variable within a future prediction window using a linear prediction head.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of deep learning and time series analysis technology, specifically relating to a multivariate time series prediction method and apparatus based on spatiotemporal feature fusion. Background Technology

[0002] Multivariate time series forecasting is a classic machine learning task. Its core lies in using historical observation data to reveal the intrinsic relationships between variables and infer future trends. Compared to univariate forecasting, multivariate forecasting needs to consider the interactive effects between different channels, as well as the coexistence of short-term fluctuations and long-term trends, making the model more complex in terms of topological structure and time dependency modeling. Taking urban traffic monitoring as an example, multiple time-series signals such as traffic flow, speed, and signal phase at different intersections are often accompanied by peak congestion, sudden accidents, and changes in travel patterns during holidays. Noise, short-term fluctuations, and long-term trends are intertwined, making it difficult to simultaneously capture global traffic flow trends by simply relying on linear statistical models or shallow networks, thus severely limiting the accuracy and robustness of long-term forecasts. To address these challenges, it is necessary to construct a unified framework that can dynamically characterize the dependencies between road network nodes and balance short- and long-term characteristics.

[0003] Traditional forecasting methods, such as the Autoregressive Integral Moving Average (ARIMA) and Vector Autoregressive (VAR) models, while effective for stationary series, lack the ability to effectively model non-stationarity, seasonality, and complex dependencies among multiple variables. Deep learning-based Recurrent Neural Networks (RNNs) and their variants (LSTM, GRU) can capture nonlinear time-series patterns to some extent and model short-term dependencies well, but they suffer from gradient vanishing or oversmoothing problems when encountering long-term dependencies. Furthermore, RNN-like structures are difficult to parallelize, and the large volume of traffic data and high real-time requirements limit their efficiency in industrial deployments. In recent years, Convolutional Neural Networks (CNNs) and Temporal Convolutional Networks (TCNs) have been introduced into the field of time-series forecasting, improving parallelism and stability through parallelizable convolutional operations; however, their fixed receptive fields still struggle to simultaneously cover short-term abrupt changes and long-term trends. Transformer-based methods excel at long-term dependency modeling but pay insufficient attention to dynamic topological structures between nodes and local short-range patterns. Meanwhile, pure time-domain models struggle to fully utilize the frequency-domain periodicity information in the data, while graph neural networks (GNNs) excel at capturing relationships between nodes but are weak at modeling global dependencies and local patterns in sequences. Current technologies have yet to establish a unified framework that can accommodate long-range dependencies, local patterns, dynamic graph structures, and frequency-domain features, hindering further improvements in the accuracy and robustness of multivariate traffic spatiotemporal sequence prediction. Summary of the Invention

[0004] To overcome the problems in the prior art, this invention proposes a multivariate time series prediction method and apparatus based on spatiotemporal feature fusion.

[0005] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0006] In a first aspect, the present invention provides a multivariate time series prediction method based on spatiotemporal feature fusion, comprising the following steps:

[0007] Step 100: 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;

[0008] Step 200: Divide the normalized traffic time series data into overlapping patches according to the sliding window, and generate patch embedding sequences through linear mapping;

[0009] Step 300: Apply bimodal temporal attention to the patch embedding sequence to capture temporal patterns in the traffic time series data to obtain fused attention features;

[0010] Step 400: Based on the learnable node embedding matrix, a time-varying adjacency matrix is ​​generated by constructing a dynamic graph, and graph convolution is performed on the fused attention features to obtain the temporal graph propagation result; the temporal graph propagation result is subjected to a fast Fourier transform, multiplied by a learnable scaling factor, and then inversely transformed to obtain the inverse transform time-frequency result; the temporal graph propagation result and the inverse transform time-frequency result are added together and fused through a multilayer perceptron for output;

[0011] Step 500: Alternately execute steps 300-400, and add a layer normalization after each output to obtain the final spatiotemporal features;

[0012] Step 600: Flatten the final spatiotemporal features and generate predicted values ​​for each variable within the future prediction window using a linear prediction head.

[0013] Further, in step 100, the traffic time series data is normalized and standardized to obtain normalized traffic time series data, including:

[0014] For each sample and each variable in the traffic time series data, calculate its mean and standard deviation along the time dimension.

[0015] The traffic time series data is standardized using the mean and standard deviation to obtain normalized traffic time series data.

[0016] Further, in step 200, the normalized traffic time series data is divided into overlapping patches using a sliding window, including:

[0017] Based on patch length The sliding step size is A sliding window is used to move the normalized traffic time series data along its time dimension along the sliding step size. Cut into segments sequentially There are overlapping patches, where T represents the length of the original traffic time series data.

[0018] Further, in step 300, bimodal temporal attention is applied to the patch embedding sequence to capture temporal patterns in the traffic time series data, resulting in fused attention features, including:

[0019] The patch embedding sequence is projected into query, key, and value through three sets of trainable linear transformations;

[0020] Calculate the dot product score matrix based on the query and key; calculate the global attention weights based on the score matrix; and calculate the output of the global pattern branch based on the sum of the attention weights and values.

[0021] A sliding local mask is constructed, and after applying the local mask to the same score matrix, the local attention weights are calculated. Based on the sum of the local attention weights and values, the output of the local mode branch is calculated.

[0022] The outputs of the global mode branch and the local mode branch are added element-wise to obtain the fused attention features.

[0023] Further, in step 400, a time-varying adjacency matrix is ​​generated by constructing a dynamic graph based on the learnable node embedding matrix, including:

[0024] Construct two learnable node embedding matrices; calculate the similarity matrix between the two learnable node embedding matrices. Then, the Sigmoid function is applied to each element to normalize the matrix, resulting in a time-varying adaptive adjacency matrix. :

[0025] ;

[0026] in, This represents the Sigmoid function.

[0027] Further, in step 400, graph convolution is performed on the fused attention features to obtain the temporal graph propagation result, including:

[0028] The fused attention features are reorganized into the initial node features. And the initial node is split into nodes according to the node dimension. , ;

[0029] Based on graph depth, proceed sequentially. Secondary graph propagation:

[0030] ;

[0031] In the above formula, Indicates the first Layer time-domain diagram propagation results; Indicates the adjacent node index; Represents a time-varying adaptive adjacency matrix; Indicates the first Layer nodes The feature representation; B represents the number of samples; N represents the number of variables.

[0032] 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:

[0033] 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.

[0034] 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:

[0035] 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. :

[0036] ;

[0037] 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;

[0038] 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.

[0039] Secondly, a multivariate time series prediction device based on spatiotemporal feature fusion is provided, comprising:

[0040] 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.

[0041] 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.

[0042] 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;

[0043] 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.

[0044] The graph convolution propagation module is used to perform graph convolution on the fused attention features to obtain the temporal graph propagation result;

[0045] The frequency domain enhancement module is used to perform a fast Fourier transform on the propagation results of the time domain graph, multiply them by a learnable scaling factor, and then perform an inverse transform to obtain the inverse transform time-frequency results.

[0046] The multi-stage fusion module is used to add the propagation result of the time-domain graph to the inverse transform time-frequency result, and then fuse the output through a multilayer perceptron.

[0047] The residual normalization module performs residual fusion and normalization on the fused attention features after passing through the multilayer perceptron fusion output to obtain the final spatiotemporal features;

[0048] The prediction head module is used to flatten the final spatiotemporal features and generate predicted values ​​for each variable within the future prediction window using a linear prediction head.

[0049] Compared with the prior art, the present invention has the following technical effects:

[0050] This invention captures both global long-range dependencies and local short-range patterns simultaneously through dual-modal temporal attention, eliminating the need to switch models between different scales and significantly improving sensitivity to sudden traffic congestion and trend changes. It utilizes trainable node embeddings and multi-head graph attention to generate an adaptive adjacency matrix online, adjusting node weights according to traffic conditions to effectively reflect the dynamic relationships between real-time road segments. By introducing a learnable Fourier transform branch on top of graph convolutional propagation, it achieves adaptive weighted fusion of temporal and frequency domain features, enhancing the model's ability to express multi-periodic, first-order, and higher-order fluctuations, making it 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 to improve gradient flow stability and effectively alleviate overfitting and gradient vanishing problems. Attached Figure Description

[0051] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a flowchart of the multivariate time series prediction method based on spatiotemporal feature fusion of the present invention;

[0053] Figure 2 A plot showing the fitted results of predictions for the traffic dataset;

[0054] Figure 3 This is a schematic diagram of the multivariate time series prediction device based on spatiotemporal feature fusion according to the present invention. Detailed Implementation

[0055] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the specific implementation methods, structures, features, and effects of the technical solutions proposed according to the present invention are described in detail below with reference to the accompanying drawings and preferred embodiments. Specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form. Unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0056] In one embodiment of the present invention, reference is made to... Figures 1-2 This paper presents a multivariate time series prediction method based on spatiotemporal feature fusion, which includes:

[0057] Step 100: 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;

[0058] Step 200: Divide the normalized traffic time series data into overlapping patches according to the sliding window, and generate patch embedding sequences through linear mapping;

[0059] Step 300: Apply bimodal temporal attention to the patch embedding sequence to capture temporal patterns in the traffic time series data and obtain the fused attention features;

[0060] Step 400: Based on the learnable node embedding matrix, a time-varying adjacency matrix is ​​generated by constructing a dynamic graph, and graph convolution is performed on the fused attention features to obtain the 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 inversely transformed to obtain the inverse transform time-frequency result. The time-domain graph propagation result and the inverse transform time-frequency result are added together and fused through a multilayer perceptron.

[0061] Step 500: Alternately execute steps 300-400 in the hierarchical encoder, and add layer normalization after each output to obtain the final spatiotemporal features;

[0062] Step 600: Flatten the final spatiotemporal features and generate predicted values ​​for each variable within the future prediction window using a linear prediction head.

[0063] The following is a detailed explanation of each of the above steps:

[0064] Step 100: 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.

[0065] In this invention, one specific implementation of step 100 can be:

[0066] Step 101: Process traffic time series data Each sample in b and each variable n Calculate their mean values ​​over the time dimension. with standard deviation This is used to capture the local statistical characteristics of each instance; where B represents the batch size, which represents the number of independent time series instances in the data; N represents the number of variables; T represents the length of the original traffic time series data; and R represents the real number field.

[0067] Step 102: Standardize the original traffic time series data using the mean and standard deviation to obtain normalized traffic time series data. .

[0068] Normalized traffic time series data This serves as input for subsequent feature extraction or model modeling to improve numerical stability during training and reduce scale differences and non-stationarity in traffic flow data; the mean value corresponding to each sample is saved. with standard deviation Statistical values ​​are used for destandardization of the model output to achieve reversibility.

[0069] Step 200: Normalize the traffic time series data According to lengthP The sliding window is divided into overlapping patches, and a patch embedding sequence is generated by linear mapping.

[0070] In this invention, one specific implementation of step 200 can be:

[0071] Step 201: Based on the patch length P The sliding step size is A sliding window displays the normalized traffic time series data. Along its time dimension along the sliding step size Cut into segments sequentially There are several overlapping patches, each patch being [size missing]. The patch length controls the number of time steps for each window coverage, while the sliding step size controls the overlap between patches.

[0072] Step 202: Flatten each patch along the time dimension to obtain a shape as follows The tensor is then passed through a trainable linear mapping layer:

[0073] Linear: ;

[0074] Each length The patch projection is of dimension . The patch embeddings are then reshaped into shapes by batch and variable dimension. This allows the data to be fed into the subsequent bimodal temporal attention mechanism for parallel computation. The hidden dimension of the model is consistent with the input and output dimensions of the subsequent attention layer.

[0075] Step 300: Apply bimodal temporal attention to the patch embedding sequence to capture temporal patterns in the traffic time series data to obtain fused attention features;

[0076] The bimodal temporal attention includes a global mode branch and a local mode branch. The global mode branch is used to capture global long-range dependencies, while the local mode branch captures short-range local modes in a window of size w. The outputs of the global mode branch and the local mode branch are then added element-wise to obtain the fused attention features.

[0077] In this invention, one specific implementation of step 300 can be:

[0078] Step 301: Project the patch embedding sequence into query Q, key K, and value V through three sets of trainable linear transformations respectively.

[0079] ;

[0080] ;

[0081] ;

[0082] And reshaped into ,

[0083] in, The trainable linear transformation weight matrix is ​​used to generate the query (Q), key (K), and value (V), respectively. It is the dimension of a single attention head. For the number of attention heads.

[0084] Step 302: The global mode branch is used to capture global long-range dependencies and obtain the output of the global mode branch.

[0085] Calculate the dot product score matrix based on query Q and key K. :

[0086] ;

[0087] Global attention weights are calculated based on the score matrix using the "scaled dot product" formula. :

[0088] ;

[0089] Based on attention weights The sum V is used to calculate the output of the global mode branch. :

[0090] .

[0091] Step 303: The local mode branch captures the short-range local mode in a window of size w and obtains the output of the local mode branch.

[0092] The size of the construction window is w Sliding local mask Each query position i Only with The internal keys are connected;

[0093] For the same score matrix Apply local mask Then, the local attention weights are calculated. :

[0094] ;

[0095] Based on local attention weights The sum V is used to calculate the output of the local pattern branch. :

[0096] .

[0097] Step 304: Add the outputs of the global mode branch and the local mode branch element by element to obtain the fused attention features.

[0098] Output of the global mode branch Output of local mode branch Element-wise summation is performed along the same dimension, and the final temporal attention features are output via Dropout.

[0099] Step 400: Based on the learnable node embedding matrix, a time-varying adjacency matrix is ​​generated by constructing a dynamic graph, and graph convolution is performed on the fused attention features to obtain the 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 inversely transformed to obtain the inverse transform time-frequency result. The time-domain graph propagation result and the inverse transform time-frequency result are added together and fused through a multilayer perceptron.

[0100] In this invention, one specific implementation of step 400 can be:

[0101] Step 401: Based on the learnable node embedding matrix, a time-varying adjacency matrix is ​​generated by constructing a dynamic graph.

[0102] Let the learnable node embedding matrix be:

[0103] ;

[0104] In the above formula, Indicates the node embedding dimension;

[0105] Calculate the similarity matrix between two learnable node embedding matrices. Then, the Sigmoid function is applied to each element to normalize the matrix, resulting in a time-varying adaptive adjacency matrix. :

[0106] ;

[0107] in, This represents the Sigmoid function.

[0108] Step 402: Perform graph convolution on the fused attention features to obtain the temporal graph propagation result.

[0109] The fused attention features are reorganized into the initial node features. And split it into nodes. , For graph depth G, proceed sequentially. Secondary graph propagation:

[0110] ;

[0111] In the above formula, Indicates the first Layer time-domain diagram propagation results; Indicates the adjacent node index; Represents a time-varying adaptive adjacency matrix; Indicates the first Layer nodes The characteristics are represented.

[0112] Step 403: Perform a Fast Fourier Transform on the propagation result of the time-domain graph, multiply it by a learnable scaling factor, and then perform an inverse transform to obtain the enhanced time-frequency features; perform an inverse Fourier Transform on the enhanced frequency domain coefficients to obtain the enhanced time-frequency results.

[0113] For each time-domain graph propagation output Perform a Fourier transform (FFT) along the time dimension, and multiply the resulting frequency domain coefficients by a learnable scalar to obtain the enhanced frequency domain coefficients:

[0114] , ;

[0115] In the above formula, This represents the enhanced frequency domain coefficients; Represents frequency domain coefficients; This represents a learnable scalar.

[0116] Perform an inverse FFT (IFFT) on the enhanced frequency domain coefficients to obtain the enhanced time-frequency result:

[0117] ;

[0118] In the above formula, This indicates the enhanced time-frequency result.

[0119] Step 404: Add the propagation result of the time-domain graph to the time-frequency result of the inverse transform, and then fuse them through a multilayer perceptron.

[0120] Collect all time-domain graph propagation results and enhanced time-frequency results Concatenate these features according to the last dimension to obtain cascaded features. :

[0121] ;

[0122] Cascaded features are fused using a multilayer perceptron (MLP). :

[0123] ;

[0124] Will Reshaping And pass it to step 500.

[0125] Step 500: Alternately execute steps 300-400 in the layer encoder, and add layer normalization after each output.

[0126] In this invention, one specific implementation of step 500 can be:

[0127] Step 501: For The encoding layer executes the following sub-steps in sequence:

[0128] Temporal attention calculation: Let the input of the current layer be... The bimodal temporal attention from step 300 is invoked to obtain the fused attention features. ;

[0129] Graph convolution and frequency domain fusion: merging the attention features Reshape and divide by node The module from step 400 is invoked to calculate multi-order propagation and frequency domain enhancement for each node, ultimately yielding... .

[0130] Step 502: Residual fusion and normalization to obtain the final spatiotemporal features:

[0131] ;

[0132] in, For the patch embedding sequence output from step 200, LayerNorm performs normalization on the last dimension.

[0133] The above steps are as follows L Layered loops are used to obtain the final spatiotemporal features. This serves as the input for step 600.

[0134] Step 600: Flatten the final spatiotemporal features and generate predicted values ​​for each variable within the future prediction window using a linear prediction head.

[0135] In this invention, one specific implementation of step 600 can be:

[0136] Step 601: Divide the final encoded output 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. :

[0137] ;

[0138] 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.

[0139] Step 602: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] 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.

[0140] Based on the same inventive concept, this application also provides a transpose of multivariate time series prediction based on spatiotemporal feature fusion for implementing the multivariate time series prediction method based on spatiotemporal feature fusion described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more device embodiments provided below can be found in the limitations of the multivariate time series prediction method based on spatiotemporal feature fusion described above, and will not be repeated here.

[0141] In one embodiment, refer to Figure 3 A multivariate time series prediction device based on spatiotemporal feature fusion is provided, comprising:

[0142] 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.

[0143] 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.

[0144] 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;

[0145] 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.

[0146] The graph convolution propagation module is used to perform graph convolution on the fused attention features to obtain the temporal graph propagation result;

[0147] The frequency domain enhancement module is used to perform a fast Fourier transform on the propagation results of the time domain graph, multiply them by a learnable scaling factor, and then perform an inverse transform to obtain the inverse transform time-frequency results.

[0148] The multi-stage fusion module is used to add the propagation result of the time-domain graph to the inverse transform time-frequency result, and then fuse the output through a multilayer perceptron.

[0149] The residual normalization module performs residual fusion and normalization on the fused attention features after passing through the multilayer perceptron fusion output to obtain the final spatiotemporal features;

[0150] The prediction head module is used to flatten the final spatiotemporal features and generate predicted values ​​for each variable within the future prediction window using a linear prediction head.

[0151] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A multivariate time series prediction method based on spatiotemporal feature fusion, characterized in that, The method comprises the following steps: Step 100: acquiring multivariate traffic time series data, normalizing and standardizing the traffic time series data to obtain normalized traffic time series data, wherein the multivariate traffic time series data comprises traffic flow, vehicle speed and signal phase of an intersection; 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, comprising: projecting the patch embedding sequences into queries, keys and values through three groups of trainable linear transformations respectively; calculating a dot product score matrix based on the queries and the keys; calculating global attention weights based on the score matrix, and calculating the output of the global mode branch based on the attention weights and the values; constructing a sliding local mask, calculating the local attention weights after applying the local mask to the same score matrix; calculating the output of the local mode branch based on the local attention weights and the values; adding the outputs of the global mode branch and the local mode branch element by element to obtain the 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, comprising: 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; 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; performing fast Fourier transform on the time-domain graph propagation result, multiplying by a learnable scaling factor, and then performing inverse transform to obtain an inverse transform time-frequency result; adding the time-domain graph propagation result and the inverse transform time-frequency result, and outputting through a multi-layer perception; 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, comprising: 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 the 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, comprising: 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 method of claim 1, wherein, In step 500, steps 300-400 are alternately performed, and layer normalization is added after each output to obtain final spatio-temporal features, comprising: 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 final spatio-temporal features.

5. The multivariate time series prediction method based on spatiotemporal feature fusion according to claim 1, characterized in that, In step 600, the final spatio-temporal features are flattened, and prediction values of each variable within a future prediction window are generated through a linear prediction head, comprising: outputting the final encoded output along a time dimension L flattening F inputting the flattened features into a trainable fully connected layer to obtain a 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.

6. A device for multivariate time series prediction based on spatiotemporal feature fusion, adopting the method for multivariate time series prediction based on spatiotemporal feature fusion according to any one of claims 1-5, characterized in that, comprising: An example normalization module is configured to obtain multivariate traffic time series data, normalize and standardize the traffic time series data to obtain normalized traffic time series data, and the multivariate traffic time series data includes traffic flow, speed, and signal phase of different intersections; 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 fast Fourier transform on the time-domain graph propagation result, multiply by a learnable scaling factor, and then 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 prediction values of each variable in a future prediction window through a linear prediction head.

Citation Information

Patent Citations

  • Traffic flow prediction method considering space-time similarity

    CN115762160A

  • Information propagation prediction method of sequence hypergraph neural network based on common attention fusion

    CN118364185A

  • Method of forecasting power production / consumption in a distributed network

    EP4383498A1

  • Self-attention mechanism-based behavior recognition method

    WO2022083335A1