Multi-task learning-based multi-mode travel flow collaborative prediction method, system and device

By employing a multi-task learning approach, combined with temporal graph convolutional networks and self-attention mechanisms, the problem of data sparsity and complexity in multimodal travel prediction is solved, achieving high-precision OD-scale traffic travel prediction and supporting urban traffic management and planning.

CN119862994BActive Publication Date: 2025-10-28HUAZHONG NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411969555.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-10-28
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively capture the interactions between multiple modes of travel and geographical features in urban traffic forecasting, leading to data sparsity and model complexity issues, especially insufficient prediction accuracy at the OD scale.

Method used

We employ a multi-task learning approach, acquiring data from various travel modes to construct an OD flow matrix, extracting flow similarity features and built environment features. By utilizing spatial adjacency graphs, flow feature maps, and built environment feature maps, combined with temporal graph convolutional networks and self-attention mechanisms, we capture spatiotemporal and interaction-dependent features and design an auxiliary loss function to enhance prediction.

Benefits of technology

It achieves high-precision urban residents' travel demand prediction at the OD scale, reduces model complexity, improves prediction accuracy, and supports multi-modal traffic collaborative management and urban planning decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862994B_ABST
    Figure CN119862994B_ABST
Patent Text Reader

Abstract

This invention discloses a multi-modal travel flow collaborative prediction method, system, and device based on multi-task learning. The method includes: acquiring relevant data of multiple travel modes in the area to be tested; preprocessing and spatiotemporally aligning the relevant data of multiple travel modes; extracting flow similarity features, built environment features, and temporal features of OD flows based on the OD flow matrix; extracting high-dimensional features of the built environment and mobile flows based on the built environment features and temporal features; constructing a spatial adjacency graph based on spatial proximity relationships; constructing a flow feature graph based on flow similarity features; constructing a built environment feature graph based on the extracted high-dimensional features; and then constructing a view for each travel mode; constructing a flow prediction pre-training model; training the flow prediction pre-training model to obtain a flow prediction model; and inputting the OD flow to be tested into the flow prediction model to obtain the prediction result for the next time moment. The method predicts multi-traffic OD flows in subsequent time periods based on historical OD flows and built environment data with high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data technology, and in particular to a method, system and device for collaborative prediction of multi-task learning and multi-modal travel flows. Background Technology

[0002] With the diversification of urban travel modes and the increasing complexity of travel demands, urban residents have more diverse travel options. Compared to single modes of transportation, residents tend to adopt combined modes, such as taxi and subway connections, or bus and shared bicycle connections. This multimodal transportation approach brings about complex interactions. There are close correlations between various modes of transportation, and relying solely on single-mode travel forecasting cannot fully reveal the dynamic changes in the urban transportation system and the mutual influences between different modes. Currently, most research methods focus on predicting single-mode travel demand, rarely considering the interactions between different modes. Therefore, designing a framework that can collaboratively predict residents' multimodal travel flows is particularly necessary. This will help to accurately predict residents' multimodal travel demand and more realistically reflect the diversity of residents' travel behaviors.

[0003] Currently, methods for predicting urban residents' travel demand are mainly at the regional scale, focusing on analyzing the inflow and outflow of population within a region, but they cannot predict the direction of residents' movement. In contrast, OD (Origin-Destination) flow prediction focuses on the origin and destination of residents' trips, enabling the prediction of directional flows. This allows for a more accurate capture of the dynamic changes in residents' travel, a detailed depiction of residents' travel behavior, and the identification of travel hotspots and high-frequency travel routes in the city, thus meeting the precise needs of urban and traffic management.

[0004] In recent years, deep learning models have been widely applied in the field of travel demand forecasting due to their ability to capture nonlinear spatiotemporal dependencies. Current forecasting models primarily rely on historical data to capture the spatiotemporal dependencies of individual travel modes, while relatively little consideration is given to the spatiotemporal dependencies and synergistic effects between different travel modes. To achieve accurate forecasting of multimodal transportation, it is necessary to construct separate modules for intra-modal and inter-modal learning, capturing the spatiotemporal dependencies of each travel mode and the synergistic effects between different travel modes. Meanwhile, OD (origin-destination) forecasting still faces many challenges. On the one hand, the data dimension for OD forecasting far exceeds that for regional forecasting, exhibiting significant sparsity in both time and space. On the other hand, deep learning models typically involve a large number of parameters, requiring meticulous tuning and evaluation. Therefore, how to address the data sparsity problem and how to adjust parameters to improve model accuracy have become core issues in OD demand forecasting.

[0005] Current methods for predicting urban residents' travel demand primarily rely on historical travel data and utilize deep learning as the main research tool, aiming to achieve higher accuracy models and methods at the regional and origin-destination (OD) scales. However, these methods still have several limitations: First, current methods mainly focus on predicting undirected flows at the regional scale, with less attention paid to predicting directed flows at the OD scale. Second, most current methods only consider the spatiotemporal dependence of a single travel mode, with few methods addressing multimodal travel OD prediction modeling. These methods face two major technical challenges: data sparsity and model complexity, and resolving these issues remains a key challenge for current technological development. Furthermore, the prediction of urban residents' travel demand has not yet been deeply integrated with geographical environmental characteristics. Although existing methods utilize geographical environmental characteristics to some extent to analyze residents' travel patterns and behaviors, research deeply integrating geographical environmental characteristics into predictive modeling remains limited. In these studies, geographical environmental characteristics are typically input into the model along with historical data, rather than being deeply embedded in the model to capture the complex dependencies between urban residents' travel demand and the geographical environment. Summary of the Invention

[0006] This invention addresses the shortcomings of existing technologies by providing a method, system, and apparatus for collaborative prediction of multi-mode travel flows based on multi-task learning.

[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0008] A multi-task learning-based multi-modal travel flow collaborative prediction method includes the following steps:

[0009] Acquire relevant data on various modes of transportation in the area to be tested. The relevant data includes historical origin and destination data, points of interest data, and road network data. Historical origin and destination data includes various modes of transportation, time of movement, and origin and destination locations. Points of interest data includes urban infrastructure data, service data, and geographic information data. Road network data includes road network density within each spatial unit.

[0010] The area to be tested is divided into a unit grid. The relevant data of various travel modes are preprocessed and spatiotemporally aligned to extract the OD flow matrix. Based on the OD flow matrix, the flow similarity features, built environment features and temporal features of the OD flow are extracted.

[0011] A spatial adjacency graph is constructed based on the spatial proximity relationship of OD flow, a flow feature graph is constructed based on flow similarity features, and high-dimensional features of built environment and mobile flow are extracted based on built environment features and temporal features to construct a built environment feature graph.

[0012] A view of each mode of transportation is constructed using spatial adjacency graphs, traffic flow characteristic graphs, and built environment characteristic graphs;

[0013] A traffic prediction pre-training model is constructed, comprising a spatiotemporal dependency feature extraction module, an interaction dependency feature extraction module, and a feature fusion module. The spatiotemporal dependency feature extraction module receives views for each travel mode and extracts the spatiotemporal dependency features corresponding to each travel mode view through a temporal graph convolutional network. The interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each travel mode and captures the interaction dependency features through a self-attention mechanism. The feature fusion module fuses the spatiotemporal dependency features and the interaction dependency features to obtain fused features. The traffic prediction pre-training model is trained based on traffic feature maps of historical time periods, and a loss function is used to enhance prediction, resulting in a traffic prediction model.

[0014] The OD flow to be measured is input into the flow prediction model for prediction, and the prediction result for the next time step under the current application scenario is obtained.

[0015] As one possible implementation method, dividing the area to be tested into a cell grid, performing spatiotemporal alignment processing on relevant data from multiple travel modes, and extracting the OD flow matrix includes the following steps:

[0016] The area to be measured is represented as a rectangle and divided into H×W spatial units along the longitude and latitude. Each spatial unit has the same size and is sequentially coded up to N.

[0017] If the origin and destination of each mode of transportation are located in N spatial units, then there are N spatial units. Seed OD flow;

[0018] Selecting M time periods from the historical timeframe, we sequentially extract the flow rate of each OD flow within each time period, i.e., the number of OD pairs that fall into the first spatial unit and whose destination falls into the second spatial unit. Furthermore, we align various travel modes in time and space. The resulting data matrix dimension is then represented as follows: This is the OD flow matrix for M time periods.

[0019] As one possible implementation, the construction of a spatial adjacency graph based on spatial proximity and the construction of a traffic feature graph based on traffic similarity features include the following steps:

[0020] Treating OD flows as nodes and the adjacency relationships between any two OD flows as edges in the graph structure, we construct a spatial adjacency graph, represented as: ;

[0021] The traffic characteristic map is represented as follows: , This means connecting each OD stream to the top few OD streams in the ranking of OD streams, in order to capture the flow characteristics of OD streams;

[0022] Among them, according to the proximity relationship of OD flows, if two OD flows are adjacent, the weight is 1, otherwise the weight is 0. The proximity relationship of OD flows is determined according to the adjacency relationship between the start and end points. For a given OD flow, there are three types of spatial neighbors: OD flows that are adjacent to the start and end points of the current OD flow respectively, OD flows that are adjacent to the start point of the OD flow and have the same end point, and OD flows that have the same start point and are adjacent to the end point.

[0023] As one possible implementation, the step of extracting high-dimensional features of the built environment and mobile flow based on built environment features and temporal features, and constructing a built environment feature map, includes the following steps:

[0024] By processing the point of interest data and road network data, and statistically analyzing the point of interest data and road network data of various travel modes in each spatial unit, the built environment characteristics of each spatial unit can be obtained.

[0025] The built environment features related to the origin and destination of OD flows are extracted, and the historical time period of OD flows is divided into several intervals on average. The OD flows of each mode of travel in each time period are summarized to obtain the time series features.

[0026] The graph convolutional network is used to process the built environment features and time series features respectively. The graph convolutional network is set with multiple convolutional layers and one output layer. The convolutional layers are set with a dimension of 64 or 128, and the output layer is set with a dimension of 1.

[0027] The activation function used is ReLU, and the model is optimized using the MSE loss function and the Adam optimizer to obtain a high-dimensional feature matrix of the mobile flow in the built environment. And the dimension is represented as ;

[0028] Based on the high-dimensional feature matrix, the inner product of the high-dimensional feature matrices is calculated using the relation matrix calculation formula. This inner product expresses the similarity of the high-dimensional features. The relation matrix calculation formula is as follows: , The inner product of the high-dimensional feature matrices has a dimension of 1. , Represents a high-dimensional feature matrix;

[0029] Based on the high-dimensional feature matrix and similarity, a built environment feature map is constructed, represented as follows: ;

[0030] in, express OD flow, The dimension is The characteristic matrix is ​​the inner product. The feature matrix representing the node.

[0031] As one possible implementation, each mode of transportation view is represented as follows:

[0032]

[0033] in, This represents the view of the nth mode of transportation. These represent the spatial adjacency graph, the flow characteristic graph, and the built environment characteristic graph, respectively.

[0034] As one possible implementation, the spatiotemporal dependency feature extraction module receives each travel mode view and extracts the spatiotemporal dependency features corresponding to each travel mode view through a time-graph convolutional network, including:

[0035] The spatiotemporal dependency feature extraction module includes a multi-layer temporal graph convolutional network, which includes a temporal convolutional network and a graph convolutional network. The temporal convolutional network captures temporal dependency features, and the graph convolutional network captures spatial dependency features.

[0036] Temporal convolutional networks include causal dilated convolutional structures and gated recursive units. The causal dilated convolutional structures learn the dynamic changes of OD flow in each mode of travel view to capture time-dependent features, and the gated recursive units capture time-dependent features again.

[0037] Filters are constructed in the Fourier domain of the graph convolutional network to capture spatial dependency features between nodes;

[0038] The causal dilated convolution structure is a one-dimensional convolution, represented as: ;

[0039] The gated recursive unit is represented as: ;

[0040] The graph convolutional network is represented as follows: ;

[0041] in, This represents the features after dilated causal convolution. Indicates time-dependent features, Indicates size is The core, This represents the expansion factor that controls the jump distance. Indicates the step size. These represent convolution filters, This represents the sigmoid function. These represent the deviation coefficients, This indicates the time-dependent features that were captured again. Represents the convolution kernel. express The symmetric Laplace matrix, Represents the identity matrix. express The angle matrix, This indicates spatial dependency features.

[0042] As one possible implementation, the interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each mode of travel and captures the interaction dependency features through a self-attention mechanism, including the following steps:

[0043] Obtain the spatiotemporal dependency features of the same graph for each mode of travel, concatenate the spatiotemporal dependency features in their respective dimensions and perform dimensional transformation to form a merged tensor;

[0044] By using an attention mechanism, the merged tensor is mapped to query, key, and value vectors through a convolutional layer, capturing the interactive dependencies between graphs of the same type for multiple travel modes, and obtaining interactive dependency features;

[0045] The attention mechanism weights are represented as follows:

[0046]

[0047] in, Indicates interactive dependency features, Dimensions representing features These represent the query vector, key vector, and value vector, respectively.

[0048] As one possible implementation method, the fusion feature is represented as follows:

[0049]

[0050] in, This represents the learnable parameter matrix. Represents the Hadamard product. These represent interactive dependency features.

[0051] As one possible implementation method, the loss function is obtained in the following way:

[0052] Construct a first loss function and a second loss function respectively, and obtain the total loss function based on the first loss function and the second loss function;

[0053] The first loss function is expressed as follows:

[0054] in, Indicates unmasked OD flow. Indicates the predicted value. The value represents the actual value, and the mask represents the matrix file. The value is 0 or 1, which indicates whether the corresponding OD stream is masked.

[0055] The second loss function is expressed as follows:

[0056]

[0057] The loss function is expressed as follows: ;

[0058] in, These represent the importance weights corresponding to the first loss function and the second loss function, respectively.

[0059] A multi-task learning and multi-mode travel flow collaborative prediction system includes a data acquisition module, a processing and extraction module, a feature extraction module, a view construction module, a model training module, and a prediction and inference module.

[0060] The data acquisition module is used to acquire relevant data on various travel modes in the area to be tested. The relevant data includes historical origin and destination data, points of interest data, and road network data. The historical origin and destination data includes various travel modes, movement occurrence time data, and movement origin and destination location data. The points of interest data includes urban related infrastructure data, service data, and geographic information data. The road network data is the road network density within each spatial unit.

[0061] The processing and extraction module is used to divide the area to be tested into a cell grid, preprocess and align the relevant data of various travel modes in time and space, extract the OD flow matrix, and extract the flow similarity features, built environment features and time series features of the OD flow based on the OD flow matrix.

[0062] The feature extraction module constructs a spatial adjacency graph based on the spatial proximity relationship of OD flow, constructs a flow feature graph based on flow similarity features, and extracts high-dimensional features of built environment and mobile flow based on built environment features and temporal features to construct a built environment feature graph.

[0063] The view construction module constructs views for each mode of travel using spatial adjacency graphs, traffic flow feature graphs, and built environment feature graphs.

[0064] The model training module is used to construct a traffic prediction pre-training model. The traffic prediction pre-training model includes a spatiotemporal dependency feature extraction module, an interaction dependency feature extraction module, and a feature fusion module. The spatiotemporal dependency feature extraction module receives views of each travel mode and extracts the spatiotemporal dependency features corresponding to each travel mode view through a temporal graph convolutional network. The interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each travel mode and captures the interaction dependency features through a self-attention mechanism. The feature fusion module fuses the spatiotemporal dependency features and the interaction dependency features to obtain fused features. The traffic prediction pre-training model is trained based on traffic feature maps of historical time periods, and a loss function is used to enhance prediction to obtain the traffic prediction model.

[0065] The prediction inference module is used to input the OD flow to be measured into the flow prediction model for prediction, and obtain the prediction result of the next time step under the current application scenario.

[0066] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the following method:

[0067] Acquire relevant data on various modes of transportation in the area to be tested. The relevant data includes historical origin and destination data, points of interest data, and road network data. Historical origin and destination data includes various modes of transportation, time of movement, and origin and destination locations. Points of interest data includes urban infrastructure data, service data, and geographic information data. Road network data includes road network density within each spatial unit.

[0068] The area to be tested is divided into a unit grid. The relevant data of various travel modes are preprocessed and spatiotemporally aligned to extract the OD flow matrix. Based on the OD flow matrix, the flow similarity features, built environment features and temporal features of the OD flow are extracted.

[0069] A spatial adjacency graph is constructed based on the spatial proximity relationship of OD flow, a flow feature graph is constructed based on flow similarity features, and high-dimensional features of built environment and mobile flow are extracted based on built environment features and temporal features to construct a built environment feature graph.

[0070] A view of each mode of transportation is constructed using spatial adjacency graphs, traffic flow characteristic graphs, and built environment characteristic graphs;

[0071] A traffic prediction pre-training model is constructed, comprising a spatiotemporal dependency feature extraction module, an interaction dependency feature extraction module, and a feature fusion module. The spatiotemporal dependency feature extraction module receives views for each travel mode and extracts the spatiotemporal dependency features corresponding to each travel mode view through a temporal graph convolutional network. The interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each travel mode and captures the interaction dependency features through a self-attention mechanism. The feature fusion module fuses the spatiotemporal dependency features and the interaction dependency features to obtain fused features. The traffic prediction pre-training model is trained based on traffic feature maps of historical time periods, and a loss function is used to enhance prediction, resulting in a traffic prediction model.

[0072] The OD flow to be measured is input into the flow prediction model for prediction, and the prediction result for the next time step under the current application scenario is obtained.

[0073] A multi-task learning-based multi-mode travel flow collaborative prediction device includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the following method:

[0074] Acquire relevant data on various modes of transportation in the area to be tested. The relevant data includes historical origin and destination data, points of interest data, and road network data. Historical origin and destination data includes various modes of transportation, time of movement, and origin and destination locations. Points of interest data includes urban infrastructure data, service data, and geographic information data. Road network data includes road network density within each spatial unit.

[0075] The area to be tested is divided into a unit grid. The relevant data of various travel modes are preprocessed and spatiotemporally aligned to extract the OD flow matrix. Based on the OD flow matrix, the flow similarity features, built environment features and temporal features of the OD flow are extracted.

[0076] A spatial adjacency graph is constructed based on the spatial proximity relationship of OD flow, a flow feature graph is constructed based on flow similarity features, and high-dimensional features of built environment and mobile flow are extracted based on built environment features and temporal features to construct a built environment feature graph.

[0077] A view of each mode of transportation is constructed using spatial adjacency graphs, traffic flow characteristic graphs, and built environment characteristic graphs;

[0078] A traffic prediction pre-training model is constructed, comprising a spatiotemporal dependency feature extraction module, an interaction dependency feature extraction module, and a feature fusion module. The spatiotemporal dependency feature extraction module receives views for each travel mode and extracts the spatiotemporal dependency features corresponding to each travel mode view through a temporal graph convolutional network. The interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each travel mode and captures the interaction dependency features through a self-attention mechanism. The feature fusion module fuses the spatiotemporal dependency features and the interaction dependency features to obtain fused features. The traffic prediction pre-training model is trained based on traffic feature maps of historical time periods, and a loss function is used to enhance prediction, resulting in a traffic prediction model.

[0079] The OD flow to be measured is input into the flow prediction model for prediction, and the prediction result for the next time step under the current application scenario is obtained.

[0080] This invention, by adopting the above technical solutions, has significant technical effects:

[0081] This invention integrates multi-source geographic data and deep learning methods, while considering the interactive dependence and synergistic impact of built environment characteristics and multimodal transportation, to construct a high-precision urban residents' travel demand prediction model at the OD scale, so as to support scientific decision-making in multimodal transportation collaborative management and urban planning.

[0082] Specifically, this invention focuses on multimodal traffic travel prediction at the OD scale. Based on representation learning methods, it extracts built environment features and temporal dynamic features of crowd movement flow, and constructs multiple views to represent them with spatial association and flow characteristics of movement flow. Based on the idea of ​​multi-task learning, it uses temporal graph convolutional network (TGCN) and self-attention mechanism to capture spatiotemporal dependency features and interaction dependencies between multimodal traffic, respectively, and designs an auxiliary loss function to enhance prediction.

[0083] This invention uses a masked loss function to reduce the impact of data sparsity on prediction. Based on this framework, this invention can achieve collaborative prediction of multiple traffic flows; it predicts multi-traffic origin-destination flows for subsequent periods based on historical origin-destination (OD) flows and built-up environment data. Compared to existing methods, the model is relatively simple, requires less computational power, and yields higher accuracy. Attached Figure Description

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

[0085] Figure 1 This is a flowchart illustrating the method of the present invention;

[0086] Figure 2 This is a schematic diagram of the overall structure of the system of the present invention;

[0087] Figure 3 This is a schematic diagram of the method for constructing a built environment feature map according to the present invention;

[0088] Figure 4 This is a schematic diagram of the traffic prediction pre-training model of the present invention. Detailed Implementation

[0089] The present invention will be further described in detail below with reference to the embodiments. The following embodiments are explanations of the present invention, but the present invention is not limited to the following embodiments.

[0090] Example 1:

[0091] A multi-task learning-based multi-modal travel flow collaborative prediction method, such as Figure 1 As shown, it includes the following steps:

[0092] S100. Acquire relevant data on various modes of transportation in the area to be tested. The relevant data includes historical origin and destination data, points of interest data, and road network data. Historical origin and destination data includes various modes of transportation, time of movement, and origin and destination locations. Points of interest data includes urban infrastructure data, service data, and geographic information data. Road network data includes road network density within each spatial unit.

[0093] S200. Divide the area to be tested into a cell grid, preprocess and align the relevant data of various travel modes in time and space, extract the OD flow matrix, and extract the flow similarity features, built environment features and time series features of the OD flow based on the OD flow matrix.

[0094] S300. Construct a spatial adjacency graph based on the spatial proximity relationship of OD flow, construct a flow feature graph based on flow similarity features, and extract high-dimensional features of built environment and mobile flow based on built environment features and temporal features to construct a built environment feature graph.

[0095] S400: Construct views for each mode of transportation using spatial adjacency graphs, traffic flow characteristic graphs, and built environment characteristic graphs;

[0096] S500. Construct a traffic prediction pre-training model. The traffic prediction pre-training model includes a spatiotemporal dependency feature extraction module, an interaction dependency feature extraction module, and a feature fusion module. The spatiotemporal dependency feature extraction module receives views of each travel mode and extracts the spatiotemporal dependency features corresponding to each travel mode view through a temporal graph convolutional network. The interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each travel mode and captures the interaction dependency features through a self-attention mechanism. The feature fusion module fuses the spatiotemporal dependency features and the interaction dependency features to obtain fused features. The traffic prediction pre-training model is trained based on the traffic feature maps of historical time periods, and a loss function is used to enhance prediction to obtain the traffic prediction model.

[0097] S600: Input the OD flow to be measured into the flow prediction model for prediction, and obtain the prediction result of the next moment under the current application scenario.

[0098] To capture the interaction dependencies between different modes of transportation, a multi-view learning approach is adopted. Complex interaction patterns are decomposed into multiple independent, simple patterns, capturing the spatiotemporal dependencies of each view separately, and then the multi-view features are fused. This method alleviates the burden of capturing complex nonlinear dependencies, reduces model complexity, and makes the generated model more interpretable.

[0099] In one specific embodiment, dividing the area to be tested into a cell grid, performing spatiotemporal alignment processing on the relevant data of multiple travel modes, and extracting the OD flow matrix includes the following steps:

[0100] The area to be measured is represented as a rectangle and divided into H×W spatial units along the longitude and latitude. Each spatial unit has the same size and is sequentially coded up to N.

[0101] If the origin and destination of each mode of transportation are located in N spatial units, then there are N spatial units. Seed OD flow;

[0102] Selecting M time periods from the historical timeframe, we sequentially extract the flow rate of each type of OD flow within each time period, i.e., the number of OD pairs that fall into the first spatial unit and whose destination falls into the second spatial unit. Furthermore, we align multiple travel modes in time and space. The resulting data matrix dimension is then represented as follows: This is the OD flow matrix for M time periods.

[0103] If we consider OD flows as nodes and the proximity relationships between any two OD flows as edges in the graph structure, then the graph structure is represented as follows: ,in, Represents a set of nodes. Representing dimension, The dimension is The feature matrix is ​​the feature of the edge. The feature matrix of a node is represented as: Let represent the historical travel demand for each node in the graph structure for the two travel modes. The travel prediction problem is then defined as follows: given one or more graphs G and their feature matrices X, constructing and training a reasonable model can predict the features of the two travel modes in the next time period.

[0104] The construction of a spatial adjacency graph based on spatial proximity and a traffic feature graph based on traffic similarity features include the following steps:

[0105] Treating OD flows as nodes and the adjacency relationships between any two OD flows as edges in the graph structure, we construct a spatial adjacency graph, represented as: ;

[0106] The traffic characteristic map is represented as follows: , This means connecting each OD stream to the top few OD streams in the ranking of OD streams, in order to capture the flow characteristics of OD streams;

[0107] Among them, according to the proximity relationship of OD flows, if two OD flows are adjacent, the weight is 1, otherwise the weight is 0. The proximity relationship of OD flows is determined according to the adjacency relationship between the start and end points. For a given OD flow, there are three types of spatial neighbors: OD flows that are adjacent to the start and end points of the current OD flow respectively, OD flows that are adjacent to the start point of the OD flow and have the same end point, and OD flows that have the same start point and are adjacent to the end point.

[0108] High-dimensional features are a necessary condition for more accurate predictions. Therefore, the construction of a built-up environment feature map based on high-dimensional features, such as... Figure 3 As shown, it includes the following steps:

[0109] By processing the point-of-interest (POI) data and road network data, and statistically analyzing the road network density of POI data in each spatial unit, the built environment characteristics of each spatial unit can be obtained.

[0110] The built environment features related to the origin and destination of OD flows are extracted, and the historical time period of OD flows is divided into several intervals on average. The OD flows of each mode of travel in each time period are summarized to obtain the time series features.

[0111] The graph convolutional network is used to process the built environment features and time series features respectively. The graph convolutional network is set with multiple convolutional layers and one output layer. The convolutional layers are set with a dimension of 64 or 128, and the output layer is set with a dimension of 1.

[0112] The activation function used is ReLU, and the model is optimized using the MSE loss function and the Adam optimizer to obtain a high-dimensional feature matrix of the mobile flow in the built environment. And the dimension is represented as ;

[0113] Based on the high-dimensional feature matrix, the inner product of the high-dimensional feature matrices is calculated using the relation matrix calculation formula. This inner product expresses the similarity of the high-dimensional features. The relation matrix calculation formula is as follows: , The inner product of the high-dimensional feature matrices has a dimension of 1. , Represents a high-dimensional feature matrix;

[0114] Based on the high-dimensional feature matrix and similarity, a built environment feature map is constructed, represented as follows: ;

[0115] in, express OD flow, The dimension is The characteristic matrix is ​​the inner product. The feature matrix representing the node.

[0116] The final view of each mode of transportation is represented as follows:

[0117]

[0118] in, This represents the view of the nth mode of transportation. These represent the spatial adjacency graph, the flow characteristic graph, and the built environment characteristic graph, respectively.

[0119] In one embodiment, the spatiotemporal dependency feature extraction module receives each travel mode view and extracts the spatiotemporal dependency features corresponding to each travel mode view through a time-graph convolutional network, including:

[0120] The spatiotemporal dependency feature extraction module includes a multi-layer temporal graph convolutional network, which includes a temporal convolutional network and a graph convolutional network. The temporal convolutional network captures temporal dependency features, and the graph convolutional network captures spatial dependency features.

[0121] Temporal convolutional networks include causal dilated convolutional structures and gated recursive units. The causal dilated convolutional structures learn the dynamic changes of OD flow in each mode of travel view to capture time-dependent features, and the gated recursive units capture time-dependent features again.

[0122] Filters are constructed in the Fourier domain of the graph convolutional network to capture spatial dependency features between nodes;

[0123] The causal dilated convolution structure is a one-dimensional convolution, represented as: ;

[0124] The gated recursive unit is represented as: ;

[0125] The graph convolutional network is represented as follows: ;

[0126] in, This represents the features after dilated causal convolution. Indicates time-dependent features, Indicates size is The core, This represents the expansion factor that controls the jump distance. Indicates the step size. These represent convolution filters, This represents the sigmoid function. These represent the deviation coefficients, This indicates the time-dependent features that were captured again. Represents the convolution kernel. express The symmetric Laplace matrix, Represents the identity matrix. express The angle matrix, This indicates spatial dependency features.

[0127] Finally, the spatiotemporal dependency feature extraction module extracts the spatiotemporal dependency features corresponding to each travel mode view, while the interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same type of graph in each travel mode and captures the interaction dependency features through a self-attention mechanism, including the following steps:

[0128] Obtain the view of each mode of transportation, stitch the views of each mode of transportation together in their respective dimensions and perform dimensional transformation to form a merged tensor;

[0129] By using an attention mechanism, the merged tensor is mapped to query, key, and value vectors through a convolutional layer, capturing the interactive dependencies between graphs of the same type for multiple travel modes, and obtaining interactive dependency features;

[0130] The attention mechanism weights are represented as follows:

[0131]

[0132] in, Indicates interactive dependency features, Dimensions representing features These represent the query vector, key vector, and value vector, respectively.

[0133] The final fusion features are represented as follows:

[0134]

[0135] in, This represents the learnable parameter matrix. Represents the Hadamard product. These represent interactive dependency features.

[0136] During training, the model's optimal parameters are obtained by adjusting the loss function. In this invention, the loss function is obtained in the following way:

[0137] Construct a first loss function and a second loss function respectively, and obtain the total loss function based on the first loss function and the second loss function;

[0138] The first loss function is expressed as follows:

[0139] in, Indicates unmasked OD flow. Indicates the predicted value. The value represents the actual value, and the mask indicates that the matrix file value is 0 or 1, indicating whether the corresponding OD stream is masked. If the value is masked, backpropagation will not be performed. This method can significantly improve the prediction performance of unmasked ODs. Due to the sparsity of OD data, ODs with small traffic can be masked. In this example, ODs with a traffic of 0 are masked.

[0140] The second loss function is used to enhance the identification of inter-mode interaction dependencies. It calculates the cosine distance for graphs of the same category for both travel modes, as shown below:

[0141]

[0142] The loss function is expressed as follows: ;in, These represent the importance weights corresponding to the first loss function and the second loss function, respectively.

[0143] Finally, the model testing module tests and evaluates the trained model. Mean absolute error (MAE), root mean square error (RMSE), and symmetric mean absolute percentage error (SMAPE) are used to evaluate the predictive model. The prediction output module can call the trained model and obtain the prediction results of the OD flow by inputting historical data.

[0144] The following is a specific embodiment:

[0145] Collect relevant data on the study area over historical periods, such as historical origin-destination (OD) data, point-of-interest (POI) data, and road network data;

[0146] Historical origin-destination (OD) data records the starting and ending points of an individual or object's movement in space, as well as the time of the movement. This type of data includes data from various modes of transportation such as taxis, subways, and shared bicycles. For trajectory-based data, further processing is required to extract OD data.

[0147] Point of Interest (POI) data can be obtained from open datasets, such as from the Gaode Map platform, which can acquire various types of POI data for the study area, including companies and enterprises, shopping services, transportation facilities, science, education and culture services, accommodation services, tourist attractions, cultural media, leisure and entertainment services, medical and health services, sports and leisure services, and residential areas. Selectively aggregate and statistically analyze various types of POI data in each spatial unit of the study area.

[0148] Road network data is obtained from open data platforms such as Amap and OpenStreetMap, and the road network density in each spatial unit is calculated.

[0149] This invention aims to predict travel demand between each origin-destination pair in various travel modes based on historical time step T data. The study area is divided into spatial units, and historical origin-destination (OD) data for various travel modes are spatiotemporally aligned to extract the OD flow matrix. For example, in this instance, the study area is divided into 1 km x 1 km grids, sequentially coded from 1 to N. The origin and destination of each travel mode are located within a spatial unit, with N grids serving as the origin and destination, thus enabling the prediction of travel demand between each origin-destination pair across multiple travel modes. This involves generating an OD (Original Disk Stream) flow. From a time perspective, the time interval for historical time periods is set to 30 minutes, resulting in a total of M time periods. For a given time period... and any two spatial units and Statistical period Inside, starting point falls into And the finish line falls into The number of origin-destination pairs (OD pairs) is calculated, and the flow rate of each OD flow is extracted sequentially for each time period. During extraction, it should be ensured that multiple travel modes are aligned in time and space. Therefore, the data matrix dimension for a certain travel mode is [dimension number missing]. That is, the OD flow matrix of M time periods was extracted.

[0150] If we treat OD flows as nodes in a graph structure and the relationships between OD flows as edges, the graph structure can be constructed as follows: Where V represents the node set with dimension 1. A represents dimension ; The feature matrix of is the feature matrix describing the edge; X is the feature matrix of the node, denoted as . , representing the historical travel demand for each of the two travel modes at each node in graph G.

[0151] The travel prediction problem involves learning a function given one or more graphs G and their feature matrices X, such that it can predict the features of the graphs for two different travel modes in the next time period.

[0152] In one embodiment, taking taxi and shared bicycle travel data as examples, the data is divided into taxi view and shared bicycle view based on the travel mode. In each travel mode view, the spatial proximity relationship, flow relationship, and built environment relationship between OD flows are considered, thus constructing three relationship graphs: spatial adjacency graph, flow feature graph, and built environment feature graph.

[0153] A spatial adjacency graph was constructed based on the proximity relationships of OD flows. If two OD flows are adjacent, the weight is 1; otherwise, the weight is 0. Here, the proximity relationship of OD flows is determined according to the adjacency relationship between the start and end points. For a given OD flow, there are three types of spatial neighbors: OD flows that are adjacent to both the start and end points of the current OD flow, OD flows that are adjacent to the start point of the current OD flow and have the same end point, and OD flows that have the same start point and are adjacent to the end point of the current OD flow.

[0154] Constructing a traffic feature map , This is represented by connecting each OD flow to the top few OD flows in terms of traffic, in order to capture the flow characteristics of the OD flow.

[0155] Construct a built environment feature map Based on representation learning, high-dimensional features of mobile flows in the built environment are extracted to calculate the similarity between OD flows.

[0156] This section focuses on constructing the built environment feature map. First, POI and road network data are processed, and historical point-of-interest (POI) and road network data of various types are statistically analyzed for each spatial unit. Taking POIs as categorized into three types as an example, a total of four built environment features are obtained for each spatial unit: the density of the three POI categories and the road network density. For a given origin-destination (OD) flow, built environment features of the origin and destination are extracted, resulting in eight features. Simultaneously, the historical time period of the OD flow is divided into 12 intervals per day, each interval being two hours long: 00:00-02:00, ..., 22:00-24:00. Traffic flow for various travel modes at the origin and destination in each time period is summarized, resulting in 24 temporal features for both travel modes.

[0157] Based on this, construct a graph. Where V is a node, representing Seed OD flow; For dimension The feature matrix is ​​constructed using the spatial proximity relationship of the flow; X is the feature matrix of the node, and the input feature matrix consists of 32 extracted features, including built environment features and temporal features.

[0158] Graph convolutional networks (GCNNs) are used to process feature maps, and multiple convolutional layers and one output layer can be configured. The convolutional layers are set to 64 or 128 dimensions, the output layer to 1 dimension, ReLU activation is used, and the model is optimized using the MSE loss function and the Adam optimizer. This yields the extracted built-up environment-mobile flow high-dimensional feature matrix F, with dimensions [missing information]. Then, for the extracted high-dimensional feature matrix F, a relation matrix R is calculated to express the similarity of the features. The formula for calculating the relation matrix R is as follows: That is, to calculate the inner product of the high-dimensional features of the OD flow built-up environment and the moving flow, the dimension of which is ;

[0159] The built environment feature map is then constructed and represented as follows: ;

[0160] in, express OD flow, The dimension is The characteristic matrix is ​​the inner product. The feature matrix representing a node is the built environment feature and the temporal feature.

[0161] To perform multi-view learning, a taxi view is constructed. And shared bicycle view Each view includes three types of graphs: spatial adjacency graph, flow characteristic graph, and built environment characteristic graph, then:

[0162] ;

[0163] .

[0164] Although the three types of graphs have different edges, they have the same nodes. The feature X of the travel mode belongs to the node. The six graphs are input into the pre-trained traffic prediction model to extract features and fit the model.

[0165] The traffic prediction pre-trained model, or model training module, includes an intra-pattern learning module (i.e., a spatiotemporal dependency feature extraction module), an inter-pattern learning module (i.e., an interaction dependency feature extraction module), and a feature fusion module. The complete traffic prediction pre-trained model can be found in the appendix. Figure 4As shown, the intra-pattern learning module mainly consists of a TGCN, which combines a Temporal Convolutional Network (TCN) and a Graph Convolutional Network (GCN). The TCN includes a Convolutional Neural Network (CNN) and a Gated Recurrent Unit (GRU). The GCN is used to capture spatial dependency features from the graph, while the TCN is primarily used to learn the dynamic changes of the OD flow to capture temporal dependency features. Specifically, the TCN uses a causal dilated convolutional structure to capture the temporal dependency features of the OD flow. This convolution is a one-dimensional convolution that slides the input by skipping a certain stride. For each graph... , Given the time-series features of view v, at stride s, dilated causal convolution can be expressed as: ,in, This represents the features obtained after dilated causal convolution. Let L be a kernel of size L, and d be an expansion factor controlling the jump distance. Gated recurrent units (GRUs) are used to further capture time-dependent features and can be represented as... ,in and It is a convolution filter. represents the sigmoid function, and b and c are the bias coefficients. GCN constructs a filter in the Fourier domain and applies it to the nodes of the graph, capturing the spatial features between nodes through first-order neighborhoods. Graph convolution can be represented as... ,in For convolution kernel, Let G be the symmetric Laplacian matrix, I be the identity matrix, and D be the diagonal matrix of A. Stacking multiple layers of TGCN can effectively capture the spatial dependency features of each graph. The number of stacking layers can be determined according to the actual application scenario; the example uses 4 layers. Furthermore, the in-pattern learning module involves setting the temporal and spatial convolution kernel sizes and the number of convolution channels. The example sets the temporal and spatial convolution kernel sizes to 3 and the number of convolution channels to 128. Overall, by placing the six graphs into the TGCN, six spatiotemporal feature matrices are extracted for the three graphs under two travel modes. Each spatiotemporal feature matrix represents the spatiotemporal dependency features of the corresponding graph in historical data. (See attached...) Figure 4 As shown, the spatial adjacency graph, traffic feature graph, and built environment feature graph constructed based on taxi OD flow will be processed by the in-pattern learning module, i.e., the spatiotemporal dependency feature extraction module, to extract the spatiotemporal dependency features corresponding to the spatial adjacency graph, traffic feature graph, and built environment feature graph. Similarly, the spatial adjacency graph, traffic feature graph, and built environment feature graph based on shared bicycle OD flow will be processed in the same way to extract the spatiotemporal dependency features corresponding to the spatial adjacency graph, traffic feature graph, and built environment feature graph.

[0166] The inter-pattern learning module fuses spatiotemporal dependency features extracted from multiple graphs to capture the interaction dependencies between travel modes or transportation patterns. This module primarily relies on a self-attention mechanism, mapping input data through convolutional layers to query (Q), key (K), and value (V) vectors. This generates more efficient feature representations in the spatial dimension, resulting in more accurate feature capture and information fusion. The input data is a tensor containing multiple view features. These features are concatenated and dimensionality transformed to accommodate subsequent convolutional operations. If more than one view feature exists, they are concatenated along the last dimension to form a merged tensor. The formula for calculating attention weights is... ,in, The feature dimensions are Q, K, and V, which are the query vector, key vector, and value vector, respectively. These are generated from the merged tensor through a 1D convolutional layer, followed by the softmax function to calculate attention weights, which are then multiplied by V to obtain the attention value. The final output is mapped through a linear layer, and ReLU activation and Dropout are used to prevent overfitting. In the example, the spatial adjacency graphs of taxi and shared bicycle views are connected, their traffic feature graphs are connected, and their built environment feature graphs are connected, performing three sets of self-attention mechanism operations to capture the interaction dependencies between the same graphs of the two travel modes. For example, the interaction dependency between the spatiotemporal dependency features extracted from taxi OD flow and the spatiotemporal dependency features extracted from shared bicycle OD flow is obtained, thus yielding the interaction dependency features between the same graphs of the two travel modes, resulting in three types of features. , , Of course, if there are multiple modes of transportation, then it is sufficient to capture the interaction dependency features between the same type of graphs for each pair of modes of transportation.

[0167] The feature fusion module uses a parameter matrix-based fusion method to fuse the three types of features, as shown in the formula: ,in , and Let be the learnable parameter matrix, and ⊙ denote the Hadamard product. To achieve efficient model training, two loss functions are used to constrain the training process. The main loss function uses the Masked Mean Squared Error (MSE) function, with the following formula: ,in This represents the number of unmasked ODs. For predicted values, The actual value is represented by `mask`, which is a matrix file with values ​​of 0 and 1, indicating whether the corresponding OD flow is masked. If a value is masked, backpropagation will not be performed. This method can significantly improve the prediction performance of unmasked ODs. Due to the sparsity of OD data, ODs with small flows can be masked; in this example, ODs with a flow of 0 are masked. An auxiliary loss function is used to enhance the identification of inter-modal interaction dependencies. Cosine distance is calculated for graphs of the same category for both travel modes, and the formula is as follows:

[0168] .

[0169]

[0170] The total loss function is then... ,in and Used to control the importance of the two types of losses.

[0171] The model testing module tests and evaluates the trained model. Mean absolute error (MAE), root mean square error (RMSE), and symmetric mean absolute percentage error (SMAPE) are used to evaluate the predictive model. The prediction output module can call the trained model and obtain the prediction results of the OD flow by inputting historical data.

[0172] To address the above problems, this invention designs a collaborative prediction method for multi-modal traffic flows of residents based on multi-task learning. This invention integrates multi-source geographic data and deep learning methods, while considering the built environment characteristics and the interactive dependencies and collaborative effects of multi-modal traffic, to construct a high-precision urban resident traffic demand prediction model at the OD scale, thereby supporting scientific decision-making in multi-modal traffic collaborative management and urban planning.

[0173] Specifically, this invention focuses on multimodal traffic travel prediction at the OD scale. Based on representation learning methods, it extracts built environment features and dynamic features of pedestrian movement flows, constructing multiple views to represent these features along with spatial associations and flow characteristics. Using a multi-task learning approach, it employs Temporal Graph Convolutional Networks (TGCN) and Self-Attention to capture spatiotemporal dependencies and inter-modal traffic interaction dependencies, respectively, and designs an auxiliary loss function to enhance prediction. In particular, this invention uses a Masked Loss Function to reduce the impact of data sparsity on prediction. Through this framework, this invention can achieve collaborative prediction of multiple traffic flows; predicting multi-traffic OD flows for subsequent time periods based on historical OD flows and built environment data. Compared to existing methods, the model is relatively simple, requires less computational power, and yields higher accuracy.

[0174] Example 2:

[0175] A multi-task learning-based multi-modal travel flow collaborative prediction system, such as Figure 2 As shown, it includes a data acquisition module 100, a processing and extraction module 200, a feature extraction module 300, a view construction module 400, a model training module 500, and a prediction and inference module 600.

[0176] The data acquisition module 100 is used to acquire relevant data of various travel modes in the area to be tested. The relevant data includes historical origin and destination data, points of interest data, and road network data. The historical origin and destination data includes various travel modes, movement occurrence time data, and movement origin and destination location data. The points of interest data are data on urban related infrastructure, services, geographic information, etc., and the road network data is the road network density within each spatial unit.

[0177] The processing and extraction module 200 is used to divide the area to be tested into a cell grid, preprocess and spatiotemporally align the relevant data of multiple travel modes, and extract the OD flow matrix.

[0178] The feature extraction module 300 is used to extract the traffic similarity features, built environment features, and temporal features of OD flows based on the OD flow matrix, and to extract high-dimensional features of the built environment and mobile flows based on the built environment features and temporal features.

[0179] The view construction module 400 constructs a spatial adjacency graph based on spatial proximity relationships, a traffic feature graph based on traffic similarity features, and a built environment feature graph based on high-dimensional features. It then constructs a view for each mode of travel using the spatial adjacency graph, traffic feature graph, and built environment feature graph.

[0180] The model training module 500 is used to construct a traffic prediction pre-training model. The traffic prediction pre-training model includes a spatiotemporal dependency feature extraction module, an interaction dependency feature extraction module, and a feature fusion module. The spatiotemporal dependency feature extraction module receives views of each travel mode and extracts the spatiotemporal dependency features corresponding to each travel mode view through a temporal graph convolutional network. The interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each travel mode and captures the interaction dependency features through a self-attention mechanism. The feature fusion module fuses the spatiotemporal dependency features and the interaction dependency features to obtain fused features. The traffic prediction pre-training model is trained based on the traffic feature maps of historical time periods, and a loss function is used to enhance prediction to obtain the traffic prediction model.

[0181] The prediction inference module 600 is used to input the OD flow to be measured into the flow prediction model for prediction, and obtain the prediction result of the next moment under the current application scenario.

[0182] Various changes and modifications made without departing from the spirit and scope of this invention, and all equivalent technical solutions, also fall within the scope of this invention.

[0183] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0184] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0185] This invention is described with reference to flowchart illustrations and / or block diagrams of the method, terminal device (system), and computer program product according to the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0186] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0188] It should be noted that:

[0189] The phrase "an embodiment" or "an embodiment" used in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Therefore, the phrase "an embodiment" or "an embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment.

[0190] Furthermore, it should be noted that the shapes and names of the parts and components described in the specific embodiments described in this specification may differ. All equivalent or simple variations made to the structure, features, and principles described in this patent concept are included within the protection scope of this patent. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to replace them, as long as they do not depart from the structure of this invention or exceed the scope defined in these claims, they should all fall within the protection scope of this invention.

Claims

1. A multi-task learning-based multi-modal travel flow collaborative prediction method, characterized in that, Includes the following steps: Acquire relevant data on various modes of transportation in the area to be tested. The relevant data includes historical origin and destination data, points of interest data, and road network data. Historical origin and destination data includes various modes of transportation, time of movement, and origin and destination locations. Points of interest data includes urban infrastructure data, service data, and geographic information data. Road network data includes road network density within each spatial unit. The area to be tested is divided into a unit grid. The relevant data of various travel modes are preprocessed and spatiotemporally aligned to extract the OD flow matrix. Based on the OD flow matrix, the flow similarity features, built environment features and temporal features of the OD flow are extracted. A spatial adjacency graph is constructed based on the spatial proximity relationship of OD flow, a flow feature graph is constructed based on flow similarity features, and high-dimensional features of built environment and mobile flow are extracted based on built environment features and temporal features to construct a built environment feature graph. A view of each mode of transportation is constructed using spatial adjacency graphs, traffic flow characteristic graphs, and built environment characteristic graphs; A traffic prediction pre-training model is constructed, comprising a spatiotemporal dependency feature extraction module, an interaction dependency feature extraction module, and a feature fusion module. The spatiotemporal dependency feature extraction module receives views for each travel mode and extracts the spatiotemporal dependency features corresponding to each travel mode view through a temporal graph convolutional network. The interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each travel mode and captures the interaction dependency features through a self-attention mechanism. The feature fusion module fuses the spatiotemporal dependency features and the interaction dependency features to obtain fused features. The traffic prediction pre-training model is trained based on traffic feature maps of historical time periods, and a loss function is used to enhance prediction, resulting in a traffic prediction model. The OD flow to be measured is input into the flow prediction model for prediction, and the prediction result for the next time step under the current application scenario is obtained.

2. The multi-task learning-based multi-modal travel flow collaborative prediction method according to claim 1, characterized in that, The process of dividing the area to be tested into a cell grid, performing spatiotemporal alignment processing on relevant data from multiple travel modes, and extracting the OD flow matrix includes the following steps: The area to be measured is represented as a rectangle and divided into H×W spatial units along the longitude and latitude. Each spatial unit has the same size and is sequentially coded up to N. If the origin and destination of each mode of transportation are located in N spatial units, then there are N spatial units. Seed OD flow; Selecting M time periods from the historical timeframe, we sequentially extract the flow rate of each OD flow within each time period, i.e., the number of OD pairs that fall into the first spatial unit and whose destination falls into the second spatial unit. Furthermore, we align various travel modes in time and space. The resulting data matrix dimension is then represented as follows: This is the OD flow matrix for M time periods.

3. The multi-task learning-based multi-modal travel flow collaborative prediction method according to claim 1, characterized in that, The construction of a spatial adjacency graph based on spatial proximity and a traffic feature graph based on traffic similarity features include the following steps: Treating OD flows as nodes and the adjacency relationships between any two OD flows as edges in the graph structure, we construct a spatial adjacency graph, represented as: ; The traffic characteristic map is represented as follows: , This means connecting each OD stream to the top few OD streams in the ranking of OD streams, in order to capture the flow characteristics of OD streams; Among them, according to the proximity relationship of OD flows, if two OD flows are adjacent, the weight is 1, otherwise the weight is 0. The proximity relationship of OD flows is determined according to the adjacency relationship between the start and end points. For a given OD flow, there are three types of spatial neighbors: OD flows that are adjacent to the start and end points of the current OD flow respectively, OD flows that are adjacent to the start point of the OD flow and have the same end point, and OD flows that have the same start point and are adjacent to the end point.

4. The multi-task learning-based multi-modal travel flow collaborative prediction method according to claim 1, characterized in that, The process of extracting high-dimensional features of the built environment and mobile flow based on built environment characteristics and temporal features, and constructing a built environment feature map, includes the following steps: By processing the point of interest data and road network data, and statistically analyzing the point of interest data and road network data of various travel modes in each spatial unit, the built environment characteristics of each spatial unit can be obtained. The built environment features related to the origin and destination of OD flows are extracted, and the historical time period of OD flows is divided into several intervals on average. The OD flows of each mode of travel in each time period are summarized to obtain the time series features. The graph convolutional network is used to process the built environment features and time series features respectively. The graph convolutional network is set with multiple convolutional layers and one output layer. The convolutional layers are set with a dimension of 64 or 128, and the output layer is set with a dimension of 1. The activation function used is ReLU, and the model is optimized using the MSE loss function and the Adam optimizer to obtain a high-dimensional feature matrix of the mobile flow in the built environment. And the dimension is represented as ; Based on the high-dimensional feature matrix, the inner product of the high-dimensional feature matrices is calculated using the relation matrix calculation formula. This inner product expresses the similarity of the high-dimensional features. The relation matrix calculation formula is as follows: , The inner product of the high-dimensional feature matrices has a dimension of 1. , Represents a high-dimensional feature matrix; Based on the high-dimensional feature matrix and similarity, a built environment feature map is constructed, represented as follows: ; in, express OD flow, The dimension is The characteristic matrix is ​​the inner product. The feature matrix representing the node.

5. The multi-task learning-based multi-modal travel flow collaborative prediction method according to claim 1, characterized in that, The views for each mode of transportation are represented as follows: in, This represents the view of the nth mode of transportation. These represent the spatial adjacency graph, the flow characteristic graph, and the built environment characteristic graph, respectively.

6. The multi-task learning-based multi-modal travel flow collaborative prediction method according to claim 1, characterized in that, The spatiotemporal dependency feature extraction module receives each travel mode view and extracts the spatiotemporal dependency features corresponding to each travel mode view through a time-graph convolutional network, including: The spatiotemporal dependency feature extraction module includes a multi-layer temporal graph convolutional network, which includes a temporal convolutional network and a graph convolutional network. The temporal convolutional network captures temporal dependency features, and the graph convolutional network captures spatial dependency features. Temporal convolutional networks include causal dilated convolutional structures and gated recursive units. The causal dilated convolutional structures learn the dynamic changes of OD flow in each mode of travel view to capture time-dependent features, and the gated recursive units capture time-dependent features again. Filters are constructed in the Fourier domain of the graph convolutional network to capture spatial dependency features between nodes; The causal dilated convolution structure is a one-dimensional convolution, represented as: ; The gated recursive unit is represented as: ; The graph convolutional network is represented as follows: ; in, This represents the features after dilated causal convolution. Indicates time-dependent features, Indicates size is The core, This represents the expansion factor that controls the jump distance. Indicates the step size. These represent convolution filters, This represents the sigmoid function. These represent the deviation coefficients, This indicates the time-dependent features that were captured again. Represents the convolution kernel. express The symmetric Laplace matrix, Represents the identity matrix. express The angle matrix, This indicates spatial dependency features.

7. The multi-task learning-based multi-modal travel flow collaborative prediction method according to claim 1, characterized in that, The interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each mode of travel and captures the interaction dependency features through a self-attention mechanism, including the following steps: Obtain the spatiotemporal dependency features of the same graph for each mode of travel, concatenate the spatiotemporal dependency features in their respective dimensions and perform dimensional transformation to form a merged tensor; By using an attention mechanism, the merged tensor is mapped to query, key, and value vectors through a convolutional layer, capturing the interactive dependencies between graphs of the same type for multiple travel modes, and obtaining interactive dependency features; The attention mechanism weights are represented as follows: in, Indicates interactive dependency features, Dimensions representing features These represent the query vector, key vector, and value vector, respectively.

8. The multi-task learning-based multi-modal travel flow collaborative prediction method according to claim 1, characterized in that, The fusion feature is represented as follows: in, This represents the learnable parameter matrix. Represents the Hadamard product. These represent interactive dependency features.

9. The multi-task learning-based multi-modal travel flow collaborative prediction method according to claim 1, characterized in that, The loss function is obtained in the following way: Construct a first loss function and a second loss function respectively, and obtain the total loss function based on the first loss function and the second loss function; The first loss function is expressed as follows: in, Indicates unmasked OD flow. Indicates the predicted value. The value represents the actual value, and the mask represents the matrix file. The value is 0 or 1, which indicates whether the corresponding OD stream is masked. The second loss function is expressed as follows: The loss function is expressed as follows: ; in, These represent the importance weights corresponding to the first loss function and the second loss function, respectively.

10. A multi-task learning-based multi-modal travel flow collaborative prediction system, characterized in that, It includes a data acquisition module, a processing and extraction module, a feature extraction module, a view construction module, a model training module, and a prediction and inference module; The data acquisition module is used to acquire relevant data on various travel modes in the area to be tested. The relevant data includes historical origin and destination data, points of interest data, and road network data. The historical origin and destination data includes various travel modes, movement occurrence time data, and movement origin and destination location data. The points of interest data includes urban related infrastructure data, service data, and geographic information data. The road network data is the road network density within each spatial unit. The processing and extraction module is used to divide the area to be tested into a cell grid, preprocess and align the relevant data of various travel modes in time and space, extract the OD flow matrix, and extract the flow similarity features, built environment features and time series features of the OD flow based on the OD flow matrix. The feature extraction module constructs a spatial adjacency graph based on the spatial proximity relationship of OD flow, constructs a flow feature graph based on flow similarity features, and extracts high-dimensional features of built environment and mobile flow based on built environment features and temporal features to construct a built environment feature graph. The view construction module constructs views for each mode of travel using spatial adjacency graphs, traffic flow feature graphs, and built environment feature graphs. The model training module is used to construct a traffic prediction pre-training model. The traffic prediction pre-training model includes a spatiotemporal dependency feature extraction module, an interaction dependency feature extraction module, and a feature fusion module. The spatiotemporal dependency feature extraction module receives views of each travel mode and extracts the spatiotemporal dependency features corresponding to each travel mode view through a temporal graph convolutional network. The interaction dependency feature extraction module fuses the spatiotemporal dependency features of the same graph in each travel mode and captures the interaction dependency features through a self-attention mechanism. The feature fusion module fuses the spatiotemporal dependency features and the interaction dependency features to obtain fused features. The traffic prediction pre-training model is trained based on traffic feature maps of historical time periods, and a loss function is used to enhance prediction to obtain the traffic prediction model. The prediction inference module is used to input the OD flow to be measured into the flow prediction model for prediction, and obtain the prediction result of the next time step under the current application scenario.

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

12. A multi-task learning-based multi-modal travel flow collaborative prediction device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Traffic flow short-term prediction optimization application method based on time convolution network

    CN113178073A

  • Subway passenger flow volume prediction method and system based on space-time diagram ordinary differential equation

    CN117592602A