Traffic flow prediction method based on combination of dynamic graph and static graph convolutional neural network

By combining dynamic and static graph convolutional neural networks and using GRU and Transformer models for multimodal feature fusion, the problems of low efficiency and poor robustness in handling spatiotemporal relationships in traffic flow prediction are solved, achieving high-precision and stable traffic flow prediction.

CN121921960APending Publication Date: 2026-04-24NANTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANTONG UNIV
Filing Date
2026-01-21
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods are inefficient and lack robustness when dealing with spatiotemporal relationships, making it difficult to adapt to the dynamic changes and complex characteristics of traffic networks.

Method used

By combining dynamic graph convolutional neural networks and static graph convolutional neural networks, and through GRU, Transformer models and multimodal feature fusion, an efficient traffic flow prediction framework is constructed, which utilizes dynamic adjacency matrices and multimodal information to model traffic conditions.

Benefits of technology

It achieves high-precision and robust prediction of traffic flow, adapts to the dynamic changes and complex characteristics of traffic networks, and improves the accuracy and stability of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921960A_ABST
    Figure CN121921960A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic flow prediction method combining dynamic and static graph convolutional neural networks. According to the method, firstly, a gating recursion unit and dynamic graph convolution are fused, a dynamic graph convolution gating recursion unit is constructed, and dynamic spatial-temporal characteristics of traffic flow are effectively extracted; secondly, combining a Pearson correlation coefficient and a Spearman correlation coefficient to construct an inter-node flow correlation matrix, and inputting the inter-node flow correlation matrix into a static graph convolutional network to extract inherent law features; meanwhile, multi-modal features such as flow, speed and occupancy are fused through cosine similarity, and the multi-modal features are embedded into a Value matrix of Transform, so that the feature expression capability is enhanced; and finally, combining the output of the dynamic branch and the output of the static multi-mode branch through a space door fusion mechanism to form a final prediction result. According to the method, dynamic and static graph structure information is fully fused, the multi-modal features and the attention mechanism are combined, the precision and robustness of traffic flow prediction are remarkably improved, and the method is suitable for complex and changeable actual traffic scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data mining technology and relates to a traffic flow prediction method that combines dynamic and static graph convolutional neural networks. Background Technology

[0002] Traffic flow prediction, a core task in intelligent transportation systems, aims to model and predict future traffic conditions with high accuracy based on historical observation data. Due to the strong temporal dependence (e.g., morning and evening rush hours) and complex spatial structure (e.g., road network topology) of traffic systems, traditional statistical models (such as ARIMA and SVR) have limited effectiveness in capturing nonlinear spatiotemporal relationships. With the development of deep learning, spatiotemporal modeling methods based on graph neural networks (GNNs) and sequence modeling networks (such as RNNs, LSTMs, and Transformers) have gradually become a research hotspot.

[0003] In recent years, Graph Convolutional Neural Networks (GCNs) have demonstrated powerful capabilities in extracting spatial dependencies between nodes (such as road segments and intersections) in traffic network structures. To model traffic relationships that change dynamically over time, researchers have further proposed Dynamic Graph Convolutional Neural Networks (DGCNs), which can adjust the adjacency matrix according to each time step to adapt to changes in traffic conditions. However, using either dynamic or static graphs alone has its limitations: dynamic graphs can model time-varying topologies, but they are computationally expensive and have poor stability; static graphs are structurally stable but struggle to adapt to sudden situations.

[0004] On the other hand, the Transformer architecture, with its multi-head attention mechanism, has significant advantages in processing long-sequence data and parallel computing, and is gradually being introduced into traffic prediction tasks to replace traditional recurrent neural networks (such as GRU and LSTM). Especially in temporal modeling, Transformer does not rely on sequential computation, can learn long-term dependencies more efficiently, and improve prediction accuracy. Summary of the Invention

[0005] Purpose of the Invention: To overcome the shortcomings of existing methods, the purpose of this invention is to provide a traffic flow prediction method based on a combination of dynamic and static graph convolutional neural networks (GCNs) using transformers. By fully considering temporal and spatial correlations, as well as multimodal information, it combines the static GCN's capture of fixed feature information with the dynamic GCN's timely extraction of traffic state information. This comprehensive approach enables more accurate information extraction and prediction.

[0006] Technical solution:

[0007] A traffic flow prediction method combining dynamic and static graph convolutional neural networks includes the following steps:

[0008] Step 1: Represent the traffic network as a graph G=(V,E,A), where V is the set of sensor nodes, E is the set of edges, and A is the initial adjacency matrix based on the physical distance between nodes;

[0009] Step 2: Construct and apply a dynamic graph convolutional gated recursive unit (GRU) for prediction. The process includes: generating a spatiotemporal embedding matrix using a learnable spatial embedding matrix and a temporal embedding matrix; generating a dynamic graph embedding and a dynamic adjacency matrix by combining the dynamic signal extracted from the input at the current time; and fusing the dynamic graph convolution operation with the GRU to model the traffic flow sequence and obtain the first prediction result.

[0010] Step 3: Construct the adjacency matrix for the static graph convolutional network (GCN). The process includes: jointly calculating the traffic correlation between nodes using the Pearson correlation coefficient and the Spearman correlation coefficient to obtain the traffic correlation matrix; and fusing the traffic correlation matrix with the physical distance information between nodes to form the static adjacency matrix.

[0011] Step 4: Construct and apply a Transformer-static GCN model that integrates multimodal features for prediction. The process includes: selecting traffic flow as the main feature; calculating the similarity matrix between the speed feature and the occupancy feature and the main feature using cosine similarity; weighting and fusing the matrix and integrating it into the Value matrix in the Transformer model; performing singular value decomposition on the main feature matrix and reconstructing it after enhancement by the Graph Attention Network (GAT); then inputting it into the static GCN constructed with the static adjacency matrix to extract features and obtain the second prediction result.

[0012] Step 5: Combine the first prediction result obtained in Step 2 with the second prediction result obtained in Step 4 using a spatial gate fusion mechanism to obtain the final traffic flow prediction result.

[0013] Preferably, in step 2, the specific process of generating the dynamic graph embedding and dynamic adjacency matrix includes:

[0014] Initialize the learnable spatial embedding matrix and temporal embedding matrix Element-wise multiplication yields the spatiotemporal embedding matrix. ;

[0015] Input at the current time step Dynamic signals are extracted using a multilayer perceptron (MLP). ;

[0016] Will and Element-wise multiplication followed by activation function processing generates a dynamic graph embedding. ;

[0017] Embedded by the dynamic graph Generate a dynamic adjacency matrix and perform normalization.

[0018] Preferably, in step 2, the specific method for fusing the dynamic graph convolution operation with GRU is as follows:

[0019] Before the GRU's update gate and reset gate are calculated, the current input feature vector, the hidden state matrix of all nodes in the previous time step, and the dynamic graph embedding are concatenated to form a combined feature.

[0020] Perform a dynamic graph convolution operation on the combined features to obtain gated input features;

[0021] The gating input features are input into the update gate and reset gate of the GRU for gating calculation.

[0022] Preferably, in step 3, the specific process of constructing the static adjacency matrix includes:

[0023] Calculate the Pearson correlation coefficient matrix of traffic flow sequences between nodes. ;

[0024] Calculate the Spearman correlation coefficient matrix of traffic flow sequences between nodes. ;

[0025] According to preset weighting coefficients right and Weighted fusion is performed to obtain a comprehensive correlation matrix. ;

[0026] Will The static adjacency matrix is ​​formed by fusing it with a distance matrix based on physical distance.

[0027] Preferably, in step 4, the specific method for integrating multimodal features into the Transformer model is as follows:

[0028] Calculate the cosine similarity matrix between flow rate characteristics and velocity characteristics. ;

[0029] Calculate the cosine similarity matrix between flow characteristics and occupancy characteristics. ;

[0030] By adjusting parameters and We perform a weighted summation to obtain the multimodal similarity matrix M;

[0031] After normalizing M, it is added to the Value matrix in the Transformer attention mechanism.

[0032] Preferably, the specific process of processing the main feature matrix in step 4 includes:

[0033] Singular value decomposition is performed on the traffic principal feature matrix A to obtain the time feature matrix U and the spatial feature matrix V;

[0034] U and V are respectively input into the graph attention network GAT for feature enhancement;

[0035] The enhanced U and V are recombined with the singular value matrix to reconstruct the enhanced principal characteristic matrix.

[0036] Preferably, the spatial gate fusion mechanism in step 5 is specifically as follows:

[0037] The first prediction result is activated using the hyperbolic tangent function;

[0038] The second prediction result is activated by the Sigmoid function;

[0039] The two activated results are multiplied element-wise to obtain the final prediction result.

[0040] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described thereon.

[0041] The present invention also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described thereon.

[0042] The present invention also provides a traffic flow prediction system, including the aforementioned electronic device, for performing the method described.

[0043] Beneficial Effects: This model integrates dynamic graph convolution, gated recurrent units (GRU), graph convolutional networks (GCN), and Transformer structures, proposing a high-precision traffic flow prediction framework oriented towards multimodal features. First, to fully exploit the temporal dynamics of traffic data, a GRU network is introduced to model traffic flow sequences, effectively capturing their short-term and long-term temporal dependencies. Building upon this, a dynamic graph convolution module is constructed, learning dynamic adjacency relationships through node embedding matrices. The adjacency matrix of the original static graph is decomposed into two learnable low-rank matrices to improve the model's adaptability to time-varying topologies and enhance its ability to represent complex traffic patterns.

[0044] To further model the spatial dependencies between nodes, we consider the statistical correlation and physical distance characteristics of traffic flow between nodes in the transportation network. We use Pearson correlation coefficient and Spearman rank correlation coefficient together to measure the correlation of node traffic flow and integrate the physical distance information between nodes to construct a hybrid adjacency matrix that combines statistical and physical attributes. This matrix is ​​then input into the static GCN to further explore the potential structural patterns in the transportation network.

[0045] At the feature level, considering that traffic flow prediction depends not only on the flow itself but also on features such as speed and occupancy, the model further introduces these two modalities. A similarity matrix is ​​calculated between them using cosine similarity, and their weights in the model are flexibly controlled through an adjustable parameter. This modal information is effectively integrated into the Value matrix of the Transformer structure, enhancing the model's ability to fuse and model multimodal information and improving its ability to perceive complex feature interactions in traffic scenarios.

[0046] Ultimately, the model will fuse the spatiotemporal modeling branch, which is based on dynamic graph convolution and GRU, with the Transformer-GCN prediction branch that integrates multimodal features. By combining the prediction results of the two modules, the model can give full play to their respective advantages and achieve high-precision and robust prediction of traffic flow. It is especially suitable for handling real-world scenarios in traffic networks that are dynamically changing and have complex and diverse features. Attached Figure Description

[0047] Figure 1 This is the overall flowchart.

[0048] Figure 2 A schematic diagram of dynamic graph convolution implemented using a spatiotemporal embedding matrix.

[0049] Figure 3 This is a schematic diagram of calculating the adjacency matrix by combining the Pearson correlation coefficient and the Spearman correlation coefficient.

[0050] Figure 4 This is a schematic diagram of a multimodal transformer.

[0051] Figure 5 This is a schematic diagram illustrating the extraction of main feature information through decomposition.

[0052] Figure 6 This is the overall framework diagram of the model. Detailed Implementation

[0053] The present invention will be further described below with reference to the embodiments and accompanying drawings.

[0054] Example 1

[0055] This embodiment provides a traffic flow prediction method that combines dynamic and static graph convolutional neural networks. The overall process is as follows: Figure 1 As shown, the specific steps include the following:

[0056] Step 1: The traffic network can be represented as a graph G=(V, E, A), where: V is a set of N nodes, each node representing a sensor located at a corresponding position in the road network, responsible for recording traffic information at that location; E is the set of edges; and A is a graph adjacency matrix derived based on factors such as pairwise distances between nodes in the network. Gated Recurrent Units (GRUs) can effectively capture temporal and spatial features. Therefore, a variant of RNN, GRU, is chosen. The specific steps are as follows:

[0057] 1-1 Reset Gate ): Determines the hidden state at the current moment. Does it depend on the hidden state of the previous moment? .

[0058]

[0059] 1-2 Update Gate ): Determines how much new information from the current moment is retained for the next moment.

[0060]

[0061] , These are the trainable weight matrices corresponding to the reset gate and the update gate, respectively. , These are the trainable bias vectors corresponding to the reset gate and the update gate, respectively. This represents the model input feature vector at time t. This represents the Sigmoid activation function.

[0062] Step 2 flowchart is as follows Figure 2 As shown, a spatiotemporal embedding matrix is ​​generated by element-wise multiplying a learnable spatial embedding matrix with a temporal embedding matrix. A multilayer perceptron (MLP) is then used to extract dynamic signals from the input data, which are combined with the spatiotemporal embedding to obtain a dynamic graph embedding. After normalization, this embedding is applied to dynamic graph convolution to achieve spatiotemporal modeling of traffic flow. The specific steps are as follows:

[0063] 2-1 Initialize a learnable spatial embedding matrix Due to the periodicity of urban traffic flow, spatial embedding matrix and temporal embedding matrix are used. The spatiotemporal embedding matrix is ​​formed by element-wise dot product. The specific formula is as follows:

[0064]

[0065] 2-2 At time step t, the input of the current time step is... Dynamic signals are extracted through multilayer perceptron (MLP) layers. The formula is:

[0066]

[0067] 2-3 pairs and Perform element-wise multiplication to generate a dynamic graph embedding. The formula is:

[0068]

[0069] 2-4 pairs of generated dynamic adjacency matrices Perform normalization and substitute into the graph convolution formula

[0070]

[0071] Represents the dynamic adjacency matrix at time t The degree matrix. This represents the node feature matrix input to the graph convolutional layer. , This represents the trainable weight matrix and bias term of the graph convolutional layer. , This represents the trainable parameter matrix used for low-rank decomposition and preventing overfitting in the optimized graph convolution formula. Represents the identity matrix.

[0072] Step 3, the specific steps are as follows:

[0073] Unlike the original GRU, the information is first processed through the preceding dynamic graph convolution before passing through the update and reset gates. This fully considers the spatiotemporal correlation and extracts the most effective traffic flow information at the current time. The complete modified GRU formula is as follows:

[0074]

[0075] This indicates that a dynamic graph convolution operation is performed on the concatenated vector sequence within the brackets. This represents the hidden state matrix of all nodes at time t-1. This indicates a concatenation operation of vectors or matrices along the feature dimension. This represents the Hadamardi accumulation. Let represent the candidate hidden state vector at time t. , , , , , This represents the trainable weight parameters and bias parameters in the GRU after the fusion dynamic graph convolution operation.

[0076] Step 4 flowchart is as follows Figure 3 As shown, by combining the Pearson correlation coefficient and the Spearman correlation coefficient, and weighting the correlation calculation results of the two proportionally, the impact of outliers on the correlation of traffic flow between road nodes is suppressed. The specific steps are as follows:

[0077] 4-1 Traffic flows between road nodes exhibit a certain correlation. First, the Pearson correlation coefficient is used to calculate this correlation, as shown in the following formula:

[0078]

[0079] , Indicates a historical time window Within the range, the traffic flow observations of nodes i and j at time t. , This indicates that nodes i and j are within the historical time window. The maximum value of the internal traffic flow sequence.

[0080] 4-2 Then, the Spearman correlation coefficient is used to calculate the correlation, as shown in the following formula:

[0081]

[0082] 4-3 The correlation coefficients obtained from the two methods are added together in a certain proportion to prevent the influence of outliers. The formula is as follows:

[0083]

[0084] This represents the adjustable weighting parameter used to fuse the Pearson and Spearman correlation coefficients.

[0085] Step 5 flowchart is as follows Figure 4 As shown, by fusing the multimodal cosine similarity matrices of traffic flow-speed and traffic flow-occupancy, and then normalizing them, the result is used as the Value matrix of the Transformer. Attention weights are dynamically adjusted to capture traffic flow pattern similarity, thereby improving prediction accuracy. The specific steps are as follows:

[0086] 5-1 In traffic flow prediction, the cosine similarity matrix is ​​a tool used to capture the similarity of traffic flow patterns between different time steps or spatial locations. It helps the model better understand the dynamic changes in traffic flow, thereby improving prediction accuracy. First, the cosine similarity matrix of flow rate and speed is calculated, and its formula is as follows:

[0087]

[0088]

[0089]

[0090]

[0091] , , This indicates that they represent the positions respectively. The traffic flow, speed, and occupancy feature vectors at time t.

[0092] 5-2 Next, calculate the cosine similarity matrix of traffic and occupancy, and add it to the cosine similarity matrix calculated in the previous step by a single point ratio. The formula is as follows:

[0093]

[0094] 5-3 After the first two steps, the final cosine similarity matrix is ​​normalized and then passed into the Value matrix in the transformer. This yields the required transformer model, and the attention calculation formula after passing it in is as follows:

[0095]

[0096] This represents the dimension of the key vector K.

[0097] Step 6 flowchart is as follows Figure 5 As shown, the specific steps are as follows:

[0098] 6-1 After decomposing the main feature matrix into temporal and spatial feature matrices using singular value decomposition, each matrix is ​​passed through a graph attention network layer before being restored to the main feature matrix. This allows for the extraction of important information by assigning weights in the temporal and spatial dimensions. The formula is as follows:

[0099]

[0100]

[0101] Where A is the principal feature matrix, U is the feature matrix of the time dimension after decomposition, V is the feature matrix of the spatial dimension after decomposition, and the singular value Σ is used to reflect the importance of the spatiotemporal pattern and select key features.

[0102] 6-2 Before the main features pass through GCN, they first pass through several layers of the improved transformer model described above. This can extract multimodal information and make up for the shortcomings of insufficient global information aggregation in the previous GRU.

[0103] 6-3 The results obtained in 6-1 are put into the static GCN network to extract the inherent spatial structure and regularity features of traffic flow as the output of a branch.

[0104] Step 7: Overall model block diagram as follows Figure 6 As shown, the specific steps are as follows:

[0105] The spatial gate fusion mechanism is used to fuse the outputs from the two branches to obtain the final prediction result, as shown in the following formula:

[0106]

[0107] This represents the first predicted output obtained from the branch of the dynamic graph convolution gated recursive unit. This represents the second prediction output obtained from the Transformer-static GCN branch that fuses multimodal features.

[0108] Example 2

[0109] One embodiment of the electronic device described herein can be a traffic flow prediction server or an edge computing device. The device includes at least one processor (such as a CPU or GPU), a memory (such as RAM, ROM, or a hard disk), an input / output interface, and a communication module (such as an Ethernet card or a 5G module). The memory stores a computer program, which, when executed by the processor, is configured to perform the aforementioned actions. Figure 1 The traffic flow prediction method shown and described in any step of Embodiment 1. The device receives real-time traffic data from roadside sensors (such as loop detectors and cameras) via a network, runs a prediction model, and sends the prediction results to the traffic control center or information dissemination system.

[0110] Example 3

[0111] The computer-readable storage medium in this embodiment can be any physical or non-physical medium containing program code, such as: a server hard drive, solid-state drive (SSD), read-only memory (ROM), random access memory (RAM), USB flash drive, portable hard drive, optical disc (such as CD-ROM, DVD), or cloud storage space. Instructions are stored on this medium, which, when executed by the processor of an electronic device, cause the device to implement the traffic flow prediction method described above.

[0112] Example 4

[0113] One implementation of the traffic flow prediction system in this embodiment may include: a data acquisition module, a preprocessing module, a model calculation module, and a result output module. The model calculation module is implemented using the electronic device described in Embodiment 2. The data acquisition module is used to acquire raw traffic flow, speed, and occupancy data from the traffic sensor network; the preprocessing module is used for data cleaning, normalization, and graph structure construction; the model calculation module loads and runs the trained prediction model, executing the method described in Embodiment 1; the result output module is used to visualize the predicted future traffic flow state or transmit it to downstream application systems such as signal control and navigation.

Claims

1. A traffic flow prediction method combining dynamic and static graph convolutional neural networks, characterized in that, Includes the following steps: Step 1: Represent the traffic network as a graph G=(V,E,A), where V is the set of sensor nodes, E is the set of edges, and A is the initial adjacency matrix based on the physical distance between nodes; Step 2: Construct and apply a dynamic graph convolutional gated recursive unit (GRU) for prediction. The process includes: generating a spatiotemporal embedding matrix using a learnable spatial embedding matrix and a temporal embedding matrix; generating a dynamic graph embedding and a dynamic adjacency matrix by combining the dynamic signal extracted from the input at the current time; and fusing the dynamic graph convolution operation with the GRU to model the traffic flow sequence and obtain the first prediction result. Step 3: Construct the adjacency matrix for the static graph convolutional network (GCN). The process includes: jointly calculating the traffic correlation between nodes using the Pearson correlation coefficient and the Spearman correlation coefficient to obtain the traffic correlation matrix; and fusing the traffic correlation matrix with the physical distance information between nodes to form the static adjacency matrix. Step 4: Construct and apply a Transformer-static GCN model that integrates multimodal features for prediction. The process includes: selecting traffic flow as the main feature; calculating the similarity matrix between the speed feature and the occupancy feature and the main feature using cosine similarity; weighting and fusing the matrix and integrating it into the Value matrix in the Transformer model; performing singular value decomposition on the main feature matrix and reconstructing it after enhancement by the Graph Attention Network (GAT); then inputting it into the static GCN constructed with the static adjacency matrix to extract features and obtain the second prediction result. Step 5: Combine the first prediction result obtained in Step 2 with the second prediction result obtained in Step 4 using a spatial gate fusion mechanism to obtain the final traffic flow prediction result.

2. The method according to claim 1, characterized in that, In step 2, the specific process of generating the dynamic graph embedding and dynamic adjacency matrix includes: Initialize the learnable spatial embedding matrix and temporal embedding matrix Element-wise multiplication yields the spatiotemporal embedding matrix. ; Input at the current time step Dynamic signals are extracted using a multilayer perceptron (MLP). ; Will and Element-wise multiplication followed by activation function processing generates a dynamic graph embedding. ; Embedded by the dynamic graph Generate a dynamic adjacency matrix and perform normalization.

3. The method according to claim 1 or 2, characterized in that, In step 2, the specific method for fusing the dynamic graph convolution operation with GRU is as follows: Before the GRU's update gate and reset gate are calculated, the current input feature vector, the hidden state matrix of all nodes in the previous time step, and the dynamic graph embedding are concatenated to form a combined feature. Perform a dynamic graph convolution operation on the combined features to obtain gated input features; The gating input features are input into the update gate and reset gate of the GRU for gating calculation.

4. The method according to claim 1, characterized in that, In step 3, the specific process of constructing the static adjacency matrix includes: Calculate the Pearson correlation coefficient matrix of traffic flow sequences between nodes. ; Calculate the Spearman correlation coefficient matrix of traffic flow sequences between nodes. ; According to preset weighting coefficients right and Weighted fusion is performed to obtain a comprehensive correlation matrix. ; Will The static adjacency matrix is ​​formed by fusing it with a distance matrix based on physical distance.

5. The method according to claim 1, characterized in that, In step 4, the specific method for incorporating multimodal features into the Transformer model is as follows: Calculate the cosine similarity matrix between flow rate characteristics and velocity characteristics. ; Calculate the cosine similarity matrix between flow characteristics and occupancy characteristics. ; By adjusting parameters and We perform a weighted summation to obtain the multimodal similarity matrix M; After normalizing M, it is added to the Value matrix in the Transformer attention mechanism.

6. The method according to claim 1, characterized in that, The specific process of processing the main feature matrix in step 4 includes: Singular value decomposition is performed on the traffic principal feature matrix A to obtain the time feature matrix U and the spatial feature matrix V; U and V are respectively input into the graph attention network GAT for feature enhancement; The enhanced U and V are recombined with the singular value matrix to reconstruct the enhanced principal characteristic matrix.

7. The method according to claim 1, characterized in that, The spatial gate fusion mechanism in step 5 is specifically as follows: The first prediction result is activated using the hyperbolic tangent function; The second prediction result is activated by the Sigmoid function; The two activated results are multiplied element-wise to obtain the final prediction result.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.

10. A traffic flow prediction system, characterized in that, Includes the electronic device as described in claim 8, for performing the method as described in any one of claims 1 to 7.