Short-term traffic flow prediction method based on spatio-temporal graph neural network

By constructing a network graph structure of the traffic network and combining it with historical traffic flow data, and using a spatiotemporal graph neural network for feature fusion, the problem of difficulty in capturing complex spatial dependencies in existing methods is solved, and accurate prediction and management optimization of traffic flow are achieved.

CN122200975APending Publication Date: 2026-06-12珠海城市职业技术学院

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
珠海城市职业技术学院
Filing Date
2026-03-10
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods struggle to effectively capture the complex spatial connections and dependencies between nodes in large-scale, complex road networks, resulting in limited ability to represent complex spatiotemporal propagation patterns of traffic flow and failing to meet the needs of intelligent traffic management and real-time navigation guidance.

Method used

A spatiotemporal graph neural network-based approach is adopted to construct a network structure of the traffic road network. Feature extraction is performed by combining historical traffic flow data, and feature fusion is carried out through neural networks of multiple spatiotemporal modules. Finally, a fully connected layer is used for mapping to determine the traffic flow prediction value.

Benefits of technology

It enables accurate prediction of traffic flow, provides accurate basis for traffic management and planning, improves the operational efficiency and safety of the transportation system, and can respond to traffic congestion in advance and optimize resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122200975A_ABST
    Figure CN122200975A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a short-term traffic flow prediction method based on a space-time graph neural network. The method comprises: acquiring a corresponding traffic road network in a preset area, and constructing a network graph structure corresponding to the traffic road network; acquiring historical traffic flow data corresponding to the preset area, and taking the historical traffic flow data as node features of the network graph structure to obtain a road network graph with time sequence features; inputting the road network graph with time sequence features into a neural network comprising multiple space-time modules for feature extraction to obtain space-time joint features corresponding to the preset area; and performing full connection layer mapping on the space-time joint features to determine a traffic flow prediction value of each node based on a mapping result. The present application can accurately determine the traffic flow prediction value of each node in the preset area, which helps to take measures in advance to cope with traffic congestion, optimize traffic resource allocation, and improve the operation efficiency and safety of the entire traffic system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of traffic flow prediction technology, specifically to a short-term traffic flow prediction method based on a spatiotemporal graph neural network. Background Technology

[0002] With the acceleration of urbanization, traffic congestion has become a core issue affecting urban operational efficiency and residents' quality of life. Accurate short-term traffic flow prediction is a key technological foundation for building intelligent traffic management, real-time navigation and guidance, and other applications. Traditional traffic flow prediction methods are mainly divided into methods based on mathematical models and methods based on statistical analysis. The former relies on specific physical assumptions and is difficult to adapt to the nonlinear dynamics of large-scale complex road networks; the latter, such as the autoregressive integral moving average model, is insufficient in capturing long-term spatiotemporal dependencies. In recent years, deep learning technologies, especially recurrent neural networks and convolutional neural networks, have been introduced into this field to capture the temporal and spatial characteristics of traffic data. However, these methods usually treat traffic networks as regular grids or do not consider spatial topology, and cannot effectively model the complex spatial connections and dependencies between nodes in real-world road networks.

[0003] In related technologies, spatial feature extraction and time series prediction are usually treated as two relatively independent stages, failing to achieve true spatiotemporal joint modeling and resulting in limited ability to represent complex spatiotemporal propagation patterns of traffic flow. Therefore, there is an urgent need for an integrated technical solution that can deeply integrate the spatiotemporal characteristics of road networks, achieve multi-scale joint prediction, and directly serve dynamic route planning and travel decision-making with the prediction results. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of this application provide a short-term traffic flow prediction method based on a spatiotemporal graph neural network.

[0005] According to one aspect of the embodiments of this application, a short-term traffic flow prediction method based on a spatiotemporal graph neural network is provided, comprising: acquiring a traffic network corresponding to a preset area and constructing a network graph structure corresponding to the traffic network; acquiring historical traffic flow data corresponding to the preset area and using the historical traffic flow data as node features of the network graph structure to obtain a road network graph with temporal features; inputting the road network graph with temporal features into a neural network containing multiple spatiotemporal modules for feature extraction to obtain spatiotemporal joint features corresponding to the preset area; and mapping the spatiotemporal joint features through a fully connected layer to determine the traffic flow prediction value of each node based on the mapping result.

[0006] According to one aspect of the embodiments of this application, the step of inputting the road network map with temporal features into a neural network containing multiple spatiotemporal modules for feature extraction to obtain the spatiotemporal joint features corresponding to the preset region includes: determining a node feature sequence containing spatial dependencies corresponding to the road network map with temporal features based on the neural network; determining the initial spatiotemporal features corresponding to the node feature sequence containing spatial dependencies; performing hierarchical processing on the initial spatiotemporal features based on the multiple spatiotemporal modules to obtain multi-level spatiotemporal feature fusion, so as to determine the spatiotemporal joint features corresponding to the preset region based on the multi-level spatiotemporal feature fusion.

[0007] According to one aspect of the embodiments of this application, determining the node feature sequence containing spatial dependencies corresponding to the road network map with temporal features based on the neural network includes: performing graph convolutional layer processing on the road network map with temporal features to obtain the topological connectivity relationship corresponding to the road network map; determining the neighboring node features corresponding to each node based on the topological connectivity relationship, and determining the spatial dependency relationship corresponding to each node based on the neighboring node features; and determining the node feature sequence containing spatial dependencies corresponding to the road network map with temporal features based on the spatial dependency relationship corresponding to each node.

[0008] According to one aspect of the embodiments of this application, the step of mapping the spatiotemporal joint features using a fully connected layer to determine the traffic flow prediction value of each node based on the mapping result includes: inputting the spatiotemporal joint features into a fully connected neural network layer of the neural network; mapping the high-dimensional features in the spatiotemporal joint features to the traffic flow prediction value corresponding to each node through the regression output layer in the fully connected neural network layer; and normalizing the traffic flow prediction value to obtain the traffic flow prediction value of each node.

[0009] According to one aspect of the embodiments of this application, constructing the network graph structure corresponding to the traffic network includes: determining the intersections and road segment connections corresponding to the traffic network; using the intersections as nodes and the road segment connections as edges; and constructing the network graph structure corresponding to the traffic network based on the nodes and the edges.

[0010] According to one aspect of the embodiments of this application, the step of using the historical traffic flow data as node features of the network graph structure to obtain a road network graph with time-series features includes: determining traffic state parameters corresponding to each node based on the historical traffic flow data, wherein the traffic state parameters include traffic flow, average vehicle speed, and time information; performing time alignment processing on the traffic state parameters of each node to obtain a time-series feature vector corresponding to each node, and stacking the time-series feature vectors of all nodes in node order to construct a three-dimensional node feature matrix; associating the three-dimensional node feature matrix with the topology information of the network graph structure to obtain the road network graph with time-series features containing static topological connection relationships and dynamic node features.

[0011] According to one aspect of the embodiments of this application, the method further includes: determining an adjacency matrix corresponding to the three-dimensional feature matrix based on the topological information of the network structure, wherein the element values ​​of the adjacency matrix represent whether there is a connection between corresponding nodes; associating the three-dimensional feature matrix and the adjacency matrix to obtain a road network map with temporal features based on the association result.

[0012] According to one aspect of the embodiments of this application, the method further includes: determining the toll cost corresponding to each road segment within the preset area based on the traffic flow prediction value of each node; and determining a target navigation path based on the toll cost to control the vehicle to travel according to the target navigation path.

[0013] According to one aspect of the embodiments of this application, the method further includes: determining a sequence of traffic flow prediction values ​​corresponding to each node at different time scales; performing weighted fusion on the traffic flow prediction value sequences corresponding to different time scales to obtain a fusion result; determining multiple candidate navigation paths including a time dimension and the toll costs corresponding to the multiple candidate navigation paths based on the fusion result; obtaining the departure time of the vehicle, and determining a target navigation path from the multiple candidate navigation paths based on the departure time.

[0014] According to one aspect of the embodiments of this application, a short-term traffic flow prediction device based on a spatiotemporal graph neural network is provided, comprising: a model construction module for acquiring a traffic network corresponding to a preset area and constructing a network graph structure corresponding to the traffic network; a feature module for acquiring historical traffic flow data corresponding to the preset area and using the historical traffic flow data as node features of the network graph structure to obtain a road network graph with temporal features; a joint module for inputting the road network graph with temporal features into a neural network containing multiple spatiotemporal modules for feature extraction to obtain spatiotemporal joint features corresponding to the preset area; and a prediction module for mapping the spatiotemporal joint features through a fully connected layer to determine the traffic flow prediction value of each node based on the mapping result.

[0015] According to one aspect of the embodiments of this application, an electronic device is provided, including: a memory and a processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0016] According to one aspect of the embodiments of this application, the embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect as described above.

[0017] According to one aspect of the embodiments of this application, the embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect as described above.

[0018] In the technical solution provided by the embodiments of this application, by acquiring the traffic network corresponding to a preset area and constructing a network diagram structure, this operation presents the actual complex traffic network in an intuitive and computer-processable graphical manner, laying a solid foundation for subsequent data analysis and processing, and enabling the clear display of various elements in the traffic system and their interrelationships. Next, historical traffic flow data of the preset area is used as the node features of the network diagram structure, thereby obtaining a road network diagram with temporal characteristics. Historical traffic flow data contains rich traffic operation patterns and rules; integrating it into the network diagram structure allows the road network diagram to not only possess spatial topological relationships but also add dynamic information in the temporal dimension, enabling the road network diagram to more comprehensively and realistically reflect the actual operation of the traffic system. Then, the road network diagram with temporal characteristics is input into a neural network containing multiple spatiotemporal modules for feature extraction, obtaining the spatiotemporal joint features corresponding to the preset area. With its powerful nonlinear fitting ability and ability to process complex data, the neural network can deeply mine the hidden spatiotemporal features in the road network diagram, capture the changing patterns of traffic flow in time and space, and their mutual influence relationships, thereby extracting more representative and predictive spatiotemporal joint features. Finally, the spatiotemporal joint features are mapped using a fully connected layer. Based on the mapping results, the traffic flow prediction value for each node is determined. The fully connected layer can integrate the various feature information extracted earlier and perform linear combination and nonlinear transformation of the features through learned weight parameters. Finally, it outputs the traffic flow prediction value for each node, providing an accurate and reliable basis for traffic management, planning, and the operation of intelligent transportation systems. This helps to take measures in advance to deal with traffic congestion, optimize the allocation of traffic resources, and improve the operational efficiency and safety of the entire transportation system.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings: Figure 1 This is a schematic diagram illustrating an implementation environment for short-term traffic flow prediction based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 2 This is a schematic flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 1 ; Figure 3 This is a schematic flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 2 ; Figure 4 This is a schematic flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 3 ; Figure 5 This is a schematic flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 4 ; Figure 6 This is a schematic flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 5 ; Figure 7 This is a schematic flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 6 ; Figure 8 This is a schematic flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 7 ; Figure 9 This is a schematic flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 8 ; Figure 10 This is a schematic flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 9 ; Figure 11 This is a block diagram illustrating a short-term traffic flow prediction device based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 12 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0022] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0023] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0024] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0025] First, it's important to understand that Spatio-Temporal Graph Neural Networks (STGNNs) are deep learning models specifically designed to process data with both temporal and spatial dimensions. Their core lies in fusing graph neural networks (GNNs) with time series analysis techniques to simultaneously capture the spatial structural relationships and dynamic temporal changes between nodes. This model takes a spatio-temporal graph as input, where nodes represent spatial entities such as traffic intersections and sensors, edges represent connections between nodes, and node features are dynamically updated over time (e.g., traffic flow and speed at different times). Graph convolution operations (such as GCN and GAT) aggregate neighbor node information to obtain spatial context representations. Then, recurrent neural units (such as LSTM) or attention mechanisms are used to further mine temporal patterns. Finally, a fully connected layer maps and outputs predicted node attributes for future times (e.g., short-term traffic flow). Its advantage lies in its ability to comprehensively characterize the complex interaction between "spatial dependence and temporal evolution" in traffic systems, providing accurate modeling capabilities for tasks such as traffic prediction and anomaly detection.

[0026] Short-term traffic flow prediction based on spatiotemporal graph neural networks is an advanced prediction method that integrates graph structure and spatiotemporal information mining capabilities. It first abstracts the traffic network as a graph structure, where traffic elements such as intersections and road segments are treated as nodes, and the connections between them form edges, thus accurately characterizing the spatial topological features of the traffic system. Simultaneously, historical traffic flow data (such as traffic volume and speed at different times for each node) is used as node features, endowing the graph structure with temporal dimension information. Next, leveraging the powerful feature extraction and learning capabilities of spatiotemporal graph neural networks, it delves into the complex temporal and spatial relationships and dynamic changes in traffic flow, capturing the spatiotemporal dependence of traffic flow. Finally, based on the learned spatiotemporal joint features, it accurately predicts traffic flow in the near future, providing a scientific basis for traffic management departments to formulate real-time control strategies, optimize traffic resource allocation, and alleviate urban traffic congestion.

[0027] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an implementation environment for short-term traffic flow prediction based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. Figure 1As shown, the server 120 acquires the traffic network of a preset area from the terminal device 110 and constructs the corresponding network diagram structure. Furthermore, the server 120 can also acquire historical traffic flow data corresponding to the preset area through the terminal device 110 and use this historical traffic flow data as node features of the network diagram structure to obtain a road network diagram with temporal features. Then, the server 120 inputs the road network diagram with temporal features into a neural network containing multiple spatiotemporal modules for feature extraction to obtain the spatiotemporal joint features corresponding to the preset area. Finally, the server 120 performs fully connected layer mapping on the spatiotemporal joint features to determine the traffic flow prediction value for each node based on the mapping result. This achieves accurate prediction of short-term traffic flow within the preset area.

[0028] in, Figure 1 The server 120 shown can be, for example, a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. There are no restrictions on this.

[0029] In the field of traffic management and planning, accurate traffic flow forecasting is a crucial prerequisite for achieving efficient traffic scheduling, alleviating congestion, and improving the travel experience. Traditional traffic flow forecasting methods are mainly divided into two categories: methods based on mathematical models and methods based on statistical analysis. Methods based on mathematical models typically construct forecasting models based on specific physical assumptions, such as analogizing traffic flow to a fluid and using fluid dynamics principles to simulate the movement of traffic flow. However, real-world large-scale complex road networks are highly nonlinear and dynamic. Traffic flow is influenced by a variety of factors, such as road conditions, weather conditions, emergencies, and driver behavior. These specific physical assumptions cannot fully and accurately reflect actual traffic conditions, resulting in poor adaptability of this method when facing complex and ever-changing real-world road networks, and the forecasting accuracy is insufficient to meet practical needs.

[0030] To address these issues, embodiments of this application propose a short-term traffic flow prediction method based on a spatiotemporal graph neural network, a short-term traffic flow prediction device based on a spatiotemporal graph neural network, an electronic device, a computer-readable storage medium, and a computer program product, which will be described in detail below.

[0031] Please see Figure 2 , Figure 2This is a flowchart illustrating a short-term traffic flow prediction method based on a spatiotemporal graph neural network, as shown in an exemplary embodiment of this application. This method can be applied to... Figure 1 The implementation environment shown is specifically executed by server 120 within that implementation environment. It should be understood that this method can also be applied to other exemplary implementation environments and executed by devices in other implementation environments; this embodiment does not limit the implementation environment to which the method is applicable.

[0032] like Figure 2 As shown, in one possible embodiment provided in this application, the above-described short-term traffic flow prediction method based on spatiotemporal graph neural networks includes at least steps S210 to S240, which are described in detail below: Step S210: Obtain the corresponding traffic network within the preset area and construct the network diagram structure corresponding to the traffic network.

[0033] For example, road network data within a preset area, including road topology, intersection locations, and sensor deployment points, can be obtained through a geographic information system or traffic management department. Then, road sensors or intersections in the traffic network are abstracted as nodes in a graph structure, with each node corresponding to a specific traffic detection point or road intersection. Next, edges are constructed between nodes based on road connectivity, where an edge connects two nodes if and only if the corresponding road segments are physically connected or have a traffic flow relationship, thus forming a graph data structure containing spatial topology information.

[0034] Step S220: Obtain historical traffic flow data corresponding to the preset area, and use the historical traffic flow data as the node features of the network diagram structure to obtain a road network diagram with time-series features.

[0035] For example, historical traffic flow data, including time-series information such as flow rate, speed, and density, is obtained from road intersections and sensor deployment locations within a preset area through traffic management departments, geomagnetic sensors, cameras, GPS trajectory data, or public traffic data platforms. This data needs to undergo data cleaning to remove missing and outlier values, and its dimensions are standardized or normalized. The traffic network is then abstracted into a graph structure. The feature vector of a node corresponding to a road intersection or sensor location is composed of the historical traffic flow time-series data for that node's location. For example, traffic data from every 5 minutes of the past hour can be used as the dimension of the node feature vector. In addition, edge connections are constructed based on the actual connectivity of the road, and the edge weights are dynamically adjusted based on road distance, number of lanes, speed limits, or real-time traffic conditions. This forms an adjacency matrix or adjacency list containing spatial topology information. Then, neighbor node information can be aggregated on the node features through graph convolution operations, and the spatial dependencies of the road network and the time series data in the node features can be captured. The dynamic changes in time are modeled through temporal convolution or temporal gating mechanisms. Finally, the spatial graph convolution and time series modeling are integrated to obtain the feature representation of each node that has both spatial neighborhood information and historical temporal features, thus forming a road network graph structure with temporal features.

[0036] Step S230: Input the road network map with temporal features into a neural network containing multiple spatiotemporal modules for feature extraction to obtain the spatiotemporal joint features corresponding to the preset region.

[0037] For example, a road network map with temporal features is first used as input data, where each node contains historical traffic flow time-series features and edges reflect road connectivity information. Then, multiple stacked spatiotemporal modules process the data layer by layer. Each spatiotemporal module consists of graph convolutional layers and temporal convolutional layers. The graph convolutional layer performs neighbor information aggregation on each node, utilizing the node connection relationships defined by the adjacency matrix or adjacency list, and performs weighted summation or pooling operations on the features of neighboring nodes using a learnable weight matrix to capture the spatial dependencies in the road network's spatial topology. The temporal convolutional layer processes the time-series data in the node features. One-dimensional convolution operations are applied to extract local temporal patterns through a learnable convolutional kernel sliding window to capture the dynamic changes in traffic flow over time. The output of each spatiotemporal module serves as the input to the next module. Through multi-layer stacking, spatiotemporal information at different scales is gradually fused. The final output layer integrates the spatiotemporal features of all nodes through global pooling or fully connected layers to obtain the spatiotemporal joint features corresponding to the preset region. These spatiotemporal joint features integrate the node association information in the road network spatial topology and the dynamic evolution of traffic flow time series, providing high-dimensional spatiotemporal joint representation support for subsequent short-term traffic flow prediction and dynamic path planning.

[0038] Step S240: Map the spatiotemporal joint features using a fully connected layer to determine the traffic flow prediction value for each node based on the mapping result.

[0039] For example, the spatiotemporal joint features extracted through multi-layer spatiotemporal modules are input into a fully connected layer network structure. This fully connected layer is composed of multiple linear transformation layers and nonlinear activation function layers stacked alternately. Each linear layer uses a learnable weight matrix and bias vector to linearly combine the input features to achieve the mapping from high-dimensional features to a low-dimensional prediction space. Nonlinear activation functions such as ReLU or Sigmoid introduce nonlinear expressive power to enhance the model's ability to fit complex spatiotemporal patterns. The output dimension of the fully connected layer is related to the number of nodes in the preset area and the prediction time step. For example, if it is necessary to predict the traffic flow of all nodes in the future T time steps, the final output dimension of the fully connected layer is the number of nodes multiplied by the number of time steps. The parameters of the fully connected layer are optimized by the backpropagation algorithm based on the mean square error or cross-entropy loss function between the actual and predicted values ​​of historical traffic flow, so that the prediction results gradually approach the actual traffic flow distribution. Finally, each dimension of the fully connected layer output corresponds to the traffic flow prediction value of a specific node at a specific future time, forming a traffic flow prediction result covering all nodes in the preset area in the future time period.

[0040] In the embodiments provided in this application, a network map structure of a preset regional traffic network is constructed and historical traffic flow data is incorporated to form a network map with time-series characteristics. Then, the spatiotemporal joint features are extracted by a neural network containing multiple spatiotemporal modules and mapped by a fully connected layer, so that the traffic flow prediction value of each node can be accurately determined.

[0041] Furthermore, based on the above embodiments, please refer to... Figure 3 In one exemplary embodiment provided in this application, the specific implementation process of inputting a road network map with temporal features into a neural network containing multiple spatiotemporal modules for feature extraction to obtain the spatiotemporal joint features corresponding to a preset region may further include steps S310 to S330, which are described in detail below: Step S310: Determine the node feature sequence containing spatial dependence corresponding to the road network map with temporal features based on the neural network; Step S320: Determine the initial spatiotemporal features corresponding to the node feature sequence containing spatial dependencies; Step S330: The initial spatiotemporal features are processed hierarchically based on multiple spatiotemporal modules to obtain multi-level spatiotemporal feature fusion, so as to determine the spatiotemporal joint features corresponding to the preset region based on the multi-level spatiotemporal feature fusion.

[0042] For example, spatial dependency modeling is performed on the node features of a road network graph with temporal characteristics using graph convolution operations. The neighbor information aggregation operation is performed on the feature vector of each node using the node connection relationships defined by the adjacency matrix. A learnable weight matrix is ​​used to perform weighted summation or pooling of the neighbor node features, thereby incorporating spatial topological dependencies into the node features, forming a node feature sequence containing spatial dependencies. Subsequently, this node feature sequence is input into the initial spatiotemporal feature extraction module. Temporal convolution operations are applied to the time-series data in the node features, using a one-dimensional convolution kernel to extract local time patterns, capturing the dynamic changes in traffic flow over time. Simultaneously, spatial convolution operations are combined to further integrate spatial neighborhood information, forming the initial spatiotemporal features. Then… The initial spatiotemporal features are processed hierarchically based on multiple spatiotemporal modules. Each spatiotemporal module contains graph convolutional layers and temporal convolutional layers. The graph convolutional layers aggregate neighbor node information in the feature space dimension to enhance spatial dependency modeling, while the temporal convolutional layers capture dynamic changes at different time steps in the time dimension. Through the layer-by-layer processing of multiple modules, spatiotemporal information at different scales is gradually fused to achieve spatiotemporal feature fusion from local to global. Finally, the spatiotemporal feature fusion results of multiple layers are integrated through global pooling or fully connected layers to obtain the spatiotemporal joint features corresponding to the preset region. These features contain node association information of the road network spatial topology and integrate the dynamic evolution law of traffic flow time series, providing high-dimensional spatiotemporal joint representation support for subsequent short-term traffic flow prediction and dynamic path planning.

[0043] In the embodiments provided in this application, a neural network is used to extract a sequence of node features with spatial dependencies from a road network map with temporal features and generate initial spatiotemporal features. Then, through hierarchical processing of multiple spatiotemporal modules, multi-level spatiotemporal feature fusion is achieved, thereby accurately determining the spatiotemporal joint features corresponding to a preset area.

[0044] Based on the above embodiments, please refer to Figure 4 In one exemplary embodiment provided in this application, the specific implementation process of determining the spatially dependent node feature sequence corresponding to the road network map with temporal features based on the neural network may further include steps S410 to S430, which are described in detail below: Step S410: Perform graph convolutional layer processing on the road network map with temporal features to obtain the topological connection relationship corresponding to the road network map; Step S420: Determine the characteristics of the neighboring nodes corresponding to each node based on the topological connection relationship, and determine the spatial dependency relationship corresponding to each node based on the characteristics of the neighboring nodes. Step S430: Determine the node feature sequence containing spatial dependencies corresponding to the road network map with temporal features based on the spatial dependency relationship corresponding to each node.

[0045] For example, spatial dependency modeling of road network graph node features with temporal characteristics is performed using graph convolution operations to leverage node connectivity relationships defined by adjacency matrices or adjacency lists. The graph convolutional layer uses a learnable weight matrix to perform weighted summation or pooling operations on the neighboring node features of each node, thereby incorporating spatial topological dependencies into the node features and forming a sequence of node features containing spatial dependencies. Subsequently, the neighboring node features corresponding to each node are determined based on the topological connectivity relationships; that is, feature vectors of directly connected neighboring nodes of each node are extracted according to the node connectivity relationships defined in the adjacency matrix. These neighboring node features reflect the local neighborhood information of the node in the road network space. Then, based on... The spatial dependencies of each node are determined by the features of adjacent nodes. The degree of spatial dependency between nodes is quantified by calculating the similarity or correlation between node features. For example, methods such as inner product, cosine similarity, or attention mechanism are used to measure the strength of association between nodes. Finally, based on the spatial dependencies of each node, a sequence of node features containing spatial dependencies is determined for the road network map with temporal features. This sequence integrates the temporal features of the node itself with the spatial dependency information of adjacent nodes to form a high-dimensional node feature representation that contains both the dynamic changes in time and reflects the spatial topological associations. This provides spatially dependent feature input for feature extraction and traffic flow prediction in subsequent spatiotemporal modules.

[0046] In the embodiments provided in this application, the topological connection relationship is obtained by performing graph convolutional layer processing on the road network map with temporal features, thereby determining the features of adjacent nodes and spatial dependencies of each node, and finally generating a node feature sequence containing spatial dependencies, which effectively captures the spatial association characteristics between nodes in the road network map.

[0047] Based on the above embodiments, please refer to Figure 5 In one exemplary embodiment provided in this application, the specific implementation process of mapping the spatiotemporal joint features using a fully connected layer to determine the traffic flow prediction value of each node based on the mapping result may further include steps S510 to S530, which are described in detail below: Step S510: Input the spatiotemporal joint features into the fully connected neural network layer of the neural network; Step S520: Through the regression output layer in the fully connected neural network layer, the high-dimensional features in the spatiotemporal joint features are mapped to the traffic flow prediction value corresponding to each node. Step S530: Normalize the traffic flow prediction values ​​to obtain the traffic flow prediction values ​​for each node.

[0048] For example, spatiotemporal joint features are fed as input data into a fully connected neural network layer. This fully connected layer consists of multiple linear transformation layers and nonlinear activation function layers stacked alternately. Each linear layer uses a learnable weight matrix and bias vector to linearly combine the input features to achieve a mapping from high-dimensional features to a low-dimensional prediction space. Nonlinear activation functions such as ReLU or Sigmoid introduce nonlinear expressive power to enhance the model's ability to fit complex spatiotemporal patterns. Subsequently, a regression output layer maps the high-dimensional features to specific traffic flow prediction values. This output layer typically uses a linear activation function to adapt to the regression task. For continuous value prediction requirements, the output dimension is related to the number of nodes in the preset area and the prediction time step. For example, if it is necessary to predict the traffic flow of all nodes in the future T time steps, the output dimension is the number of nodes multiplied by the number of time steps. Then, the predicted value is normalized. For example, the Min-Max normalization method is used to scale the predicted value to the [0,1] interval, or Z-Score standardization is performed according to the actual traffic flow range to eliminate the influence of the dimension. Finally, the normalized traffic flow prediction value of each node at a specific future time is obtained, forming a standardized prediction result covering all nodes in the preset area in the future time period.

[0049] In the embodiments provided in this application, by inputting spatiotemporal joint features into a fully connected neural network layer and mapping them to traffic flow prediction values ​​for each node through a regression output layer, and then performing normalization processing, traffic flow prediction results for each node that conform to the actual range can be obtained efficiently and accurately.

[0050] Based on the above embodiments, please refer to Figure 6 In one exemplary embodiment provided in this application, the specific implementation process of constructing the network diagram structure corresponding to the traffic network may further include steps S610 to S630, which are described in detail below: Step S610: Determine the intersections and road segment connections corresponding to the traffic network; Step S620: Treat the intersection as a node and the road segment connection relationship as an edge; Step S630: Construct the network graph structure corresponding to the traffic network based on nodes and edges.

[0051] For example, road topology data within a preset area can be obtained through a geographic information system or traffic management department. This data includes basic information such as the location of road intersections, sensor deployment points, number of lanes, road length, and speed limits. All road intersections are identified and extracted as nodes. Node features include attributes such as historical traffic flow, real-time vehicle speed, and road type. Subsequently, road segment connection relationships are determined based on road connectivity analysis. That is, when the road segments corresponding to two nodes are directly connected in physical space or have a traffic flow transmission relationship, an edge connection is established. Edge weights can be dynamically calculated based on road distance, number of lanes, speed limits, or real-time traffic conditions to form an adjacency matrix or adjacency list to represent the connection strength and direction between nodes. Finally, a network graph structure corresponding to the traffic network is constructed based on nodes and edges. This structure can aggregate neighbor node information to capture the spatial dependence of the road network through graph convolution operations. At the same time, the time series data in the node features are modeled through temporal convolution or gating mechanisms to dynamically change over time, forming a road network graph structure that combines spatial neighborhood information and historical temporal features.

[0052] In the embodiments provided in this application, by clarifying the connection relationships between intersections and road segments in the traffic network and converting them into nodes and edges respectively to construct a network graph structure, the topological characteristics of the traffic network can be accurately and intuitively presented.

[0053] Based on the above embodiments, please refer to Figure 7 In one exemplary embodiment provided in this application, the specific implementation process of using historical traffic flow data as node features of the network diagram structure to obtain a road network diagram with time-series features may further include steps S710 to S730, which are described in detail below: Step S710: Determine the traffic state parameters corresponding to each node based on historical traffic flow data. The traffic state parameters include traffic flow, average vehicle speed, and time information. Step S720: Perform time alignment processing on the traffic state parameters of each node to obtain the temporal feature vector corresponding to each node, and stack the temporal feature vectors of all nodes in node order to construct a three-dimensional node feature matrix. Step S730: Associate the three-dimensional node feature matrix with the topological information of the network structure to obtain a road network map with temporal features that includes static topological connection relationships and dynamic node features.

[0054] For example, traffic flow, average speed, and corresponding timestamp information for each node at multiple time steps are extracted from historical traffic flow data. The time information must be standardized to ensure time alignment across different nodes. Time alignment is then performed by resampling or interpolating the traffic state parameters of all nodes at preset time intervals (e.g., 5 minutes, 1 hour), ensuring each node has corresponding traffic flow and average speed data at the same time step. This forms a temporal feature vector for each node, with the dimension being the number of time steps multiplied by the number of traffic state parameter types (e.g., flow, speed). Next, the temporal feature vectors of all nodes are stacked sequentially along the spatial dimension to construct a three-dimensional node feature matrix, with dimensions including the number of nodes, the number of time steps, and the number of features (e.g., flow, speed, time). Finally... The three-dimensional node feature matrix is ​​associated with the topological information of the network structure (such as adjacency matrix or adjacency list). The static topological connection relationship (edge ​​information) and dynamic node features (temporal feature vector) are fused through graph convolution operation to form a road network graph with temporal features that includes both the static connection relationship of the road network spatial topology and the dynamic evolution features of the node time series.

[0055] In the embodiments provided in this application, a three-dimensional node feature matrix is ​​constructed by determining the traffic state parameters of each node based on historical traffic flow data and performing time alignment processing. After being associated with the network diagram structure topology information, a road network diagram with time-series features that combines static topological connection relationships and dynamic node features can be generated, providing more comprehensive data support for traffic analysis.

[0056] Furthermore, based on the above embodiments, please refer to... Figure 8 In one exemplary embodiment provided in this application, the specific implementation process of the above-mentioned short-term traffic flow prediction method based on spatiotemporal graph neural network may further include steps S810 and S820, which are described in detail below: Step S810: Based on the topological information of the network structure, determine the adjacency matrix corresponding to the three-dimensional feature matrix. The element values ​​of the adjacency matrix represent whether there is a connection between the corresponding nodes. Step S820: The three-dimensional feature matrix and the adjacency matrix are associated to obtain a road network map with temporal features based on the association result.

[0057] For example, connections between nodes are extracted from traffic network topology data, such as direct connectivity between road intersections or traffic flow paths. An adjacency matrix is ​​constructed based on these connections, where rows and columns correspond to node numbers, and element values ​​are set to 1 to indicate a direct connection between corresponding nodes and 0 to indicate no connection. This forms an adjacency matrix reflecting the static spatial topology of the road network. Subsequently, a three-dimensional feature matrix (dimensions of number of nodes, time steps, and features, including dynamic temporal features such as traffic flow, average vehicle speed, and time information) is associated with the adjacency matrix. Graph convolution operations are then used to integrate the node connections defined in the adjacency matrix into the node features of the three-dimensional feature matrix. This ensures that each node's features not only include its own dynamic temporal changes but also aggregate spatial dependency information from neighboring nodes, ultimately forming a road network graph with temporal features that incorporates both static topological connections and dynamic node temporal features.

[0058] In the embodiments provided in this application, by determining the adjacency matrix of the three-dimensional feature matrix based on the network structure topology information to characterize the node connection relationship, and associating it with the three-dimensional feature matrix, a road network map that integrates static topology and dynamic temporal features can be efficiently constructed.

[0059] Based on the above embodiments, please refer to Figure 9 In one exemplary embodiment provided in this application, the specific implementation process of the above-mentioned short-term traffic flow prediction method based on spatiotemporal graph neural network may further include steps S910 and S920, which are described in detail below: Step S910: Determine the toll cost corresponding to each road segment within the preset area based on the traffic flow prediction value of each node. Step S920: Determine the target navigation path based on the toll cost, so as to control the vehicle to travel according to the target navigation path.

[0060] For example, based on the traffic flow prediction value of each node in the future time step, the node traffic is mapped to the corresponding road segment in combination with the road segment topology relationship. For example, by calculating the weighted average of the traffic flow of each node on the road segment or by allocating the traffic flow according to attributes such as road segment length and number of lanes, the predicted traffic flow value of each road segment at different time scales can be obtained. Subsequently, toll costs are calculated based on predicted traffic flow. These costs can comprehensively consider time and congestion costs. For example, the Bureau of Public Roads (BPR) function can be used to convert traffic flow into travel time, or the actual travel time can be calculated based on the relationship between traffic flow and speed. At the same time, cost weights are adjusted by combining factors such as road speed limits, number of lanes, and road type to form the toll cost value for each road segment at each time step. Then, based on the real-time or predicted toll costs, a path planning algorithm or dynamic programming method is used to search for the minimum cost path from the origin to the destination within a preset area. This path needs to consider dynamic cost changes over time. For example, it can avoid congested road segments during peak hours or select the path with the optimal toll cost over time. The final target navigation path contains a series of road segment sequences and corresponding travel times. The path instructions are pushed in real time through the vehicle navigation system or traffic signal control system to guide vehicles to travel along the optimal path, achieving dynamic navigation and traffic flow optimization.

[0061] In the embodiments provided in this application, the toll cost of each road segment in the preset area is calculated based on the traffic flow prediction value of each node, and the target navigation path is determined accordingly, which can guide vehicles to travel along the optimal path to improve traffic operation efficiency.

[0062] Based on the above embodiments, please refer to Figure 10 In one exemplary embodiment provided in this application, the specific implementation process of the above-mentioned short-term traffic flow prediction method based on spatiotemporal graph neural network may further include steps S1010 to S1040, which are described in detail below: Step S1010: Determine the traffic flow prediction sequence for each node at different time scales; Step S1020: Weighted fusion of the traffic flow prediction value sequences at different time scales is performed to obtain the fusion result.

[0063] For example, firstly, based on historical traffic flow data and spatiotemporal joint features, multi-step predictions are performed for each node by dividing it into multi-scale time windows (such as 5 minutes, 15 minutes, 30 minutes, etc.). A fully connected layer or time series model (such as LSTM, TCN) is used to generate a sequence of traffic flow prediction values ​​for the node at multiple time granularities in the future. Each time scale corresponds to an independent prediction result sequence. Then, the traffic flow prediction value sequences at different time scales are weighted and fused. Specifically, the weight allocation strategy is learned or manually set (such as high weight for short-term predictions and low weight for long-term predictions) to perform weighted summation or splicing fusion of the sequences at each time scale. During the fusion process, the correlation between time scales and the dynamic adjustment of prediction errors need to be considered. For example, an attention mechanism is used to dynamically allocate weights according to the prediction confidence of the time scale. Finally, a comprehensive traffic flow prediction result that integrates information from multiple time scales is formed.

[0064] Step S1030: Based on the fusion results, determine multiple candidate navigation paths including the time dimension and the corresponding travel costs of the multiple candidate navigation paths; Step S1040: Obtain the vehicle's departure time and determine the target navigation path from multiple candidate navigation paths based on the departure time.

[0065] For example, by utilizing the fusion results of traffic flow predictions across multiple time scales, combined with the node connectivity and road segment attributes in the road network topology, a dynamic path search algorithm (such as Dijkstra's algorithm or A* algorithm on a time-dependent graph) generates multiple candidate navigation paths containing a time dimension. Each path corresponds to a different departure time or travel time period. Based on the predicted traffic flow, the toll cost for each path at different time steps is calculated. The toll cost comprehensively considers time cost, congestion cost, and road attributes (such as speed limits and number of lanes). For instance, the BPR function can be used to convert traffic flow into travel time, or the actual travel time can be calculated based on the relationship between traffic flow and speed. The system adjusts cost weights based on real-time traffic conditions to form a dynamic travel cost sequence for each candidate path at each time step. Then, it obtains the vehicle's departure time and selects the path with the lowest travel cost that aligns with the departure time as the target navigation path through time window matching or path cost comparison. This path needs to consider cost changes over time, such as avoiding congested sections during peak hours or choosing the path with the optimal travel cost over time. Finally, it generates a target navigation path that includes the road segment sequence, travel time, and cost details. The system pushes path instructions in real time through the in-vehicle navigation system to guide vehicles to travel along the optimal path, achieving dynamic navigation and traffic flow optimization.

[0066] In the embodiments adopted in this application, by determining the traffic flow prediction sequence of each node at different time scales and weighting and fusing them, multiple candidate navigation paths containing the time dimension and their travel costs can be accurately obtained. Combined with the vehicle departure time, the optimal target navigation path can be efficiently determined.

[0067] Please see Figure 11 , Figure 11 This is a block diagram illustrating an exemplary embodiment of the present application of a short-term traffic flow prediction device based on a spatiotemporal graph neural network. The device can be applied to... Figure 1 The implementation environment shown is specifically configured in server 120. This device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applicable.

[0068] like Figure 11 As shown, this exemplary short-term traffic flow prediction device based on a spatiotemporal graph neural network includes: a construction module 1110, used to acquire the corresponding traffic network within a preset area and construct the network graph structure corresponding to the traffic network; a feature module 1120, used to acquire historical traffic flow data corresponding to the preset area and use the historical traffic flow data as node features of the network graph structure to obtain a road network graph with temporal features; a joint module 1130, used to input the road network graph with temporal features into a neural network containing multiple spatiotemporal modules for feature extraction to obtain spatiotemporal joint features corresponding to the preset area; and a prediction module 1140, used to perform fully connected layer mapping on the spatiotemporal joint features to determine the traffic flow prediction value of each node based on the mapping result.

[0069] According to one aspect of the embodiments of this application, the aforementioned joint module 1130 is further configured to: determine, based on a neural network, a node feature sequence containing spatial dependencies corresponding to a road network map with temporal features; determine the initial spatiotemporal features corresponding to the node feature sequence containing spatial dependencies; perform hierarchical processing on the initial spatiotemporal features based on multiple spatiotemporal modules to obtain multi-level spatiotemporal feature fusion, so as to determine the spatiotemporal joint features corresponding to a preset region based on multi-level spatiotemporal feature fusion.

[0070] According to one aspect of the embodiments of this application, the aforementioned joint module 1130 is further configured to: perform graph convolutional layer processing on the road network map with temporal features to obtain the topological connection relationship corresponding to the road network map; determine the neighboring node features corresponding to each node based on the topological connection relationship, and determine the spatial dependency relationship corresponding to each node based on the neighboring node features; and determine the node feature sequence containing spatial dependency corresponding to the road network map with temporal features based on the spatial dependency relationship corresponding to each node.

[0071] According to one aspect of the embodiments of this application, the prediction module 1140 is further configured to: input spatiotemporal joint features into a fully connected neural network layer of a neural network; map the high-dimensional features in the spatiotemporal joint features to traffic flow prediction values ​​corresponding to each node through the regression output layer in the fully connected neural network layer; and normalize the traffic flow prediction values ​​to obtain the traffic flow prediction values ​​for each node.

[0072] According to one aspect of the embodiments of this application, the above-mentioned construction module 1110 is further configured to: determine the intersections and road segment connections corresponding to the traffic network; use the intersections as nodes and the road segment connections as edges; and construct the network graph structure corresponding to the traffic network based on the nodes and edges.

[0073] According to one aspect of the embodiments of this application, the feature module 1120 is further configured to: determine the traffic state parameters corresponding to each node based on historical traffic flow data, the traffic state parameters including traffic flow, average vehicle speed and time information; perform time alignment processing on the traffic state parameters of each node to obtain the time-series feature vector corresponding to each node, and stack the time-series feature vectors of all nodes in node order to construct a three-dimensional node feature matrix; associate the three-dimensional node feature matrix with the topological information of the network structure to obtain a road network map with time-series features containing static topological connection relationships and dynamic node features.

[0074] According to one aspect of the embodiments of this application, the feature module 1120 is further configured to: determine the adjacency matrix corresponding to the three-dimensional feature matrix based on the topological information of the network structure, wherein the element values ​​of the adjacency matrix represent whether there is a connection between the corresponding nodes; and associate the three-dimensional feature matrix and the adjacency matrix to obtain a road network map with temporal features based on the association result.

[0075] According to one aspect of the embodiments of this application, the prediction module 1140 is further configured to determine the toll cost corresponding to each road segment within a preset area based on the traffic flow prediction value of each node; and determine the target navigation path based on the toll cost to control the vehicle to travel according to the target navigation path.

[0076] According to one aspect of the embodiments of this application, the prediction module 1140 is further configured to: determine the traffic flow prediction value sequence corresponding to each node at different time scales; perform weighted fusion on the traffic flow prediction value sequence corresponding to different time scales to obtain a fusion result; determine multiple candidate navigation paths including the time dimension and the toll cost corresponding to the multiple candidate navigation paths based on the fusion result; obtain the departure time point of the vehicle, and determine the target navigation path from the multiple candidate navigation paths based on the departure time point.

[0077] It should be noted that the short-term traffic flow prediction device based on spatiotemporal graph neural networks provided in the above embodiments and the short-term traffic flow prediction method based on spatiotemporal graph neural networks provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the short-term traffic flow prediction device based on spatiotemporal graph neural networks provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0078] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, enable the electronic device to implement the short-term traffic flow prediction method based on spatiotemporal graph neural networks provided in the above embodiments.

[0079] Figure 12 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 12 The computer system 1200 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0080] like Figure 12 As shown, the computer system 1200 includes a Central Processing Unit (CPU) 1201, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 1202 or programs loaded from storage portion 1208 into Random Access Memory (RAM) 1203. Various programs and data required for system operation are also stored in RAM 1203. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. An Input / Output (I / O) interface 1205 is also connected to bus 1204.

[0081] The following components are connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.

[0082] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the system of this application.

[0083] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0084] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0085] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0086] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned short-term traffic flow prediction method based on a spatiotemporal graph neural network. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not incorporated into the electronic device.

[0087] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the short-term traffic flow prediction method based on a spatiotemporal graph neural network provided in the various embodiments above.

[0088] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

Claims

1. A short-term traffic flow prediction method based on a spatiotemporal graph neural network, characterized in that, include: Obtain the corresponding traffic network within a preset area, and construct the network diagram structure corresponding to the traffic network; Historical traffic flow data corresponding to the preset area is obtained, and the historical traffic flow data is used as the node features of the network structure to obtain a road network map with time-series features. The road network map with temporal features is input into a neural network containing multiple spatiotemporal modules for feature extraction to obtain the spatiotemporal joint features corresponding to the preset region. The spatiotemporal joint features are mapped using a fully connected layer to determine the traffic flow prediction value for each node based on the mapping results.

2. The method as described in claim 1, characterized in that, The step of inputting the road network map with temporal features into a neural network containing multiple spatiotemporal modules for feature extraction to obtain the spatiotemporal joint features corresponding to the preset region includes: Based on the neural network, the node feature sequence containing spatial dependencies corresponding to the road network map with temporal features is determined; Determine the initial spatiotemporal features corresponding to the node feature sequence containing spatial dependencies; The initial spatiotemporal features are processed hierarchically based on the multiple spatiotemporal modules to obtain multi-level spatiotemporal feature fusion, so as to determine the spatiotemporal joint features corresponding to the preset region based on the multi-level spatiotemporal feature fusion.

3. The method as described in claim 2, characterized in that, The step of determining the spatially dependent node feature sequence corresponding to the road network map with temporal features based on the neural network includes: The road network map with temporal characteristics is processed by a graph convolutional layer to obtain the topological connectivity relationship corresponding to the road network map; Based on the topological connectivity, the characteristics of the neighboring nodes corresponding to each node are determined, and based on the characteristics of the neighboring nodes, the spatial dependency relationship corresponding to each node is determined. Based on the spatial dependencies corresponding to each node, determine the node feature sequence containing spatial dependencies corresponding to the road network map with temporal features.

4. The method as described in claim 1, characterized in that, The step of mapping the spatiotemporal joint features using a fully connected layer to determine the traffic flow prediction value for each node based on the mapping result includes: The spatiotemporal joint features are input into a fully connected neural network layer of the neural network; The high-dimensional features in the spatiotemporal joint features are mapped to the traffic flow prediction value corresponding to each node through the regression output layer in the fully connected neural network layer. The traffic flow prediction values ​​are normalized to obtain the traffic flow prediction value for each node.

5. The method as described in claim 1, characterized in that, The construction of the network diagram structure corresponding to the traffic network includes: Determine the intersections and road segment connections corresponding to the aforementioned traffic network; The intersection is considered as a node, and the road segment connections are considered as edges; The network graph structure corresponding to the traffic network is constructed based on the nodes and edges.

6. The method as described in claim 5, characterized in that, The step of using the historical traffic flow data as node features of the network diagram structure to obtain a road network diagram with time-series characteristics includes: Based on the historical traffic flow data, the traffic state parameters corresponding to each node are determined. The traffic state parameters include traffic flow, average vehicle speed, and time information. The traffic state parameters of each node are time-aligned to obtain the temporal feature vector corresponding to each node, and the temporal feature vectors of all nodes are stacked in node order to construct a three-dimensional node feature matrix. The three-dimensional node feature matrix is ​​associated with the topological information of the network structure to obtain the road network map with time-series features, which includes static topological connection relationships and dynamic node features.

7. The method as described in claim 6, characterized in that, The method further includes: Based on the topology information of the network structure, the adjacency matrix corresponding to the three-dimensional feature matrix is ​​determined, and the element values ​​of the adjacency matrix represent whether there is a connection between the corresponding nodes. The three-dimensional feature matrix and the adjacency matrix are correlated to obtain a road network map with temporal features based on the correlation result.

8. The method as described in claim 1, characterized in that, The method further includes: The toll cost for each road segment within the preset area is determined based on the traffic flow prediction value of each node. The target navigation path is determined based on the toll cost in order to control the vehicle to travel along the target navigation path.

9. The method as described in claim 8, characterized in that, The method further includes: Determine the sequence of traffic flow forecast values ​​for each node at different time scales; The traffic flow prediction value sequences corresponding to different time scales are weighted and fused to obtain the fusion result; Based on the fusion results, multiple candidate navigation paths, including the time dimension, and the corresponding travel costs of the multiple candidate navigation paths are determined. Obtain the departure time of the vehicle, and determine the target navigation path from the multiple candidate navigation paths based on the departure time.