A rail transit passenger flow prediction model and method of an adaptive graph convolution recurrent neural network combined with an attention mechanism
By combining an adaptive graph convolutional recurrent neural network with an attention mechanism, the problems of node specificity, spatial dynamic correlation, and time step difference in rail transit passenger flow prediction are solved, achieving higher accuracy in passenger flow prediction.
Patent Information
- Application Number
- CN202211069744.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-02
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-09-02
AI Technical Summary
Existing methods for predicting rail transit passenger flow cannot effectively consider node specificity, spatial dynamic correlation, and time step differences, resulting in insufficient prediction accuracy.
An adaptive graph convolutional recurrent neural network with attention mechanism is adopted to learn the long-term and short-term dynamic spatial correlations in rail transit passenger flow through adaptive graph convolutional network and attention mechanism. The overall model is built through encoder-decoder architecture, and attention-enhanced adaptive graph convolutional module is used to model node specificity and spatial dynamics.
It improves the accuracy of rail transit passenger flow forecasting, reduces the number of parameters and speeds up calculations, solves the problem of time step differences, and achieves effective modeling of spatial dynamics and node specificity.
Smart Images

Figure CN115423189B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of traffic flow prediction, and particularly relates to a rail transit passenger flow prediction method based on an adaptive graph convolution recurrent neural network combined with an attention mechanism. BACKGROUND
[0002] With the development and progress of economy, technology and society, the speed of urbanization is accelerating, and the urban transportation system is becoming more and more convenient, but it also brings great challenges, such as traffic congestion, energy consumption and environmental pollution. Traffic supervision based on intelligent transportation system can improve traffic efficiency and alleviate traffic congestion to a certain extent.
[0003] Accurate passenger flow prediction is one of the core research contents of intelligent transportation system. For urban rail transit, as the rail network is continuously developed, its operation and timetable planning become more and more complex, and accurate traffic flow prediction helps to optimize train scheduling, develop reasonable operation plan, provide reference for passenger travel planning, provide early warning for large-scale crowd gathering activities, and plan and layout future subway lines and stations, thereby reducing the transportation pressure of rail transit, increasing the convenience of passenger travel, and providing great help to the management of the overall subway network and even the city traffic.
[0004] Traditional methods regard traffic flow prediction as a multi-time series prediction task, so traditional time series modeling methods such as ARIMA are used, but such methods do not consider the spatial correlation between different time series, and most of such models cannot model nonlinear time series. Although some grid-based methods have achieved good results, the natural topological connection property of road network determines the non-Euclidean data characteristics of traffic flow data. This further hinders the effective application of traditional methods in traffic flow prediction tasks.
[0005] In recent spatio-temporal sequence prediction research, many researchers have begun to use graph neural networks to model non-Euclidean data, inspired by this, some traffic flow prediction research has also begun to use graph neural network-based methods to model complex spatial correlation. For example, diffusion graph convolution model, spatio-temporal graph convolution model, etc. In terms of modeling spatial correlation, existing graph neural network traffic flow prediction methods are mostly based on pre-defined static road networks, which cannot model the dynamics in space, and most methods treat all stations as the same, or only use artificial annotation of transfer stations and origin-destination stations. In summary, the existing rail prediction method has poor generalization ability and cannot achieve accurate rail passenger flow prediction, and there is still a lot of room for improvement. The existing rail prediction task faces three challenges:
[0006] (1) Node specificity
[0007] In a large number of existing methods, subway stations are regarded as the same node, and the specificity of different nodes is rarely considered. The specificity of the node is modeled by methods such as manually labeling attributes of starting and ending stations or transfer stations, embedding OD transfer matrix, embedding POI similarity and embedding time similarity (DWT) time graph. These methods belong to the traditional GCN method, which models the association between nodes rather than explicitly modeling the specificity of the node's attributes. Although this method (after neighborhood aggregation of all spatial nodes, the same transformation is performed on the channel dimension), can greatly reduce the parameter quantity and speed up the operation, but in the real scene, even if the stations are directly adjacent or have the same functional attributes, the traffic flow change mode is not necessarily the same. Therefore, the modeling method completely dependent on the structural or functional similarity assumption has a natural deficiency, lacking consideration of node specificity. In summary, it is necessary to explicitly model the specificity of different nodes, but how to explicitly model the node specificity while solving the problem of parameter explosion caused by modeling each node separately is a valuable challenge.
[0008] (2) Spatial dynamic correlation
[0009] In existing works, a large number of methods for modeling spatial correlation are based on a pre-defined static adjacency matrix. For example, a static graph based on topological connection: if node i is adjacent to node j, set the corresponding element Aij in the adjacency matrix A to 1, otherwise set it to 0. Then through Laplace transformation, finally aggregate the spatial neighborhood. This method is called a static spatial correlation modeling method, which ignores the fact that in real scenarios, different stations are not only affected by the passenger flow of adjacent upstream and downstream, but also related to time, weather, large-scale activities and other factors. Therefore, modeling spatial dynamic correlation is a challenging task.
[0010] (3) Time step difference.
[0011] It is well known that as the time step increases, the error accumulation phenomenon occurs in the time series prediction task, that is, as the prediction time step increases, the error will be larger. At the same time, all weight parameters based on RNN model are shared by all time steps, and the difference between different time steps is not considered as the prediction time step increases. SUMMARY
[0012] Therefore, one of the purposes of the present application is to provide a rail transit passenger flow prediction model based on an adaptive graph convolution recurrent neural network combined with an attention mechanism.
[0013] One of the purposes of the present application is achieved by the following technical solutions:
[0014] An adaptive graph convolutional recurrent neural network model for predicting rail transit passenger flow, incorporating an attention mechanism, is constructed using the following steps:
[0015] Step S1: Use an adaptive graph convolutional network and an attention mechanism to learn the long-term and short-term dynamic spatial correlations in rail transit passenger flow, respectively, and fuse the two to model the long-term and short-term spatial correlations through graph convolution operations. The overall AEAGCRN model is built through an encoder-decoder architecture.
[0016] Step S2: Use the AEAGRU module as the main network module of the encoder-decoder architecture, that is, use GRU as the main framework, and replace the MLP operation in GRU with attention-enhanced adaptive graph convolution module (AEAGCN) to jointly model the spatiotemporal correlation.
[0017] Step S3: Model spatial dynamics and node specificity using the Attention-Enhanced Adaptive Graph Convolutional Module (AEAGCN).
[0018] Furthermore, in step S1, during training, the encoder state h1 is initialized as an all-zero matrix by inputting the historical time series into the encoder, and the decoder state is initialized using the encoder's final state. The decoder's prediction layer is composed of a separation layer with time step specificity and a projection layer that shares parameters within the decoder's time step.
[0019] Furthermore, in step S2, the attention-enhanced graph convolution (AEAGCN) module obtained in step S1 is embedded into the GRU to replace the MLP operation, and finally an attention-enhanced adaptive graph convolution recurrent network is obtained.
[0020] z t =σ(AEAGCN([X :,t ,h t-1 ]))
[0021] r t =σ(AEAGCN([X :,t h t-1 ])).
[0022] Furthermore, the specific operation of step S2 is as follows:
[0023] First, the current time input and state are concatenated and then fed into the AEAGCN module. Next, a non-linear transformation is performed using the sigmoid activation function (σ refers to the sigmoid activation function), yielding the inputs to the update and reset gates. Finally, gating operations are applied to both to obtain the hidden state and the output of subsequent layers.
[0024]
[0025]
[0026] where tanh is a nonlinear activation function mapping to the interval (-1, 1); X :,t , h t are the input and output at the t-th time step, respectively; [·] denotes the matrix concatenation operation, * denotes the Hadamard product, z t , r t are the update gate and the reset gate, respectively, is the hidden state computed based on the reset gate.
[0027] Further, in the step S3, firstly, two adaptive globally shared node parameter matrices E1, E2 (E1∈R N×D ) are used to model the spatial correlation in the global time domain, D is the feature dimension of the parameter matrix; E1, E2 respectively represent the attributes of the inbound and outbound passenger flows of all stations, and the long-time-scale global adaptive spatial correlation matrix A static is constructed by the trainable parameter matrix E1, E2 to learn the hidden association relationship between nodes, and the specific formula is as follows:
[0028]
[0029] where softmax represents a nonlinear normalization method, and ReLU represents a nonlinear activation function; E1, E2 are two globally parameter-shared association matrices obtained after training the full set of training data, and the short-time-scale spatial correlation matrix A att is obtained through matrix operation and nonlinear conversion A att , that is, A att is adaptive.
[0030] Secondly, a dynamic graph structure based on an attention mechanism is used to capture the dynamic changes of the existing spatial correlation in the recent history data, and the specific formula is as follows:
[0031]
[0032] denotes the short-time-scale spatial correlation matrix; where l represents the parameter in the l-th layer graph convolution operation; is the linear transformation weight parameter matrix; the × operator represents matrix multiplication; by combining the two, the model can effectively capture the features of the dynamic spatial correlation at different time scales, and realize modeling of the long-term static and real-time dynamic spatial correlation at the same time; the formula is as follows:
[0033]
[0034] Wherein l represents the parameter of the lth layer graph convolution operation, distinguished from the global shared parameter, The spatial correlation adaptive matrix represents the combination of global parameter sharing and local spatial features.
[0035] Finally, with reference to the common graph convolution model, different node features are represented by introducing a node channel domain feature matrix E c c ∈R N×d , c represents the definition of the dynamic graph convolution model, and the specific formula is as follows:
[0036]
[0037] Wherein W c ∈R d×C_in×C_out , represents a trainable weight matrix, b c ∈R C_in×C_out , represents a bias term; H l represents the input of the lth layer of the graph convolution network AEAGCN, which is also the output of the graph convolution operation of the previous layer.
[0038] The second object of the application is to provide a rail transit passenger flow prediction method based on an adaptive graph convolution recurrent neural network combined with an attention mechanism, which uses the prediction model as described above, comprising the following steps:
[0039] First, define a rail transit network graph G=(V,E,A), wherein V represents a set of rail stations, V={v1,...,vn}, wherein |V|=N, N represents the number of rail stations, which is also the number of graph nodes, E represents the edge connecting two rail stations in the graph, and A represents the adjacency matrix of the time sequence traffic data node (measured by node distance or time sequence similarity); The rail time sequence passenger flow graph signal tensor can be represented as X={X :,1 , X :,2 ,..., X :,t}, X∈R N×T×C , wherein X :,t ={X 1,t ,..., X i,t ,..., X N,t}, X :,t ∈R N×C , X N,t ∈R 1×C , X i,t is used to represent the in-out passenger flow data of the ith node at time t, C represents the channel dimension C=2, which represents the in-out passenger flow, and under the condition that the passenger flow tensor data X on the given traffic network G is given, the multi-time step passenger flow prediction problem can be defined as solving a mapping function f θ ;f θ According to the past p time slice access passenger flow data, the access passenger flow data of future delta time slices are mapped, and the following formula is used to express:
[0040] (X :,t+1 , X :,t+2 ,..., X :,t+Δ ) = f θ (X :,t-p+1, , X :,t-p+2 ,..., X :,t ; G).
[0041] Then data preparation is carried out, first, the card swiping data is cleaned and repaired, then the time slice size is set to S minutes, and the access and exit passenger flow data in each S minute interval is counted as a group of data, to obtain the graph signal tensor X B×N×C ; wherein B is the sequence length sorted by time sequence, N is the number of track stations, and C is the attribute of the node; finally, according to the required sequence window size of input and output, the track passenger flow time sequence data is subjected to window sliding operation, to make training and test data sets X t N×T×C ;
[0042] The prediction model is completed, and simulation training is carried out, and the model is used for rail transit passenger flow prediction.
[0043] Further, the time slice size is set to 10 minutes, that is, S is equal to 10.
[0044] Further, the simulation training uses the teacher-forcing method to train the model, the Adam optimizer is used to optimize all the models on the training parameters, and the cosine annealing method is used to adjust the learning rate; the AEAGRU model with the same number of layers is stacked to be used as the main network of the encoder and the decoder.
[0045] The beneficial effects of the present application are:
[0046] (1) The present application builds an overall AEAGCRN model through an encoder-decoder architecture, and regards the whole problem as a sequence prediction problem, wherein a differentiation layer is added before the shared layer of the decoder to add a differentiated weight to different time steps, thereby solving the time step difference problem;
[0047] (2) By using the AEAGRU module as the main network module of the encoder-decoder architecture, i.e., using GRU as the main framework, the MLP operation in GRU is replaced by the attention-enhanced adaptive graph convolution module (AEAGCN) to jointly model the spatio-temporal correlation, and the attention-enhanced adaptive graph convolution module (AEAGCN) is proposed to model the spatial dynamics and the specificity of nodes, which uses multiple node adaptive parameters to explicitly model the attributes of different nodes, and uses a low-rank node adaptive matrix to perform tensor decomposition on the channel dimension transformation of the nodes, thereby alleviating the problem of explosive parameter quantity.
[0048] (3) By capturing the spatial dynamic correlation relationship through the adaptive parameter graph, the adaptive parameter graph is also decomposed into two low-rank node adaptive parameter matrices, which reduces the parameter quantity and facilitates model convergence, and all the node adaptive parameters above are globally shared, i.e., global sharing is realized in all network modules in the encoder and decoder, which is equivalent to adding a direct connection channel (i.e., the idea of Highway Network) to the network, and a new solution is proposed for the problem that graph convolution cannot be deep.
[0049] Other advantages, objects, and features of the present application will be in part apparent and in part pointed out hereinafter in the specification, and it is to be understood that both the foregoing description and the appended claims are exemplary and intended to be given the broadest possible interpretation within the scope of the prior art. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings, in which:
[0051] Figure 1 The overall model Seq2Seq framework of the present application is shown in the figure.
[0052] Figure 2 The attention-enhanced GRU module of the present application is shown in the figure.
[0053] Figure 3 The attention-enhanced adaptive graph convolutional neural network of the present application is shown in the figure. DETAILED DESCRIPTION
[0054] The preferred embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be understood that the preferred embodiments are only for illustrating the present application, and are not intended to limit the protection scope of the present application.
[0055] As shown in the figure, the application provides an attention-enhanced adaptive graph convolution recurrent neural network learning method, and the specific implementation steps include:
[0056] (I) First, define a rail transit network graph G=(V, E, A), wherein V represents a rail station set, V={v1,..., vn}, wherein |V|=N, N represents the number of rail stations, and is also the number of graph nodes. E represents an edge connecting two rail stations in the graph. A represents an adjacency matrix of the time-series traffic data node (measured by node distance or time-series similarity). The rail time-series passenger flow graph signal tensor can be represented as X={X :,1 , X :,2 ,..., X :,t}, X∈R N×T×C , wherein X :,t ={X 1,t ,..., X i,t ,..., X N,t}, X :,t ∈R N×C , X N,t ∈R 1×C , and X i,t is used to represent the in-out passenger flow data of the ith node at time t. C represents the channel dimension C=2, representing in-out passenger flow. Under the precondition of given passenger flow tensor data X on the traffic network G, the multi-time-step passenger flow prediction problem can be defined as solving a mapping function f θ . f θ According to the in-out passenger flow data of the past p time slices, the in-out passenger flow data of the future Δ time slices is mapped. It can be expressed by the following formula.
[0057] (X :,t+1 , X :,t+2 ,..., X :,t+Δ )=f θ (X :,t-p+1 , X :,t-p+2 ,..., X :,t ; G)。
[0058] (II) Data preparation. First, clean and repair the card swiping data. For example, define a person's in-out journey at a station as an invalid circular journey; define a person's in-out journey at a station as an abnormal data. For invalid circular journey and abnormal data, they should be deleted. Second, set the time slice size to S minutes, and count the in-out station passenger flow data in each S-minute interval as a group of data, and obtain the graph signal tensor X∈R B×N×Cwhere B is the sequence length ordered by time series, N is the number of track stations, and C is the attribute of the node. Finally, the track passenger flow time series data is windowed to make the training and test data sets X according to the required sequence window size of the input and output t ∈R N×T×C The size of the time slice can be selected according to actual needs, and in the embodiment, 10 minutes is used, that is, S = 10.
[0059] (Three) Model building. First, the adaptive graph convolutional network and the attention mechanism are used to learn the long-term and short-term dynamic spatial correlation in the rail transit passenger flow respectively, and the long-term and short-term spatial correlation is modeled through graph convolution operation by fusing the two; then, the graph convolution is embedded into the gated recurrent unit (GRU) to perform joint modeling of dynamic spatio-temporal correlation; finally, the overall model is built through the encoder-decoder architecture. Specifically, the building of the prediction model includes the following steps:
[0060] Step S1: the adaptive graph convolutional network and the attention mechanism are used to learn the long-term and short-term dynamic spatial correlation in the rail transit passenger flow respectively, and the long-term and short-term spatial correlation is modeled through graph convolution operation by fusing the two; the overall AEAGCRN model is built through the encoder-decoder architecture; in step S1, during training, the historical time series is input into the encoder, the encoder state h1 is initialized as a full 0 matrix, and the decoder state is initialized using the final state of the encoder; the prediction layer of the decoder is composed of a separation layer with time step specificity and a projection layer with parameter sharing within the decoder time step.
[0061] Step S2: the AEAGRU module is used as the main network module of the encoder-decoder architecture, that is, the GRU is used as the main framework, and the MLP operation in the GRU is replaced by the attention-enhanced adaptive graph convolution module (AEAGCN) to jointly model the spatio-temporal correlation; in step S2, the attention-enhanced graph convolution (AEAGCN) module obtained through step S1 is embedded into the GRU to replace the MLP operation, and finally the attention-enhanced adaptive graph convolutional recurrent network is obtained;
[0062] z t =σ(AEAGCN([X :,t ,h t-1 ]))
[0063] r t =σ(AEAGCN([X :,t ,h t-1 ]))。
[0064] The specific operation is as follows:
[0065] First, the current time input and state are spliced, and then put into the AEAGCN module as input; then, the sigmoid activation function is used for nonlinear transformation, where σ represents the sigmoid activation function, and the inputs of the update gate and the reset gate are obtained respectively; finally, the two are operated by the gate, and the hidden state and the subsequent layer output are obtained:
[0066]
[0067]
[0068] where tanh is a nonlinear activation function mapping to the interval (-1, 1); X :,t , h t are the input and output at the t-th time step respectively; [·] represents the matrix splicing operation, * represents the Hadamard product, z t , r t are the update gate and the reset gate respectively, is the hidden state calculated based on the reset gate.
[0069] Step S3: The spatial dynamics and node specificity are modeled by using the attention enhanced adaptive graph convolution module (AEAGCN). Specifically, it includes:
[0070] First, two adaptive globally shared node parameter matrices E1, E2 (E1∈R N×D ) are used to model the spatial correlation in the global time domain, and D is the feature dimension of the parameter matrix; E1, E2 represent the attributes of the inbound and outbound passenger flow of all stations respectively, and the long-time-scale global adaptive spatial correlation matrix A static is constructed by the trainable parameter matrix E1, E2 to learn the hidden association relationship between nodes, and the specific formula is as follows:
[0071]
[0072] where softmax represents a nonlinear normalization method, and ReLU represents a nonlinear activation function; E1, E2 are two globally shared association matrices obtained by training the full training set data, and A att is obtained by matrix operation and nonlinear transformation of E1, E2, that is, A att is adaptive.
[0073] Second, the dynamic graph structure based on the attention mechanism is used to capture the dynamic changes of the existing spatial correlation in the recent history data, and the specific formula is as follows:
[0074]
[0075] denotes the short-term spatial correlation matrix; wherein l denotes the parameter in the l-th layer graph convolution operation; is a linear transformation weight parameter matrix; the × operator denotes matrix multiplication; by combining the two, the model can effectively capture the characteristics of dynamic spatial correlation at different time scales, and realize modeling of long-term static and real-time dynamic spatial correlation at the same time; the formula is as follows:
[0076]
[0077] wherein l denotes the parameter of the l-th layer graph convolution operation, distinguished from the global shared parameter, denotes the spatial correlation adaptive matrix combining global parameter sharing and local spatial feature;
[0078] Finally, by introducing a node channel domain feature matrix E c to represent different node features (E c ∈R N×d ), c represents the definition of a dynamic graph convolution model, and the specific formula is as follows:
[0079]
[0080] wherein W c ∈R d×C_in×C_out is a trainable weight matrix, b c ∈R C_in×C_out is a bias term; H l denotes the input of the l-th layer of the graph convolution network layer AEAGCN, which is also the output of the last layer of graph convolution operation.
[0081] (Four) model training, in this embodiment, two real data sets are used for experiments, two data sets are Beijing Subway and Chongqing Subway. First, the model uses the architecture of Seq2Seq to build the model framework, and the input and output are regarded as a sequence, wherein the encoder is used to replace the MLP module in GRU with the aforementioned attention enhanced adaptive graph convolutional network module (AEAGCN), and the improved GRU is used as the AEAGRU as the skeleton network, in terms of training techniques, the model is trained using the teacher-forcing method. In the training process, the output of the previous state is not used as the input of the next state at the beginning of the first few epochs, but the corresponding previous item of the real target data (ground truth) of the training data is directly used as the input of the next state. That is, the encoder learns a standard by using the real target data as the input. As the training steps proceed, the probability of using real target data is reduced at an exponential rate, and more use of the output of the previous state as the input of the next state.
[0082] In terms of training parameters, all models are optimized by Adam optimizer in this embodiment, and the learning rate is adjusted using the cosine annealing method, and the period T=10. The maximum epoch number is set to 150, the initial learning rate lr is 0.005, the minimum learning rate is 1e-6, and the batch size is 32.
[0083] In terms of model parameters, first, the AEAGRU model with the same number of layers (layers=2) is used as the main network of the encoder and the decoder in this embodiment. Secondly, for the encoder, a tensor h1 of all 0 is used as the initial state tensor, wherein h1∈R B×C_in×C_out , B represents the size of batch_size, C_in and C_out represent the channel dimension of the input and output respectively, C_in=64, C_out=64. Finally, the dimension d of the different node adaptive parameter matrix E of AEAGCN is uniformly set to 32.
[0084] In order to illustrate the effectiveness of the present application, a series of experimental verification is carried out, and the baseline model and the most advanced model widely used in the field of traffic flow prediction at present are selected for comparison experiment. Including:
[0085] ARIMA: Kalman filter autoregressive integrated moving average model
[0086] FC-LSTM: Long Short-Term Memory Network. A recurrent neural network that uses fully connected computation of hidden units.
[0087] DCRNN: Diffused Graph Convolutional Recurrent Neural Network. It combines graph convolutional networks with recurrent neural networks using an encoder-decoder approach.
[0088] STGCN: Spatiotemporal Graph Convolutional Neural Network. It models spatiotemporal dependencies by combining graph convolution with one-dimensional convolutional neural networks.
[0089] AGCRN: Adaptive Graph Convolutional Recurrent Neural Network. It combines adaptive graph convolution with recurrent neural networks.
[0090] GWN: Graph Wavelet Neural Network. It uses only adaptive graph convolution for spatial modeling and a one-dimensional diffusing convolutional neural network with a gating mechanism for temporal correlation modeling.
[0091] The effectiveness of time series prediction algorithms depends on a good evaluation metric. This example selects common metrics such as MAE, RMSE, and MAPE for performance evaluation.
[0092]
[0093]
[0094]
[0095] Because of X in MAPE i Since the value cannot be 0, the portion of the station's inbound or outbound traffic that is less than or equal to δ (δ = 1 in this case) will be masked every 10 minutes. This also reduces the impact of low traffic data on the MAPE index.
[0096] Experiments were conducted on the BJ_Metro dataset of a certain city and the CQ_Metro dataset of a certain municipality, and the results are shown in Tables 1 and 2. By comparing the prediction step sizes of 1, 3, and 6, the experimental results of various models predicting station entry and exit populations in the next 10, 30, and 60 minutes were presented on the test set. AEAGCN-64 and AEAGCN-32 represent models with hidden unit dimensions set to 64 and 32, respectively. Bold text indicates the model achieving the best performance for that metric on that dataset, while underlined text indicates the second-best performance.
[0097] Table 1: Experimental results on the CQ_Metro dataset
[0098]
[0099] Table 2: Experimental results on the BJ_Metro dataset
[0100]
[0101] The final results show that the above indicators are better than the existing methods on the BJ_Metro dataset, and some indicators are better than the existing latest methods on the CQ_Metro dataset, and some indicators achieve approximately optimal results. Among them, AEAGCN-64 and AEAGCN-32 represent the model hidden unit dimension setting to 64 and 32, the results show that with the adjustment of the hidden dimension, the learning ability of the model is greatly improved, but subsequent experiments also found that the improvement benefit and space cost ratio of the hidden unit dimension will gradually decrease, 64 is a relatively appropriate parameter value. This experiment uses the hardware platform of Intel(R) Xeon(R) Silver4210R CPU@2.40GHz CPU and 2080Ti GPU, and uses the software platform of Pytorch training framework based on Windows10 system and Python language to build.
[0102] It should be appreciated that embodiments of the present application can be realized or implemented by computer hardware, a combination of hardware and software, or through computer instructions stored in a non-transitory computer readable memory. The method can be implemented in a computer program using standard programming techniques - including a non-transitory computer readable storage medium configured with a computer program, wherein the storage medium thus configured makes the computer operate in a specific and predefined manner according to the method described in the specific embodiments and the accompanying drawings. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if necessary, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. In addition, the program can be run on a programmed application-specific integrated circuit for this purpose.
[0103] In addition, the operations of the processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and / or combinations thereof) can be performed under the control of one or more computer systems configured with executable instructions (e.g., executable instructions, one or more computer programs or one or more applications), by hardware or a combination thereof. The computer programs include a plurality of instructions executable by one or more processors.
[0104] Further, the methods can be implemented in any type of computing platform operatively coupled to a suitable computing platform, including but not limited to a personal computer, a mini-computer, a mainframe, a workstation, a network or distributed computing environment, a stand-alone or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the present application can be implemented in machine readable code stored on a non-transitory storage medium or device, whether removable or integrated to the computing platform, such as a hard disk, an optical read and / or write storage medium, RAM, ROM, and the like, such that it is readable by a programmable computer and, when the storage medium or device is read by the computer, is used to configure and operate the computer to perform the processes described herein. Further, the machine readable code, or portions thereof, can be transmitted over a wired or wireless network. The present application described herein includes these and other different types of non-transitory computer readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The present application also includes the computer itself when programmed in accordance with the methods and techniques described herein.
[0105] Finally, it is to be understood that the above-described embodiments are merely exemplary of the application and that a myriad of modifications, e.g., to details of structure, can be made to the disclosed technology and that all such modifications are intended to be included within the scope of the application. Accordingly, other embodiments are within the scope of the following claims.
Claims
1. A rail transit passenger flow prediction model of an adaptive graph convolution recurrent neural network combined with an attention mechanism, characterized in that: The model is built by the following steps: Step S1: using adaptive graph convolutional network and attention mechanism to learn long-term and short-term dynamic spatial correlation in rail transit passenger flow respectively, and to fuse the two by graph convolution operation for long-term and short-term spatial correlation modeling, and to build the overall AEAGCRN model by encoder-decoder architecture; Step S2: using AEAGRU module as the main network module of the encoder-decoder architecture, i.e. using GRU as the main framework, replacing the MLP operation in GRU with attention-enhanced adaptive graph convolution module (AEAGCN) to jointly model the spatio-temporal correlation; Step S3: using attention-enhanced adaptive graph convolution module (AEAGCN) to model the spatial dynamics and node specificity; First, the spatial correlation in the global time domain is modeled using two adaptive globally shared node parameter matrices E1, E2 (E1∈R N×D ) with D being the parameter matrix feature dimension; E1, E2 respectively represent the attributes of the inbound passenger flow and the outbound passenger flow of all stations, and the parameter matrix can be trained to construct a long-time-scale global adaptive spatial correlation matrix A through E1, E2 static , to learn the hidden correlation between nodes, and the specific formula is as follows: Wherein softmax represents a nonlinear normalization method, ReLU represents a nonlinear activation function; E1, E2 are two global parameter shared correlation matrices obtained after training on the full training set data, and the two global parameter shared correlation matrices are obtained through matrix operation and nonlinear conversion A att , that is, A att is adaptive; Secondly, a dynamic graph structure based on attention mechanism is used to capture the dynamic changes of the existing spatial correlation in the recent history data, and the specific formula is as follows: denotes a short-term spatial correlation matrix; where l denotes a parameter in the l-th layer graph convolution operation; is a linear transformation weight parameter matrix; the x operator denotes matrix multiplication; By combining the two, the model can effectively capture the features of dynamic spatial correlation at different time scales, and realize the modeling of long-term static and real-time dynamic spatial correlation at the same time; the formula is as follows: wherein l denotes parameters of the l-th layer graph convolution operation, distinguished from global shared parameters, denotes a spatial correlation adaptive matrix that combines global parameter sharing and local spatial features. Finally, referring to the common graph convolution model, the node channel domain feature matrix E c is introduced to represent different node features (E c ∈R N×d ), and the specific formula is as follows: where W c ∈R d×C_in×C_out , denotes a trainable weight matrix, b c ∈R C_in×C_out denotes a bias term; H l denotes the input of the l-th layer of the graph convolutional network layer AEAGCN, which is also the output of the graph convolutional operation of the previous layer.
2. The rail transit passenger flow prediction model of the adaptive graph convolution recurrent neural network with attention mechanism according to claim 1, characterized in that: In step S1, during training, the historical time series is input into the encoder, the encoder state h1 is initialized as a full 0 matrix, and the decoder state is initialized using the final state of the encoder, and the prediction layer of the decoder is composed of a separate layer with time step specificity and a projection layer with decoder time step parameter sharing.
3. The rail transit passenger flow prediction model of the adaptive graph convolution recurrent neural network with attention mechanism according to claim 2, characterized in that: In step S2, the attention-enhanced graph convolution (AEAGCN) module obtained by step S1 is embedded into GRU to replace the MLP operation, and finally an adaptive graph convolution recurrent network based on attention enhancement is obtained; z t = σ(AEAGCN([X :,t , h t-1 ])) r t = σ(AEAGCN([X :,t , h t-1 ])).
4. The rail transit passenger flow prediction model of the adaptive graph convolution recurrent neural network combined with the attention mechanism according to claim 3, characterized in that: The specific operation of step S2 is: First, the current time input and state are spliced, and then they are input into the AEAGCN module; then the nonlinear transformation is performed through the sigmoid activation function, where sigma represents the sigmoid activation function, and the inputs of the update gate and the reset gate are obtained respectively; finally, the gating operation is performed on the two to obtain the hidden state and the subsequent layer output: where tanh is a nonlinear activation function mapping to the interval (-1, 1); x :,t , h t are the input and output at the t-th time step, respectively; [·] denotes the matrix concatenation operation, * denotes the Hadamard product, z t , r t are the update gate and the reset gate, respectively, is the hidden state computed based on the reset gate.
5. An orbital traffic passenger flow prediction method combining an adaptive graph convolution recurrent neural network with an attention mechanism, which utilizes the prediction model of any one of claims 1 to 4, characterized in that: First, define an orbital traffic network graph G=(V,E,A), where V represents the set of orbital stations, V={v1,...,vn}, where |V|=N, N represents the number of orbital stations, which is also the number of graph nodes, E represents the edge connecting two orbital stations in the graph, and A represents the adjacency matrix of the time-series traffic data node, which is measured by node distance or time-series similarity; The track timing passenger flow graph signal tensor is represented as X = {X :,1 , X :,2 , ..., X :,T}, X ∈ R N×T×C , where X :,t = {X 1,t ,..., X i,t ,..., X N,t}, X :,t ∈ R N×C , X N,t ∈ R 1×C , X i,t is used to represent the in-out passenger flow data of the ith node at time t, C represents the channel dimension C = 2, which represents the in-out passenger flow, and under the premise of given passenger flow tensor data X on the traffic network G, the multi-time-step passenger flow prediction problem is defined as solving a mapping function f θ ; f θ is mapped according to the in-out passenger flow data of the past p time slices to obtain the in-out passenger flow data of the future Δ time slices, which is represented by the following formula: (X ;,t+1 , X :,t+2 ,..., X :,t+Δ ) = f θ (X :,t-p+1 , X :,t-p+2 ,..., X :,t ; G); Then data preparation is carried out, first, the card swiping data is cleaned and abnormity is repaired, then the time slice size is set to S minutes, and the in-and-out passenger flow data in each S-minute interval is counted as a group of data, to obtain a graph signal tensor X∈R B×N×C ; where B is the sequence length ordered by time series, N is the number of track stations, and C is the attribute of the node; finally, the track passenger flow time series data is window-slid according to the required sequence window size of input and output to make the training and test data sets X t ∈R N×T×C ; The prediction model of any one of claims 1 to 4 is built and simulated, and the model is used for orbital traffic passenger flow prediction.
6. The rail transit passenger flow prediction method of the adaptive graph convolution recurrent neural network with attention mechanism according to claim 5, characterized in that: The time slice size is set to 10 minutes, i.e. S equals 10.
7. The track passenger flow prediction method of claim 5, wherein: The simulation training uses a teacher-forcing method to train the model, optimizes all the models through an Adam optimizer on training parameters, and adjusts the learning rate through a cosine annealing method; The AEAGRU model stack with the same number of layers is used as the main network of the encoder and the decoder.
Citation Information
Patent Citations
Rail transit passenger flow prediction method considering dynamic space-time correlation
CN113298314A
Convolutional network traffic flow prediction method based on space-time attention mechanism
CN113450568A