Urban rail transit road network short-time OD passenger flow prediction method based on space-time multi-graph neural network
By adopting the spatiotemporal multi-graph neural network method in the urban rail transit road network, multiple spatial relationship networks are built and multiple feature extraction modules are combined, the problem of low prediction accuracy in the existing technology is solved, and higher prediction accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202510043659.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-06-10
AI Technical Summary
In the short-term OD passenger flow prediction of urban rail transit networks, the prediction accuracy is limited and the time dependence of the sequence cannot be fully captured, resulting in the prediction effect need to be improved.
Using a method based on space-time multi-graph neural network, a station functional correlation network, an OD travel time network, a dynamic passenger flow connectivity network and a dynamic passenger flow similarity network are used to extract spatial and temporal features and perform short-term OD passenger flow prediction using multi-graph convolution, Transformer module, BiLSTM-GRU module and multi-head time convolution module.
It significantly improves the accuracy and adaptability of short-term OD passenger flow forecasts, can better match capacity and passenger flow, alleviate peak congestion, and improve passenger experience.
Smart Images

Figure CN120123963A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rail transit passenger flow prediction, and particularly to a short-term OD passenger flow prediction method for urban rail transit road networks based on a spatio-temporal multi-graph neural network. Background Art
[0002] With the expansion of the urban rail transit operation network and service scope, the number of passengers choosing urban rail transit as a travel mode shows a gradually increasing trend. However, the sharp growth of passenger flow may lead to a mismatch between transport supply and demand, thus causing problems in station operation organization and passenger travel. For example, during the morning and evening rush hours, large passenger flows may occur at some stations, resulting in congestion, increasing the risk of passenger detention and emergencies, and bringing potential hazards to passenger safety and station management. Real-time passenger flow prediction can provide relatively accurate and timely passenger flow volume, enabling staff to reasonably arrange train schedules, dispatching, and departure intervals, achieving the optimal allocation of resources, and realizing the precise matching of transport capacity and passenger flow. At the same time, it can also relieve congestion and improve service quality, which is conducive to the realization of the network operation of urban rail transit.
[0003] With the expansion of the scale of the urban rail transit system, the volume of traffic data is continuously increasing. Artificial intelligence technologies such as machine learning and deep learning can utilize these data to achieve precise prediction of passenger flow. Among them, spatio-temporal multi-graph neural networks, that is, combining graph neural networks with other structures capable of predicting time-series data, learn the potential spatio-temporal dependencies of data from various spatio-temporal graphs and are widely used in various prediction scenarios. For example, after dividing the area into grids, each grid is regarded as a node, and its traffic data (incoming vehicle flow, outgoing vehicle flow) is continuously monitored. Spatio-temporal multi-graph neural networks consider both the time and space dependencies of traffic data. Currently, most studies combine GCN with RNN or CNN, using GCN to obtain spatial dependencies and using RNN or CNN to obtain time dependencies. By training an effective spatio-temporal multi-graph neural network, the short-term OD passenger flow volume of the entire urban rail transit road network can be accurately predicted.
[0004] In the mode of subway network operation, short-term OD passenger flow prediction for urban rail transit road networks can improve the efficiency of transport capacity allocation, relieve congestion during peak hours, and enhance the passenger experience. By accurately predicting OD passenger flow, not only can the pressure on congested stations be identified and relieved in advance, but also it can support the rapid response to emergency events and improve the overall resilience of the system. At the same time, the predicted passenger flow results provide data support for intelligent dispatching and cost control, promoting the development of rail transit towards intelligence and digitization.
[0005] The OD passenger flow data of urban rail transit network is a time series data with strong periodicity, many influencing factors and complex relative relationships. OD passenger flow prediction is a typical time series prediction problem. Machine learning prediction models are widely used in traffic flow prediction and can learn patterns from OD passenger flow data to achieve prediction. Based on machine learning theory, many scholars use methods such as Autoregressive Integrated Moving Average (ARIMA), Support Vector Machines (SVM), and K-nearest neighbor (K-NN) to model OD passenger flow data. Machine learning-related prediction models mainly construct relevant features based on the time dependence of data for prediction, and generally use a combination of multiple models to improve prediction accuracy. The following two types of features are mainly constructed: (1) Time series-related features: such as the passenger flow in the previous few moments of the moment to be predicted, the passenger flow at the same moment in the previous few days, and the passenger flow at the same moment in the previous few weeks. By constructing time series-related features, the model can discover potential time dependence and fit the OD passenger flow at the moment to be predicted more accurately. (2) External features: such as the features constructed from POI data around the station; in addition, weather features can also be considered, such as rainfall / snow conditions, temperature, wind force level, visibility index, etc. Using this machine learning prediction model to predict OD passenger flow data can construct time series-related features and external features, and use passenger flow data to train the model to obtain OD passenger flow data at future moments, thus providing data support for the operation and management of the station. When constructing an OD prediction model based on machine learning theory, although relevant features of passenger flow data are constructed and the influence of external factors on passenger flow is considered, the prediction accuracy is not high. Because these shallow machine learning methods require the special design of relevant features in the traffic field, and these features may not be sufficient to capture the complex time patterns in the original data sequence. Moreover, if a machine learning model considers too many features, it will not only cause difficulties in modeling, but also prolong the training time of the model and increase the computational cost. Therefore, the prediction accuracy of machine learning models is limited and cannot fully capture the time dependence relationship of the sequence, resulting in a large deviation between the OD passenger flow prediction results and the actual on-site situation, and the prediction effect needs to be improved. At the same time, from the perspective of the prediction object, machine learning models are still limited to predicting single or multiple OD pairs, rather than predicting the OD passenger flow matrix of the road network. For the prediction of the entire road network OD, separate modeling and training are required. This not only increases the training time, but also increases the workload of modeling.
[0006] For the prediction of time series, it is necessary to fully capture the time dependence in the data. In addition to constructing corresponding features, more advanced technologies are also required. Therefore, neural networks with strong feature learning ability, high model scalability, and the ability to effectively process high-dimensional data are used to predict traffic flow data. As a neural network algorithm for time series prediction problems, the Recurrent Neural Network (RNN) can effectively capture the time dependence in sequence data by gradually accumulating and updating historical information in the sequence through its recursive structure. Among them, the models based on RNN mainly include the Long Short-Term Memory (LSTM) and the Gate Recurrent Unit (GRU). In recent years, many researchers have successfully applied the LSTM network to the OD passenger flow prediction in traffic networks. LSTM is improved on the basis of the RNN model. Compared with the RNN model, the LSTM model contains three gating structures: the input gate, the output gate, and the forget gate, which can solve the problem that the update of the network weights slows down as the historical time becomes longer during the training of the RNN model and can achieve long-term memory. BiLSTM is an extended form of the LSTM network, which contains two independent LSTM layers. One processes data forward from the beginning of the sequence, and the other processes data backward from the end of the sequence. The final output combines the information from these two directions. Among them, the input time series is affected by the forget gate, the input gate, the output gate, and the state update function respectively to obtain the prediction result. Analyze the three gating structures and one state update function respectively: (1) The three gating structures: The forget gate, the input gate, and the output gate all use the sigmoid function, and their output values are between 0 and 1, indicating the proportion of information retention. They operate independently. Although the calculation methods are the same, the parameters are different, and together they determine which information is more important in the prediction. (2) The state update function: In LSTM, the value of the previous state function is combined with the result of the forget gate, and the input value is recalculated. Then it is combined with the result of the output gate to calculate the value of the current state function. The calculation part of the forget gate and the state function value is responsible for judging how much of the output of the previous moment can be retained in the prediction of the current moment. If it is unimportant information, it will be discarded, so that past information can be continuously transmitted between different moments and feature information from a long time ago can be obtained. The calculation of the input gate and the input value controls the amount of input value flowing in. (3) The final output: The output gate controls the relationship between the current state and the output value and determines the final prediction result. It determines how much information is extracted from the state for generating the final output. The GRU has a more concise structure than the LSTM, with only two gating structures: the update gate and the reset gate.The update gate determines the proportion of the previous state retained at the current moment, helping the model remember important historical information, while the reset gate controls the degree of combination of the current input and past states, enabling the model to selectively forget irrelevant information. Deep learning models based on neural networks have better performance. For example, prediction models of the RNN type mainly consider time-related features in history and can handle complex non-linear data well, improving prediction accuracy. The structure of the RNN has an additional loop pointing to itself compared to the fully connected neural network model, indicating that it can pass the information being processed at the current moment for use at the next moment. However, its drawback is that it cannot handle long-term dependence problems well and is prone to gradient explosion. The long-term dependence problem means that when the information required at the prediction point t is too far from t, the model cannot obtain the required information. Gradient explosion refers to the situation where during the neural network training process, the value of the gradient becomes extremely large during backpropagation, resulting in the model parameters being updated too quickly, thus presenting an unstable training phenomenon. The emergence of LSTM and GRU has solved problems such as long-term dependence and gradient explosion. However, passenger flow prediction has complex spatio-temporal dependencies, and neural network models such as LSTM cannot extract spatial dependencies well.
[0007] Convolutional Neural Network (CNN) is a deep neural network for supervised learning, aiming to gradually abstract the key information of data from low-level to high-level through multi-layer feature representations to enhance the robustness of the model. CNN mainly consists of three parts: the convolutional layer, the pooling layer, and the fully connected layer. The main role of the convolutional layer is to extract the core features in the input data, while the pooling layer is used to reduce the feature dimension while retaining important information. The fully connected layer further maps the features to the final output of the model. In the convolutional layer, a convolutional kernel filters a small area of the input feature matrix to extract local features, and by moving the convolutional kernel to cover the entire input, feature dimensionality reduction is achieved. The input to the pooling layer is the feature map output by the convolutional layer, and its role is to further reduce the amount of feature data. Common pooling methods include max pooling (taking the maximum value within the stride area) and average pooling (taking the average value within the stride area). The result after pooling is passed to the fully connected layer, where it is multiplied by the weight matrix and added with a bias, and the ReLU activation function is used to complete the non-linear transformation. The parameters in the fully connected layer are optimized by the gradient descent method to gradually improve the prediction accuracy of the model. The limitation of CNN is that it performs poorly on data in non-Euclidean spaces. Data in Euclidean spaces has a regular spatial structure. For example, images and audio can be represented by two-dimensional or one-dimensional matrices, which are suitable for standard convolutional operations of CNN. However, in non-Euclidean spaces such as rail transit networks, the spatial structure is irregular, and the number of neighbors and connection patterns of each node in the network are different, making it difficult to use a fixed convolutional kernel to perform convolution on graph data. Therefore, it is difficult for CNN to adapt to this irregular graph-structured data.
[0008] In summary, the short-term OD prediction of urban rail transit network is not only the key to improving service level and providing refined passenger transport services, but also a key factor in ensuring a high degree of matching between transport capacity resources and transport demand. Due to the inherent complex network structure and time-varying spatial relationships of the rail transit network system, coupled with the characteristics of historical OD time series, such as many influencing factors, complex relative relationships, and sparsity, it is very difficult to solve the OD passenger flow prediction task at the network level through traditional prediction models. Summary of the Invention
[0009] To solve the problems existing in the prior art, the object of the present invention is to provide a short-term OD passenger flow prediction method for urban rail transit network based on spatio-temporal multi-graph neural network, which has stronger accuracy and adaptability.
[0010] To achieve the above object, the technical solution adopted by the present invention is: a short-term OD passenger flow prediction method for urban rail transit network based on spatio-temporal multi-graph neural network, comprising the following steps:
[0011] Step 1, symbol definition and passenger flow data construction: Define symbols for urban rail transit stations and passenger flow data, and use data analysis methods to process the operation data of the stations to obtain passenger flow data;
[0012] Step 2, multi-relationship graph structure: Based on the potential inter-station associations of stations, construct four spatial relationships: station function correlation network, OD pair travel time network, dynamic passenger flow connectivity network, and dynamic passenger flow similarity network; among them, the dynamic passenger flow connectivity network and the dynamic passenger flow similarity network are dynamically constructed according to the passenger flow data and change with time;
[0013] Step 3, spatial feature extraction: Input the constructed passenger flow data, perform graph convolution operations with the constructed different networks, and at the same time use the Transformer module to capture global spatial features, and finally fuse the outputs to obtain a sequence of hidden values with spatial features and output;
[0014] Step 4, time feature extraction: Input the passenger flow data, use BiLSTM to extract long-distance time dependencies for the origin and destination of the OD passenger flow respectively, and fuse the results with the results of Step 3, and input GRU to further capture shorter time series dependencies; finally input the multi-head time convolution module, and use TCN to extract time dependence information in parallel through multiple convolutional kernels to obtain the prediction result.
[0015] As a further improvement of the present invention, the specific content of the said Step 1 is as follows:
[0016] Define G as the physical network of rail transit, G = (S, E); where S is the set of stations, |S| is the total number of stations, i and j are stations, and i, j ∈ S = {0, L, i, L, |S}. E is the set of intervals, e is an interval, and e = (i, j) ∈ E; for the spatial relationships in the constructed urban rail transit road network, the OD pair travel time network, the station function correlation network, the dynamic passenger flow connectivity network, and the dynamic passenger flow similarity network are respectively defined as: R T ,R S ,
[0017] For the operation data of the station, set the prediction time granularity. The OD matrix is extracted according to the entry time. All OD flows of the same OD matrix enter the station in the same time period, but due to different travel times, they can leave the station in different time periods; then for the given t-th time period, is the OD passenger flow volume from the origin station, i.e., station i, to the destination station, i.e., station j, within this time period, M t is the historical OD passenger flow matrix of the t-th time period input to the prediction model:
[0018]
[0019] Among them, the i-th row of the matrix represents the composition of the outgoing passenger flow from the i-th station to other stations within the t-th time period, and the j-th column of the matrix represents the composition of the incoming passenger flow with station j as the destination station within the t-th time period;
[0020] The OD passenger flow volume of the entire road network for all T time periods is defined as M = (M 1 ,M 2 ,L,M t ,L M T ); for the prediction target, Y = M T +1 ,M T+1 is the OD passenger flow volume of the entire road network at the next moment;
[0021] Define the short-term OD passenger flow prediction problem of the urban rail transit road network based on the spatio-temporal multi-graph neural network. The model is defined as: where f is the model to be trained.
[0022] As a further improvement of the present invention, in step 2, the construction method of the station function correlation network is specifically as follows:
[0023] Calculate the functional similarity between stations according to the POI data around the stations, and calculate the similarity between two POI data sequences using the Pearson coefficient; construct the station function correlation network matrix R S , and the similarity is obtained as follows:
[0024] e i,j = Pearson(E i , E j )
[0025] where: e is the similarity, and E i and E j are the POI data sequences of station i and station j respectively; According to the above formula, the corresponding matrix is:
[0026]
[0027] where n is the number of stations, and the normalized station function correlation network is R S (i, j):
[0028]
[0029] The construction method of the OD pair travel time network is specifically as follows:
[0030] Normalize the physical distance between the origin station and the destination station to obtain the OD pair travel time network matrix:
[0031]
[0032] where: a i,j is the travel time of the OD pair from station i to station j;
[0033] The construction method of the dynamic passenger flow connectivity network is specifically as follows:
[0034] Construct a dynamic passenger flow connectivity network matrix based on the OD passenger flow After normalization, we get:
[0035]
[0036] where: is the OD passenger flow between station i and station j at time t;
[0037] The construction method of the dynamic passenger flow similarity network is specifically as follows:
[0038] Use the DTW algorithm to calculate the similarity between station passenger flow sequences and construct the dynamic passenger flow similarity network matrix R t D , and the similarity is obtained by the following formula:
[0039]
[0040] where: is the DTW similarity between station i and station j at time t, and The passenger flow volumes of station i and station j at time t respectively; after normalization processing, the dynamic passenger flow similarity matrix is obtained as follows:
[0041]
[0042] As a further improvement of the present invention, step 3 specifically includes the following steps:
[0043] Step 3.1: Use the multi-graph convolution module to perform graph convolution on four types of network relationships, namely the station function correlation network, the OD pair travel time network, the dynamic passenger flow connectivity network, and the dynamic passenger flow similarity network, to grasp the spatial features;
[0044] Step 3.2: Use the Transformer module to obtain the global spatial dependence.
[0045] As a further improvement of the present invention, in step 3.1, when the historical data M=(M 1 ,M 2 ,L,M t ,L M T ) is input into the network; the OD passenger flow matrix M t at a certain moment is assigned to the corresponding |S| station nodes, and the graph convolution processes of the four network relationships are respectively carried out, and then the results are fused to obtain h t , specifically as follows:
[0046] During the graph convolution process, first perform a linear transformation on the features M t of the nodes on the road network to extract the important information of the initial features; then, perform weighted aggregation on the neighborhood information of the nodes through the adjacency matrix, integrate the features of the neighboring nodes into the current node, and obtain the new features of this node. This feature is the result obtained by performing graph convolution on the function similarity network; apply the same operation to the travel time network, the dynamic passenger flow connectivity network, and the dynamic passenger flow similarity network, and respectively obtain the corresponding features and Add the node features obtained by the four graph convolution operations to fuse and obtain the final feature of this node. Apply the same steps to all nodes, so as to obtain all node features h t , which is the result after multi-relationship graph convolution.
[0047] As a further improvement of the present invention, step 3.2 is specifically as follows:
[0048] The historical data M=(M 1 ,M 2 ,L,M t ,L M T) Input the Transformer module, and add the result obtained from the Transformer module to the multi-graph convolution result h t to obtain the result h after spatial feature extraction t '.
[0049] As a further improvement of the present invention, step 4 specifically includes the following steps:
[0050] Step 4.1: Use the BiLSTM-GRU module to extract temporal dependencies from the historical data M = (M 1 , M 2 , L, M t , L M T ); perform temporal feature extraction on the destinations and origins of the OD passenger flow matrix M t , that is:
[0051] h t ” ,1 = BiLSTM(M t )
[0052] h t ” ,2 = BiLSTM([M t ) T )
[0053] And fuse the results to obtain h t ”; fuse h t ” with h t ' and input the fused result into the GRU model to obtain the result h t ”':
[0054]
[0055] Step 4.2: Input the intermediate result h''' = (h 1 ”', h 2 ”', L, h t ”', L h T ”') into the multi-head temporal convolution module. The temporal convolutional network TCN uses one-dimensional convolution to process time series data.
[0056] As a further improvement of the present invention, the temporal convolutional network TCN includes: causal convolution, dilated convolution, and residual connection, where:
[0057] Causal convolution ensures that no information leaks from the future to the past, keeps the size of the convolutional kernel as k, and ensures that each time step only depends on the previous time steps and the current time step; for the input sequence x 1 , x 2 , L, x t , L xT , the convolution operation is as follows:
[0058]
[0059] Among them, w i is the weight of the convolution kernel, and x t-i is the input data at time step t - i, ensuring that the output of the current time step only depends on past inputs;
[0060] Dilated convolution is used to make the network increase the historical receptive field of the model, improve the prediction ability and reduce the computational amount; TCN increases the receptive field of the convolution kernel through dilated convolution to capture long-term dependencies; dilated convolution captures information from more distant time steps by introducing gaps in the convolution operation, causing the convolution kernel to jump between each time step; the formula for dilated convolution is:
[0061]
[0062] Among them, d is the dilation factor and k is the convolution kernel size;
[0063] Residual connections are introduced, that is, the output of each layer is added to the input to maintain the stability of the gradient; at the same time, layer normalization operations are added after each layer to reduce internal covariate shift and improve training efficiency;
[0064] In the multi-head mechanism, the input data is processed by multiple independent temporal convolution kernels, and each head focuses on different feature patterns or time windows; the outputs of all heads are concatenated to obtain the final result.
[0065] This invention takes rail transit passenger service as the starting point, captures the spatial correlation between nodes by introducing the Relational Graph Convolutional Network (R-GCN) and Transformer modules, combines with the BiLSTM-GRU module and multi-head temporal convolution to mine temporal dependencies, and proposes a spatio-temporal multi-graph neural network model to predict the short-term OD passenger flow of the rail transit network based on the above technologies. Among them:
[0066] 1. Multi-relational graph construction:
[0067] Respectively construct the station functional correlation network, OD pair travel time network, dynamic passenger flow connectivity network and dynamic passenger flow similarity network to capture deeper spatial relationships and successfully solve the problem of insufficient acquisition of spatial relationships.
[0068] 2. Spatial feature extraction part:
[0069] (1) Design a multi-graph convolution module. Using the R-GCN method, perform graph convolution operations on the four constructed networks respectively, and fuse the results to obtain the output, so as to more accurately capture the local spatial features of the data.
[0070] (2) Design a Transformer module to capture the global spatial features of the sequence data and better mine the spatial dependencies.
[0071] (3) Fuse the spatial feature extraction results obtained by the two modules.
[0072] 3. Temporal feature extraction part:
[0073] (1) Design a BiLSTM-GRU module. Use BiLSTM to extract the long-term temporal dependencies of OD passenger flow, fuse the results with the spatial feature extraction results, and input them into GRU to further capture the shorter temporal dependencies.
[0074] (2) Design a multi-head temporal convolution module. Use TCN to effectively capture the short-term and long-term temporal trends, and finally obtain the prediction results.
[0075] The beneficial effects of the present invention are as follows:
[0076] 1. The present invention constructs a spatial feature extraction part and a temporal feature extraction part, and establishes a spatio-temporal multi-graph neural network prediction model. In the spatial module, use relational graph convolution to extract spatial features such as station functional correlation, OD pair travel time, and dynamic passenger flow similarity, use the Transformer module to capture global spatial dependencies for supplementation, and then use the BiLSTM-GRU module and the multi-head temporal convolution module to obtain temporal dependencies. After predicting the OD passenger flow of the Chongqing Rail Transit network, compared with other models, the temporal feature extraction part of the model can greatly improve the prediction effect, and the addition of the spatial convolution module R-GCN and the Transformer module significantly improves the prediction accuracy, demonstrating the role of the multi-relational graph convolution and other modules of the present invention.
[0077] 2. Compared with machine learning methods and other deep learning methods, the present invention has stronger accuracy and adaptability in the application of short-term OD passenger flow prediction problems in urban rail transit networks. It can adapt to the short-term OD prediction needs under various networks, has more significant guiding significance for the actual station work, and is beneficial to improving the operation and management level of the station. Description of the Drawings
[0078] Figure 1 It is the overall technical framework diagram of the embodiment of the present invention;
[0079] Figure 2 It is the spatial convolution layer and its convolution calculation process diagram in the embodiment of the present invention;
[0080] Figure 3 This is the structural diagram of the Transformer module in the embodiments of the present invention. Specific embodiments
[0081] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0082] Embodiment
[0083] In order to achieve accurate short-term OD passenger flow prediction, this embodiment proposes a spatio-temporal multi-graph neural network model based on four modules: the Transformer module, the multi-graph convolutional network module, the BiLSTM-GRU module, and the multi-head temporal convolutional module from two dimensions of time and space. Combining the operation data of the stations, OD passenger flow data is constructed, and the spatial features between stations are deeply mined to construct a multi-relational graph network.
[0084] In order to realize the mining of spatial features between nodes, the multi-graph convolutional module is used to introduce R-GCN in the spatial convolutional layer to realize multi-graph fusion, and at the same time, the Transformer module is used to capture global spatial dependencies. In order to realize the mining of temporal features, the present invention uses the BiLSTM-GRU module to capture short-term and long-term temporal dependencies of the sequence, and at the same time, uses the multi-head temporal convolutional module, and uses the TCN network to perform temporal convolution through multiple convolutional kernels to perform short-term OD passenger flow prediction.
[0085] The technical solutions adopted by the spatio-temporal multi-graph neural network model constructed in this embodiment are as follows, mainly including four steps.
[0086] Step 1 (S1): Symbol definition and passenger flow data construction. Define symbols for urban rail transit stations and passenger flow data, and use data analysis methods to process the operation data of the stations (including card numbers, transaction dates, transaction times, transaction events, etc.) to obtain passenger flow data.
[0087] Step 2 (S2): Multi-relational graph structure. Based on the potential inter-station associations of the stations, four spatial relationships are constructed: the station function correlation network, the OD pair travel time network, the dynamic passenger flow connectivity network, and the dynamic passenger flow similarity network. Among them, the dynamic passenger flow connectivity network and the dynamic passenger flow similarity network are dynamically constructed according to the passenger flow data in Step 1 and change over time.
[0088] Step 3 (S3): Spatial feature extraction part. Input the constructed passenger flow data, perform graph convolution operations with the constructed different networks, and at the same time use the Transformer module to capture global spatial features, and finally fuse and output to obtain a sequence of hidden values with spatial features and output.
[0089] Step 4 (S4): Temporal feature extraction part. Input the passenger flow data, use BiLSTM to separately extract the long-distance temporal dependencies of the origin and destination of OD passenger flows, fuse the results with those of S3, and input them into GRU to further capture shorter temporal dependencies. Finally, input into the multi-head temporal convolution module, and use TCN to parallelly extract temporal dependency information through multiple convolutional kernels to obtain the prediction result.
[0090] The overall technical framework of this embodiment is shown in Figure 1 , and the historical time series M is transformed into the predicted time series Y through the structure in the figure, that is, the mapping relationship. The following will elaborate on the above four steps in detail.
[0091] Step 1 (S1): Symbol definition and passenger flow data construction:
[0092] Define G as the rail transit physical network, G = (S, E); where S is the set of stations, |S| is the total number of stations, i and j are stations, and i, j ∈ S = {0, L, i, L, |S}. E is the set of intervals, e is an interval, and e = (i, j) ∈ E. For the spatial relationships in the constructed urban rail transit road network, the OD pair travel time network, station function correlation network, dynamic passenger flow connectivity network, and dynamic passenger flow similarity network are respectively defined as: R T , R S , The construction process of the network is shown in Step 2.
[0093] For the operation data of stations, set the prediction time granularity to 30 minutes. The OD matrix is extracted according to the entry time. All OD flows in the same OD matrix enter the station in the same time period, but due to different travel times, they can leave the station in different time periods. Then for the given t-th time period, is the OD passenger flow volume from the origin station (station i) to the destination station (station j) within this time period, and M t is the historical OD passenger flow matrix of the t-th time period input to the prediction model, as shown in Equation (1). The i-th row of this matrix represents the composition of the outgoing passenger flows from the i-th station to other stations within the t-th time period, and the j-th column of the matrix represents the composition of the incoming passenger flows with station j as the destination station within the t-th time period. Then further, the OD passenger flow volume of the entire road network for all T time periods is defined as M = (M 1 , M 2 , L, M t , L M T ). For the prediction target, Y = M T+1 , M T+1 is the OD passenger flow volume of the entire road network at the next moment.
[0094]
[0095] On this basis, the short-term OD passenger flow prediction problem of urban rail transit road network based on spatio-temporal multi-graph neural network is defined, and the model can be defined as: where f is the model to be trained.
[0096] Step 2 (S2): Multi-relationship graph structure:
[0097] There are differences in the transportation organization methods between urban rail transit and road traffic. Due to its fluid characteristics, road traffic can be regarded as a continuous network system, where the traffic flows of adjacent roads are highly correlated. Using the adjacency matrix of physical roads can clearly represent the correlation between roads. Similarly, urban rail transit can also use the actual network connected by physical tracks to represent the correlation between stations. Since it is difficult to obtain the actual OD pair distance network, an OD pair travel time network is proposed to represent the correlation between stations, that is, the average travel time matrix of all OD pairs. In addition to the actual rail transit network, urban rail transit also includes a virtual network formed based on transportation plans and passenger travel demands. Passenger travel demands may be related to the functional characteristics around stations, and a station functional correlation network is proposed, which is calculated using site POI (Point of Interest) data. In addition, the traffic flow of road traffic is dispersed along the road system, while the passenger flow of urban rail transit converges at stations. The passenger flow can reflect a certain traffic pattern of stations, and there is a correlation and similarity between the passenger flows of stations. A dynamic passenger flow connectivity network and a dynamic passenger flow similarity network are proposed to capture the traffic pattern relationship between stations. The present invention draws on the R-GCN method in graph neural networks to fully explore features such as the correlation network between stations and the similarity of station passenger flows, and analyzes four relationships between stations in the urban rail transit road network: OD pair travel time network, station functional correlation network, dynamic passenger flow connectivity network, and dynamic passenger flow similarity network.
[0098] (1) Station functional correlation network:
[0099] The POI data around the station can reveal the functions and attractions of the area around the station, and can reflect the traffic pattern of the station to a certain extent. Therefore, the functional similarity between stations can be calculated using POI data. In this patent, the Pearson coefficient is used to calculate the similarity between two POI data sequences. Based on the similarity, a station functional correlation network matrix R S is constructed, and the similarity can be obtained as follows:
[0100] e i,j = Pearson(E i , E j )
[0101] In the formula: e is the similarity, E i and E jPOI data sequences for station i and station j respectively. The corresponding matrix is as follows:
[0102]
[0103] where n is the number of stations, and further normalization gives the station functional correlation network as R S (i, j).
[0104]
[0105] (2) OD pair travel time network:
[0106] In the entire urban rail transit network, the travel time of OD pairs indicates the length of the travel distance of OD pairs from another aspect, that is, the physical distance between the origin station and the destination station, reflecting the distance spatial relationship of the stations. After normalization, the OD pair travel time network matrix is obtained:
[0107]
[0108] In the formula: a i,j is the travel time of the OD pair from station i to station j.
[0109] (3) Dynamic passenger flow connectivity network:
[0110] In the entire urban rail transit network, some stations are not directly physically connected, but there is a correlation in passenger flow. That is, the correlation of passenger flow between stations does not entirely depend on the spatial distance, and there may still be a strong correlation between two stations with a relatively long physical distance. The passenger flow volume (OD volume) between stations can reflect the correlation between stations, and the closer the passenger flow between stations, the closer the connection. Based on the OD passenger flow volume, a dynamic passenger flow connectivity network matrix is constructed After normalization, we can get:
[0111]
[0112] In the formula: is the OD passenger flow volume between station i and station j at time t.
[0113] (4) Dynamic passenger flow similarity network:
[0114] Some stations are not directly physically connected, but there is a correlation in passenger flow. That is, the correlation of passenger flow between stations does not entirely depend on the spatial distance, and there may still be a strong correlation between two stations with a relatively long physical distance. Use the DTW algorithm to calculate the similarity between station passenger flow sequences and construct the dynamic passenger flow similarity network matrix R t D , and the similarity can be obtained as follows:
[0115]
[0116] Wherein: is the DTW similarity between station i and station j at time t, and are the passenger flow volumes of station i and station j at time t respectively. After further normalization processing, the dynamic passenger flow similarity matrix is obtained as follows:
[0117]
[0118] Step 3 (S3): Spatial feature extraction part:
[0119] (1) Multi-graph convolution module:
[0120] The spatial convolution operation proposed in this embodiment refers to R-GCN. Considering different types of connection relationships between stations comprehensively, through graph convolution on four types of network relationships, namely the station function correlation network, the OD pair travel time network, the dynamic passenger flow connectivity network, and the dynamic passenger flow similarity network, the spatial features are grasped. The structure of the spatial convolution layer is shown in Figure 2 . Figure 2 (a) in Figure 2 shows the fusion process of graph convolution,
[0121] When the historical data M = (M 1 , M 2 , L, M t , L M T ) is input into the network. The OD passenger flow matrix M t at a certain moment is allocated to the corresponding |S| station nodes, and the graph convolution processes of the four network relationships are carried out respectively, and then the results are fused to obtain h t .
[0122] The core idea of graph convolution is to use the graph structure information to update and aggregate the features of nodes through the adjacency relationship. Taking Figure 2 (a) in Figure 2 as an example of the function similarity network, its graph convolution process is as shown in t (b) in . In the graph convolution process, first, the features M t of the nodes on the road network are linearly transformed to extract the important information of the initial features. Then, the neighborhood information of the nodes is weighted and aggregated through the adjacency matrix, and the features of the neighboring nodes are integrated into the current node to obtain the new feature This feature is the result obtained by performing graph convolution on the function similarity network. The same operation is applied to the travel time network, the dynamic passenger flow connectivity network, and the dynamic passenger flow similarity network, and the corresponding features and are obtained respectively.Add the node features obtained from the four graph convolution operations and fuse them to obtain the final feature of the node As shown in Figure 2 (a) in. The same steps are applied to all nodes to obtain all node features h t , which is the result after multi-relational graph convolution.
[0123] (2) Transformer module:
[0124] Graph convolution aggregates node features with multiple relational graphs, considering local spatial features. At the same time, the Transformer module is used to obtain global spatial dependencies for supplementation. Input the historical data M = (M 1 , M 2 , L, M t , L M T ) into the Transformer module. The structure diagram is as shown in Figure 3 . The Transformer module mainly consists of three parts.
[0125] Add the result obtained after passing through the Transformer module to the multi-graph convolution result h t to obtain the result h t ' after spatial feature extraction.
[0126] Step 4 (S4): Temporal feature extraction part:
[0127] Only considering spatial convolution and ignoring the temporal characteristics of passenger flow will lead to an increase in prediction error. Therefore, when the input data passes through spatial feature extraction, temporal features need to be extracted.
[0128] (1) BiLSTM-GRU module:
[0129] There are periodic patterns in OD passenger flow. Use the BiLSTM model to extract temporal dependencies from the historical data M = (M 1 , M 2 , L, M t , L M T ). Extract temporal features for the destinations and origins of the OD passenger flow matrix M t respectively, that is
[0130] h t ” ,1 = BiLSTM(M t )
[0131] h t ” ,2 = BiLSTM([M t T )
[0132] And fuse the results to obtain h t ". Fuse h t " with h t ' and input the fused result into the GRU model to obtain the result h t "'.
[0133]
[0134] (2) Multi-Head Temporal Convolution Module:
[0135] Multi-Head Temporal Convolution is a model that combines the multi-head mechanism and temporal convolution. It can parallelly extract time-dependent information of different lengths through multiple convolutional kernels, effectively capture short-term and long-term trends, and improve the model's sensitivity to patterns at different time scales. Input the intermediate result h''' = (h 1 ''', h 2 ''', L, h t ''', L h T ''') into the multi-head temporal convolution module.
[0136] Temporal Convolution Network (TCN) uses one-dimensional convolution to process time series data. It consists of three parts: causal convolution, dilated convolution, and residual connection.
[0137] 1) Causal Convolution: Ensure that no information leaks from the future to the past.
[0138] This is achieved by keeping the size of the convolutional kernel as k in the convolution operation and ensuring that each time step only depends on the previous time step and the current time step. For the input sequence x 1 , x 2 , L, x t , L x T , the convolution operation is:[[]]
[0139]
[0140] where w i is the weight of the convolutional kernel, and x t-i is the input data at time step t - i, ensuring that the output of the current time step only depends on past inputs.
[0141] 2) Dilated Convolution: Use dilated convolution to enable the network to increase the model's historical receptive field, improve the prediction ability, and reduce the computational cost.
[0142] TCN increases the receptive field of the convolutional kernel through dilated convolution to capture long-term dependencies. Dilated convolution introduces gaps in the convolution operation, causing the convolutional kernel to "jump" between each time step, thereby capturing information from more distant time steps.
[0143] The formula for dilated convolution is:
[0144]
[0145] Among them, d is the dilation factor and k is the convolution kernel size.
[0146] 3) Residual connection and layer normalization:
[0147] In order to prevent the gradient from disappearing or exploding in deep networks, TCN introduces residual connections, which adds the output of each layer to the input, which helps to keep the gradient stable. At the same time, layer normalization operations are added after each layer to help reduce internal covariate shifts and improve training efficiency.
[0148] The multi-head mechanism is that the input data is processed by multiple independent time convolution kernels, each head focuses on different feature patterns or time windows. The outputs of all heads are spliced to get the final result.
[0149] This embodiment proposes a spatiotemporal multi-graph neural network prediction framework, which is divided into four steps to predict the OD passenger flow of the road network. Among them, the spatial characteristics are reflected in the Transformer module and the multi-relationships based on passenger flow related data mining, constructing the station function correlation network, OD travel time network, dynamic passenger flow connectivity network and dynamic passenger flow similarity network, and then using multi-relationship graph convolution to fuse the four network relationships. The temporal characteristics are reflected in the changes of spatial relationships over time and the temporal changes of passenger flow, which correspond to dynamic graph convolution and BiLSTM-GRU modules and multi-head time convolution models respectively. The innovation of the spatiotemporal network structure is to comprehensively consider the spatial and temporal characteristics of the model and conduct in-depth coupling.
[0150] Multi-relationship graph structure: In addition to the physical connection of tracks between stations, there are also potential spatial association mechanisms, and these relationships are of positive significance for realizing passenger flow prediction. According to the passenger flow data of the station and the POI data around the station, the station function correlation network, OD travel time network, dynamic passenger flow connectivity network and dynamic passenger flow similarity network are selected and constructed to mine potential spatial relationships. In order to ensure the accuracy of the station prediction model, the dynamic similarity network constructed using the historical data of the station changes continuously over time. The innovation of the present invention in the multi-relationship graph structure is to mine the POI data around the station and the passenger flow data of urban rail transit, and propose four different spatial relationships in a targeted manner.
[0151] Space-time multi-graph neural network technology framework: That is, the overall technical solution of this embodiment, which comprehensively describes the design concept of the station prediction model, including four steps: symbol definition and passenger flow data construction (S1), multi-relationship graph structure (S2), spatial feature extraction part (S3), and temporal feature extraction part (S4). (2) Multi-graph construction based on multiple station relationships: The station functional correlation network and the OD pair travel time network are proposed, and the dynamic changes of the passenger flow connectivity network and the passenger flow similarity network are considered, ultimately ensuring the in-depth mining of the station spatial relationship and the high accuracy of the prediction result. Spatial feature extraction part and temporal feature extraction part: In spatial feature extraction, graph convolution operations are performed on static and dynamic networks based on multi-relationship graph convolution, and at the same time, the Transformer module is used to grasp the global spatial dependence, which can well adapt to the temporal change characteristics of the spatial relationship. In temporal feature extraction, the BiLSTM-GRU module and the multi-head temporal convolution are used to realize the mining of temporal features, resulting in a large improvement in the prediction accuracy.
[0152] The above-described embodiments only represent the specific implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several variations and improvements can be made, and these all belong to the protection scope of the present invention.
Claims
1. A method for predicting short-term OD passenger flow in urban rail transit network based on spatiotemporal multi-graph neural network, characterized in that: The following steps are involved: Step 1: Symbol definition and passenger flow data construction: symbol definition of urban rail transit stations and passenger flow data, and use data analysis methods to process the station operation data to obtain passenger flow data; Step 2, multi-relationship graph structure: Based on the potential inter-station associations of stations, four spatial relationships are constructed: station function correlation network, OD pair travel time network, dynamic passenger flow connectivity network and dynamic passenger flow similarity network; among them, the dynamic passenger flow connectivity network and dynamic passenger flow similarity network are dynamically constructed according to passenger flow data and change over time; Step 3: Spatial feature extraction: Input the constructed passenger flow data, perform graph convolution operations with the constructed different networks, and use the Transformer module to capture the global spatial features. Finally, fuse the outputs to obtain the hidden value sequence with spatial features and output it; Step 4, time feature extraction: input passenger flow data, use BiLSTM to extract the long-distance time dependency of the starting point and destination of OD passenger flow respectively, fuse the results with the results of step 3, and input GRU to further capture the shorter time dependency; finally, input the multi-head time convolution module, use TCN to extract the time dependency information in parallel through multiple convolution kernels to obtain the prediction result.
2. The method for predicting short-term OD passenger flow of urban rail transit network based on spatiotemporal multi-graph neural network according to claim 1 is characterized in that: The step 1 is specifically as follows: Define G as the physical network of rail transit, G = (S, E); where S is the set of stations, |S| is the total number of stations, i, j are stations, i, j∈S = {0, L, i, L, |S|}. E is the set of intervals, e is the interval, e = (i, j)∈E; for the spatial relationship in the constructed urban rail transit network, OD defines the travel time network, station function correlation network, dynamic passenger flow connectivity network and dynamic passenger flow similarity network as: R T ,R S , For the station operation data, the prediction time granularity is set, and the OD matrix is extracted according to the entry time. All OD flows in the same OD matrix enter the station in the same time period, but can leave the station in different time periods due to different travel times; then for a given t-th time period, is the OD passenger flow from the starting station, i.e. station i, to the terminal station, i.e. station j, during this time period, M t The historical OD passenger flow matrix for the tth period input to the prediction model is: The i-th row of the matrix represents the composition of the destination passenger flow from the i-th station to other stations in the t-th time period, and the j-th column of the matrix represents the composition of the source passenger flow with station j as the destination station in the t-th time period; The OD passenger flow of the road network in all T time periods is defined as M = (M 1 ,M 2 ,L,M t ,LM T );For the prediction target, Y=M T+1 , M T+1 is the OD passenger flow of the entire road network at the next moment; The short-term OD passenger flow prediction problem of urban rail transit network based on spatiotemporal multi-graph neural network is defined. The model is defined as: Where f is the model to be trained.
3. The method for predicting short-term OD passenger flow of urban rail transit network based on spatiotemporal multi-graph neural network according to claim 2 is characterized in that: In step 2, the method for constructing the station function correlation network is as follows: The functional similarity between stations is calculated based on the POI data around the station, and the similarity between two POI data sequences is calculated using the Pearson coefficient; based on the similarity, the station functional correlation network matrix R is constructed S , the similarity is obtained as follows: And i,j =Pearson(E i ,AND j ) Where: e is the similarity, E i and E j are the POI data sequences of station i and station j respectively; according to the above formula, the corresponding matrix is: Among them, n is the number of stations, and the normalized station function correlation network is R S (i,j): The OD method for constructing the travel time network is as follows: The physical distance between the starting station and the terminal station is normalized to obtain the OD travel time network matrix: Where: a i,j is the travel time of the OD pair from station i to station j; The method for constructing the dynamic passenger flow connectivity network is specifically as follows: Constructing a dynamic passenger flow connectivity network matrix based on OD passenger flow After normalization, we get: Where: is the OD passenger flow of station i and station j at time t; The method for constructing the dynamic passenger flow similarity network is specifically as follows: The DTW algorithm is used to calculate the similarity between station passenger flow sequences and construct a dynamic passenger flow similarity network matrix R t D , the similarity is obtained by the following formula: Where: is the DTW similarity between station i and station j at time t, and are the passenger flows of station i and station j at time t respectively; the dynamic passenger flow similarity matrix obtained by normalization is:
4. The method for predicting short-term OD passenger flow of urban rail transit network based on spatiotemporal multi-graph neural network according to claim 3 is characterized in that: The step 3 specifically includes the following steps: Step 3.1, use the multi-graph convolution module to perform graph convolution on four types of network relationships: station function correlation network, OD pair travel time network, dynamic passenger flow connectivity network, and dynamic passenger flow similarity network to grasp the spatial characteristics; Step 3.2: Use the Transformer module to obtain global spatial dependencies.
5. The method for predicting short-term OD passenger flow of urban rail transit network based on spatiotemporal multi-graph neural network according to claim 4 is characterized in that: In step 3.1, when historical data M=(M 1 ,M 2 ,L,M t ,LM T ) is input into the network; the OD passenger flow matrix M at a certain moment t Assign them to the corresponding |S| station nodes, perform the graph convolution process of the four network relationships respectively, and then fuse the results to get h t , as follows: In the process of graph convolution, we firstly compute the features M of the nodes on the road network. t A linear transformation is performed to extract important information of the initial features; then, the neighborhood information of the node is weighted and aggregated through the adjacency matrix, and the features of the neighboring nodes are integrated into the current node to obtain the new features of the node. This feature is the result of graph convolution on the functional similarity network. The same operation is applied to the travel time network, dynamic passenger flow connectivity network, and dynamic passenger flow similarity network to obtain the corresponding features. and Add the node features obtained by the four graph convolution operations and fuse them to get the final feature of the node The same steps are applied to all nodes to obtain all node features h t , which is the result after multi-relation graph convolution.
6. The method for predicting short-term OD passenger flow of urban rail transit network based on spatiotemporal multi-graph neural network according to claim 5 is characterized in that: The step 3.2 is as follows: The historical data M=(M 1 ,M 2 ,L,M t ,LM T ) Input the Transformer module and combine the result obtained by the Transformer module with the multi-graph convolution result h t Add them together to get the result h after spatial feature extraction t '.
7. The method for predicting short-term OD passenger flow of urban rail transit network based on spatiotemporal multi-graph neural network according to claim 6 is characterized in that: The step 4 specifically comprises the following steps: Step 4.1: Use the BiLSTM-GRU module to process the historical data M = (M 1 ,M 2 ,L,M t ,LM T ) Extract time dependency; for OD passenger flow matrix M t The time features of the destination and the origin are extracted respectively, namely: h” t,1 =BiLSTM(M t ) h” t,2 =BiLSTM([M t ] T ) And merge the results to get h" t ; will h" t With h' t After fusion, input into the GRU model to get the result h"' t : Step 4.2: Set the intermediate result h''=(h1'',h2'',L,h t ”',L h T ”’) Input the multi-head temporal convolution module. The temporal convolution network (TCN) uses one-dimensional convolution to process time series data.
8. The method for predicting short-term OD passenger flow of urban rail transit network based on spatiotemporal multi-graph neural network according to claim 7 is characterized in that: The temporal convolutional network TCN includes: causal convolution, dilated convolution and residual connection, where: Causal convolution ensures that no information leaks from the future to the past, keeps the size of the convolution kernel at k, and ensures that each time step depends only on the previous time step and the current time step; for the input sequence x1,x2,L,x t ,L x T , the convolution operation is: Among them, w i is the weight of the convolution kernel, x t-i is the input data of time step ti, ensuring that the output of the current time step depends only on the past input; The network uses dilated convolution to increase the historical receptive field of the model, improve the prediction ability and reduce the amount of calculation; TCN increases the receptive field of the convolution kernel by dilated convolution, thereby capturing long-term dependencies; dilated convolution introduces intervals in the convolution operation, allowing the convolution kernel to jump between each time step, thereby capturing information from farther time steps; the formula for dilated convolution is: Among them, d is the dilation factor and k is the convolution kernel size; Introducing residual connections, that is, adding the output of each layer to the input to keep the gradient stable; at the same time, adding layer normalization operations after each layer to reduce internal covariate shift and improve training efficiency; The input data of the multi-head mechanism is processed by multiple independent time convolution kernels, each head focuses on different feature patterns or time windows; the outputs of all heads are spliced to obtain the final result.
Citation Information
Cited By
Shared bicycle multi-station demand intelligent prediction method based on graph convolution and sequential network cooperation
CN121525937A
Commercial district passenger flow volume prediction method based on graph neural network
CN121660739A
A business district passenger flow prediction method based on a graph neural network
CN121660739B
Rail transit short-term OD passenger flow prediction method based on node-edge space-time fusion
CN122242838A
Rail transit short-term OD passenger flow prediction method based on node-edge space-time fusion
CN122242838B
