A multi-source data-based multi-layer fusion urban rail transit passenger flow prediction method
By constructing a multi-layer fusion structure based on Transformer-LSTM and a deep attention module, the problems of spatial correlation and information loss in urban rail transit networks are solved, achieving high-precision multi-source data fusion and short-term passenger flow prediction, and improving the robustness of the prediction model.
Patent Information
- Application Number
- CN202310610756.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-26
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-05-26
AI Technical Summary
Existing short-term passenger flow forecasting models suffer from problems such as inability to effectively capture spatial correlations between stations, severe information loss, and underutilization of internal correlations among multi-source data when dealing with urban rail transit networks, resulting in low forecast accuracy and insufficient robustness.
We employ an LSTM network module based on the Transformer mechanism and a deep attention module, combined with a multi-layer fusion structure, to extract temporal and spatial features through multi-source data interaction and collaboration. This leads to the construction of a multi-layer fusion urban rail transit passenger flow prediction method, which includes a data interaction and collaboration module, a Transformer-LSTM network module, a deep attention module, and a multi-layer fusion structure. Features are extracted using a self-attention mechanism and deep separable convolution.
It improves the accuracy and robustness of passenger flow forecasting, effectively extracts the internal correlation between multi-source data, reduces information loss, and enhances the accuracy and reliability of forecast results.
Smart Images

Figure CN116776277B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of passenger flow forecasting technology, and more specifically, to a multi-layer fusion method for predicting urban rail transit passenger flow based on multi-source data. Background Technology
[0002] Accurate and reliable passenger flow forecasting provides multifaceted support for station operations. Temporal feature extraction is a crucial part of short-term passenger flow forecasting. Currently, the main approaches include the following: First, traditional forecasting models based on mathematical statistics, including ARIMA (Autoregressive Integrated Moving Average), SARIMA (Seasonal Time Series), and Kalman Filter models. Second, machine learning-based passenger flow forecasting models, such as Support Vector Machine (SVM), Back Propagation (BP), and Dynamic Bayesian methods. However, machine learning-based forecasting methods typically do not consider the spatial correlation between stations, and these models have limited capabilities when dealing with high-dimensional problems or complex spatiotemporal attribute data. Third, deep learning-based models, such as Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks. Thanks to the development of Convolutional Neural Networks (CNNs) and Graph Convolutional Neural Networks (GCNs), the topological spatial correlation in transportation networks has been better handled; for example, multi-graph GCN networks can be constructed to extract spatiotemporal features from urban rail transit networks. However, road traffic flow is strictly constrained by relevant traffic flow theories and road network structures, while urban rail transit flow can be abstractly viewed as a "jump" from station entry to exit. Therefore, the GCN network model based on the adjacency matrix is more suitable for predicting road traffic networks, but it has limitations in representing the topological characteristics of urban rail transit networks, such as... Figure 1 and Figure 2 As shown in the image.
[0003] To improve the accuracy and robustness of prediction results, hybrid prediction frameworks using multi-source data have been proposed in recent years. For example, a ResLSTM deep learning architecture based on ResNet, GCN, and LSTM networks, and considering the impact of air quality, has been proposed to achieve short-term passenger flow prediction at the urban rail transit network level. Depending on the stage of multi-source data fusion, some models achieve fusion at the feature level, while others consider fusion at the result level. The latter cannot fully utilize the complementary advantages of multi-source data. Furthermore, information loss is unavoidable during deep learning models performing operations such as convolution, pooling, dimensionality reduction, and fusion, and the internal correlations between multi-source data are often overlooked.
[0004] Analysis reveals that existing short-term passenger flow forecasting models have the following main problems:
[0005] (1) Models based on mathematical statistics are weak in characterizing traffic flow features that are full of uncertainty and complexity, and have problems such as poor real-time performance and low prediction accuracy. While machine learning-based models improve the accuracy of short-term passenger flow prediction to some extent, they usually cannot take into account the spatial correlation between stations during the prediction process, and such models have limited ability to deal with high-dimensional problems and complex spatiotemporal attribute data.
[0006] (2) Many studies directly use adjacency matrices to model spatial correlations in traffic networks, which works well in road traffic networks, but has limitations in representing topological correlations in urban rail transit networks.
[0007] (3) Information loss is unavoidable during deep learning model operations such as convolution, pooling, dimensionality reduction, and fusion. After passing through a series of network layers, the information richness retained is lower than that of the original information, and some information that plays a positive role in the prediction results is lost, such as... Figure 3 As shown. Furthermore, when using multi-source data for prediction, there is a certain internal correlation between different data points, which is often overlooked in existing research. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of the prior art and provide a multi-layer fusion method for predicting urban rail transit passenger flow based on multi-source data. This method includes the following steps:
[0009] Acquire time-series passenger flow, time-step-based OD data, and POI data as multi-source data;
[0010] The multi-source data is input into the passenger flow prediction model to obtain passenger flow prediction results for multiple future time steps, as follows:
[0011] [Y t+1 …Y t+k ] = f(P t ,OD t ,POI)
[0012] Among them, P t This represents the time series matrix of passenger flow entering the station at time step t, OD t The OD matrix represents the start and end points of time step t, and POI represents the point of interest (POI) matrix. [Y] t+1 …Y t+k ] represents the short-term passenger flow forecast value for k time steps from Y(t+1) to Y(t+k), and f represents the passenger flow forecast model.
[0013] In one embodiment, the passenger flow prediction model includes a data interaction and collaboration module, a Transformer-LSTM network module, a deep attention module, and a multi-layer fusion structure, wherein the multi-layer fusion structure includes a pre-fusion layer, a feature fusion layer, and a post-fusion layer.
[0014] Specifically: the data interaction and collaboration module is used to realize the collaboration between the multi-source data and to fuse the POI data features using a network layer based on a self-attention mechanism; the pre-fusion layer is used to fuse the feature map corresponding to the time series passenger flow and the feature map corresponding to the OD data based on the time step to obtain a first fused feature map; the Transformer-LSTM network module is used to extract time features based on the first fused feature map; the deep attention module is used to extract spatial and topological features based on the first fused feature map; the feature fusion layer is used to fuse the feature maps processed by the Transformer-LSTM network module and the deep attention module to obtain a second fused feature map; and the post-fusion layer is used to fuse decision matrices from different data sources.
[0015] Compared with existing technologies, the advantages of this invention lie in proposing a multi-step short-term passenger flow prediction model framework (or MSFPF) for urban rail transit networks based on a Transformer-based LSTM network module (TLB) and a deep attention module (DAB). Simultaneously, it uses time-series passenger flow data, time-step-based OD (Operational Origin) data, and POI (Point of Interest) data as multi-source data inputs, and utilizes corresponding data interaction methods to mine the internal correlations between the multi-source data. Furthermore, to overcome the information loss problem caused by operations such as convolution, pooling, dimensionality reduction, and fusion in deep learning model frameworks, a multi-layer fusion structure (MSF) is constructed in the framework to enhance information preservation. Verification shows that this invention can effectively extract spatiotemporal features from multi-source data, improve passenger flow prediction accuracy, and possesses certain advantages and robustness.
[0016] Other features and advantages of the invention will become clear from the following detailed description of exemplary embodiments of the invention with reference to the accompanying drawings. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the invention and, together with their description, serve to explain the principles of the invention.
[0018] Figure 1 This is a schematic diagram of a road traffic network based on existing technology;
[0019] Figure 2 This is a schematic diagram of an existing urban rail transit network.
[0020] Figure 3 This is a diagram illustrating information loss using existing technologies;
[0021] Figure 4 This is a flowchart of a multi-layer fusion urban rail transit passenger flow prediction method based on multi-source data according to an embodiment of the present invention;
[0022] Figure 5 This is a structural diagram of a multi-level fusion passenger flow prediction model (MSFPF) according to an embodiment of the present invention;
[0023] Figure 6 This is a schematic diagram of a Transformer-based LSTM network module structure according to an embodiment of the present invention;
[0024] Figure 7 This is a schematic diagram of the deep attention module structure according to an embodiment of the present invention;
[0025] Figure 8 This is a comparison chart of RMSE errors under different numbers of time steps according to an embodiment of the present invention;
[0026] Figure 9 This is a comparison curve of predicted and actual passenger flow values at subway station A according to an embodiment of the present invention.
[0027] Figure 10 This is a comparison curve of predicted and actual passenger flow values at subway station B according to an embodiment of the present invention.
[0028] Figure 11 This is a comparison curve of predicted and actual passenger flow values at subway station C according to an embodiment of the present invention;
[0029] Figure 12 This is a box plot comparison diagram of an MSFPF model and a Bi-LSTM model according to an embodiment of the present invention;
[0030] Figure 13 This is a data point fitting graph of predicted and actual values according to an embodiment of the present invention. Detailed Implementation
[0031] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the invention.
[0032] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.
[0033] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0034] In all the examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0035] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0036] See Figure 4 As shown, the provided multi-source data-based multi-layer fusion urban rail transit passenger flow prediction method includes the following steps: Step S410, constructing a passenger flow prediction model, which includes a Transformer-based LSTM network module TLB, a channel attention and depthwise separable convolution-based deep attention module DAB, and a multi-layer fusion structure. The provided model is a practical and effective deep learning model framework, capable of capturing the internal correlations between multi-source data. It fully exploits the temporal and spatial correlations in different data using the TLB network module and the DAB deep attention module, and achieves organic fusion with the help of the multi-layer fusion structure (MSF). Step S420, acquiring time-series passenger flow, time-step-based OD data, and POI data as multi-source data, inputting them into the constructed passenger flow prediction model, and obtaining passenger flow prediction results for multiple future time steps. This multi-step prediction method can improve prediction accuracy and broaden the prediction time span while ensuring sufficiently high model prediction accuracy.
[0037] In summary, the proposed multi-source data-based multi-layer fusion method for urban rail transit passenger flow prediction comprises the following parts. First, the scientific problem to be solved is defined in detail. Second, the proposed deep learning framework is presented. Then, the multi-layer fusion structure (MSF), the internal correlation of multi-source data, the Transformer-based LSTM network module (TLB), and the deep attention module (DAB) used in the framework are explained in detail. Finally, experiments are conducted based on five consecutive weeks of AFC data from subway cards in a Chinese urban rail transit network, and the results are compared with nine widely used short-term passenger flow prediction models, verifying the effectiveness and superiority of the invention.
[0038] I. Problem Definition
[0039] The purpose of this invention is to predict passenger flow in urban rail transit systems at several future time steps based on historical AFC data and corresponding POI data. The core issue is to find the nonlinear relationship between the two. First, based on AFC data, with a time granularity of 10 minutes, time-series inbound passenger flow (Inflow) and time-step-based OD data are extracted.
[0040] Passenger flow P t ∈R M×N As an attribute feature of subway station passenger flow in urban rail transit system, M represents the number of stations in the system, N represents the number of historical time steps used, and each element is represented as p(i,n), which is the observed passenger flow of station i in the nth time interval.
[0041] OD data based on time steps is OD t ∈R N×M×M Each element od ij (n) represents the number of origin-destination (OD) routes from station i to station j within the nth time interval. Simultaneously, the POI matrix POI∈R is extracted from the POI data. M×C Each element poi(i,c) represents the number of POIs of type c near station i.
[0042] In one embodiment, three time modes are used to predict the state within the next k time steps: real-time mode, daily mode, and weekly mode. These correspond to the state data before the prediction time step, the state data within the same time period of the previous day, and the state data within the same time period of the previous week, respectively. Each mode includes several time intervals. Based on this, the data input extracted for each training iteration is represented as P. t ,OD t And POI.
[0043] At time step t, all AFC and POI data are known. After certain data processing steps, the passenger flow time series matrix P is extracted. t OD matrix based on time step t And the POI matrix POI. Using the extracted data as multi-source data input, short-term passenger flow prediction is completed for k time steps from Y(t+1) to Y(t+k). This problem can be defined as:
[0044] [Y t+1 …Y t+k ] = f(P t ,OD t ,POI)(1
[0045] Where f is the network-level multi-step short-term passenger flow prediction model to be constructed, that is, the non-linear relationship between the input data and the final predicted value.
[0046] II. Passenger Flow Forecasting Model Structure
[0047] Figure 5 This is an example of the structure of a Multi-Level Fusion Passenger Flow Prediction Model (MSFPF). This model utilizes inbound passenger flow data, time-step-based OD (Original Demand) data, and POI (Point of Interest) data to perform network-level passenger flow prediction. To overcome the problem of information loss in the network, the model constructs a multi-level fusion structure (MSF) to preserve as much information as possible. To capture the internal correlations between multi-source data, the model uses two specific data-level matrix operations to achieve collaboration between multi-source data and uses a network layer based on a self-attention mechanism to fuse POI features. To more effectively capture temporal features from the processed time-series data, a Transformer-LSTM module (TLB) is employed. Furthermore, a Deep Attention module (DAB) based on channel attention and depthwise separable convolution is constructed to extract spatial and topological features from the fused OD data.
[0048] 1. Multi-layered fusion structure
[0049] In deep learning networks, information loss is inevitable during network learning due to the need to perform nonlinear mapping, convolution, dimensionality reduction, and other operations for feature extraction and data fusion. Therefore, in one embodiment, a MSF (Multi-Fuse Feature) structure is proposed, which has three fusion layers: a pre-fusion layer (first-stage fusion), a feature fusion layer (second-stage fusion), and a post-fusion layer (third-stage fusion). After data undergoes operations that may lead to information loss, the fused features derived from the previous stage will supplement the subsequent feature matrix. The following is a detailed description of each fusion stage.
[0050] Pre-fusion: Pre-fusion directly processes low-level information while retaining the most comprehensive information. Since the Inflow and OD matrices have different dimensions, preprocessing is required. Considering the great potential of LSTM networks in processing time-series passenger flow and their ability to effectively capture temporal features and long-term dependencies, a bidirectional long short-term memory network (Bi-LSTM) is used to preprocess the Inflow matrix. Simultaneously, the time-step-based OD matrix is processed by DenseNet to extract spatial-temporal features. The Dense module can reuse features and allows information to propagate effectively between layers, ensuring that more detailed information is retained. The computation of pre-fusion is represented as follows:
[0051] F E =w E1 A E1 +w E2 A E2 (2)
[0052] Among them, A E1 A E2 w represents the preprocessed feature map. E1 ,w E2 This represents the fusion weight and is initialized to 1.
[0053] Feature fusion: The feature fusion stage allows for more flexible control of the fusion process and preserves features from multiple data sources. Its main function is to merge the feature maps obtained after TLB and DAB processing. Furthermore, the pre-fusion feature matrix is also considered in this stage to compensate for information lost in the completed operations. The calculation of feature fusion is expressed as follows:
[0054] F D =w D1 A D1 +w D2 A D2 +w D3 F E (3
[0055] Among them, A D1 A D2 This represents the feature map after TLB and DAB processing, w D1 ,w D2 ,w D3 This represents the fusion weight and is initialized to 1.
[0056] Post-fusion: Since features have already been processed into relevant decision information before this stage, post-fusion has the advantages of high efficiency and low computational requirements. Its main function is to fuse decision matrices from different data sources. Furthermore, considering the information loss of the fully connected layer and the high integration of information in the decision layer data, the feature fusion layer matrix is also taken into account. To fully consider the importance of different features, the post-fusion calculation based on element-level fusion is represented as follows:
[0057]
[0058] Among them, A L1 A L2 W represents the decision matrix from different data sources. L1 W L2 W L3 This represents the fusion weights and is initialized to the identity matrix. This represents the Hadamard product.
[0059] 2. Multi-source data interaction and collaboration
[0060] Data-level interoperability aims to improve the collaboration between the Inflow matrix and the time-step-based OD matrix, whose inherent correlations can support spatiotemporal modeling. Furthermore, POI data can also provide independent spatial and temporal characteristics for different data sources.
[0061] In terms of temporal collaboration, the relevant Outflow data o(j,n) can be extracted from the OD data by accumulating the number of passengers exiting the station (see Equation 5). Furthermore, POI data also exhibits temporal dependence, showing temporal patterns and correlations with land use, typically manifesting as morning and evening peak hours. For example, stations near residential areas usually experience morning peaks on weekdays, while stations near shopping malls typically attract more passengers on weekends. Temporal features in POIs can be extracted using a self-attention layer; the principle of the self-attention mechanism will be discussed in detail later. These feature maps are combined using weighted summaries (see Equation 6), where U1(n) represents the feature map obtained after collaboration, P(n) and O(n) represent the Inflow and Outflow matrices, respectively, Att1 represents the temporal features provided by the POI data, and w... u1 ,w u2 ,w u3 These are the learnable weights in the process of combining.
[0062]
[0063] U1(n)=w u1 P(n)+w u2 O(n) T +w u3 Att1,(n=1,2,…,N)(6
[0064] In terms of spatial collaboration, the spatial distribution r(i,n) of passenger flow entering each station in the entire urban rail transit network is extracted from the Inflow data. This represents the proportion of passengers entering each station in the entire network. The specific calculation method is shown in Formula 7. Furthermore, POI data exhibits spatial dependence, typically showing that stations near large shopping malls, residential areas, and office buildings attract more passengers. Spatial features in the POI data can be extracted using two self-attention networks from both the entry and exit perspectives of the OD matrix. Finally, the extracted entry distribution matrix, POI spatial features, and OD matrix are weighted and fused, as shown in Formula 8. Here, U2(n) represents the feature map obtained after collaboration, OD(n) and R(n) represent the OD matrix and passenger flow distribution vector, respectively, Att2 and Att3 represent the spatial features provided by the POI data, and w... u4 ,w u5 ,w u6 ,w u7 These are the learnable weights in the process of combining.
[0065]
[0066] U2(n)=w u4 OD(n)+w u5 R(n)+w u6 Att2+w u7 Att3,(n=1,2,…,N)(8)
[0067] 3. LSTM Networks Based on Attention Mechanism
[0068] LSTM neural networks can effectively capture temporal correlations and improve prediction accuracy when processing time-series passenger flow data, and the multi-head attention mechanism in the Transformer model allows the model to better focus on key features and improve prediction efficiency. Therefore, in one embodiment, an LSTM network layer based on the Transformer mechanism is constructed to extract temporal features from the input data, and its network structure is as follows: Figure 6 As shown.
[0069] In the Transformer model, input data first passes through a positional encoding layer. This layer effectively encodes the temporal dependencies between time steps and records time-series information, as the data is not naturally ordered upon input. Simultaneously, since single-head self-attention networks struggle to capture sufficient global spatiotemporal features in complex data, a multi-head attention network is used to achieve the desired effect. This network performs parallel computation n times based on the self-attention mechanism, concatenates the n results, and then processes them through a fully connected layer to obtain the final feature matrix. The principle is as follows: Figure 6 As shown. In each attention head, the temporal vector after position encoding is based on three weight matrices W. Q W K W V These are mapped to query vector Q, key vector K, and value vector V, respectively, as shown in formulas (9)-(11), where b Q ,b K ,b V The three vectors obtained are used as bias hyperparameters. A self-attention mechanism is achieved through a nonlinear transformation, and its functional expression is shown in equation (12), where... is the scaling factor, and Softmax(·) is the activation function. Furthermore, the features output by the multi-head attention mechanism will be further processed by a Bi-LSTM network. This network is better able to handle sequence data and extract comprehensive temporal features, especially long-term dependencies.
[0070]
[0071]
[0072]
[0073]
[0074] 4. Deep Attention Module
[0075] Figure 7 This is a schematic diagram of the deep attention module, which consists of channel attention units and depthwise segregating convolutional units. Assume the input data size is (N, M, M), where n is the number of time steps and m represents the number of stations in the network. The channel attention unit compresses the input data spatially through pooling operations, pooling each two-dimensional feature into a real number a. c To achieve global pooling, see formula (13); then, incentive weighting is used to generate corresponding weights for each channel, specifically using a fully connected layer and a sigmoid function, as shown in formula (14); after obtaining the weight vector W, linear operations are used to model the importance of different channels, as shown in formula (15). OD(t) data corresponds to different time steps in the depth dimension. Embedding an attention mechanism into it can obtain spatiotemporal information at different time steps and focus on its main features.
[0076] The deep separable convolutional unit can seamlessly integrate with the channel attention unit. The core idea is to decompose the complete convolution operation into two steps: depthwise convolution and pointwise convolution. This unit uses the feature map embedded with channel attention obtained from the former as input, with a data size of (N, M, M). During depthwise convolution, each input channel corresponds to a filter, and the same number of intermediate feature matrices are output after the convolution operation. Subsequently, pointwise convolution is performed, where each channel's feature matrix corresponds to an (N, 1, 1) convolution kernel, and the final result is output after weighted fusion along the depth dimension. This deep attention module effectively extracts the spatiotemporal features of each channel and, based on the attention mechanism, can focus on the main features. Furthermore, compared to traditional convolutional networks, deep separable convolution can significantly reduce the number of parameters in the model.
[0077]
[0078] W = F ex (a)=Sigmoid(FC(a)) (14)
[0079]
[0080] III. Experimental Verification and Analysis
[0081] To verify the effectiveness of this invention, simulation experiments were conducted. The following details the dataset used, evaluation metrics, benchmark model, model parameter settings, and experimental results analysis.
[0082] 1. Dataset
[0083] Two AFC (Automatic Fare Collection) card swipe datasets from a certain urban rail transit system were used. Each dataset contains five weeks of data, and each record includes the passenger's ID, entry time, entry station, exit time, and exit station information. Due to random errors introduced during data collection, data cleaning was first performed according to certain rules, primarily targeting "meaningless data" (e.g., entry time much earlier than the rail transit's operating start time), "blank data" (e.g., missing important data), and "erroneous data" (e.g., entry time later than exit time). After cleaning, the first dataset contained 17,790,319 valid data points, and the second dataset contained 18,232,887 valid data points. For POI (Point of Interest) data, two datasets were also included, corresponding to the time periods of the two AFC datasets. Each POI record mainly records the point of interest name, code number, location, and category information. In the experiment, primary classification and coordinates were mainly considered, resulting in 23 primary categories.
[0084] 2. Model Configuration and Evaluation Metrics
[0085] (1) Model parameter settings
[0086] The proposed MSFPF model is implemented using the PyTorch library. Each dataset contains data from 5 weeks, with 85% of the data selected as the training set for training the model, 10% as the validation set during training, and the remaining 15% as the test set. Each prediction includes three time modes, each with 10 time steps. To balance prediction accuracy and network learning speed, after multiple trials, a batch size of 32 and a learning rate of 0.0005 were chosen, with Adam as the optimizer. During training, mean squared error (MSE) was selected as the loss function and saved, as shown in formula (16). Simultaneously, Model Checkpointing was added to save models that performed well during training, and Early Stopping was added to terminate the training task in a timely manner and avoid overfitting. Finally, to reduce the impact of randomly initialized parameters, the model was repeatedly trained several times, and their average value was calculated as the final prediction result.
[0087]
[0088] (2) Evaluation indicators
[0089] Root mean square error (RMSE), mean absolute error (MAE), and weighted average absolute percentage error (WMAPE) were selected as evaluation indicators for prediction performance. The calculation formulas for each indicator are shown in (17)-(19). Where y i Represents the actual value. This represents the predicted value, and n represents the number of samples.
[0090]
[0091]
[0092]
[0093] 3. Model Comparison
[0094] The proposed MSFPF model is compared with the following models to demonstrate its effectiveness.
[0095] SVR (Support Vector Regression): Regression analysis of data based on the principle of support vector machines.
[0096] LSTM (Long Short-Term Memory): Long Short-Term Memory networks can effectively capture the temporal features in time series data and capture long-term dependencies.
[0097] Conv-LSTM (Convolutional LSTM Network): Conv-LSTM uses convolutional layers instead of the feedforward network in LSTM to extract spatial correlations in urban rail transit networks.
[0098] Bi-LSTM (Long Short-Term Memory): A bidirectional long short-term memory network contains two LSTM networks, one forward and one backward, thus possessing stronger feature extraction capabilities.
[0099] ST-ResNet (Spatial Temporal Residual Network): This model can model the topological network based on convolutional operations and solve the gradient vanishing and gradient exploding problems in deep networks through residual connections.
[0100] GCN (Graph Convolutional Network): A graph convolutional neural network can be seen as an extension of a convolutional neural network on a topological graph G = (V, E, A), focusing on acquiring spatial information in the network.
[0101] T-GCN: This time-plot convolutional model uses a GCN network to learn spatial features in the topological network and utilizes a GRU to capture temporal features in time-series data.
[0102] Graph WaveNet: This model uses an adaptive correlation matrix to capture spatial dependencies and stacked dilated causal convolutions to extract temporal dependencies.
[0103] STIPM: This model uses a three-branch architecture, based on an attention mechanism, an LSTM network, and a CNN network, to extract a sufficient amount of temporal and spatial features from multi-source data.
[0104] MSFPF-No MSF: Based on the proposed MSFPF model, the multi-layer fusion structure is removed, while other configurations remain unchanged.
[0105] MSFPF-No TLB: Based on the proposed MSFPF model, the TLB module is replaced with a traditional LSTM network, while other configurations remain unchanged.
[0106] MSFPF-No DAB: Based on the proposed MSFPF model, the DAB module is replaced with a two-layer CNN network, while other configurations remain unchanged.
[0107] MSFPF-No POI: Based on the proposed MSFPF model, the input POI data and its related data collaboration and fusion are removed, while other configurations remain unchanged.
[0108] 4. Analysis of Experimental Results
[0109] (1) Prediction performance within the network
[0110] The prediction performance of the STIPM model and all benchmark models is shown in Tables 1 and 2. The experimental results show that deep learning-based prediction models (e.g., LSTM models) generally outperform traditional machine learning models (e.g., SVR models). For example, the MAE (Multi-Step Error) of the LSTM model is 7.33%, 16.48%, and 23.09% higher than the SVR model at different time steps. Overall, the SVR model has the worst prediction performance, but its results in single-step prediction are not significantly different from other benchmark models. This is because the SVR model can only use a "direct multi-step prediction" strategy to complete multi-step predictions. Therefore, the discontinuity of the input and output sequences in the second and third time steps leads to a significant increase in error. Among all deep learning models, models based on LSTM neural networks achieve relatively good prediction results, such as the LSTM and ConvLSTM models. This result demonstrates the superiority of LSTM networks in processing medium- to long-term time series data. However, LSTM-based models cannot capture spatial correlations well. Meanwhile, because CNN models cannot directly capture sufficiently high-quality spatiotemporal features through convolutional operations, their prediction performance is not significant. Furthermore, GCN, T-GCN, ST-GCN, and GWN models are based on graph convolutional networks. As mentioned earlier, these models are more suitable for road traffic, and therefore their performance is also not outstanding in urban rail transit systems with different network structures.
[0111] Experimental results show that the proposed MSFPF model achieves higher prediction accuracy across all three evaluation metrics and with an arbitrary number of prediction time steps. These results demonstrate that the MSFPF model comprehensively and successfully extracts sufficient spatial and temporal features, thereby improving prediction accuracy. Furthermore, the model exhibits the highest prediction accuracy across different datasets, demonstrating its robustness to diverse datasets and further highlighting the superiority and feasibility of the proposed prediction model. Moreover, the MSF structure clearly plays a crucial role in improving prediction accuracy, as illustrated in the MSFPF-No MSF ablation experiments; a more detailed analysis will follow.
[0112] Table 1: Prediction Accuracy of Each Model (Dataset 1)
[0113]
[0114]
[0115] Table 2: Prediction Accuracy of Each Model (Dataset 2)
[0116]
[0117] (2) Analysis of prediction performance based on different prediction time steps
[0118] Of all the prediction models, only the SVR model uses the "direct multi-step prediction" method, while the rest use the "neural network multi-output" strategy. When the number of prediction time steps is set to 3, the prediction time span is 30 minutes. Compared with direct medium- to long-term prediction at a 30-minute time granularity, multi-step short-term prediction can obtain more detailed and complete prediction information.
[0119] To explore the effects of multi-step prediction and the relationship between prediction accuracy and the number of prediction time steps, the RMSE metric from the first dataset is used to compare the results of different prediction models at different time steps. Figure 8 As shown, overall, the prediction error of each model increases with the increase in the number of prediction time steps. However, the error variation remains within an acceptable range, verifying the feasibility of combining multi-step prediction with short-term passenger flow prediction. Furthermore, the MSFPF model exhibits a relatively smaller error variation, demonstrating the applicability of multi-step prediction within the proposed model structure.
[0120] (3) Comparison of model prediction performance at a single station
[0121] To verify the model's predictive performance at the individual station level, three typical subway stations were selected. The predicted and actual passenger flows for these three stations were compared at different prediction time steps. Figure 9 (Corresponding subway station A) Figure 10 (Corresponding to subway station B) and Figure 11 As shown in (corresponding to subway station C), the forecast results include data for approximately 5 days from Wednesday to the weekend.
[0122] The first subway station, A, is a commuter-oriented station. Its vicinity mainly consists of medium to large residential communities and a small amount of commercial and office space, resulting in a significant early morning rush hour on weekdays. For example... Figure 9 As shown, the passenger flow entering the station exhibits strong regularity, and the predicted value curve basically coincides with the actual value curve under all prediction conditions, indicating good performance.
[0123] The second subway station, B, is a commercial station located near the center of a large commercial area. For example... Figure 10 As shown, this station experiences significant evening rush hours on weekdays; the same pattern is observed on non-weekdays, with a significant increase in total passenger volume compared to weekdays. Furthermore, compared to other stations in the network, this station has a larger total passenger volume, with peak evening rush hours on weekdays reaching approximately 1000 passengers per 10 minutes and peak evening rush hours on non-weekdays reaching as high as 1600 passengers per 10 minutes.
[0124] The third subway station, C, is a comprehensive intercity and urban transportation hub, serving as a transfer station for railways, urban rail transit, and surface public transportation. For example... Figure 11 As shown, compared to the previous two stations, this station exhibits less regularity in passenger flow, and the fluctuations in passenger flow over time are significant and drastic. Nevertheless, the proposed MSFPF model can still capture the changing trends of passenger flow and complete multi-step predictions.
[0125] (4) Error distribution analysis
[0126] The prediction evaluation metrics in Tables 1 and 2 are average error values calculated based on the entire urban rail transit network. Therefore, to further validate the performance of the prediction model, in addition to analyzing the overall performance and the performance of individual stations, it is also crucial to explore the error distribution among all subway stations and all data points. Therefore, box plots are used to display the evaluation metrics for all data points, such as... Figure 12 As shown, each subplot represents the prediction error distribution of the MSFPF model and the selected baseline Bi-LSTM model at single-step, two-step, and three-step intervals, respectively. The box plots demonstrate that the MSFPF model produces fewer outlier data points, and its box plot error index is generally lower than that of the Bi-LSTM model. Meanwhile, Figure 13 This demonstrates the true distribution of predicted and actual values. Figure 13 The data points are closely fitted to both ends of the line y = x; furthermore, regardless of the size of the passenger flow, the proposed MSFPF model can always obtain reliable and accurate prediction results, indicating that the model has strong robustness and the effect of reducing outliers.
[0127] (5) Ablation test
[0128] To further verify the effectiveness of each component in the proposed MSFPF model, a series of ablation experiments were established based on the MSFPF model by modifying the model structure and input data, and further analysis was conducted. The final prediction results of the first dataset are analyzed as an example, as shown in Table 3.
[0129] Table 3: Accuracy of Ablation Experiment Prediction Results
[0130]
[0131] Analysis of the prediction results based on MSFPF-No TLB shows a slight decrease in prediction accuracy, indicating that the Transformer model successfully improves prediction accuracy by capturing key features and global temporal dependencies. Similarly, in the STIPM-No DAB model, replacing the deep attention module with a two-layer CNN network also leads to a slight decrease in prediction accuracy, but the number of model parameters increases to almost 1.65 times that of the original model. This indicates that the DAB structure successfully extracts a large number of spatial features, improving prediction accuracy while significantly reducing the number of model parameters. Analysis of the prediction results based on MSFPF-No POI shows a decrease in prediction accuracy after removing the POI data source, indicating that land use around the site has spatial and temporal impacts on passenger flow. The proposed MSFPF model can extract the corresponding spatiotemporal dependencies from POI data to support short-term passenger flow prediction. Nevertheless, the three ablation experiment models still outperform the baseline model, demonstrating the structural robustness of the MSFPF model. However, in the SFPF-No MSF experiment, the lack of a multi-layer fusion structure led to a sharp decline in prediction accuracy. For example, the RMSE index decreased by 48.54%, 58.62%, and 47.07% at different time steps. This result indicates that information loss is a significant phenomenon during deep network learning, while the MSF structure can retain helpful information to a great extent, making it a key component in improving prediction accuracy in the proposed MSPFF model.
[0132] Compared with the prior art, the present invention has the following advantages:
[0133] 1) An end-to-end network-level multi-step short-term passenger flow prediction model for urban rail transit is proposed. It is original and novel in terms of structure and data input. It considers multi-source input data such as passenger flow entering the station, points of interest around the station, and metro network topology, and successfully extracts comprehensive spatial and temporal features from the multi-source data.
[0134] 2) By constructing a multi-layer fusion structure MSF, the problem of information loss during deep network learning (such as convolution, pooling, and dimensionality reduction operations) is overcome. Through information preservation and residual connection, the information in the entire deep network is comprehensively supplemented, thereby significantly improving the prediction accuracy of the model.
[0135] 3) Corresponding interactions and collaborations were implemented among the multi-source input data, and the internal correlations between passenger flow data and OD data were mined. Simultaneously, based on a self-attention mechanism, relevant temporal and spatial features were extracted from the POI data to support the final prediction. Through data-level interaction and collaboration among multi-source data, the internal correlations between them were captured.
[0136] In summary, this invention proposes a network-level deep learning framework that effectively extracts and fuses temporal and spatial correlations from different data sources to achieve high-accuracy short-term passenger flow prediction for urban rail transit. Simultaneously, a multi-layer fusion structure (MSF) is constructed to further preserve information and overcome the problem of information loss in the network; collaboration between multi-source data at the data level is considered to obtain the internal correlations between multi-source data, and a network layer based on a self-attention mechanism is used to fuse POI features. Furthermore, the provided model employs multi-step prediction, which can broaden the prediction time span while ensuring sufficiently high prediction accuracy. For example, when predicting passenger flow data for the next 30 minutes, multi-step prediction can use a 10-minute time granularity to predict values for three time steps simultaneously; compared to single-step prediction with a 30-minute time granularity, multi-step prediction demonstrates greater significance in practical applications. For transportation network operators and managers, the detailed information provided by multi-step prediction helps in formulating more effective management and control strategies; for passengers, it also helps them make more effective choices regarding travel routes and modes of transportation.
[0137] This invention can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.
[0138] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0139] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0140] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.
Claims
1. A multi-source data-based multi-layer fusion urban rail transit passenger flow prediction method, comprising the following steps: obtaining time series passenger flow, time step-based OD data and POI data as multi-source data; inputting the multi-source data into a passenger flow prediction model to obtain passenger flow prediction results for a plurality of future time steps, represented as: [Y t+1 …Y t+k ] = f(P t , OD t , POI) where P t represents the inbound passenger flow time series matrix at time step t, OD t represents the origin-destination OD matrix at time step t, POI represents the point of interest POI matrix, [Y t+1 …Y t+k ] represents the short-term passenger flow prediction value from Y(t+1) to Y(t+k) for a total of k time steps, and f represents the passenger flow prediction model. wherein the passenger flow prediction model is provided with a data interaction and cooperation module, a Transformer-LSTM network module, a deep attention module and a multi-layer fusion structure, and the multi-layer fusion structure comprises a front fusion layer, a feature fusion layer and a rear fusion layer; wherein: the data interaction and cooperation module is used to realize cooperation between the multi-source data and fuse POI data features using a network layer based on a self-attention mechanism; the front fusion layer is used to fuse feature maps corresponding to the time series passenger flow and feature maps corresponding to the time step-based OD data to obtain first fusion feature maps; the Transformer-LSTM network module is used to extract time features based on the first fusion feature maps; the deep attention module is used to extract spatial and topological features based on the first fusion features; the feature fusion layer is used to fuse feature maps processed by the Transformer-LSTM network module and the deep attention module to obtain second fusion feature maps; the rear fusion layer is used to fuse decision matrices from different data sources.
2. The method of claim 1, wherein, The calculation of the front fusion layer is represented as: F E = w E1 A E1 + w E2 A E2 wherein A E1 ,A E2 respectively represent the feature map corresponding to the time series passenger flow and the feature map corresponding to the OD data based on the time step, w E1 ,w E2 represents a fusion weight, F E is the fusion feature output by the front fusion layer; The calculation of the feature fusion layer is represented as: F D = w D1 A D1 + w D2 A D2 + w D3 F E A D1 ,A D2 respectively represent the feature maps processed by the Transformer-LSTM module and the deep attention module, w D1 ,w D2 ,w D3 denote fusion weights, F D denote the fusion features output by the feature fusion layer; The calculation of the rear fusion layer is represented as: where A L1 ,A L2 denote decision matrices of different data sources, W L1 ,W L2 ,W L3 denote fusion weights, denote Hadamard product, F L denote the fusion features output by the post-fusion layer.
3. The method of claim 1, wherein, The data interaction and cooperation module performs the following steps: time cooperation is performed according to the following formula: U1(n) = w u1 P(n) + w u2 O(n) T +w u3 Att1,(n = 1, 2,..., N) spatial cooperation is performed according to the following formula: U2(n) = w u4 OD(n) + w u5 R(n) + w u6 Att2 + w u7 Att3, (n = 1, 2,..., N) where o(j, n) represents the Outflow data extracted from the time-step-based OD data, U1(n) represents the feature map obtained after time collaboration, P(n), O(n) represent the time series passenger flow Inflow data and Outflow data matrix respectively, Att1 represents the time feature provided by the POI data, w u1 ,w u2 ,w u3 is the learnable weight in the time collaboration process; U2(n) represents the feature map obtained after spatial collaboration, OD(n), R(n) represent the OD data matrix and passenger flow distribution vector respectively, Att2, Att3 represent the spatial feature provided by the POI data, w u4 ,w u5 ,w u6 ,w u7 is the learnable weight in the spatial collaboration process, i, j, n represent the index, M represents the number of stations, and N represents the number of historical time steps used.
4. The method of claim 1, wherein, The Transformer-LSTM network module sequentially comprises a position encoding layer, a multi-head attention mechanism layer and a bidirectional long short-term memory network layer Bi-LSTM.
5. The method of claim 1, wherein, The deep attention module comprises: a channel attention unit: used to compress input data in the spatial dimension through a pooling operation, and pool each two-dimensional feature into a real number; then use excitation weighting to generate a corresponding weight for each channel to obtain a weight vector; after obtaining the weight vector, the importance degree between different channels is modeled using linear operation to obtain a feature map embedded with channel attention; a depth separation convolution unit: used to sequentially perform depth-wise convolution and point-wise convolution with the obtained feature map embedded with channel attention as input, and the input data size is (N, M, M), wherein in the depth-wise convolution, each input channel corresponds to a filter, and after the convolution operation, the same number of intermediate feature matrices are output; in the point-wise convolution, each channel feature matrix corresponds to a (N, 1, 1) convolution kernel, and after the convolution operation, the final result is output after weighted fusion in the depth dimension, M represents the number of stations, and N represents the number of used historical time steps.
6. The method of claim 1, wherein, The feature map corresponding to the time series passenger flow is extracted using a bidirectional long short-term memory network, and the feature map corresponding to the time step-based OD data is extracted using a DenseNet network.
7. The method of claim 1, wherein, The multi-source data adopts three time modes, namely real-time mode, daily mode and weekly mode, which respectively correspond to state data before a prediction time step, state data in the same period of the previous day and state data in the same period of the previous week.
8. A computer readable storage medium having stored thereon a computer program, wherein, The computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
9. A computer device comprising a memory and a processor, having stored on the memory a computer program capable of running on the processor, characterized in that, The processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Trend prediction method based on attention mechanism and reinforcement learning
CN114049222A
Subway short-time passenger flow prediction method based on space-time diagram convolutional network
CN115618934A