Data background and data set introduction of rail transit card swiping based on deep learning

The rapid development of emerging technologies such as big data and artificial intelligence provides ideas and methods for the intelligent operation organization and passenger flow control of rail transit. The short-term passenger flow prediction of urban rail transit is an important research content for building a smart rail transit system, including short-term inbound flow prediction, short-term OD flow prediction and short-term section flow prediction

The artificial intelligence technology represented by deep learning provides an opportunity for the further development of short-term passenger flow prediction of urban rail transit, and introduces the application status of deep learning in the field of rail transit in detail. For the application background, take "data acquisition-data preprocessing-application actual combat" as the main line

1. Mainstream research direction of artificial intelligence in rail transit operation management

Short-term passenger flow forecast

 According to its research object, it can be divided into road traffic short-term passenger flow forecast, bus short-term passenger flow forecast, urban rail transit short-term passenger flow forecast, railway short-term passenger flow forecast, etc.

According to whether the overall distribution of the sample is known, it can be divided into parametric prediction model and non-parametric prediction model

According to whether the prediction model is linear or not, it can be divided into linear prediction model and nonlinear prediction model

According to the number of models embedded in the forecasting process, it can be divided into single forecasting model and hybrid forecasting model

According to the development history of the prediction model, it can be divided into traditional prediction models based on mathematical statistics, prediction models based on machine learning, and prediction models based on deep learning.

What is "short-term" is the primary issue that needs to be clarified. For this reason, 50 relevant references were randomly selected, and the time granularity used for short-term passenger flow prediction was counted. The statistical results are shown in the figure

The results show that the time granularity distribution used for prediction ranges from 1 minute to 1 hour. Considering the reasons of practicability, economy, necessity, and feasibility, the short-term passenger flow prediction is mostly within 2 minutes to 30 minutes, and this No research on short-term passenger flow forecasting of more than 60 minutes was found in this statistics

Regarding the short-term passenger flow prediction of urban rail transit, the "prediction object" is another issue that needs to be clarified. According to the different attributes of passenger flow in the system, the short-term passenger flow prediction objects can be divided into

Short-term inbound flow prediction, used to solve the "where do passengers come from" in a short period of time in the rail transit system

Short-term OD flow prediction, used to solve the "where to go" of rail transit system passengers in a short period of time

Short-term cross-sectional flow prediction, used to solve the problem of "which way to go" for passengers in rail transit systems in a short period of time

Throughout the development of short-term passenger flow forecasting, it can be roughly divided into three stages:

The first stage is the traditional model based on mathematical statistics

For example, historical average model (Historical average model, HA), least squares method, ARIMA, logistic regression, Kalman filter model, K nearest neighbor model, etc. Due to the lack of large-scale development of urban rail transit at this stage, most of the relevant research on short-term passenger flow forecasting is aimed at road traffic. Therefore, relevant research in the field of urban rail transit is relatively scarce. In the field of road traffic, due to some shortcomings of this type of model, such as The "real-time performance" is poor and the prediction accuracy is low, that is, it cannot meet the real-time requirements and prediction accuracy requirements of short-term passenger flow prediction. Therefore, most of the models developed at this stage are no longer used.

The second stage is the model based on machine learning

With the development of machine learning, some machine learning models and hybrid forecasting models have been gradually applied to the field of short-term passenger flow forecasting, such as using decision trees, random forests, multilayer perceptrons (Backpropagation neural networks, BPNNs), support vector machines (Support vector machine, SVM) model, etc.

With the development of urban rail transit, models based on machine learning are gradually being applied to the field of urban rail transit. The models include both a single prediction model and a hybrid prediction model that uses one or more models in combination, such as a dynamic Bayesian network. Combination with Gaussian mixture model, combination of ARIMA model and wavelet decomposition, support vector machines, BPNNs, etc. Compared with traditional prediction models based on mathematical statistics, this type of model has higher prediction accuracy, but most models at this stage cannot consider the more complex spatio-temporal correlation between stations

The third stage is the model based on deep learning

As a branch of machine learning, deep learning has developed rapidly in recent years, and its good predictive performance has greatly promoted the innovation in the field of traffic forecasting. At this stage, the cyclic neural network RNN, convolutional neural network CNN, and graph convolutional neural network Network GCN and others have been successively mined and applied to short-term passenger flow prediction, and a large number of deep learning frameworks have been developed immediately

The deep learning models for short-term passenger flow prediction can be roughly divided into: models based on cyclic neural networks, models based on convolutional neural networks, models based on graph convolutional neural networks, and models based on various deep learning frameworks

Models based on recurrent neural networks: In the early stage of deep learning, a large number of RNN-based models emerged for short-term passenger flow prediction. The long-short-term memory network LSTM model and the Gated recurrent unit (Gated recurrent unit, GRU) model are the most representative The two RNN models can learn and remember long-term dependencies in time series, and solve the problems of gradient disappearance and gradient explosion in ordinary RNN models to a certain extent. They have been very maturely applied in natural language processing, pattern recognition and other fields.

In 2015, LSTM was first applied to the field of short-term traffic speed prediction, and in 2016, GRU was first introduced into the field of short-term passenger flow prediction. In general, although the model related to the cyclic neural network can better capture the time characteristics of passenger flow, it cannot capture the spatial characteristics between stations, and cannot use parallel computing to accelerate training, and the model training time is relatively long

Models based on graph convolutional neural networks: GCN has received a lot of attention from scholars in recent years because it can embed network structure information into the model construction process with the help of adjacency matrix. The GCN-based model can consider the space-time dependence characteristics of the transportation network, especially the topological structure information between stations, roads, and regions, and the structural information of non-European traffic data can also be fully utilized. Compared with RNN and CNN, GCN has more Fast training efficiency and fewer hyperparameters, therefore, a large number of scholars apply GCN to the field of short-term passenger flow prediction. In order to consider different types of adjacency relationships, such as proximity, connectivity, and functional proximity, some scholars have constructed a multi-graph convolutional neural network for short-term passenger flow prediction. In order to consider the importance of different connections in the constructed network graph, the Graph attention network (GAT) is applied to short-term passenger flow prediction research. In the field of urban rail transit, some scholars have introduced GCN into the field of short-term passenger flow prediction of subways, and considered the real-time, daily, and weekly patterns of passenger flow in the model, and the adjacency relationship between stations has been effectively described. Graph convolutional neural networks generally can only use shallow networks (mostly one to four layers). When building deep graph networks, the performance of the model will deteriorate. Therefore, it is impossible to use residual connections to build deep neural networks like CNN. The high-order spatial features cannot be effectively captured

Models based on deep learning frameworks: In order to overcome the shortcomings of using a single deep learning model and more effectively capture the spatiotemporal dependencies of network traffic, various complex deep learning frameworks based on RNN, CNN, and GCN have gradually been developed. . For example, some studies combine CNN and LSTM for traffic prediction; some studies combine GCN, LSTM, GRU, etc. for short-term traffic prediction; Under the framework, models such as LSTM and Gaussian regression are embedded for short-term traffic prediction. Recently, Transformer networks, capsule networks, and generative confrontation networks have also been applied to the field of traffic prediction

Among various deep learning framework models, such as SAE model, ST-GCN model, T-GCN model, ST-ResNet model, and DCRNN model, they are all well-recognized short-term traffic prediction deep learning frameworks. This type of model is partly used for short-term forecasts in minutes, partly for medium and long-term forecasts in hours or days; partly for single or several station forecasts, partly for network-level forecasts; partly for Some of the short-term forecasts under normal conditions are used for short-term forecasts under abnormal conditions; some use static correlations, and some use dynamic correlations. In summary, a large number of studies have shown that deep learning frameworks have better model performance capabilities than single RNN, CNN, and GCN models in most cases, but some deep learning framework models have high complexity, resulting in portability and recurrence. The performance is poor, and it needs to consume a lot of computing resources and time to train the model, so the practical value is relatively weak. Therefore, in the process of building the model, it is necessary to weigh the complexity of the model, the performance of the model and the application value, and make a comprehensive consideration

To sum up, the short-term inbound flow prediction of urban rail transit continues to develop and improve, and has now entered the development stage represented by deep learning models. When constructing a short-term inbound flow prediction model at this stage, factors such as passenger flow characteristics of the rail transit network, model complexity, model performance effects, and model application value should be fully considered to lay the foundation for building a smart subway ecology

Short-term OD flow prediction

Through short-term OD flow prediction, the OD matrix of the network can be obtained, which can be used as an important input of passenger flow distribution for short-term cross-sectional flow prediction. Therefore, short-term OD flow prediction is a bridge between short-term inbound flow prediction and short-term section flow prediction, and plays an important role in the short-term passenger flow prediction system of smart urban rail transit. The accurate short-term OD flow prediction model can provide the spatio-temporal travel distribution between stations, which is helpful for understanding passenger travel behavior

OD prediction refers to the use of historical OD matrix information to predict future OD matrix information, and OD estimation refers to the use of road traffic section flow count information or rail traffic in and out station flow information to estimate the OD information of the road network. There are essential differences between the two

According to the research method, OD prediction or OD estimation can be divided into three categories:

The first category is traditional methods based on mathematical statistics or simulation, such as least squares estimation model, probability analysis estimation model, multi-agent simulation model, etc.

The second category is based on machine learning methods, such as state-space models, BPNNs, principal component analysis and singular value decomposition, hierarchical Bayesian models, etc. For short-term OD prediction or OD estimation

The performance of the above two types of models is slightly weaker in terms of real-time and practicability. For example, when the model is applied to a large-scale network, the least squares method and the state space model will consume a lot of computing resources. Improvement, inability to consider the space-time dependence between OD requirements in the modeling process, etc.

In order to make up for the above deficiencies, in recent years, the third type of models represented by deep learning models have been widely used. For example, the LSTM model is used for OD matrix prediction. In this type of research, each station is individually trained with an LSTM model for prediction. With the help of parallel computing technology, the OD prediction of all stations in the entire network is performed. CNN and GCN are used to predict the OD matrix of road traffic. In this type of research, the road network is divided into different regions, each region is used as a node, and the adjacency relationship between regions is used as an edge, which is quite different from the rail transit network. Using GCN to estimate the OD matrix of road traffic, in this type of research, the road segments are used as nodes, and the connections between road segments are used as edges. Using LSTM and CNN for individual-based destination prediction in the shared bicycle system requires a lot of data preprocessing work for the dockless shared bicycle system, such as the need to determine the starting point and potential destination of the trip in advance. In short, there are some differences between the research background of the existing research and the OD prediction of rail transit, but it can provide a certain reference for the short-term OD flow prediction of rail transit

According to the research object, short-term OD prediction or OD estimation can be divided into road traffic OD estimation, taxi OD matrix prediction, bus OD matrix prediction, rail transit OD matrix prediction, etc. For different transportation systems, there are also large differences in the availability of data.

In the road traffic network, neither the real-time nor the real OD matrix can be obtained, but the flow count of road sections can be obtained through sensors, etc., and then the estimated OD matrix can be obtained through OD estimation, but the difficulty lies in the fact that the real OD matrix cannot be obtained, and the estimated OD matrix Reliability is also difficult to assess

In the taxi system, since there are no fixed pick-up and drop-off stations, existing studies usually divide the research area into traffic areas or grid areas to match trajectory data or order data, and then obtain the real historical OD matrix between areas, and Generally, passengers have already determined their travel destination when they take the bus, so real-time OD matrix information can also be obtained

In the bus system, the card data information recorded by the bus system in different cities is quite different. Some can completely record the passengers’ boarding and alighting stations, but some only record the passenger’s boarding stations or have no records. Therefore, the real Whether the OD matrix can be obtained depends on the situation; due to the existence of travel time, the real-time OD matrix of the bus system cannot be obtained

The urban rail transit system has fixed subway stations, and passengers need to swipe their cards to enter and exit the subway station. Therefore, the real historical OD matrix information can be extracted based on the historical AFC data; also because of the travel time of the traffic travel, the real-time OD matrix information in the subway system cannot Obtain

To sum up, the research in the field of short-term OD prediction of urban rail transit is relatively lagging behind. It is necessary to design and construct the model based on the unique characteristics of rail transit and make full use of the advantages of the deep learning model to meet the requirements of building a smart subway ecology at this stage. High precision, high real-time, high operability and other requirements

Short-term cross-sectional flow prediction

After predicting the short-term inbound flow and OD flow of urban rail transit, that is, after solving the problem of "where are you coming from" and "where are you going" for passengers in the rail transit system in a short period of time? Passenger travel routes and transfer information are not recorded in the AFC data. Passenger route selection needs to be predicted to obtain cross-sectional flow through passenger flow distribution and other means, that is, short-term cross-sectional flow prediction is performed to solve the short-term problem of passengers in rail transit systems. The "Which Way To Go" Question

Construction of a computational graph-based short-term cross-sectional flow prediction model for rail transit. First, introduce the computational graph model in the field of machine learning, and analyze in detail the advantages of the passenger flow allocation model based on the computational graph compared with the traditional passenger flow allocation model. Secondly, put the passenger flow distribution model of rail transit under the framework of calculation graph, and estimate the Section travel time and station waiting time, and then through steps such as passenger flow distribution and intelligent body simulation, the cross-sectional flow is finally generated. Finally, a case study is carried out, the model is applied to the virtual subway network, and the rationality and effectiveness of the model are verified. The model is applied to the real subway network in Beijing, and the short-term cross-sectional passenger flow of the network is obtained.

To sum up, compared with short-term inbound flow prediction and short-term OD flow prediction, there are fewer existing rail transit short-term cross-sectional flow prediction models, and the model structure is more complex and outdated. Therefore, combined with the idea of ​​deep learning, with the help of computational graph models in the field of deep learning, rail transit passenger flow allocation can be placed under the framework of computational graphs, and then a new rail transit short-term cross-sectional flow prediction model can be constructed to meet real-time and practicability requirements, providing new ideas and references for the construction of smart subway ecology

Detection and recognition of people, objects and scenes in a station based on computer vision

Pedestrian, object, scene recognition and other applications in subway stations are all based on the monitoring video data of the whole chain in the station, for example, face recognition, passenger flow statistics, behavior analysis, etc. line detection, object leftover detection, abnormal behavior analysis, crowd density analysis, etc., and detection of leftover civil air defense doors based on interval surveillance video, etc.

Operational Optimization and Control Based on Reinforcement Learning

The research on reinforcement learning in the field of rail transit is relatively late, and most of them have just been developed in recent years. They are mainly used in train schedule optimization, inbound flow control, train energy-saving driving control, and urban rail transit information release strategies

Relatively classic reinforcement learning models include Q-learning, Sarsa, Deep Q Network, Policy Gradient, Actor Critic, etc. All models include several major elements such as State, Action, Reward, and Value Function. Reinforcement learning has been widely used in the field of road transportation, such as signal light control at intersections, logistics optimization, etc., but relatively few applications in the field of rail transportation

The key to the application of reinforcement learning models in the subway field is how to package research problems under the framework of reinforcement learning models, for example, using Actor-critic actor-critic deep reinforcement learning model for train schedule optimization

The train scheduling problem of rail transit can be regarded as a Markov decision process under random passenger demand. The framework uses the Policy Gradient strategy gradient algorithm to train the artificial neural network, and then uses the actor-critic model for online scheduling and control. Among them, the state is defined as the arrival time of the train, the departure time, the number of passengers, etc., the decision variable is the action including the departure interval, the interval running time, and the stop time. The state transition matrix is ​​when different actions are taken, from the current state to the next state The probability matrix of , the reward is the time consumption, and the value function is the total optimal time consumption

Another example is the use of the Q-learning reinforcement learning model for collaborative control of inbound flow in rail transit systems during peak hours, which has alleviated peak congestion at specific stations. Among them, the state is defined as the ratio of the inbound passenger flow of all stations on a line to all passenger flows (including inbound passenger flow and flow-limited passenger flow), and the action is defined as the flow-limiting ratio of all stations on a line, specifically is {0%, 20%, 40%, 60%, 80%, 100%}, the reward is the safety risk of the station, and the value function is the safety risk function of all stations

A brief summary of the above three aspects:

Short-term passenger flow forecasting, that is, using historical AFC card data to extract passenger flow time series, using historical passenger flow time series data and external factors such as weather, etc., to build a deep learning model to predict passenger flow in a short period of time in the future

Use various surveillance video data in subway stations to build deep learning models for pedestrian detection and counting, object detection, scene detection, etc.

Applications related to reinforcement learning, such as train schedule optimization and inbound flow control based on reinforcement learning

Introduction of rail transit card data acquisition means and related open source datasets

The data set in the field of rail transit mainly includes AFC card swiping data, video surveillance data in stations, train schedule data, and related survey questionnaire data. The cases in this chapter are mainly based on the short-term inbound flow prediction based on card data, so here we only briefly introduce the means of obtaining AFC card swiping data and related open source data sets

Divided into the following four data:

Data from the 2019 Global Urban Computing AI Challenge sponsored by the Organizing Committee of the 10th China (Hangzhou) International Social Security Products and Technology Expo and hosted by Alibaba Cloud Tianchi and Alibaba Dharma Academy

The data is from 20190101 to 20190125, a total of 25 days of subway card swiping data records involving 3 lines and 81 subway stations with about 70 million pieces of data as training data. Each record contains seven fields:

Card swiping time Subway line ID Subway station ID Card swiping device number ID Entry and exit status (0 is exit, 1 is entry) Desensitized user ID User card type 

In addition, a road network map is also provided, that is, a connection relationship table between subway stations, including a two-dimensional adjacency matrix of 81x81

The first row and first column in the adjacency matrix represent the ID of the subway station, and the rows and columns are 0-80. The corresponding value is 1, which means that the two subway stations are directly connected, and the value of 0, which means that the two subway stations are not connected.

According to the Shenzhen Tong card swiping data released by the Shenzhen Municipal Government Data Open Platform, the data is dedicated data for the "2019 Shenzhen Open Data Application Innovation Competition"

Contains Shenzhen Tong bus and subway card ride data from October 2018 to March 2019. Each piece of data contains 11 fields: card number, transaction date, time, transaction type, transaction amount, transaction value, equipment code, company name, line station, license plate number Interline Mark Settlement Date

Sun Yat-sen University open source passenger flow time series data in its research paper

The data includes time series data of inbound flow and outbound flow at 15-minute time granularity after aggregation for three consecutive months from July 1, 2016 to September 30, 2016 in Shanghai

And the inbound flow and outbound flow time series data of 15-minute time granularity after aggregation extracted from the first Hangzhou card swiping data set from January 1, 2019 to January 25, 2019

Open Source Passenger Traffic Time Series Data in Research Papers

The data contains time series data of inbound flow and outbound flow with time granularity of 10 minutes, 15 minutes, and 30 minutes after aggregation for 5 consecutive weeks from February 29, 2016 to April 3, 2016 in Shanghai

It's not easy to create and find it helpful, please like, follow and collect~~~

Guess you like

Origin blog.csdn.net/jiebaoshayebuhui/article/details/130453916