Traffic flow intelligent prediction method and device based on spatio-temporal characteristic information fusion
By constructing a DSTMGCN model with a multidimensional graph structure and a temporal attention mechanism, the problem of neglecting spatiotemporal dependencies in existing methods is solved, achieving higher accuracy and stable traffic flow prediction, and adapting to real-time management of complex road networks.
Patent Information
- Application Number
- CN202511559794.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-03-03
AI Technical Summary
Most existing traffic flow prediction methods ignore the dynamic evolution characteristics of spatiotemporal dependencies, and cannot fully and accurately capture the changing patterns of traffic flow, resulting in low prediction accuracy.
By constructing a multidimensional graph structure, including distance graph, adjacency graph, and association graph, and combining a temporal attention layer and a spatial multi-graph convolutional layer, features of spatiotemporal dependencies are extracted and fused, and traffic flow prediction is performed using the DSTMGCN model.
It significantly improves the accuracy and stability of traffic flow prediction, better captures the nonlinear dynamic evolution of traffic flow, and has stronger generalization ability and robustness, adapting to the real-time traffic management needs of complex urban road networks.
Smart Images

Figure CN121600724A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and apparatus for intelligent traffic flow prediction based on spatiotemporal feature information fusion, belonging to the field of intelligent traffic prediction technology. Background Technology
[0002] Traffic flow prediction, as a key means to improve road operational efficiency and traffic service quality, has received increasing attention. Its core objective is to accurately predict future traffic conditions, thereby providing decision support for alleviating traffic congestion, preventing accidents, and reducing emissions. Therefore, in recent years, researchers have proposed various traffic flow prediction methods, including prediction methods based on support vector machines and their improvements, ensemble learning models, and deep learning frameworks, continuously driving the field towards higher accuracy and stronger generalization capabilities.
[0003] In the field of traffic flow prediction, spatiotemporal correlation is a crucial factor influencing traffic flow changes, especially the interactions between different times (such as morning and evening rush hours) and different locations. However, most existing deep learning methods focus only on the analysis of a single time or spatial dimension, neglecting the dynamic evolution of spatiotemporal dependencies, resulting in an inability to comprehensively and accurately capture the changing patterns of traffic flow. Existing technologies mainly rely on graph neural networks and other methods to mine the spatial relationships between sensor nodes, but these methods often ignore structural factors in the actual road network, such as the geographical distribution of nodes, road topology, lane capacity, and traffic signals. Furthermore, traffic flow not only propagates along topological paths but is also affected by physical mechanisms such as congestion spread and traffic flow switching caused by spatial proximity. The non-uniform spatial deployment of sensors and the differences in road connectivity and traffic functional zoning make traffic flow patterns more complex. Simply relying on graph structures cannot accurately reproduce these dynamic dependencies dominated by spatial physical factors. Therefore, how to accurately capture and utilize spatiotemporal correlation in deep learning methods to improve the accuracy of traffic flow prediction has become an important problem that urgently needs to be solved.
[0004] Most existing prediction methods focus on the impact of single factors (such as time or space) on traffic flow, while neglecting the combined effect of time and space factors and their interrelationships on traffic flow. These methods typically employ general deep learning techniques, lacking in-depth analysis of the time-series characteristics of traffic data and the complex spatial structure of urban road networks. Therefore, when dealing with traffic flow prediction tasks, they cannot fully utilize the spatiotemporal correlations in the data, resulting in low prediction accuracy and an inability to accurately reflect the changing patterns of traffic flow. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a traffic flow intelligent prediction method and device based on spatiotemporal feature information fusion. By introducing distance graphs, adjacency graphs and association graphs, a multi-dimensional graph structure for urban road network nodes is constructed, which effectively explores the potential correlation between different nodes and solves the shortcomings of traditional methods in spatial information extraction.
[0006] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0007] In a first aspect, the present invention provides a traffic flow intelligent prediction method based on spatiotemporal feature information fusion, comprising:
[0008] Obtain historical traffic flow data;
[0009] The historical traffic flow data is input into the pre-built DSTMGCN model;
[0010] The time attention layer in the DSTMGCN model is used to process the input traffic flow data and extract time feature information.
[0011] The temporal feature information and historical traffic flow data are input into a spatial multi-graph convolutional layer;
[0012] In the spatial multi-graph convolutional layer, based on the spectral graph convolution method, predefined distance graphs, adjacency graphs, and association graphs are used to perform convolution operations on the temporal feature information and historical traffic flow data to extract features that integrate spatiotemporal dependencies.
[0013] Based on the features that incorporate spatiotemporal dependencies, the final traffic flow prediction is generated through the output layer of the DSMMGCN model.
[0014] Furthermore, the step of processing the input traffic flow data and extracting temporal feature information through the temporal attention layer in the DSTMGCN model includes:
[0015] The input historical traffic flow data R is transformed linearly to generate query vector Q, key vector K, and value vector R, as shown in the following formula:
[0016] ;
[0017] in, , and Query the weight matrices of the vector, key vector, and value vector respectively;
[0018] Calculate the dot product between the query vector and the key vector, and then scale it using a scaling factor to obtain the attention score. The formula is as follows:
[0019] ;
[0020] The scaled attention scores are normalized using the softmax function to obtain the attention weights. The calculation formula is:
[0021] ;
[0022] Based on the attention weight Weighted summation of the value vector 𝑉 generates temporal feature information. The calculation formula is:
[0023] .
[0024] Furthermore, the calculation formula for the spectral convolution method is as follows:
[0025] ;
[0026] ;
[0027] in, Let be the Laplace matrix of the graph. Represents the Laplace matrix The Fourier matrix of the eigenvectors, It is a diagonal matrix with diagonal elements as follows: , Represents the identity matrix. Representation diagram The weighted adjacency matrix, where N represents the finite set of nodes, E represents the edge set used to represent the connectivity between adjacent nodes, and M represents the adjacency matrix; spectral graph convolution operator. For data With kernel function The product of The Fourier transform is .
[0028] Furthermore, the distance map adjacency matrix Constructed based on the Euclidean distance between nodes, as shown below:
[0029] ;
[0030] in, This represents the distance graph corresponding to the i-th row and j-th column. The adjacency matrix, Represented as nodes and The Euclidean distance between the centers of mass;
[0031] The adjacency graph adjacency matrix Based on the number of traffic flow records between nodes, it is represented as follows:
[0032] ;
[0033] in, Represents the adjacency graph corresponding to the i-th row and j-th column. The adjacency matrix; This represents the number of traffic flow records between nodes i and j;
[0034] The association diagram adjacency matrix The Pearson correlation coefficient, based on traffic flow between nodes, is constructed and represented as follows:
[0035] ;
[0036] in, This represents the association graph corresponding to the i-th row and j-th column. The adjacency matrix; The Pearson correlation coefficient is expressed by the following formula:
[0037] ;
[0038] in, and Representing nodes respectively and Traffic flow data This represents the covariance between two vectors. and express and The standard deviation.
[0039] Furthermore, the spectral graph-based convolution method utilizes predefined distance graphs, adjacency graphs, and association graphs to perform convolution operations on the temporal feature information and historical traffic flow data, respectively, to extract features that integrate spatiotemporal dependencies, including:
[0040] Based on the calculation formula of the spectral graph convolution method and the pre-obtained output of gated convolution, the propagation rule of spatial graph convolution is calculated, as follows:
[0041] ;
[0042] in, The characteristic matrix, This represents the Leaky ReLU activation function, while The kernel function represents graph convolution. For the corresponding diagrams, including , and , This is the output of the gated convolution;
[0043] Feature matrices for the distance graph, adjacency graph, and association graph are generated using the propagation rule formula of spatial graph convolution. , and ;
[0044] The feature matrix , and After concatenation, the data is input into a fully connected layer to generate features that incorporate spatiotemporal dependencies. The calculation formula is:
[0045] ;
[0046] in, Indicates a connection operation. and This represents the weight matrix and bias terms.
[0047] Furthermore, the output result of the gated convolution The calculation formula is as follows:
[0048] ;
[0049] in, Represents the Hadamard product at the element level. It is represented as a sigmoid gate. This represents fused data containing temporal characteristics and historical traffic flow data. , , and These represent the dimensions of width, length, and input channels, respectively. Represents the convolution kernel. , The dimension of the output channel, and the convolution kernel. Will Mapping to output element ,in, and It is divided into two sub-elements with the same number of channels.
[0050] Furthermore, based on features that incorporate spatiotemporal dependencies, the final traffic flow prediction value is generated through the output layer of the DSMMGCN model, as shown in the following formula:
[0051] ;
[0052] in, This represents the final traffic flow forecast.
[0053] Furthermore, the method also includes: after outputting traffic flow prediction values, using RMSE, MAE, or MAPE indicators to evaluate the performance of the prediction results.
[0054] Secondly, the present invention provides a traffic flow intelligent prediction device based on spatiotemporal feature information fusion, used to implement the traffic flow intelligent prediction method based on spatiotemporal feature information fusion as described in any one of the preceding claims, comprising:
[0055] The data acquisition module is used to acquire historical traffic flow data;
[0056] The first input module is used to input the historical traffic flow data into the pre-built DSMMGCN model;
[0057] The first extraction module is used to process the input traffic flow data and extract time feature information through the time attention layer in the DSTMGCN model;
[0058] The second input module is used to input the time feature information and historical traffic flow data into the spatial multi-graph convolutional layer;
[0059] The second extraction module is used in the spatial multi-graph convolutional layer to perform convolution operations on the temporal feature information and historical traffic flow data based on the spectral graph convolution method, using predefined distance graphs, adjacency graphs and association graphs respectively, so as to extract features that integrate spatiotemporal dependencies.
[0060] The prediction module is used to generate the final traffic flow prediction value through the output layer of the DSMMGCN model based on features that incorporate spatiotemporal dependencies.
[0061] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0062] Fourthly, the present invention provides an electronic device, comprising:
[0063] Memory, used to store computer programs / instructions;
[0064] A processor for executing the computer program / instructions to implement the steps of any of the methods described above.
[0065] Fifthly, the present invention provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the methods described above.
[0066] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0067] 1. This invention provides a traffic flow intelligent prediction method and device based on spatiotemporal feature information fusion, which demonstrates significant advantages in terms of traffic flow prediction quality, accuracy, and efficiency. Unlike traditional methods that rely solely on single time series or static spatial topology modeling, this invention fully integrates the temporal dynamics of traffic data with the complex topological structure of urban road networks. By constructing multi-dimensional distance graphs, adjacency graphs, and association graphs, it can more comprehensively uncover the potential interactions and implicit connections between different road network nodes. Specifically, the temporal attention mechanism enables the model to adaptively extract the most representative temporal features from different regions, thereby effectively capturing periodic changes such as morning and evening peak hours and holidays. The introduction of multi-graph convolutional networks not only achieves joint modeling of different graph structure information but also obtains higher-quality spatial representations through dynamic updates of the adjacency matrix and fusion of node features.
[0068] 2. This invention combines deep fusion of spatiotemporal features, enabling the model to accurately depict the nonlinear dynamic evolution of traffic flow in spatiotemporal dimensions, thereby significantly improving the stability and reliability of predictions. Furthermore, the introduction of a skip connection mechanism in the L-layer network structure effectively alleviates the gradient vanishing problem, accelerates information transmission and model training, and improves overall computational efficiency.
[0069] 3. The present invention outperforms existing traditional models and some deep learning methods in traffic flow prediction tasks, and has stronger generalization ability, robustness and scalability. It can not only achieve high-precision prediction in normal traffic environments, but also adapt to the real-time traffic management needs of large-scale and complex urban road networks, providing solid technical support for the efficient operation of intelligent transportation systems. Attached Figure Description
[0070] Figure 1 This is a flowchart of the intelligent traffic flow prediction method based on spatiotemporal feature information fusion provided in an embodiment of the present invention;
[0071] Figure 2 This is a schematic diagram of the overall framework of the DSTMGCN model provided in this embodiment of the invention. Detailed Implementation
[0072] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0073] Example 1, such as Figure 1 As shown in the figure, this embodiment introduces a traffic flow intelligent prediction method based on spatiotemporal feature information fusion, including:
[0074] Obtain historical traffic flow data;
[0075] The historical traffic flow data is input into the pre-built DSTMGCN model;
[0076] The time attention layer in the DSTMGCN model is used to process the input traffic flow data and extract time feature information.
[0077] The temporal feature information and historical traffic flow data are input into a spatial multi-graph convolutional layer;
[0078] In the spatial multi-graph convolutional layer, based on the spectral graph convolution method, predefined distance graphs, adjacency graphs, and association graphs are used to perform convolution operations on the temporal feature information and historical traffic flow data to extract features that integrate spatiotemporal dependencies.
[0079] Based on the features that incorporate spatiotemporal dependencies, the final traffic flow prediction is generated through the output layer of the DSMMGCN model.
[0080] like Figure 2 As shown in the figure, the intelligent traffic flow prediction method based on spatiotemporal feature information fusion provided in this embodiment involves the following steps in its application process:
[0081] Step 1: To more effectively capture the temporal characteristics of traffic flow data, this invention introduces an attention mechanism to weight the input features, highlighting information at key time points and extracting more representative time-series features. Specifically, feature data 𝑋 is passed to the attention head, which is equipped with an independent linear transformation weight matrix to generate query (Q), key (K), and value (W) vectors. Through these linear transformations, the model can compute the correlation between different time slices in parallel within the attention space, effectively enhancing the model's ability to model dynamic changes over time, thereby providing a more accurate and richer temporal feature representation for traffic flow prediction, as follows:
[0082] ;
[0083] in, , and This is a weight matrix for the query, key, and value. Then, a relevance score is calculated for each position using a dot product operation between the query and the key, to measure the degree of correlation between different time steps, as follows:
[0084] ;
[0085] To avoid the vanishing gradient problem caused by excessive dimensionality when calculating attention scores, a scaling factor is introduced. The dimension of the key vector is used to scale the dot product between the query and the key. Next, the scaled attention score is normalized using the softmax function to obtain a set of normalized attention weights. These weights effectively represent the importance relationships between different time steps and are then used to perform a weighted summation of the value vectors, extracting more temporally representative feature information.
[0086] ;
[0087] in, These are attention weights, which reflect the importance of the input features at each time step; This is the activation function. The attention weights are then summed with their corresponding value vectors to generate a new temporal feature representation.
[0088] ;
[0089] Step Two: Based on the complex topology of the urban road network, construct distance graphs, adjacency graphs, and association graphs to uncover potential correlations between nodes in the road network. Let... Let L be the Fourier matrix of the eigenvectors of the Laplacian. Then the Laplacian matrix L of the graph can be expressed as follows:
[0090] ;
[0091] in, It is a diagonal matrix with diagonal elements as follows: , Represents the identity matrix. Representation diagram The weighted adjacency matrix is given by N, where N represents a finite set of nodes, E represents the edge set used to represent the connectivity between adjacent nodes, and M represents the adjacency matrix. Spectral graph convolution operator. For data With kernel function The product of The Fourier transform is Based on the above expression, the spectral convolution expression is as follows:
[0092] ;
[0093] Step 3: The input to the convolutional layer represents the fused data of temporal feature information and historical traffic flow data, where... , and These represent the dimensions of width, length, and input channels, respectively. Convolution kernel. Will Mapping to output element ,in, and It is divided into two sub-elements with the same number of channels. This indicates the dimension of the output channel. The gated convolution is calculated as follows:
[0094] ;
[0095] in, This represents the element-level Hadamard product. It is represented as a sigmoid gate.
[0096] Step 4: Obtain the distance map Adjacency graph Relationship diagram Three spatial correlation plots are shown below:
[0097] 1) Distance map : Represented as nodes and Euclidean distance between the centers of mass, distance diagram adjacency matrix It is expressed as follows:
[0098] ;
[0099] in, This represents the distance graph corresponding to the i-th row and j-th column. The weight.
[0100] 2) Adjacency graph Distance map adjacency matrix It is expressed as follows:
[0101] ;
[0102] in, This represents the number of traffic flow records between nodes i and j.
[0103] 3) Relationship diagram This invention uses the Pearson correlation coefficient to determine the correlation between two sets of vectors. Let... and Representing nodes respectively and The Pearson correlation coefficient is expressed as follows: (The original text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.)
[0104] ;
[0105] in, This represents the covariance between two vectors. and express and The standard deviation of the distance plot adjacency matrix It is expressed as follows:
[0106] ;
[0107] Step 5: Given the convolutional layer of the graph The propagation rules of spatial graph convolution can then be expressed as follows:
[0108] ;
[0109] in, This represents the Leaky ReLU activation function, while The kernel function represents the graph convolution. Each traffic flow segment is associated with its corresponding graph (i.e., ...). , and The inputs are fed into three GCN modules, ultimately generating three sets of feature matrices, which are labeled as follows: , and The three feature matrices mentioned above are concatenated and used as input to the fully connected layer. The output of the spatial multi-graph convolution is then calculated as follows: :
[0110] ;
[0111] in, Indicates a connection operation. and This represents the weight matrix and bias terms.
[0112] Step Six: The DSMMGCN model contains two temporal attention layers and one spatial multi-graph convolutional layer. This invention utilizes alternating operations of the temporal attention layers and the multi-graph convolutional layer. Based on the input flow measurement values... The traffic prediction value of a single-layer DSM-TGCN model is calculated using the following method. :
[0113]
[0114] Step 7: Obtain the final prediction results, and then evaluate the prediction results using performance evaluation metrics such as RMSE, MAE, and MAPE.
[0115] This embodiment proposes a traffic flow intelligent prediction method based on spatiotemporal feature information fusion (DSTMGCN), which demonstrates significant advantages in terms of traffic flow prediction quality, accuracy, and efficiency. Unlike traditional methods that rely solely on single time series or static spatial topology modeling, this embodiment fully integrates the temporal dynamics of traffic data with the complex topological structure of urban road networks. By constructing multi-dimensional distance graphs, adjacency graphs, and association graphs, it can more comprehensively uncover the potential interactions and implicit connections between different road network nodes. Specifically, the temporal attention mechanism enables the model to adaptively extract the most representative temporal features from different regions, effectively capturing periodic changes such as morning and evening peak hours and holidays. The introduction of multi-graph convolutional networks not only achieves joint modeling of different graph structure information but also obtains higher-quality spatial representations through dynamic updates of the adjacency matrix and fusion of node features. Furthermore, the deep fusion of spatiotemporal features enables the model to accurately characterize the nonlinear dynamic evolution of traffic flow in spatiotemporal space, thereby significantly improving the stability and reliability of predictions. Furthermore, the introduction of a skip connection mechanism in the L-layer network structure effectively alleviates the gradient vanishing problem, accelerates information transmission and model training, and improves overall computational efficiency.
[0116] In summary, this embodiment outperforms existing traditional models and some deep learning methods in traffic flow prediction tasks, exhibiting stronger generalization ability, robustness, and scalability. It can not only achieve high-precision prediction in conventional traffic environments but also adapt to the real-time traffic management needs of large-scale, complex urban road networks, providing solid technical support for the efficient operation of intelligent transportation systems.
[0117] Example 2: This example provides a traffic flow intelligent prediction device based on spatiotemporal feature information fusion, used to implement the traffic flow intelligent prediction method based on spatiotemporal feature information fusion described in any one of Examples 1, including:
[0118] The data acquisition module is used to acquire historical traffic flow data;
[0119] The first input module is used to input the historical traffic flow data into the pre-built DSMMGCN model;
[0120] The first extraction module is used to process the input traffic flow data and extract time feature information through the time attention layer in the DSTMGCN model;
[0121] The second input module is used to input the time feature information and historical traffic flow data into the spatial multi-graph convolutional layer;
[0122] The second extraction module is used in the spatial multi-graph convolutional layer to perform convolution operations on the temporal feature information and historical traffic flow data based on the spectral graph convolution method, using predefined distance graphs, adjacency graphs and association graphs respectively, so as to extract features that integrate spatiotemporal dependencies.
[0123] The prediction module is used to generate the final traffic flow prediction value through the output layer of the DSMMGCN model based on features that incorporate spatiotemporal dependencies.
[0124] The specific functions of each module described above are explained in the relevant content of the method in Embodiment 1, and will not be repeated here.
[0125] Example 3: This example provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described in Example 1.
[0126] Example 4: This example provides an electronic device, including:
[0127] Memory, used to store computer programs / instructions;
[0128] A processor for executing the computer program / instructions to implement the steps of any of the methods described in Embodiment 1.
[0129] Example 5: This example provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the method described in any one of Examples 1.
[0130] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
[0131] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0132] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0133] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0134] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure and not to limit its protection scope. Although this disclosure has been described in detail with reference to the above embodiments, those skilled in the art should understand that after reading this disclosure, they can still make various changes, modifications or equivalent substitutions to the specific implementation of the invention, but these changes, modifications or equivalent substitutions are all within the protection scope of the pending claims.
Claims
1. A traffic flow intelligent prediction method based on spatiotemporal feature information fusion, characterized in that, include: Obtain historical traffic flow data; The historical traffic flow data is input into the pre-built DSTMGCN model; The time attention layer in the DSTMGCN model is used to process the input traffic flow data and extract time feature information. The temporal feature information and historical traffic flow data are input into a spatial multi-graph convolutional layer; In the spatial multi-graph convolutional layer, based on the spectral graph convolution method, predefined distance graphs, adjacency graphs, and association graphs are used to perform convolution operations on the temporal feature information and historical traffic flow data to extract features that integrate spatiotemporal dependencies. Based on the features that incorporate spatiotemporal dependencies, the final traffic flow prediction is generated through the output layer of the DSMMGCN model.
2. The intelligent traffic flow prediction method based on spatiotemporal feature information fusion according to claim 1, characterized in that, The process of processing the input traffic flow data and extracting time feature information through the time attention layer in the DSMMGCN model includes: The input historical traffic flow data R is transformed linearly to generate query vector Q, key vector K, and value vector R, as shown in the following formula: ; in, , and Query the weight matrices of the vector, key vector, and value vector respectively; Calculate the dot product between the query vector and the key vector, and then scale it using a scaling factor to obtain the attention score. The formula is as follows: ; The scaled attention scores are normalized using the softmax function to obtain the attention weights. The calculation formula is: ; Based on the attention weight Weighted summation of the value vector 𝑉 generates temporal feature information. The calculation formula is: 。 3. The intelligent traffic flow prediction method based on spatiotemporal feature information fusion according to claim 2, characterized in that, The calculation formula for the spectral convolution method is as follows: ; ; in, Let be the Laplace matrix of the graph. Represents the Laplace matrix The Fourier matrix of the eigenvectors, It is a diagonal matrix with diagonal elements as follows: , Represents the identity matrix. Representation diagram The weighted adjacency matrix, where N represents the finite set of nodes, E represents the edge set used to represent the connectivity between adjacent nodes, and M represents the adjacency matrix; spectral graph convolution operator. For data With kernel function The product of The Fourier transform is .
4. The intelligent traffic flow prediction method based on spatiotemporal feature information fusion according to claim 3, characterized in that, The distance map adjacency matrix Constructed based on the Euclidean distance between nodes, as shown below: ; in, This represents the distance graph corresponding to the i-th row and j-th column. The adjacency matrix, Represented as nodes and The Euclidean distance between the centers of mass; The adjacency graph adjacency matrix Based on the number of traffic flow records between nodes, it is represented as follows: ; in, Represents the adjacency graph corresponding to the i-th row and j-th column. The adjacency matrix; This represents the number of traffic flow records between nodes i and j; The association diagram adjacency matrix The Pearson correlation coefficient, based on traffic flow between nodes, is constructed and represented as follows: ; in, This represents the association graph corresponding to the i-th row and j-th column. The adjacency matrix; The Pearson correlation coefficient is expressed by the following formula: ; in, and Representing nodes respectively and Traffic flow data This represents the covariance between two vectors. and express and The standard deviation.
5. The intelligent traffic flow prediction method based on spatiotemporal feature information fusion according to claim 3, characterized in that, The spectral graph-based convolution method utilizes predefined distance graphs, adjacency graphs, and association graphs to perform convolution operations on the temporal feature information and historical traffic flow data, respectively, to extract features that integrate spatiotemporal dependencies, including: Based on the calculation formula of the spectral graph convolution method and the pre-obtained output of gated convolution, the propagation rule of spatial graph convolution is calculated, as follows: ; in, The characteristic matrix, This represents the Leaky ReLU activation function, while The kernel function represents graph convolution. For the corresponding diagrams, including , and , This is the output of the gated convolution; Feature matrices for the distance graph, adjacency graph, and association graph are generated using the propagation rule formula of spatial graph convolution. , and ; The feature matrix , and After concatenation, the data is input into a fully connected layer to generate features that incorporate spatiotemporal dependencies. The calculation formula is: ; in, Indicates a connection operation. and This represents the weight matrix and the bias term.
6. The intelligent traffic flow prediction method based on spatiotemporal feature information fusion according to claim 5, characterized in that, The output of the gated convolution The calculation formula is as follows: ; in, Represents the Hadamard product at the element level. It is represented as a sigmoid gate. This represents fused data containing temporal characteristics and historical traffic flow data. , , and These represent the dimensions of width, length, and input channels, respectively. Represents the convolution kernel. , The dimension of the output channel, and the convolution kernel. Will Mapping to output element ,in, and It is divided into two sub-elements with the same number of channels.
7. The intelligent traffic flow prediction method based on spatiotemporal feature information fusion according to claim 6, characterized in that, The final traffic flow prediction value is generated through the output layer of the DSMMGCN model based on features that incorporate spatiotemporal dependencies, as shown in the following formula: in, This represents the final traffic flow forecast.
8. The intelligent traffic flow prediction method based on spatiotemporal feature information fusion according to claim 7, characterized in that, The method further includes: after outputting traffic flow prediction values, using RMSE, MAE, or MAPE indices to evaluate the performance of the prediction results.
9. A traffic flow intelligent prediction device based on spatiotemporal feature information fusion, used to implement the traffic flow intelligent prediction method based on spatiotemporal feature information fusion as described in any one of claims 1-8, characterized in that, include: The data acquisition module is used to acquire historical traffic flow data; The first input module is used to input the historical traffic flow data into the pre-built DSMMGCN model; The first extraction module is used to process the input traffic flow data and extract time feature information through the time attention layer in the DSTMGCN model; The second input module is used to input the time feature information and historical traffic flow data into the spatial multi-graph convolutional layer; The second extraction module is used in the spatial multi-graph convolutional layer to perform convolution operations on the temporal feature information and historical traffic flow data based on the spectral graph convolution method, using predefined distance graphs, adjacency graphs and association graphs respectively, so as to extract features that integrate spatiotemporal dependencies. The prediction module is used to generate the final traffic flow prediction value through the output layer of the DSMMGCN model based on features that incorporate spatiotemporal dependencies.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-8.