Multi-mode traffic demand prediction method based on graph neural network
Through the multi-mode traffic demand prediction method based on graph neural network, using multi-source data fusion, multi-graph processing and meta-information embedding, combined with spatial-temporal graph convolution network and other technologies, the traditional method's spatial-temporal dependence relationship in complex urban transportation systems and Multimodal impacts are difficult to capture problems, achieving high-precision short-term traffic forecasting and traffic management decision support.
Patent Information
- Application Number
- CN202411325088.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-10
AI Technical Summary
Traditional traffic prediction methods are difficult to effectively capture the mutual influence between space-time dependencies and different traffic patterns in complex urban transportation systems, especially in non-Euclidean space and multi-modal transportation systems.
Using a multi-mode traffic demand prediction method based on graph neural network, urban traffic is modeled through multi-source data fusion, multi-graph processing and meta-information embedding, combined with spatiotemporal graph convolution network, diffusion convolution recurrent neural network and Graph-WaveNet network. Complex spatiotemporal dependencies of multiple mode data in the system.
Achieve high-precision prediction of multi-mode traffic demand, especially in short-term traffic forecasting, can better capture the mutual influence between different traffic modes, improve the accuracy of traffic demand forecasting, and provide better for traffic management and scheduling. Accurate decision support.
Smart Images

Figure CN119294589A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multi-mode demand prediction, and in particular to a multi-mode traffic demand prediction method based on graph neural network. Background Art
[0002] With the acceleration of urbanization and the complexity of transportation networks, traffic demand forecasting is becoming increasingly important in urban management. Although traditional traffic forecasting methods such as linear regression and time series models can capture the temporal changes in traffic flow, they often perform poorly when dealing with complex multimodal transportation systems, especially when facing non-Euclidean spaces and the interdependence of different transportation modes. Traffic data has obvious spatiotemporal dependency characteristics, and how to model the dependencies between regions in a complex transportation network becomes a key issue. Traditional methods such as ARIMA models and support vector machines are mainly used for traffic flow forecasting, but they cannot effectively capture the complex traffic interactions in cities, especially when dealing with irregular traffic networks. Although deep learning models such as recurrent neural networks (RNNs) and long short-term memory networks (LSTMs) perform well in temporal dependencies, they have limited processing capabilities for spatial dependencies and cannot capture the complex relationships between different regions well, which makes it difficult for the model to effectively handle the complex interactions of traffic flows in multimodal transportation systems.
[0003] Graph neural networks provide a new possibility for solving this problem. They are good at processing graph structured data, which enables them to be applied to urban transportation networks, modeling urban areas as nodes and traffic connections between areas as edges. Graph neural networks can effectively capture spatial dependencies, a feature that makes them excellent in traffic demand forecasting. For example, the spatiotemporal graph convolutional network combines graph convolutional networks and temporal convolutional networks to handle spatiotemporal dependencies at the same time. However, the spatiotemporal graph convolutional network cannot handle asymmetric traffic flow problems, while the diffuse convolutional recurrent neural network can capture bidirectional traffic flows by introducing diffuse convolutions. Graph WaveNet further improves the modeling capabilities of complex transportation networks by dynamically constructing graph structures through adaptive learning.
[0004] The challenges faced by multimodal traffic demand forecasting mainly lie in how to handle multi-source data and capture the mutual influence between modes. The flow relationship between different traffic modes (such as taxis and bicycles) is complex and difficult to handle with traditional models. To this end, the study proposed strategies for multi-source data fusion and multi-graph processing. Multi-source fusion combines data from different modes for modeling, while multi-graph processing captures multi-level spatial dependencies between regions by constructing multiple adjacency matrices (such as OD matrices and 0-1 adjacency matrices). In addition, embedding temporal meta-information (such as holidays and timestamps) into the model can also improve the ability to respond to temporal changes. Summary of the invention
[0005] The purpose of the present invention is to provide a multimodal traffic demand forecasting method based on graph neural network in response to the deficiencies of the prior art. The method adopts a method of modeling with multiple graph structures, introduces technologies such as multi-source fusion, multi-graph processing and meta-information embedding, captures the complex spatiotemporal dependencies of multiple mode data of urban transportation systems, and collects spatiotemporal data of different transportation modes (such as taxis, bicycles, etc.) and combines multiple graph structures for modeling. This method collects spatiotemporal data of different transportation modes (such as taxis, bicycles, etc.) and combines multiple graph structures for modeling, thereby achieving high-precision prediction of multimodal traffic demand, especially in short-term traffic forecasting, greatly improving the accuracy of traffic demand forecasting, especially in multimodal transportation systems, can better capture the mutual influence between different transportation modes, thereby providing more accurate decision support for traffic management and scheduling, and effectively solves the mutual influence between complex transportation modes in urban transportation, spatial heterogeneity and fusion of multimodal data. It is expected to be widely used in intelligent transportation systems and has good application prospects and commercial development value.
[0006] The specific technical solution to achieve the purpose of the present invention is: a multi-modal traffic demand prediction method based on graph neural network, which is characterized in that the method collects spatiotemporal data of different traffic modes (such as taxis, bicycles, etc.) and combines multiple graph structures for modeling, thereby realizing high-precision prediction of multi-modal traffic demand, and specifically includes the following steps:
[0007] Step 1: Multi-source data fusion
[0008] Collect inflow and outflow data from multiple traffic modes, represent these multi-mode data as multi-channel tensors and input them into the graph neural network. Assume that the traffic system consists of M different traffic modes, and the input of traffic flow of each mode at time step t is expressed by the following formula (a):
[0009]
[0010] in, is the traffic inflow and outflow status of the mth traffic mode at time t; N is the number of areas; C is the number of inflow and outflow channels.
[0011] For each time step t, the traffic data of all traffic modes are fused to generate a multi-mode input tensor X representing the comprehensive traffic status of all regions at time step t as follows (b): t :
[0012]
[0013] Step 2: Multi-image processing
[0014] Multiple adjacency matrices are input into the graph neural network for multi-graph processing, and these different graph structures are used to capture the multi-level spatial dependencies between regions. The multiple adjacency matrices include: 0-1 adjacency matrices based on geographic adjacency and the origin-destination matrix based on traffic flow The 0-1 adjacency matrix Indicates whether there is a direct connection between regions, such as roads or public transportation lines. Its matrix elements are defined by the following formula (e):
[0015]
[0016] The OD adjacency matrix Based on the historical traffic flow data, it reflects the actual traffic flow between regions. The matrix elements are defined by the following formula (f):
[0017] A OD (i,j) = historical traffic flow from region i to region j (f).
[0018] Step 3: Meta-information embedding
[0019] Traffic conditions are easily affected by some meta information, such as weather, special events, time of day or week, etc. The timestamps of external information such as day of the week, time of day, and whether it is a holiday are marked as metadata and one-hot encoded using the following formula (c):
[0020] E t =one-hot(D t ,H t ,F t ) (c).
[0021] Among them, Dt is a certain day of the week, H t For a certain hour of the day, F t The binary variable of whether it is a holiday is used to encode this information into a 32-dimensional vector, and then the encoded timestamp is expanded into 32 channels with the same shape as the single-channel input.
[0022] Step 4: Build a graph neural network model
[0023] A graph neural network model is used to predict traffic demand for the fused multimodal data. The graph neural network model includes: a spatiotemporal graph convolutional network, a diffusion convolutional recurrent neural network and a Graph-WaveNet network. The spatiotemporal graph convolutional network combines the graph convolutional network and the temporal convolutional network to simultaneously process spatial and temporal dependencies, and is expressed by the following formula (g):
[0024] Z = ReLU(D -1 / 2AD -1 / 2 XW) (g).
[0025] Among them, Z is the spatial and temporal dependency parameter of the network; D is the diagonal matrix; W is the adjacency matrix; X is the node feature matrix; θ is the learnable parameter.
[0026] The diffusion convolutional recurrent neural network captures the bidirectional dependency of traffic flow through diffusion convolution and is expressed by the following formula (h):
[0027]
[0028] Where z is the bidirectional dependency parameter of traffic flow; θ and θ′ are learnable parameters; A is the adjacency matrix; A T is the transposed adjacency matrix; K is the number of diffusion steps.
[0029] The Graph-WaveNet network dynamically captures spatial dependencies by adaptively learning graph structures. Its adaptive graph learning module is represented by the following formula (i):
[0030] A adaptive =softmax(ReLU(E·E T )) (i).
[0031] Where E is the node embedding matrix for adaptive learning.
[0032] Step 5: Model training and optimization
[0033] Three networks, namely, spatiotemporal graph convolutional network, diffuse convolutional recurrent neural network and Graph-WaveNet, are used for model training respectively, and the loss function (root mean square error) expressed by the following formula (d) is used to optimize the graph neural network model for real-time traffic scheduling:
[0034]
[0035] Step 6: Real-time Traffic Prediction
[0036] The input of the graph neural network model is the multi-modal traffic data of historical α time steps, and the output is the traffic demand forecast of the future β time steps. The historical input sequence is defined as X t ,X t-1 ,...,X t-α+1 , the predicted output is Using historical traffic data to predict traffic demand in the next three hours, the system can make real-time predictions on multiple traffic modes such as taxi inflow and outflow and bicycle inflow and outflow. The prediction process is expressed by the following formula (j):
[0037]
[0038] Among them, f θ is the prediction function based on graph neural network; θ is the learnable parameter of the model.
[0039] Compared with the prior art, the present invention has the ability to perform real-time short-term traffic demand forecasting, and can effectively adjust the allocation of traffic resources, optimize scheduling, reduce congestion, and improve traffic efficiency. It can effectively process non-Euclidean spatial data, especially complex urban traffic networks, by collecting spatiotemporal data of different traffic modes (such as taxis, bicycles, etc.), and combining multiple graph structures for modeling, to achieve high-precision forecasting of multi-modal traffic demand, especially in short-term traffic forecasting, effectively solving the mutual influence between complex traffic modes in urban traffic, spatial heterogeneity and the fusion of multi-modal data, and can be widely used in the fields of smart transportation, urban planning and public transportation scheduling, with good application prospects and commercial development value. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0041] The invention is further described in detail with reference to the following specific embodiments and drawings.
[0042] Example 1
[0043] The present invention is used to construct a multi-mode traffic demand forecasting system consisting of a data acquisition module, a multi-source data fusion module, a multi-graph modeling module, a meta-information embedding module and a graph neural network module. The data acquisition module is used to collect spatiotemporal data from multiple traffic modes (such as taxis, bicycles, etc.); the multi-source data fusion module is used to fuse the inflow and outflow data of different traffic modes; the multi-graph modeling module is used to construct a variety of adjacency matrices including 0-1 adjacency matrix and OD adjacency matrix; the meta-information embedding module is used to encode time meta-information and input it into three network models including spatiotemporal graph convolutional network, diffusion convolutional recurrent neural network and Graph-WaveNet together with traffic data; the graph neural network module is used to predict traffic demand based on multi-source data and multi-graph input. The graph neural network model adopts the following method:
[0044] 1) Graph convolution operation
[0045] The following (k) formula is used to process the graph convolution operation of spatial dependencies between nodes:
[0046] Z=θ(D -1 / 2 WD -1 / 2 )X (k).
[0047] Among them, D is a diagonal matrix, W is an adjacency matrix, X is a node feature matrix, and θ is a learnable parameter.
[0048] The difference between the above formula (k) and formula (f) is that formula (f) is spatially and temporally dependent, while formula (k) is only spatially dependent.
[0049] 2) Diffused convolution
[0050] The following (h) diffusion convolution operation is used to capture the bidirectional relationship between nodes:
[0051]
[0052] Among them, θ and θ′ are learnable parameters; A is the adjacency matrix; A T is the transposed adjacency matrix; K is the number of diffusion steps.
[0053] 3) Temporal convolution operation
[0054] Temporal dependencies are captured through temporal convolution operations, and the model predicts future inflows and outflows by processing traffic flows at historical moments.
[0055] The adjacency matrix includes a 0-1 matrix based on a simple spatial adjacency relationship and an origin-destination (OD) matrix based on actual traffic flow; the graph neural network model uses a graph convolutional network to process the spatial dependency between nodes and a recurrent neural network to process the temporal dependency; the graph neural network model performs predictions through the following formula (j):
[0056]
[0057] in, is the prediction result of the next β time steps, X t ,X t-1 ,...,X t-α+1 is the input data of the past α time steps, θ is the learnable parameter, and f θ is the prediction function based on graph neural network.
[0058] The present invention uses graph neural network models that can capture spatiotemporal information, such as spatiotemporal graph convolutional networks, diffuse convolutional recurrent neural networks, and Graph-WaveNet, to predict traffic demand in the next 1 to 3 hours. The three strategies of multi-source fusion, multi-graph processing, and meta-information embedding are used to improve the performance of the graph neural network model. The graph convolutional network is used to process the spatial dependency between nodes, and the recurrent neural network is used to process the temporal dependency.
[0059] See also Figure 1The present invention collects spatiotemporal data of different traffic modes (such as taxis, bicycles, etc.) and combines multiple graph structures for modeling to achieve high-precision prediction of multi-modal traffic demand. It mainly includes data collection, data preprocessing, multi-graph modeling, model selection and training, traffic demand prediction, and model evaluation and optimization. The specific implementation process is as follows:
[0060] Step 1: Data Collection
[0061] Through the urban traffic management system, shared bicycle platform and taxi dispatch system, the historical inflow and outflow data of different traffic modes (such as taxis and bicycles) are obtained. The data collection interval is 1 hour, covering the traffic flow changes from January 1, 2019 to December 31, 2020. The collected data includes: timestamp, area ID, traffic mode type and other information.
[0062] Step 2: Clean the raw data
[0063] Outliers and missing values are removed to ensure data consistency, and then the multi-modal traffic data is integrated into a multi-channel tensor and input into three network models: spatiotemporal graph convolutional network, diffuse convolutional recurrent neural network and Graph-WaveNet. Each channel represents the inflow or outflow data of different traffic modes, such as taxi inflow, bicycle outflow, etc.
[0064] Step 3: Introducing a multi-source fusion strategy
[0065] Traffic data from different sources (such as taxi inflows and outflows and bicycle inflows and outflows) are fused to build a multi-source dataset to capture the interdependencies between different traffic modes.
[0066] Step 4: Introduce multi-image processing strategy
[0067] 0-1 adjacency matrix: represents the direct adjacency relationship between regions and is defined by the following formula (e):
[0068]
[0069] OD adjacency matrix: Based on the actual traffic flow between regions, the OD matrix is constructed to represent the traffic flow from region i to region j and is defined by the following formula (f):
[0070] A OD (i,j) = historical traffic flow from region i to region j (f).
[0071] All adjacency matrices are normalized before being input into the spatiotemporal graph convolutional network, diffuse convolutional recurrent neural network, and Graph-WaveNet models to meet the requirements of graph neural networks.
[0072] Step 5: Introduce meta-information embedding strategy
[0073] Embed time information (such as day of the week, hour, and whether it is a holiday) into traffic data and use this meta-information to improve the accuracy of spatiotemporal modeling.
[0074] Step 6: Model Training
[0075] Select the graph neural network model, select the spatiotemporal graph convolutional network, the diffusion convolutional recurrent neural network and three models, train the models respectively, and use the root mean square error, mean absolute error and mean absolute percentage error as evaluation criteria.
[0076] Step 7: Use the above trained model to predict the traffic demand in the next 3 hours using historical traffic data. The system can make real-time predictions on multiple traffic modes such as taxi inflow and outflow and bicycle inflow and outflow. The prediction process is expressed by the following formula (j):
[0077]
[0078] in, is the prediction result of the next β time steps, X t ,X t-1 ,...,X t-α+1 is the input data of the past α time steps, θ is the learnable parameter, and f θ is the prediction function based on graph neural network.
[0079] The experimental results of this embodiment show that the present invention can perform real-time short-term traffic demand forecasting, and can effectively adjust the allocation of traffic resources, optimize scheduling, reduce congestion, and improve traffic efficiency.
[0080] The above is only a further explanation of the present invention and is not intended to limit this patent. Any equivalent implementation of the present invention should be included in the scope of the claims of this patent.
Claims
1. A multi-modal traffic demand forecasting method based on graph neural network, characterized in that: This method collects spatiotemporal data of different traffic modes and combines multiple graph structures to build models to predict multi-modal traffic demand. The specific steps include: Step 1: Multi-source data fusion Collect inflow and outflow data from multiple traffic modes, represent these multi-mode data as multi-channel tensors and input them into the graph neural network. Assume that the traffic system consists of M different traffic modes, and the input of traffic flow of each mode at time step t is expressed by the following formula (a): in, is the traffic inflow and outflow status of the mth traffic mode at time t; N is the number of areas; C is the number of inflow and outflow channels; For each time step t, the traffic data of all traffic modes are fused to generate the following formula (b) to represent the multi-mode input tensor X of the comprehensive traffic status of all regions at time step t: t : Step 2: Multi-image processing Will include a 0-1 adjacency matrix based on geographic adjacency and the origin-destination matrix based on traffic flow Multiple adjacency matrices are input into the graph neural network for multi-graph processing, and these different graph structures are used to capture the multi-level spatial dependencies between regions; Step 3: Meta-information embedding The timestamps of external information such as the day of the week, time of day, and whether it is a holiday are marked as metadata and one-hot encoded using the following formula (c): E t =one-hot(D t ,H t ,F t ) (c); Where Dt is a certain week of the week; H t For a certain hour of the day; F t is a binary variable indicating whether it is a holiday; Step 4: Build a graph neural network model Construct a graph neural network model consisting of a spatiotemporal graph convolutional network, a diffuse convolutional recurrent neural network, and a Graph-WaveNet network to predict traffic demand based on the fused multi-modal data; Step 5: Model training and optimization The graph neural network model constructed above is trained, and the loss function Loss represented by the following formula (d) is used to optimize the graph neural network model for real-time traffic scheduling: Step 6: Real-time Traffic Prediction The input of the graph neural network model is the multi-modal traffic data of the historical α time steps, and the output is the traffic demand forecast of the future β time steps. The historical input sequence is defined as: t ,X t-1 ,...,X t-α+1 , the predicted output is: The historical input sequence is fed into the trained graph neural network model for real-time traffic demand forecasting.
2. The multi-modal traffic demand forecasting method based on graph neural network according to claim 1 is characterized in that: The 0-1 adjacency matrix Indicates whether there is a direct connection between regions, such as roads or public transportation lines. Its matrix elements are defined by the following formula (e): The OD adjacency matrix Based on the calculation of historical traffic flow data, it reflects the actual traffic flow between regions. The matrix elements are defined by the following formula (f): A OD (i,j) = historical traffic flow from region i to region j (f).
3. The multi-modal traffic demand forecasting method based on graph neural network according to claim 1 is characterized in that: The spatiotemporal graph convolutional network combines the graph convolutional network and the temporal convolutional network to simultaneously process spatial and temporal dependencies, and is expressed by the following formula (g): Z=ReLU(D -1 / 2 AD -1 / 2 XW) (g): Among them, Z is the spatial and temporal dependency parameter; D is the diagonal matrix; W is the adjacency matrix; X is the node feature matrix; θ is the learnable parameter.
4. The multi-modal traffic demand forecasting method based on graph neural network according to claim 1 is characterized in that: The diffusion convolutional recurrent neural network captures the bidirectional dependency of traffic flow through diffusion convolution and is expressed by the following formula (h): Among them, Z is the bidirectional dependency parameter of traffic flow; diffusion convolution θ and θ′ are learnable parameters; A is the adjacency matrix; A T is the transposed adjacency matrix; K is the number of diffusion steps.
5. The multi-modal traffic demand forecasting method based on graph neural network according to claim 1 is characterized in that: The Graph-WaveNet network dynamically captures spatial dependencies by adaptively learning graph structures. Its adaptive graph learning module is represented by the following formula (i): TO adaptive =softmax(ReLU(E·E T )) (i): Where E is the node embedding matrix for adaptive learning.
6. The multi-modal traffic demand forecasting method based on graph neural network according to claim 1 is characterized in that: The graph neural network model uses historical traffic data to predict traffic demand in the next three hours. The prediction process is expressed by the following formula (j): Among them, f θ is the prediction function based on graph neural network; θ is the learnable parameter of the model.
Citation Information
Cited By
Smart city intelligent traffic management system based on big data
CN119831301A
Space-time dynamic OD prediction method based on fusion of graph neural network and real-time traffic state
CN122618814A
Spatiotemporal dynamic od prediction method of graph neural network fusing real-time traffic state
CN122618814B