A Short-Term Passenger Flow Prediction Method for Subways Based on Spatio-Temporal Graph Convolutional Networks

Through the space-time graph convolution network combined with the gated loop unit and the graph convolution neural network, the problem of spatial dependence changes between subway stations is solved, and more accurate prediction of short-term subway passenger flow is achieved.

CN115618934BActive Publication Date: 2025-07-29BEIJING SCI & TECH PATENT OFFICE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211246533.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2025-07-29
Estimated Expiration
2042-10-12

AI Technical Summary

Technical Problem

The existing short-term passenger flow prediction model of urban rail transit fails to effectively consider the dynamic changes in the spatial dependence relationship between subway stations, resulting in insufficient prediction accuracy.

Method used

The method based on the spatiotemporal graph convolution network is adopted, and the time dependence of subway historical data is learned by using the gated loop unit, and the dynamic spatial dependence of subway network is obtained through the graph convolution neural network, and the passenger flow prediction is combined with the first-order approximate Cheb graph convolution.

Benefits of technology

It improves the accuracy and real-timeness of urban subway passenger flow prediction, can better cope with the dynamic changes in the spatial dependence relationship between subway stations, and improves the accuracy of the prediction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115618934B_ABST
    Figure CN115618934B_ABST
Patent Text Reader

Abstract

The present invention discloses a short-term subway passenger flow prediction method based on a spatio-temporal graph convolutional network (GCN, Graph Convolutional Network). The method includes the following steps: collecting subway historical data; using a gated recurrent unit to learn the subway historical data to obtain the time-dependent relationship of the subway network, and obtaining a hidden state Ht that implies the change characteristics of the historical passenger flow; using a graph convolutional neural network to obtain the dynamic spatial dependence relationship of the subway network to predict the passenger flow at a future moment. When performing spatio-temporal prediction on the urban subway passenger flow, the present invention not only considers the time-dependent relationship of the subway network, but also takes into account the dynamic change characteristics of the spatial dependence relationship. Using the first-order approximation Cheb graph convolution, the passenger flow of all subway stations in the urban subway network at time t+1 can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a subway short-term passenger flow prediction method based on a spatio-temporal graph convolutional network Background Art

[0002] With the improvement of the urban rail transit network, the passenger flow intensity has gradually increased. It is particularly important to master the dynamic change trend of passenger flow in the short term in the future. On the one hand, it can provide real-time and effective information for travelers, which is conducive to the selection of transportation modes and routes and realizes passenger flow guidance; on the other hand, it helps to guide the operation unit to adjust the transportation plan in time, accurately match the transport capacity, do a good job in the early warning and emergency work of large passenger flows, and improve the travel experience and safety

[0003] The short-term passenger flow prediction of urban rail transit is the passenger flow prediction for the next 5 to 15 minutes, mostly based on historical AFC data and taking the subway as the research object. From the analysis of passenger flow attributes, the short-term passenger flow prediction of urban rail transit can be divided into four categories, including short-term inbound passenger flow prediction, short-term outbound passenger flow prediction, short-term OD passenger flow prediction, and short-term passenger flow distribution prediction. In addition, short-term transfer passenger flow, in-station passenger flow, cross-section passenger flow, etc. can all be classified into the category of short-term passenger flow distribution research

[0004] The models of short-term passenger flow prediction closely follow the research progress of machine learning, especially the attention mechanism that has received extensive attention and application in the past two years. Specific algorithms include deep residual shrinkage network, Transformer-based improved LSTM model based on the attention mechanism. However, the currently most commonly used traditional LSTM network model actually has certain defects or limitations

[0005] A large number of existing studies focus on extending the convolutional operator to graph-structured data and propose graph neural networks based on neighborhood feature aggregation. This method models the spatial dependence in the subway network by simulating the information transfer and aggregation process between subway networks. Currently, graph convolutional neural networks have been widely used in prediction and classification tasks of graph-structured data including urban rail transit. For example, STGCN proposed by Yu et al. consists of two temporal convolutional modules and one spatial convolutional module. In the temporal convolutional module, the GLU method is used to learn the spatial dependence relationship, and in the spatial convolutional module, the graph convolutional network is used to learn the spatial dependence relationship. Although the STGCN method has achieved good results in urban traffic prediction, it assumes that the spatial dependence relationship in the traffic network does not change with time. The DCRNN method proposed by Li et al. first uses the graph convolutional network to model the spatial dependence in the directed graph traffic network, and then inputs the graph data after feature aggregation into the gated recurrent unit (GRU) to learn the spatial dependence relationship. However, this method still assumes that the spatial dependence relationship in the traffic network is fixed

[0006] However, in the actual subway traffic network, the spatial dependence relationship between subway stations changes with the variation of the passenger flow in and out of adjacent subway stations. Therefore, when predicting the spatio-temporal passenger flow of urban subways, in addition to considering the time dependence relationship of the subway network, it is also necessary to take into account the dynamic change characteristics of the spatial dependence relationship. Based on this feature, the present invention proposes a subway passenger flow prediction method that takes into account time dependence and dynamic spatial dependence on the premise of maintaining the topological structure of the urban subway network. This method mainly uses the recurrent neural network and graph convolutional network in deep learning to model the time dependence and spatial dependence in the urban subway network respectively, and then predicts the passenger flow in the urban subway network. Summary of the Invention

[0007] To overcome the above defects, the present invention provides a subway short-term passenger flow prediction method based on a spatio-temporal graph convolutional network.

[0008] To achieve the above object, a subway short-term passenger flow prediction method based on a spatio-temporal graph convolutional network (GCN, Graph Convolutional Network) of the present invention includes the following steps:

[0009] Collect subway historical data;

[0010] Use a gated recurrent unit to learn the subway historical data to obtain the time dependence relationship of the subway network, and obtain a hidden state H that implies the change characteristics of the historical passenger flow t ;

[0011] Use a graph convolutional neural network to obtain the dynamic spatial dependence relationship of the subway network to predict the passenger flow at future moments.

[0012] Further, the input data of the gated recurrent unit network includes: 1) the passenger flow of all subway stations from t-N time to t as the adjacent time series feature; 2) the passenger flow of all subway stations at t+1 of the previous N days as the daily periodic feature; 3) the passenger flow of all subway stations at t+1 of the previous N day weeks as the weekly periodic feature. Further, the step of using a graph convolutional neural network to obtain the dynamic spatial dependence relationship of the subway network is specifically as follows: week Use the hidden layer state H as the weekly periodic feature.

[0013] Further, the step of using a graph convolutional neural network to obtain the dynamic spatial dependence relationship of the subway network is specifically as follows:

[0014] Use the hidden layer state H t to calculate the dynamic weight matrix of the subway network, and the calculation process is as follows:

[0015]

[0016] In the formula and are weight matrices to be trained, and b1 and b2 are bias coefficients;

[0017] Finally, there is Then the weight matrix of the subway network at time t is:

[0018]

[0019] In the formula

[0020] Using the first-order approximate Cheb graph convolution, the passenger flow of all subway stations in the urban subway network at time t+1 can be obtained is:

[0021]

[0022] In the formula are parameters to be trained and optimized; is the predicted value of the passenger flow of each subway station in the urban subway network at time t+1.

[0023] When the present invention performs spatio-temporal prediction on the urban subway passenger flow, in addition to considering the time-dependent relationship of the subway network, the dynamic change characteristics of the spatial dependence relationship are also considered. Using the first-order approximate Cheb graph convolution, the passenger flow of all subway stations in the urban subway network at time t+1 can be obtained BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a schematic structural diagram of an embodiment of the present invention.

[0025] Figure 2 The prediction results of the method of the present invention on the Beijing Subway AFC dataset, where

[0026] (a) Prediction results of the inbound passenger flow of Guomao Station on Line 1 for the next 10 minutes;

[0027] (b) Prediction results of the outbound passenger flow of Guomao Station on Line 1 for the next 10 minutes;

[0028] (c) Prediction results of the inbound passenger flow of Xizhimen Station on Line 2 for the next 10 minutes;

[0029] (d) Prediction results of the outbound passenger flow of Xizhimen Station on Line 2 for the next 10 minutes;

[0030] (e) Prediction results of the inbound passenger flow of Ciqikou Station on Line 7 for the next 10 minutes;

[0031] (f) Prediction results of the outbound passenger flow at Ciqikou Station on Line 7 in the next 10 minutes;

[0032] (g) Prediction results of the inbound passenger flow at Tiantongyuan Station on Line 5 in the next 10 minutes;

[0033] (h) Prediction results of the outbound passenger flow at Tiantongyuan Station on Line 5 in the next 10 minutes;

[0034] (i) Prediction results of the inbound passenger flow at Xi'erqi Station on Line 13 in the next 10 minutes;

[0035] (j) Prediction results of the outbound passenger flow at Xi'erqi Station on Line 13 in the next 10 minutes.

[0036] Figure 3 is the basic structure of the gated recurrent unit network. Detailed implementation manners

[0037] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0038] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present invention.

[0039] The terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, the meaning of "plurality" is two or more.

[0040] In the description of the present invention, it should be noted that, unless otherwise clearly defined and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a direct connection, or an indirect connection through an intermediate medium, and may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0041] The present invention provides a short-term subway passenger flow prediction method based on a spatio-temporal graph convolutional network (Seq2GCN). First, a gated recurrent unit is used to learn the time-dependent relationship of the urban subway network, and a hidden state H that implies the historical passenger flow change characteristics is obtained.t , by combining with the Laplacian matrix of the subway network and using a graph convolutional neural network to obtain the dynamic spatial dependence relationship of the urban subway network, and then predicting the passenger flow at future moments.

[0042] 1. Temporal Dependence Modeling

[0043] Compared with traditional recurrent neural networks and long short-term memory networks, the gated recurrent unit network can not only overcome the problems of gradient vanishing and gradient explosion in the backpropagation process to a certain extent, but also use fewer parameters to learn the implicit relationship between time series data while ensuring the prediction accuracy, so as to reduce the computational complexity. Therefore, the gated recurrent unit network is adopted in the present invention to model the temporal dependence of the urban subway network.

[0044] There is a temporal dependence relationship in the passenger flow of subway stations in the urban subway network. The closer the time, the stronger the dependence relationship, and there are also daily and weekly periodic change characteristics. Therefore, the input data of the gated recurrent unit network in the Seq2GCN method proposed in the present invention includes three parts, namely adjacent temporal features, daily periodic features, and weekly periodic features, to model the temporal dependence relationship more comprehensively.

[0045] Assume that it is necessary to predict the passenger flow of all subway stations in the urban subway network at time t+1. The input data of the gated recurrent unit network in the Seq2GCN model includes three parts: 1) the passenger flow of all subway stations from time t-N time to time t as adjacent temporal features; 2) the passenger flow of all subway stations at time t+1 in the previous N day days as daily periodic features; 3) the passenger flow of all subway stations at time t+1 in the previous N week weeks as weekly periodic features. Wherein is the passenger flow of the i-th subway station at time t.

[0046] Then, the adjacent temporal feature data, daily periodic feature data, and weekly periodic feature data are combined together and input into the gated recurrent unit as sequence data, as Figure 3 shown. The input sequence data will pass through an update gate z t to merge the current input features with the hidden state H to learn and record the current features. Then it passes through a reset gate r t to discard unimportant historical features. Finally, the output of the update gate z t and the reset gate r t are merged to update the state of the hidden layer H. The update gate z t and the reset gate rt The update formulas for [object] and the hidden layer state H are shown in Formulas (1), (2), and (3), and the entire calculation process is as follows Figure 3 shown below.

[0047] z t = σ(W xz X t + W hz H t-1 + b z ) (1)

[0048] r t = σ(W xt X t + W ht H t-1 + b r (2)

[0049] H t = z t ⊙ H t-1 + (1 - z t ) ⊙ tanh(W xh X t + r t ⊙ W hh H t-1 + b h ) (3)

[0050] In the formulas, W xz , W hz , W xr , W hr , W xh , W hh are weight matrices to be trained, σ is the activation function, b z , b r , b h are bias coefficients, and tanh(·) is the hyperbolic tangent function.

[0051] After the training and learning of the gated recurrent unit network, an H t that implicitly contains time-dependent features can be obtained. The gated recurrent unit network in the Seq2GCN model proposed by the present invention is a single-layer network. Therefore, where N h is the dimension size of the hidden layer in the gated recurrent unit network.

[0052] 2. Modeling of dynamic spatial dependence

[0053] The input data in the gated recurrent unit network is the one-dimensional feature data after the unfolding of the urban subway network, and this data loses the spatial topological structure features in the urban subway network. Therefore, after the gated recurrent unit network models the time dependence, the Seq2GCN model uses the GCN based on the spectral method to model the spatial dependence in the urban subway network.

[0054] The graph neural network based on the spectral method is also called GCN. This method uses the way of signal processing to complete the information aggregation of neighboring subway stations by performing the Laplace transform on the urban subway network. For the defined urban subway network Its Laplacian matrix L can be defined as:

[0055] L = D - A (4)

[0056] In the formula, A is the adjacency matrix and D is the degree matrix. Its symmetrically normalized Laplacian matrix L sym is:

[0057]

[0058] Then the feature aggregation function of the graph neural network based on the spectral method can be defined as:

[0059] aggregate(X) = L sym X (6)

[0060] The Laplacian matrix of the urban subway network has the following properties:

[0061] 1) The Laplacian matrix L is a real symmetric matrix, that is, there is L T = L;;

[0062] 2) The Laplacian matrix L is a positive semi-definite matrix, so it can be decomposed into the following form:

[0063]

[0064] In the formula is the matrix with the J eigenvectors of the Laplacian matrix as column vectors, and λ i is the non-negative eigenvalue of the eigenvector i.e.: 0 = λ0 ≤ λ1 ≤ … ≤ λ J-1 ; Λ = diag([λ0, λ1, … λ J-1 ).

[0065] Based on the above characteristics, Bruna et al. first proposed a graph convolutional neural network based on the spectral method, which uses the Fourier transform to perform convolution operations on the eigenvalues in formula (7). However, the computational complexity of this method increases with the growth of the network. Subsequently, Defferrard et al. optimized the convolution kernel to reduce the time complexity and space complexity of the convolution operation. The optimized convolution operation is as follows:

[0066]

[0067] where g θ (·) represents the convolution operation, and θ is the parameter to be trained through the feedback function. Since the value of J is much smaller than the number of subway stations in the network, the computational complexity of the convolution operation is significantly reduced.

[0068] In addition, Defferrard et al. also used the Chebyshev polynomial to replace the convolution kernel to further simplify the convolution operation. Based on the Chebyshev polynomial, we have:

[0069]

[0070] where T j (·) is the j-th order Chebyshev polynomial. Substituting formula (9) into formula (8), we get:

[0071]

[0072] where and:

[0073]

[0074] Subsequently, Kipf et al. further optimized the graph convolution operation using the first-order approximation method. They set the value of J to 1 and made the largest eigenvalue of the Laplacian matrix approximately equal to 2, i.e., λ J-1 equals 2. Substituting it into formula (10), we get:

[0075]

[0076] To reduce the computational complexity and prevent overfitting, let θ0 = -θ1 = θ, then we have:

[0077]

[0078] where and Θ is the parameter to be trained and optimized.

[0079] Suppose it is necessary to predict the passenger flow of all subway stations in the urban subway network at time t+1. When constructing the features of subway stations at time t, the present invention first selects the passenger flow of all subway stations from t-N time to time t as the adjacent time series features, where is the passenger flow of the i-th subway station at time t. Then, the passenger flow of all subway stations at time t+1 on the previous N day days is selected as the daily periodic features, where T day represents the time period difference in a day. Next, the passenger flow of all subway stations at time t+1 on the previous N week weeks is selected as the weekly periodic features, where T week represents the time period difference in a week. Finally, the passenger flow feature of the subway network at time t is:

[0080]

[0081] Existing research results show that the spatial dependence relationship in the urban subway network changes over time. Therefore, this project uses the hidden layer state H t learned by the gated recurrent unit network, which contains historical change law features, to calculate the dynamic weight matrix of the subway network. The specific calculation process is as follows:

[0082]

[0083] In the formula and are the weight matrices to be trained, b1 and b2 are the bias coefficients, and finally there is Then the weight matrix of the subway network at time t is:

[0084]

[0085] In the formula Since the method of Hadamard product is used in formula (16) to calculate the dynamic spatial weight, the original topological structure of the subway network is completely maintained. Finally, using the first-order approximate Cheb graph convolution proposed by Kipf et al., the passenger flow of all subway stations in the urban subway network at time t+1 is [7] :

[0086]

[0087] In the formula are the parameters to be trained and optimized. is the predicted passenger flow of each subway station in the urban subway network at the (t + 1)-th moment.

[0088] Implementation Case

[0089] The present invention uses the Seq2GCN method to predict the passenger flow of a large-scale urban subway network based on the Beijing Subway AFC data. First, the Beijing Subway AFC data for 30 days in June 2016 is divided into a training set, a validation set, and a test set. The training set contains 15 days of subway AFC data, and the validation set and the test set each contain 7 days and 8 days of subway AFC data. Other parameter settings are the same as those in Section 2.2.3. Then, the Seq2GCN method of the present invention is used to predict the subway passenger flow in the next 10 minutes. The predicted results of the inbound and outbound passenger flows of Guomao Station on Line 1, Xizhimen Station on Line 2, Ciqikou Station on Line 7, Tiantongyuan Station on Line 5, and Xi'erqi Station on Line 13 are as Figure 2 shown. The abscissa is time, and the ordinate is the passenger flow.

[0090] It can be seen from the figure that the change patterns of the inbound and outbound passenger flows at different stations are different. For example, the peak of the inbound passenger flow at Guomao Station is during the evening rush hour from 5 pm to 7 pm, and the peak of the outbound passenger flow is during the morning rush hour from 7 am to 9 am. The patterns of Tiantongyuan and Xi'erqi are exactly opposite to those of Guomao Station. The peak of the inbound passenger flow at Tiantongyuan and Xi'erqi is during the morning rush hour from 7 am to 9 am, and the peak of the outbound passenger flow is during the evening rush hour from 5 pm to 7 pm. The inbound and outbound passenger flows at Xizhimen Station show a double-peak pattern, with the peak periods appearing during the morning rush hour from 7 am to 9 am and the evening rush hour from 5 pm to 7 pm. However, the outbound passenger flow during the peak period is greater than the inbound passenger flow during the peak period. There are obvious differences in the change patterns of the inbound and outbound passenger flows at the five stations on weekdays and on weekends: the inbound and outbound passenger flows on weekends are significantly less than those on weekdays.

[0091] In addition, it can be seen from the figure that the outbound passenger flow at Xi'erqi Station on Line 13 will suddenly drop from a relatively large value to a relatively small value, or even drop to 0 at some moments. This is because no subway arrives at the station within the statistical interval (10 minutes), so there are few passengers getting off the subway during this period, or even no passengers getting off the subway. This is also the reason for the poor prediction accuracy of some lines, such as Line 4 and Line 13 in the following table.

[0092] Table 1 Predicted Results of Inbound Passenger Flows of Each Line of the Beijing Subway

[0093]

[0094]

[0095] Table 2 Prediction Results of the Outbound Passenger Flow of Each Line of the Beijing Subway

[0096] Line Number of stations MAE RMSE MAPE Line 1 23 18.85 29.45 22.80 Line 2 18 19.36 22.92 22.38 Line 4 24 18.08 21.37 21.62 Line 5 23 17.33 26.16 19.31 Line 6 26 16.33 26.78 28.54 Line 7 19 11.17 17.27 28.54 Line 8 18 12.40 18.63 26.56 Line 9 13 16.15 22.02 22.44 Line 10 22 19.70 23.57 22.85 Line 13 16 20.56 21.44 24.99 Line 14 26 11.22 18.82 24.78 Line 15 19 10.83 17.29 25.86

[0097] In the description of this specification, specific features, structures, materials, or characteristics may be combined in a suitable manner in any one or more embodiments or examples.

[0098] As mentioned above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claimed rights.

Claims

1. A short-term passenger flow prediction method for subways based on spatio-temporal graph convolutional networks, characterized in that, The method described above includes the following steps: (1) Collect subway historical data; (2) Use a gated recurrent unit to learn the subway historical data to obtain the time-dependent relationship of the subway network, and obtain a hidden state H that implies the changing characteristics of the historical passenger flow t ; (3) Use a graph convolutional neural network to obtain the dynamic spatial dependence relationship of the subway network for predicting the passenger flow at future moments; The step of using a graph convolutional neural network to obtain the dynamic spatial dependence relationship of the subway network is specifically as follows: Using the hidden layer state H t to calculate the dynamic weight matrix of the subway network, the calculation process is as follows: where and are weight matrices to be trained, and b1 and b2 are bias coefficients; Finally, there is the weight matrix of the subway network at time t as follows: where ⊙ represents the Hadamard product; The passenger flow of all subway stations in the urban subway network at time t + 1 can be obtained by using the first-order approximate Cheb graph convolution as follows: where are the parameters to be trained and optimized; is the predicted passenger flow of each subway station in the urban subway network at the (t + 1)-th moment.

2. The subway short-term passenger flow prediction method based on the spatio-temporal graph convolutional network according to claim 1, characterized in that, The input data of the gated recurrent unit network includes: 1) all subway stations in tN time Passenger flow at time t As a proximity time series feature; 2) All subway stations are in the first N day Passenger flow at time t+1 on the day As a daily periodic feature, T day Indicates the time period of a day; 3) All subway stations are in the first N week Passenger flow at time t+1 of the week As a periodic characteristic, T week Indicates the time period included in a week.

Citation Information

Patent Citations

  • Urban rail transit short-time passenger flow prediction method based on generative adversarial network

    CN114626585A

  • Short-term subway passenger flow prediction method, system and electronic device

    WO2021098619A1