# Predicting Fine-Grained Traffic Conditions via Spatio-Temporal LSTM

Authors: Xiaojuan Wei; Jinglin Li; Quan Yuan; Kaihui Chen; Ao Zhou; Fangchun Yang
Journal: Wireless Communications and Mobile Computing
 (2019)

---

## Abstract

Predicting traffic conditions for road segments is the prelude of working on intelligent transportation. Many existing methods can be used for short-term or long-term traffic prediction, but they focus more on regions than on road segments. The lack of fine-grained traffic predicting approach hinders the development of ITS. Therefore, MapLSTM, a spatio-temporal long short-term memory network preluded by map-matching, is proposed in this paper to predict fine-grained traffic conditions. MapLSTM first obtains the historical and real-time traffic conditions of road segments via map-matching. Then LSTM is used to predict the conditions of the corresponding road segments in the future. Breaking the single-index forecasting, MapLSTM can predict the vehicle speed, traffic volume, and the travel time in different directions of road segments simultaneously. Experiments confirmed MapLSTM can not only achieve prediction for road segments based a large scale of GPS trajectories effectively but also have higher predicting accuracy than GPR and ConvLSTM. Moreover, we demonstrate that MapLSTM can serve various applications in a lightweight way, such as cognizing driving preferences, learning navigation, and inferring traffic emissions.


---

## Body

## 1. Introduction

Traffic prediction of road segments is a fundamental issue in the Intelligent Transportation Systems (ITS), which can be hopefully used for planning optimal driving routes [1], urban computing [2], balancing traffic control [3, 4], and enhancing driving comfort [5]. It is necessary to explore the traffic dynamics and analyze the evolution pattern of traffic flow. Due to the generation of industrial IoT big data, network infrastructures and computational models have been equipped and applied [6–8]. If the global traffic information is not recognized accurately and timely, ITS will be not successfully deployed or the deployed system will be paralyzed sooner or later.In general, the power of effectively predicting the future traffic conditions for road segments comes from the historical and real-time traffic information. According to the duration for the future, 3-10 days, 1-3 days, within 1 day, and no more than 15 minutes, traffic flow forecast usually is included long-term, recent-term, short-term and short-time [9]. Most of the existing methods present prediction trend either by using probability and statistics of the time-dependent evolution of current road, or only using the pure spatial relationships among various road segments. Although available spatiotemporal information is combined to model the traffic network pattern, the information does not play out its full potential.Traffic network possesses complicated spatio-temporal relationship. The prediction methods should have accuracy, robustness, adaptability and portability as the traffic flow is a high-dynamic, high-dimensional, non-linear and non-stationary random process. Traffic conditions of road segments are influenced inevitably by the spatio-temporal information in the traffic network. Deep learning can be used to model high-level abstractions by using multiple non-linear transformations, while the learning network has rarely taken the overall spatio-temporal dynamic pattern into account. It is not convincing to achieve accurate traffic prediction merely by spatial relations between regions or road segments. Hence, the prediction results perform not well at certain times, which occur especially when there are insufficient GPS trajectories through road segments. Based on this, it is proper to consider more supplementary aspects such as map-matching technology used to recognize traffic conditions for road segments accurately and finely.In this paper, we propose a fine-grained and lightweight approach for traffic predicting of road segments, named MapLSTM, a spatio-temporal long short-term memory network (LSTM [10]) preluded by map-matching [11]. MapLSTM only requires vehicles GPS, and not need to deploy specialized traffic sensors in urban and not use the unobtainable data from ground loop. MapLSTM first obtains the historical and real-time traffic conditions of road segments via map-matching. Then LSTM is utilized to predict the traffic conditions of the corresponding road segments in the future. Breaking the single-index forecasting, MapLSTM can predict multiple traffic conditions for road segments simultaneously. To summarize, the major contributions of this paper consist of the following aspects:(1) Breaking through the difficulty of obtaining segment-based traffic data, we perform the cognizing of road-grained traffic conditions via map-matching technology.(2) Based on a large scale of taxi GPS trajectories, we propose MapLSTM to extract features from the high-dynamic, high-dimensional, non-linear and non-stationary traffic flow. And we confirm that MapLSTM have a higher predicting accuracy than GPR [1] and ConvLSTM [12].(3) We demonstrate MapLSTM can serve to various pragmatic applications: cognizing driving preferences, learning navigation and inferring traffic emissions.The remainder of this paper is organized as follows: Section2 reviews the literature on traffic prediction. Section 3 describes the materials and gives details of our mechanism MapLSTM. The next, Section 4 demonstrates the effectiveness and applications. This paper ends in Section 5 with conclusion on our work.


## 2. Literature Review

Traffic condition prediction can not only be used as the design basis of signal control of ITS but also provide decision support for dynamic route guidance. Whereas, there are still some bottlenecks in short or long term traffic prediction through a lot of real spatio-temporal data.Spatio-temporal semi-supervised learning model proposed in [13] can infer the volume of each road with real-world data collected from 155 loop detectors and 6918 taxis over 17 days. There are totally 19165 road segments in the urban area, but only 155 road segments are equipped with loop detectors, which results there in an inherent deviation in acquiring the city-wide traffic volumes. Although the constructed affinity graph can characterize the similarities among roads based similar speed patterns, the factors influencing traffic flow are not only the speed of vehicles, but also the road topology, road structure, the regional characteristics, and so on. Traffic conditions of each road segment cannot be predicted accurately only by the spatial relations on the macro.A vehicle speed is influenced by many factors: the vehicle type, the traffic conditions and the driver’s behaviour. A data driven model is proposed in [14] for vehicle speed prediction where the average traffic speed is estimated based on historical traffic data at first and then the statistical relationship with individual vehicle speed is presented by hidden markov models. Finally, the individual vehicle speed is predicted by forward-backward algorithm. Another mechanism proposed in [15] is a cooperative method which combines with fuzzy markov model and auto-regressive model. These machine learning approaches for vehicle speed prediction do not care about the basic data sources, and focus more on the accuracy of prediction algorithms rather than the accuracy of segment-based traffic prediction.DeepSense [16] is a typical deep learning approach for traffic prediction with Taxi GPS traces. DeepSense gains the prediction results based on sufficient dataset by using Restricted Boltzmann Machine. Due to the night data is too sparse, so DeepSense made a prediction based filling according to the data of the same time in history. But this prediction-based prediction approach may lose credibility in deep learning. In addition, DeepSense extract and classify the speed only on 0~60km/h to reflect the traffic congestion or smooth, which lacks universality in some other regions.Understanding traffic density from large-scale images is another way to recognize the traffic status. Reference [17] as a related work selects a region of interest in a video stream at first, then counts the number of vehicles in the region for each frame, so the density is calculated by dividing that number by the region length. Reference [18] is another image-based learning to measure traffic density using a deep convolutional neural network. These vision-based cognitive methods mainly play a role in local regions, which can dedicate to the operational control but cannot make an efficient decision in tactical planning with in the long run.In addition, the predicted object is univocal in the existing methods, more is traffic volume or speed, which can merely infer the traffic state of the road segment is congestion, slow, normal, moderate, and unimpeded. It is necessary to explore fine-grained and accurate perception in a simple way.


## 3. Materials and MapLSTM

In this section, we first provide materials on GPS trajectory, map-matching, and LSTM. Then we depict MapLSTM designed for traffic prediction.


### 3.1. Materials

#### 3.1.1. GPS Trajectory

Taxis can be considered as ubiquitous mobile sensors constantly probing a city’s rhythm and pulse. Being inherent characteristic, GPS-based taxies have proven to be an extremely useful data source for uncovering the underlying traffic behaviour. So far, the taxi GPS data have been used for urban computing, detecting hot spots, map reconstruction, finding routes, and so on [2, 19].The GPS records of a large number of taxis in a city are routinely saved to a log fileL, resulting in a very large data set L=p11,p12,…,p1n;…;pi1,pi2,…,pin;…. Fields for each GPS record generally contains TaxiID, Location (Longitude, Latitude), Speed, Event, GPS_state, Bearing, and 6 commonly used timing units: YYYY-MM-DD HH:MM:SS. Figure 1 shows an example of GPS log and trajectories. A trajectory T is a time series of GPS points with the time interval between any consecutive GPS points not exceeding a certain threshold △t (usually △t≥1min), i.e., Ti:pi1→pi2→pi3→⋯→pin.Figure 1
An example of GPS log and GPS trajectories.


#### 3.1.2. Map-Matching

Map-matching is the process of aligning a sequence of observed GPS positions with the road network on a digital map [20]. As a preprocessing step of MapLSTM, map-matching can effectively improve the existing huge amount of low-sampling-rate GPS trajectories in data set.As shown in Figure2, map-matching can be performed with the same or different time interval as the GPS points. The GPS points without map-matching can only be mapped to the road network. Not all GPS points can be mapped to their corresponding segments due to the GPS positioning error. But after map-matching, all GPS points can be corrected to the corresponding road segments.Figure 2
Map-matching when before and after.


#### 3.1.3. LSTM

LSTM [10] is a time recurrent neural network, which is the most widely used method to process and predict events with relatively long intervals in time series. LSTM can learn about long-term reliant information by input gate I, output gate O, and forget gate F, where, I determines how much of the network input at the current time xt is saved to the cell state ct. O determines how much of the control unit state ct is output to the current output value ht of LSTM. F determines how much of the cell state from the previous time ct-1 remains to the current time ct. In short, the input X at different time determines the cell state C at the corresponding time and the current cell state ct will be affected by the previous cell ct-1.The calculation of each element of LSTM is shown in Algorithm1. At the current time t, ft denotes forget gate, it represents input gate obtained by the previous output ht-1 and the current input xt, Ct denotes the cell state and C~t denotes the cell state at the previous time, ot denotes the output gate, and ht denotes the cell output. LSTM can not only save information long ago under the control of F but also avoid the current irrelevant content into memory based the gate I.Algorithm 1:For calculating each element of LSTM.
Input: The network’s input in current time xt; the initial weight matrix W, and bias units b about gates I, O, F; Output: The forget gate, input gate, cell state in different time, output gate and the cell output. (1) ft=σ(Wf⋅ht-1,xt+bf); (2)  #: σrepresent Sigmoid function. (3) it=σ(Wi⋅ht-1,xt+bi); (4) C~t=tanh(WC⋅ht-1,xt+bC); (5) Ct=ft∗Ct-1+it∗C~t; (6) ot=σ(Wo⋅ht-1,xt+bo); (7) ht=ot∗tanh(Ct); (8) returnft, it, C~t, Ct, ot, ht.


### 3.2. MapLSTM

MapLSTM is fine-grained and lightweight way. It only requires sampled GPS points of vehicles and not need to deploy expensive traffic sensors in urban and not use the unobtainable data from ground loop. In this section, we describe MapLSTM in detail.


#### 3.2.1. Framework

Figure3 shows the framework of MapLSTM, which consists of three processes: map-matching, data processing and LSTM predicting.Figure 3
MapLSTM framework for traffic prediction. It consists of three processes: Map-matching, data processing and LSTM predicting.(a) Map-Matching. A large number of sampled GPS points stored in GPS log need to be matched to road segments. In order to facilitate the operation, it is necessary to manually redivide road segments based on the road network before matching. Generally, the division is based on the intersection, or no redivision, just based on the inherent segments structure in road network, if the calculation resources and road segments information are sufficient and detailed. We do our best to maintain the original topography relationship between the divided road segments. After map-matching, all GPS points can be shifted to the corresponding road segments.(b) Data Processing. The road segments experienced map-matching also mean the information has been extended, where the road segments and vehicle information are paired off according to their ID and location. Therefore, we can have information statistics including vehicle speed, traverse time, and traffic volume taking one road segment as a unit (i.e., segment-based). The traverse time can be counted in different directions: from west to east, from east to west, from north to south, and from south to north. The processed data are sent to prediction model LSTM as the training set and testing set.(c) LSTM Predicting. The traffic data of vehicle speed, the traverse time, and traffic volume based road segments are input to LSTM concurrently for predicting task. The hidden layers of LSTM can control the long-term or short-term impact on the current state. After output layer of LSTM, it goes through a full connected network with three layers, in which the purpose is to better explore the implied relationships between states.MapLSTM enables cognition of road segment-based traffic conditions in a lightweight way. For the real-time cognition of global situations, MapLSTM is still valid by collaboration computing where a groups of cells work together to accomplish a relatively large task. Edge computing after cloud computing is a typical collaborative computing environment and has been widely used [21, 22].


#### 3.2.2. Map-Matching Algorithm

Before map-matching, it is necessary to have a information understanding about roads and vehicles. Table1 describes an example with a sample of the information. All the information about roads and vehicles can be correlated based the auxiliary information (ID, longitude and latitude).Table 1
An example with a sample of the main information about road and vehicle.
Name The Main Fields  Road ID MapID PathName Pathclass Oneway Width Length Direction Meters 59565200918 595652 Xing Fu Xi Jie 4 F 30 0.284 2 3.68  Vehicle ID Bearing Speed State Longitude Latitude Event Time Positioning 6409 84 46 1 3973633 11633100 1 20160916182046 GPS/BeiDou/MixST-Matching [20] is a pathway with candidate computation and spatio-temporal analysis for low-sampling-rate GPS trajectories. We follow ST-Matching analysis architecture and make a map-matching work on a real digital map in Beijing. As described in Algorithm 2, for the available historical trajectories, GPS sampling points in the trajectories are traversed to get the candidate point set which waiting to be corrected. For all candidate points, the spatial value can be reached by combining with the information of road network, longitude, latitude, and distance, and the temporal value can be reached by adding the time information. After spatial analysis and temporal analysis, matching results can be accomplished.Algorithm 2:Map-matching algorithm.
Input: Beijing Road network R, Coordinate axis A, Trajectories T, where, T=t1,t2,t3,…,tn, t i = p i 1 → p i 2 → p i 3 → ⋯ → p i n, p i j is a GPS sampling point, i,j∈1,n; Output: The one-to-one results of road segments and vehicles information: MT′. (1)  Initialize CPset=0; (2)  Repeat i=1,2,3,…,n; (3)  For j=1 to n (4) Si,j=GetCandidatePoints(pj,R) (5) CPset.add(Si,j) (6)  End for; (7) k=1; (8)  While k≤CPset do (9) Vs=GetSpaVal(R,A,CPset(k),dist(p,CPsetp)) (10) Vt=GetTemVal(R,A,Speed,time(pi,j,pi,j+1)) (11) MT=MatchSeq(Vs,Vt) (12) k+=1 (13)  End while; (14)  Visualized MT⇢MT′; (15) returnMT′.After map-matching, roads information where the vehicles are located can be easily obtained, and the traffic data about the roads can also be clearly gained after statistics in turn.


#### 3.2.3. Training Data Generating

The raw trajectory data cannot be used directly for our predicting task. It is necessary to match and statistics at first. If we want to get the traffic status prediction of road segments, we need to make a segment-based statistics about the traverse time in different directions, the vehicle speed and the traffic volume.The data of traverse time in different directions, the average vehicle speed and traffic volume of road segments can be generated by Algorithm3. When map-matching is done, more fine-grained data can also be obtained such as the average speed and traffic volume under different directions of road segments. The data after map-matching and statistics can be used, which also mean that the training data and the testing data of prediction network are generated.Algorithm 3:To generated the segment-based traffic data.
Input: Road Log Rl, GPS Log Vl, Output: The traffic data about the road segments. (1)Initialize TT_we, TT_ew, TT_sn, TT_ns, Speed, C o u n t _ w e, Count_ew, Count_ns,Count_sn; (2)GetVehicleColumns(ID, Time, V_Speed, V_lon, V_lat); (3)GetRoadColumns(RoadID, R_lon, R_lat); (4)Repeat RoadID; (5)Flag=0; (6)For i=StartTime to EndTime (7)if (8)ti, V_lon<Rw_lon; V_lat<Rn_lat (9)ti+1, V_lon≥Rw_lon; V_lat≥Rn_lat (10)tn+i, V_lon<Re_lon; V_lat<Rs_lat (11)tn+i+1, V_lon≥Re_lon; V_lat≥Rs_lat (12)then (13)Flag=1 (14)Count_we+=1; (15)Count_ns+=1 (16)TT_we+=tn+i+1-ti+1; (17)TT_ns+=tn+i+1-ti+1 (18)Imitate GetCountData(Count_ew, Count_sn); (19)Imitate GetTTData(TT_ew, TT_sn); (20)if Flag=1 then Speed+=V_Speed; (21)End for; (22)Avg_TT_we=TT_we/Count_we; (23) Imitate GetData(Avg_TT_ew, Avg_TT_sn, A v g _ T T _ n s); (24)Volume=∑p,q{w,e,n,s}Count_pq; (25)AvgSpeed=Speed/Volume; (26)returnAvg_TT_we, Avg_TT_ew, Avg_TT_sn, A v g _ T T _ n s, AvgSpeed, Volume.


## 3.1. Materials

### 3.1.1. GPS Trajectory

Taxis can be considered as ubiquitous mobile sensors constantly probing a city’s rhythm and pulse. Being inherent characteristic, GPS-based taxies have proven to be an extremely useful data source for uncovering the underlying traffic behaviour. So far, the taxi GPS data have been used for urban computing, detecting hot spots, map reconstruction, finding routes, and so on [2, 19].The GPS records of a large number of taxis in a city are routinely saved to a log fileL, resulting in a very large data set L=p11,p12,…,p1n;…;pi1,pi2,…,pin;…. Fields for each GPS record generally contains TaxiID, Location (Longitude, Latitude), Speed, Event, GPS_state, Bearing, and 6 commonly used timing units: YYYY-MM-DD HH:MM:SS. Figure 1 shows an example of GPS log and trajectories. A trajectory T is a time series of GPS points with the time interval between any consecutive GPS points not exceeding a certain threshold △t (usually △t≥1min), i.e., Ti:pi1→pi2→pi3→⋯→pin.Figure 1
An example of GPS log and GPS trajectories.


### 3.1.2. Map-Matching

Map-matching is the process of aligning a sequence of observed GPS positions with the road network on a digital map [20]. As a preprocessing step of MapLSTM, map-matching can effectively improve the existing huge amount of low-sampling-rate GPS trajectories in data set.As shown in Figure2, map-matching can be performed with the same or different time interval as the GPS points. The GPS points without map-matching can only be mapped to the road network. Not all GPS points can be mapped to their corresponding segments due to the GPS positioning error. But after map-matching, all GPS points can be corrected to the corresponding road segments.Figure 2
Map-matching when before and after.


### 3.1.3. LSTM

LSTM [10] is a time recurrent neural network, which is the most widely used method to process and predict events with relatively long intervals in time series. LSTM can learn about long-term reliant information by input gate I, output gate O, and forget gate F, where, I determines how much of the network input at the current time xt is saved to the cell state ct. O determines how much of the control unit state ct is output to the current output value ht of LSTM. F determines how much of the cell state from the previous time ct-1 remains to the current time ct. In short, the input X at different time determines the cell state C at the corresponding time and the current cell state ct will be affected by the previous cell ct-1.The calculation of each element of LSTM is shown in Algorithm1. At the current time t, ft denotes forget gate, it represents input gate obtained by the previous output ht-1 and the current input xt, Ct denotes the cell state and C~t denotes the cell state at the previous time, ot denotes the output gate, and ht denotes the cell output. LSTM can not only save information long ago under the control of F but also avoid the current irrelevant content into memory based the gate I.Algorithm 1:For calculating each element of LSTM.
Input: The network’s input in current time xt; the initial weight matrix W, and bias units b about gates I, O, F; Output: The forget gate, input gate, cell state in different time, output gate and the cell output. (1) ft=σ(Wf⋅ht-1,xt+bf); (2)  #: σrepresent Sigmoid function. (3) it=σ(Wi⋅ht-1,xt+bi); (4) C~t=tanh(WC⋅ht-1,xt+bC); (5) Ct=ft∗Ct-1+it∗C~t; (6) ot=σ(Wo⋅ht-1,xt+bo); (7) ht=ot∗tanh(Ct); (8) returnft, it, C~t, Ct, ot, ht.


## 3.1.1. GPS Trajectory

Taxis can be considered as ubiquitous mobile sensors constantly probing a city’s rhythm and pulse. Being inherent characteristic, GPS-based taxies have proven to be an extremely useful data source for uncovering the underlying traffic behaviour. So far, the taxi GPS data have been used for urban computing, detecting hot spots, map reconstruction, finding routes, and so on [2, 19].The GPS records of a large number of taxis in a city are routinely saved to a log fileL, resulting in a very large data set L=p11,p12,…,p1n;…;pi1,pi2,…,pin;…. Fields for each GPS record generally contains TaxiID, Location (Longitude, Latitude), Speed, Event, GPS_state, Bearing, and 6 commonly used timing units: YYYY-MM-DD HH:MM:SS. Figure 1 shows an example of GPS log and trajectories. A trajectory T is a time series of GPS points with the time interval between any consecutive GPS points not exceeding a certain threshold △t (usually △t≥1min), i.e., Ti:pi1→pi2→pi3→⋯→pin.Figure 1
An example of GPS log and GPS trajectories.


## 3.1.2. Map-Matching

Map-matching is the process of aligning a sequence of observed GPS positions with the road network on a digital map [20]. As a preprocessing step of MapLSTM, map-matching can effectively improve the existing huge amount of low-sampling-rate GPS trajectories in data set.As shown in Figure2, map-matching can be performed with the same or different time interval as the GPS points. The GPS points without map-matching can only be mapped to the road network. Not all GPS points can be mapped to their corresponding segments due to the GPS positioning error. But after map-matching, all GPS points can be corrected to the corresponding road segments.Figure 2
Map-matching when before and after.


## 3.1.3. LSTM

LSTM [10] is a time recurrent neural network, which is the most widely used method to process and predict events with relatively long intervals in time series. LSTM can learn about long-term reliant information by input gate I, output gate O, and forget gate F, where, I determines how much of the network input at the current time xt is saved to the cell state ct. O determines how much of the control unit state ct is output to the current output value ht of LSTM. F determines how much of the cell state from the previous time ct-1 remains to the current time ct. In short, the input X at different time determines the cell state C at the corresponding time and the current cell state ct will be affected by the previous cell ct-1.The calculation of each element of LSTM is shown in Algorithm1. At the current time t, ft denotes forget gate, it represents input gate obtained by the previous output ht-1 and the current input xt, Ct denotes the cell state and C~t denotes the cell state at the previous time, ot denotes the output gate, and ht denotes the cell output. LSTM can not only save information long ago under the control of F but also avoid the current irrelevant content into memory based the gate I.Algorithm 1:For calculating each element of LSTM.
Input: The network’s input in current time xt; the initial weight matrix W, and bias units b about gates I, O, F; Output: The forget gate, input gate, cell state in different time, output gate and the cell output. (1) ft=σ(Wf⋅ht-1,xt+bf); (2)  #: σrepresent Sigmoid function. (3) it=σ(Wi⋅ht-1,xt+bi); (4) C~t=tanh(WC⋅ht-1,xt+bC); (5) Ct=ft∗Ct-1+it∗C~t; (6) ot=σ(Wo⋅ht-1,xt+bo); (7) ht=ot∗tanh(Ct); (8) returnft, it, C~t, Ct, ot, ht.


## 3.2. MapLSTM

MapLSTM is fine-grained and lightweight way. It only requires sampled GPS points of vehicles and not need to deploy expensive traffic sensors in urban and not use the unobtainable data from ground loop. In this section, we describe MapLSTM in detail.


### 3.2.1. Framework

Figure3 shows the framework of MapLSTM, which consists of three processes: map-matching, data processing and LSTM predicting.Figure 3
MapLSTM framework for traffic prediction. It consists of three processes: Map-matching, data processing and LSTM predicting.(a) Map-Matching. A large number of sampled GPS points stored in GPS log need to be matched to road segments. In order to facilitate the operation, it is necessary to manually redivide road segments based on the road network before matching. Generally, the division is based on the intersection, or no redivision, just based on the inherent segments structure in road network, if the calculation resources and road segments information are sufficient and detailed. We do our best to maintain the original topography relationship between the divided road segments. After map-matching, all GPS points can be shifted to the corresponding road segments.(b) Data Processing. The road segments experienced map-matching also mean the information has been extended, where the road segments and vehicle information are paired off according to their ID and location. Therefore, we can have information statistics including vehicle speed, traverse time, and traffic volume taking one road segment as a unit (i.e., segment-based). The traverse time can be counted in different directions: from west to east, from east to west, from north to south, and from south to north. The processed data are sent to prediction model LSTM as the training set and testing set.(c) LSTM Predicting. The traffic data of vehicle speed, the traverse time, and traffic volume based road segments are input to LSTM concurrently for predicting task. The hidden layers of LSTM can control the long-term or short-term impact on the current state. After output layer of LSTM, it goes through a full connected network with three layers, in which the purpose is to better explore the implied relationships between states.MapLSTM enables cognition of road segment-based traffic conditions in a lightweight way. For the real-time cognition of global situations, MapLSTM is still valid by collaboration computing where a groups of cells work together to accomplish a relatively large task. Edge computing after cloud computing is a typical collaborative computing environment and has been widely used [21, 22].


### 3.2.2. Map-Matching Algorithm

Before map-matching, it is necessary to have a information understanding about roads and vehicles. Table1 describes an example with a sample of the information. All the information about roads and vehicles can be correlated based the auxiliary information (ID, longitude and latitude).Table 1
An example with a sample of the main information about road and vehicle.
Name The Main Fields  Road ID MapID PathName Pathclass Oneway Width Length Direction Meters 59565200918 595652 Xing Fu Xi Jie 4 F 30 0.284 2 3.68  Vehicle ID Bearing Speed State Longitude Latitude Event Time Positioning 6409 84 46 1 3973633 11633100 1 20160916182046 GPS/BeiDou/MixST-Matching [20] is a pathway with candidate computation and spatio-temporal analysis for low-sampling-rate GPS trajectories. We follow ST-Matching analysis architecture and make a map-matching work on a real digital map in Beijing. As described in Algorithm 2, for the available historical trajectories, GPS sampling points in the trajectories are traversed to get the candidate point set which waiting to be corrected. For all candidate points, the spatial value can be reached by combining with the information of road network, longitude, latitude, and distance, and the temporal value can be reached by adding the time information. After spatial analysis and temporal analysis, matching results can be accomplished.Algorithm 2:Map-matching algorithm.
Input: Beijing Road network R, Coordinate axis A, Trajectories T, where, T=t1,t2,t3,…,tn, t i = p i 1 → p i 2 → p i 3 → ⋯ → p i n, p i j is a GPS sampling point, i,j∈1,n; Output: The one-to-one results of road segments and vehicles information: MT′. (1)  Initialize CPset=0; (2)  Repeat i=1,2,3,…,n; (3)  For j=1 to n (4) Si,j=GetCandidatePoints(pj,R) (5) CPset.add(Si,j) (6)  End for; (7) k=1; (8)  While k≤CPset do (9) Vs=GetSpaVal(R,A,CPset(k),dist(p,CPsetp)) (10) Vt=GetTemVal(R,A,Speed,time(pi,j,pi,j+1)) (11) MT=MatchSeq(Vs,Vt) (12) k+=1 (13)  End while; (14)  Visualized MT⇢MT′; (15) returnMT′.After map-matching, roads information where the vehicles are located can be easily obtained, and the traffic data about the roads can also be clearly gained after statistics in turn.


### 3.2.3. Training Data Generating

The raw trajectory data cannot be used directly for our predicting task. It is necessary to match and statistics at first. If we want to get the traffic status prediction of road segments, we need to make a segment-based statistics about the traverse time in different directions, the vehicle speed and the traffic volume.The data of traverse time in different directions, the average vehicle speed and traffic volume of road segments can be generated by Algorithm3. When map-matching is done, more fine-grained data can also be obtained such as the average speed and traffic volume under different directions of road segments. The data after map-matching and statistics can be used, which also mean that the training data and the testing data of prediction network are generated.Algorithm 3:To generated the segment-based traffic data.
Input: Road Log Rl, GPS Log Vl, Output: The traffic data about the road segments. (1)Initialize TT_we, TT_ew, TT_sn, TT_ns, Speed, C o u n t _ w e, Count_ew, Count_ns,Count_sn; (2)GetVehicleColumns(ID, Time, V_Speed, V_lon, V_lat); (3)GetRoadColumns(RoadID, R_lon, R_lat); (4)Repeat RoadID; (5)Flag=0; (6)For i=StartTime to EndTime (7)if (8)ti, V_lon<Rw_lon; V_lat<Rn_lat (9)ti+1, V_lon≥Rw_lon; V_lat≥Rn_lat (10)tn+i, V_lon<Re_lon; V_lat<Rs_lat (11)tn+i+1, V_lon≥Re_lon; V_lat≥Rs_lat (12)then (13)Flag=1 (14)Count_we+=1; (15)Count_ns+=1 (16)TT_we+=tn+i+1-ti+1; (17)TT_ns+=tn+i+1-ti+1 (18)Imitate GetCountData(Count_ew, Count_sn); (19)Imitate GetTTData(TT_ew, TT_sn); (20)if Flag=1 then Speed+=V_Speed; (21)End for; (22)Avg_TT_we=TT_we/Count_we; (23) Imitate GetData(Avg_TT_ew, Avg_TT_sn, A v g _ T T _ n s); (24)Volume=∑p,q{w,e,n,s}Count_pq; (25)AvgSpeed=Speed/Volume; (26)returnAvg_TT_we, Avg_TT_ew, Avg_TT_sn, A v g _ T T _ n s, AvgSpeed, Volume.


## 3.2.1. Framework

Figure3 shows the framework of MapLSTM, which consists of three processes: map-matching, data processing and LSTM predicting.Figure 3
MapLSTM framework for traffic prediction. It consists of three processes: Map-matching, data processing and LSTM predicting.(a) Map-Matching. A large number of sampled GPS points stored in GPS log need to be matched to road segments. In order to facilitate the operation, it is necessary to manually redivide road segments based on the road network before matching. Generally, the division is based on the intersection, or no redivision, just based on the inherent segments structure in road network, if the calculation resources and road segments information are sufficient and detailed. We do our best to maintain the original topography relationship between the divided road segments. After map-matching, all GPS points can be shifted to the corresponding road segments.(b) Data Processing. The road segments experienced map-matching also mean the information has been extended, where the road segments and vehicle information are paired off according to their ID and location. Therefore, we can have information statistics including vehicle speed, traverse time, and traffic volume taking one road segment as a unit (i.e., segment-based). The traverse time can be counted in different directions: from west to east, from east to west, from north to south, and from south to north. The processed data are sent to prediction model LSTM as the training set and testing set.(c) LSTM Predicting. The traffic data of vehicle speed, the traverse time, and traffic volume based road segments are input to LSTM concurrently for predicting task. The hidden layers of LSTM can control the long-term or short-term impact on the current state. After output layer of LSTM, it goes through a full connected network with three layers, in which the purpose is to better explore the implied relationships between states.MapLSTM enables cognition of road segment-based traffic conditions in a lightweight way. For the real-time cognition of global situations, MapLSTM is still valid by collaboration computing where a groups of cells work together to accomplish a relatively large task. Edge computing after cloud computing is a typical collaborative computing environment and has been widely used [21, 22].


## 3.2.2. Map-Matching Algorithm

Before map-matching, it is necessary to have a information understanding about roads and vehicles. Table1 describes an example with a sample of the information. All the information about roads and vehicles can be correlated based the auxiliary information (ID, longitude and latitude).Table 1
An example with a sample of the main information about road and vehicle.
Name The Main Fields  Road ID MapID PathName Pathclass Oneway Width Length Direction Meters 59565200918 595652 Xing Fu Xi Jie 4 F 30 0.284 2 3.68  Vehicle ID Bearing Speed State Longitude Latitude Event Time Positioning 6409 84 46 1 3973633 11633100 1 20160916182046 GPS/BeiDou/MixST-Matching [20] is a pathway with candidate computation and spatio-temporal analysis for low-sampling-rate GPS trajectories. We follow ST-Matching analysis architecture and make a map-matching work on a real digital map in Beijing. As described in Algorithm 2, for the available historical trajectories, GPS sampling points in the trajectories are traversed to get the candidate point set which waiting to be corrected. For all candidate points, the spatial value can be reached by combining with the information of road network, longitude, latitude, and distance, and the temporal value can be reached by adding the time information. After spatial analysis and temporal analysis, matching results can be accomplished.Algorithm 2:Map-matching algorithm.
Input: Beijing Road network R, Coordinate axis A, Trajectories T, where, T=t1,t2,t3,…,tn, t i = p i 1 → p i 2 → p i 3 → ⋯ → p i n, p i j is a GPS sampling point, i,j∈1,n; Output: The one-to-one results of road segments and vehicles information: MT′. (1)  Initialize CPset=0; (2)  Repeat i=1,2,3,…,n; (3)  For j=1 to n (4) Si,j=GetCandidatePoints(pj,R) (5) CPset.add(Si,j) (6)  End for; (7) k=1; (8)  While k≤CPset do (9) Vs=GetSpaVal(R,A,CPset(k),dist(p,CPsetp)) (10) Vt=GetTemVal(R,A,Speed,time(pi,j,pi,j+1)) (11) MT=MatchSeq(Vs,Vt) (12) k+=1 (13)  End while; (14)  Visualized MT⇢MT′; (15) returnMT′.After map-matching, roads information where the vehicles are located can be easily obtained, and the traffic data about the roads can also be clearly gained after statistics in turn.


## 3.2.3. Training Data Generating

The raw trajectory data cannot be used directly for our predicting task. It is necessary to match and statistics at first. If we want to get the traffic status prediction of road segments, we need to make a segment-based statistics about the traverse time in different directions, the vehicle speed and the traffic volume.The data of traverse time in different directions, the average vehicle speed and traffic volume of road segments can be generated by Algorithm3. When map-matching is done, more fine-grained data can also be obtained such as the average speed and traffic volume under different directions of road segments. The data after map-matching and statistics can be used, which also mean that the training data and the testing data of prediction network are generated.Algorithm 3:To generated the segment-based traffic data.
Input: Road Log Rl, GPS Log Vl, Output: The traffic data about the road segments. (1)Initialize TT_we, TT_ew, TT_sn, TT_ns, Speed, C o u n t _ w e, Count_ew, Count_ns,Count_sn; (2)GetVehicleColumns(ID, Time, V_Speed, V_lon, V_lat); (3)GetRoadColumns(RoadID, R_lon, R_lat); (4)Repeat RoadID; (5)Flag=0; (6)For i=StartTime to EndTime (7)if (8)ti, V_lon<Rw_lon; V_lat<Rn_lat (9)ti+1, V_lon≥Rw_lon; V_lat≥Rn_lat (10)tn+i, V_lon<Re_lon; V_lat<Rs_lat (11)tn+i+1, V_lon≥Re_lon; V_lat≥Rs_lat (12)then (13)Flag=1 (14)Count_we+=1; (15)Count_ns+=1 (16)TT_we+=tn+i+1-ti+1; (17)TT_ns+=tn+i+1-ti+1 (18)Imitate GetCountData(Count_ew, Count_sn); (19)Imitate GetTTData(TT_ew, TT_sn); (20)if Flag=1 then Speed+=V_Speed; (21)End for; (22)Avg_TT_we=TT_we/Count_we; (23) Imitate GetData(Avg_TT_ew, Avg_TT_sn, A v g _ T T _ n s); (24)Volume=∑p,q{w,e,n,s}Count_pq; (25)AvgSpeed=Speed/Volume; (26)returnAvg_TT_we, Avg_TT_ew, Avg_TT_sn, A v g _ T T _ n s, AvgSpeed, Volume.


## 4. Experiment

We compare the following experiments to verify the performance of MapLSTM.(1) Gaussian Process Regression (GPR) [1]. It is one of the most popular used prediction algorithms and often used to compare performance as a baseline.(2) ConvLSTM [12]. It extends LSTM to have convolutional structures in both the input-to-state and state-to-state transitions, and captures spatiotemporal correlations better.(3) ConvLSTM+. It is ConvLSTM increased epoch numbers.


### 4.1. Datasets

A large scale of real taxi trajectory data are used in our predicting task. The data package of GPS log includes over 400,000 taxicabs’ trajectories in November 2012, Beijing. And full-scale entries are contained during 24 hours for each day. We use data between 8:00~ 20:00 in weekdays as the traffic pattern can be learned better in the daytime. We can get dataset 22×13×30 when the time interval is 2 minutes.There are too many segments in road networkR, so we manually redivide the road segments based R to verify the feasibility of MapLSTM. The road segments after redivision is stored to set Rss. Figure 4 depicts the traffic data of Rss on November 1, 2012 at 8 o’clock, including the traverse time in different directions TTW↔E, TTN↔S, the average vehicle speed, and the traffic volume.Figure 4
Traffic data about road segments at 8:00 on November 1, 2012.


### 4.2. Training

In MapLSTM, the obtained dataset is divided into training set and test set in an8:2 ratio. The prediction model has batch_size=20, lr_decay=0.93, hidden_size=250, and num_steps=6 (the size of window, that means using data from the previous 6 time units to predict the next one). The sizes of the three full connection layers are 180×150, 250×180, and 250×250, which is related to the total number of road segments.ConvLSTM has the same dataset as MapLSTM, and the model hasinput=21∗21, batch_size=8, num_steps=6, kernel=5∗5, filters=10, and max_epoch=70. ConvLSTM+ is iterated 20 times more than ConvLSTM.


### 4.3. Performance Evaluation

Mean absolute error (MAE) is the most commonly used criteria in predictive algorithms and is employed to evaluate the proposed MapLSTM.(1)MAE=1N∑i=1Nfi-yiwhere fi is the predicted value and yi is the observed value. The smaller the MAE, the stronger the predictable ability of algorithms.As shown in Table2, whether it is the MAE of vehicle speed, traffic count, or travel time in different direction TT_WE (from west to east), TT_EW (from east to west), TT_SN (from south to north), and TT_NS (from north to south), MapLSTM is smaller than GPR and ConvLSTM. For a certain algorithm, the closer the value of “Train” and “Test” of each parameter is, the more robust it is. The results of ConvLSTM are similar to MapLSTM but do not exceed MapLSTM. That is because ConvLSTM with the ability to capture spatiotemporal correlations is good at predicting relatively single spatial pattern, but the spatial patterns of road traffic are complex. In the future, we will focus on complex spatial correlations in traffic environment. Compared to ConvLSTM, some parameters of ConvLSTM+ are slightly better because ConvLSTM+ increased the number of epoch.Table 2
MAEs comparison of GPR, ConvLSTM, and MapLSTM.
Algorithms Speed Count TT_WE TT_EW TT_SN TT_NS  GPR 70.79 46.43 66.81 70.7 63.2 66.08  ConvLSTM Train 18.78 7.18 18.75 18.27 17.77 19.01 Test 19.27 7.32 18.71 18.11 18.14 19.29  ConvLSTM+ Train 19.44 7.13 18.75 18.59 17.82 19.46 Test 18.91 6.89 18.71 17.96 17.85 18.93  MapLSTM Train 18.33 5.59 16.42 16.5 16.94 18.62 Test 18.53 7.05 16.91 17.21 17 18.57It is important to note that MAE is affected by the accuracy of the raw data and it will decline if the dataset is large enough.


### 4.4. Applications

#### 4.4.1. Cognizing Driving Preference

Different drivers have different preferences about different types of roads, and they also have different impulse to reroute roads due to their different tolerance about the cost expectations of current congestion. For example, the drivers with low tolerance may choose a highway bypass which have a lower congestion cost expectations but have more traffic lights. Tolerance of drivers changes dynamically with various spatial-temporal conditions such as travel distance, congestion time, and arrival time. Therefore, a large deviation between the traffic optimization results and the actual expectation of drivers will lead to failure of traffic scheduling. Quite a few drivers choose a looked like shortest road, only to find the route is congested by many vehicles whose drivers make a similar decision.The traditional route planning methods are more inclined to train drivers’ basic selection tendency and do not have personalized features. The participants in these methods are considered the rational contenders perfectly. The planned result is the purely rational optimal solution and does not express the noncomplete rational decision-making preference for drivers in the actual routing decisions. Although the questionnaire may be a handy pathway for cognizing driving preferences, it lacks efficiency and comprehensiveness.The premise of learning driving preferences is to obtain an understanding about the roads conditions. The more we aware of road properties, the more satisfied we cognise the personalized preferences. MapLSTM can have a fine-grained cognition of road traffic conditions, so we can learn the driving preferences easily. For drivers of vehicles, there are two preferences getting the most attention: time and distance. Figure5 shows the traffic information about the travel time, distance, vehicle density, and speed of each road segments in Rss where the vehicle is driving from place A to place B. In order to compare the preference in driving, the full driving routes based different driving preferences including average speed, vehicle count, distance and travel time are shown in Figure 6.Figure 5
Segment-based traffic information at a certain time.Figure 6
Routes with different driving preferences from A to B.


#### 4.4.2. Learning Navigation

Navigating vehicles to their destination is an important service for ITS. In addition to using historical and real-time traffic conditions, the state-of-the-art systems take into account the impact on the future traffic conditions which can be obtained by predicting. For example, the method in [23] has the ability of learning experience-based autonomous navigation based the global traffic dynamic, and the method in [1] is another dynamic planning scheme based on situation awareness where the city sensors are deployed to maintain an up-to-date view of the city’s current traffic state.As mentioned above, the existing methods are still laborious for lightweight, fine-grained, and accurate prediction. So we propose MapLSTM to predict traffic conditions effectively. We analyze and compare the use about the predicted traffic conditions in navigation planning, as in Table3, the lower the computing complexity, the lighter the planning algorithm; the higher the navigation accuracy, the better the navigation performance; perdurability represents the sustainability of a transportation system; the higher the perdurability, the more sustainable the transportation system.Table 3
Applications and comparisons about the predicted traffic conditions in navigation planning.
Literature Raw data source Object-based Pathway Core algorithm Complexity Accuracy Save time Perdurability  [1] smart sensors city self-aware Gaussian Process Regression middle middle middle low [23] GPS points region autonomous Value Iteration Network middle middle high middle [24] street-view images intersection autonomous CNN+RL+A⋆ high middle high low [25] GPS points region agents Ant Colony+RL middle middle middle middle [26] vehicles sharing city RIS statistics low low middle low


#### 4.4.3. Inferring Traffic Emissions

In the COPERT model [28], hot emissions are one of the key essentials about traffic emissions. Hot emissions occur when the engine of vehicle is at its normal mode. Hot emission factor EF, the amount of pollutant a single vehicle emits per kilometer (g/km), is calculated as a function of travel speed v(km/h) [29]. (2)EF=a+cv+ev21+bv+dv2where, a, b, c, d, e are the pollution emission parameters of COPERT model, these values are given in [29] to calumniate different kinds of emissions and gas consumption: CO, Hydrocarbon, Nox, Fuel Consumption (FC).As in Figure7, we infer different kinds of traffic emissions and gas consumption of 126th road segment at 10:00 in the next five days, the average of CO is about 0.5, Hydrocarbon is 0.04, Nox is 0.09, FC is 4.24, CO2 is 4.29, and PM2.5 is 0.007. As for other pollutants like CO2 and PM2.5, their emission factors are proportional to FC. (3)EFco2=3.18∗EFFCEFPM2.5=3∗10-5∗EFFCFigure 7
Interring traffic emissions of 126th road segment.


#### 4.4.4. Other Applications

Table4 compares the applications about traffic prediction in recent two years. It can be seen from Table 4 that the traffic prediction methods is more inclined to use machine learning and deep learning algorithm to achieve more accurate and larger regional prediction; the advance cannot be separated from the rapid development of machine learning and deep learning in recent years.Table 4
Applications and comparisons about the traffic prediction.
Year Literature Basic data source Target Term Core algorithm Complexity Granularity Object-based  2018 [18] web camera traffic density short Convolutional neural network high fine-grained intersection [27] an open dataset traffic flow long/short Generative adversarial network high coarse-grained freeway  2017 [17] web camera traffic density short Fully convolutional networks high fine-grained restricted area [15] an experimental car vehicle speed short Auto-regressive model middle fine-grained road segment [14] floating car vehicle speed short HMMs+SUMO middle coarse-grained motorway [13] Loop Detector traffic volume short ST semi-supervised learning low fine-grained road segment [1] traffic loops traffic flow long Gaussian process regression low coarse-grained region


## 4.1. Datasets

A large scale of real taxi trajectory data are used in our predicting task. The data package of GPS log includes over 400,000 taxicabs’ trajectories in November 2012, Beijing. And full-scale entries are contained during 24 hours for each day. We use data between 8:00~ 20:00 in weekdays as the traffic pattern can be learned better in the daytime. We can get dataset 22×13×30 when the time interval is 2 minutes.There are too many segments in road networkR, so we manually redivide the road segments based R to verify the feasibility of MapLSTM. The road segments after redivision is stored to set Rss. Figure 4 depicts the traffic data of Rss on November 1, 2012 at 8 o’clock, including the traverse time in different directions TTW↔E, TTN↔S, the average vehicle speed, and the traffic volume.Figure 4
Traffic data about road segments at 8:00 on November 1, 2012.


## 4.2. Training

In MapLSTM, the obtained dataset is divided into training set and test set in an8:2 ratio. The prediction model has batch_size=20, lr_decay=0.93, hidden_size=250, and num_steps=6 (the size of window, that means using data from the previous 6 time units to predict the next one). The sizes of the three full connection layers are 180×150, 250×180, and 250×250, which is related to the total number of road segments.ConvLSTM has the same dataset as MapLSTM, and the model hasinput=21∗21, batch_size=8, num_steps=6, kernel=5∗5, filters=10, and max_epoch=70. ConvLSTM+ is iterated 20 times more than ConvLSTM.


## 4.3. Performance Evaluation

Mean absolute error (MAE) is the most commonly used criteria in predictive algorithms and is employed to evaluate the proposed MapLSTM.(1)MAE=1N∑i=1Nfi-yiwhere fi is the predicted value and yi is the observed value. The smaller the MAE, the stronger the predictable ability of algorithms.As shown in Table2, whether it is the MAE of vehicle speed, traffic count, or travel time in different direction TT_WE (from west to east), TT_EW (from east to west), TT_SN (from south to north), and TT_NS (from north to south), MapLSTM is smaller than GPR and ConvLSTM. For a certain algorithm, the closer the value of “Train” and “Test” of each parameter is, the more robust it is. The results of ConvLSTM are similar to MapLSTM but do not exceed MapLSTM. That is because ConvLSTM with the ability to capture spatiotemporal correlations is good at predicting relatively single spatial pattern, but the spatial patterns of road traffic are complex. In the future, we will focus on complex spatial correlations in traffic environment. Compared to ConvLSTM, some parameters of ConvLSTM+ are slightly better because ConvLSTM+ increased the number of epoch.Table 2
MAEs comparison of GPR, ConvLSTM, and MapLSTM.
Algorithms Speed Count TT_WE TT_EW TT_SN TT_NS  GPR 70.79 46.43 66.81 70.7 63.2 66.08  ConvLSTM Train 18.78 7.18 18.75 18.27 17.77 19.01 Test 19.27 7.32 18.71 18.11 18.14 19.29  ConvLSTM+ Train 19.44 7.13 18.75 18.59 17.82 19.46 Test 18.91 6.89 18.71 17.96 17.85 18.93  MapLSTM Train 18.33 5.59 16.42 16.5 16.94 18.62 Test 18.53 7.05 16.91 17.21 17 18.57It is important to note that MAE is affected by the accuracy of the raw data and it will decline if the dataset is large enough.


## 4.4. Applications

### 4.4.1. Cognizing Driving Preference

Different drivers have different preferences about different types of roads, and they also have different impulse to reroute roads due to their different tolerance about the cost expectations of current congestion. For example, the drivers with low tolerance may choose a highway bypass which have a lower congestion cost expectations but have more traffic lights. Tolerance of drivers changes dynamically with various spatial-temporal conditions such as travel distance, congestion time, and arrival time. Therefore, a large deviation between the traffic optimization results and the actual expectation of drivers will lead to failure of traffic scheduling. Quite a few drivers choose a looked like shortest road, only to find the route is congested by many vehicles whose drivers make a similar decision.The traditional route planning methods are more inclined to train drivers’ basic selection tendency and do not have personalized features. The participants in these methods are considered the rational contenders perfectly. The planned result is the purely rational optimal solution and does not express the noncomplete rational decision-making preference for drivers in the actual routing decisions. Although the questionnaire may be a handy pathway for cognizing driving preferences, it lacks efficiency and comprehensiveness.The premise of learning driving preferences is to obtain an understanding about the roads conditions. The more we aware of road properties, the more satisfied we cognise the personalized preferences. MapLSTM can have a fine-grained cognition of road traffic conditions, so we can learn the driving preferences easily. For drivers of vehicles, there are two preferences getting the most attention: time and distance. Figure5 shows the traffic information about the travel time, distance, vehicle density, and speed of each road segments in Rss where the vehicle is driving from place A to place B. In order to compare the preference in driving, the full driving routes based different driving preferences including average speed, vehicle count, distance and travel time are shown in Figure 6.Figure 5
Segment-based traffic information at a certain time.Figure 6
Routes with different driving preferences from A to B.


### 4.4.2. Learning Navigation

Navigating vehicles to their destination is an important service for ITS. In addition to using historical and real-time traffic conditions, the state-of-the-art systems take into account the impact on the future traffic conditions which can be obtained by predicting. For example, the method in [23] has the ability of learning experience-based autonomous navigation based the global traffic dynamic, and the method in [1] is another dynamic planning scheme based on situation awareness where the city sensors are deployed to maintain an up-to-date view of the city’s current traffic state.As mentioned above, the existing methods are still laborious for lightweight, fine-grained, and accurate prediction. So we propose MapLSTM to predict traffic conditions effectively. We analyze and compare the use about the predicted traffic conditions in navigation planning, as in Table3, the lower the computing complexity, the lighter the planning algorithm; the higher the navigation accuracy, the better the navigation performance; perdurability represents the sustainability of a transportation system; the higher the perdurability, the more sustainable the transportation system.Table 3
Applications and comparisons about the predicted traffic conditions in navigation planning.
Literature Raw data source Object-based Pathway Core algorithm Complexity Accuracy Save time Perdurability  [1] smart sensors city self-aware Gaussian Process Regression middle middle middle low [23] GPS points region autonomous Value Iteration Network middle middle high middle [24] street-view images intersection autonomous CNN+RL+A⋆ high middle high low [25] GPS points region agents Ant Colony+RL middle middle middle middle [26] vehicles sharing city RIS statistics low low middle low


### 4.4.3. Inferring Traffic Emissions

In the COPERT model [28], hot emissions are one of the key essentials about traffic emissions. Hot emissions occur when the engine of vehicle is at its normal mode. Hot emission factor EF, the amount of pollutant a single vehicle emits per kilometer (g/km), is calculated as a function of travel speed v(km/h) [29]. (2)EF=a+cv+ev21+bv+dv2where, a, b, c, d, e are the pollution emission parameters of COPERT model, these values are given in [29] to calumniate different kinds of emissions and gas consumption: CO, Hydrocarbon, Nox, Fuel Consumption (FC).As in Figure7, we infer different kinds of traffic emissions and gas consumption of 126th road segment at 10:00 in the next five days, the average of CO is about 0.5, Hydrocarbon is 0.04, Nox is 0.09, FC is 4.24, CO2 is 4.29, and PM2.5 is 0.007. As for other pollutants like CO2 and PM2.5, their emission factors are proportional to FC. (3)EFco2=3.18∗EFFCEFPM2.5=3∗10-5∗EFFCFigure 7
Interring traffic emissions of 126th road segment.


### 4.4.4. Other Applications

Table4 compares the applications about traffic prediction in recent two years. It can be seen from Table 4 that the traffic prediction methods is more inclined to use machine learning and deep learning algorithm to achieve more accurate and larger regional prediction; the advance cannot be separated from the rapid development of machine learning and deep learning in recent years.Table 4
Applications and comparisons about the traffic prediction.
Year Literature Basic data source Target Term Core algorithm Complexity Granularity Object-based  2018 [18] web camera traffic density short Convolutional neural network high fine-grained intersection [27] an open dataset traffic flow long/short Generative adversarial network high coarse-grained freeway  2017 [17] web camera traffic density short Fully convolutional networks high fine-grained restricted area [15] an experimental car vehicle speed short Auto-regressive model middle fine-grained road segment [14] floating car vehicle speed short HMMs+SUMO middle coarse-grained motorway [13] Loop Detector traffic volume short ST semi-supervised learning low fine-grained road segment [1] traffic loops traffic flow long Gaussian process regression low coarse-grained region


## 4.4.1. Cognizing Driving Preference

Different drivers have different preferences about different types of roads, and they also have different impulse to reroute roads due to their different tolerance about the cost expectations of current congestion. For example, the drivers with low tolerance may choose a highway bypass which have a lower congestion cost expectations but have more traffic lights. Tolerance of drivers changes dynamically with various spatial-temporal conditions such as travel distance, congestion time, and arrival time. Therefore, a large deviation between the traffic optimization results and the actual expectation of drivers will lead to failure of traffic scheduling. Quite a few drivers choose a looked like shortest road, only to find the route is congested by many vehicles whose drivers make a similar decision.The traditional route planning methods are more inclined to train drivers’ basic selection tendency and do not have personalized features. The participants in these methods are considered the rational contenders perfectly. The planned result is the purely rational optimal solution and does not express the noncomplete rational decision-making preference for drivers in the actual routing decisions. Although the questionnaire may be a handy pathway for cognizing driving preferences, it lacks efficiency and comprehensiveness.The premise of learning driving preferences is to obtain an understanding about the roads conditions. The more we aware of road properties, the more satisfied we cognise the personalized preferences. MapLSTM can have a fine-grained cognition of road traffic conditions, so we can learn the driving preferences easily. For drivers of vehicles, there are two preferences getting the most attention: time and distance. Figure5 shows the traffic information about the travel time, distance, vehicle density, and speed of each road segments in Rss where the vehicle is driving from place A to place B. In order to compare the preference in driving, the full driving routes based different driving preferences including average speed, vehicle count, distance and travel time are shown in Figure 6.Figure 5
Segment-based traffic information at a certain time.Figure 6
Routes with different driving preferences from A to B.


## 4.4.2. Learning Navigation

Navigating vehicles to their destination is an important service for ITS. In addition to using historical and real-time traffic conditions, the state-of-the-art systems take into account the impact on the future traffic conditions which can be obtained by predicting. For example, the method in [23] has the ability of learning experience-based autonomous navigation based the global traffic dynamic, and the method in [1] is another dynamic planning scheme based on situation awareness where the city sensors are deployed to maintain an up-to-date view of the city’s current traffic state.As mentioned above, the existing methods are still laborious for lightweight, fine-grained, and accurate prediction. So we propose MapLSTM to predict traffic conditions effectively. We analyze and compare the use about the predicted traffic conditions in navigation planning, as in Table3, the lower the computing complexity, the lighter the planning algorithm; the higher the navigation accuracy, the better the navigation performance; perdurability represents the sustainability of a transportation system; the higher the perdurability, the more sustainable the transportation system.Table 3
Applications and comparisons about the predicted traffic conditions in navigation planning.
Literature Raw data source Object-based Pathway Core algorithm Complexity Accuracy Save time Perdurability  [1] smart sensors city self-aware Gaussian Process Regression middle middle middle low [23] GPS points region autonomous Value Iteration Network middle middle high middle [24] street-view images intersection autonomous CNN+RL+A⋆ high middle high low [25] GPS points region agents Ant Colony+RL middle middle middle middle [26] vehicles sharing city RIS statistics low low middle low


## 4.4.3. Inferring Traffic Emissions

In the COPERT model [28], hot emissions are one of the key essentials about traffic emissions. Hot emissions occur when the engine of vehicle is at its normal mode. Hot emission factor EF, the amount of pollutant a single vehicle emits per kilometer (g/km), is calculated as a function of travel speed v(km/h) [29]. (2)EF=a+cv+ev21+bv+dv2where, a, b, c, d, e are the pollution emission parameters of COPERT model, these values are given in [29] to calumniate different kinds of emissions and gas consumption: CO, Hydrocarbon, Nox, Fuel Consumption (FC).As in Figure7, we infer different kinds of traffic emissions and gas consumption of 126th road segment at 10:00 in the next five days, the average of CO is about 0.5, Hydrocarbon is 0.04, Nox is 0.09, FC is 4.24, CO2 is 4.29, and PM2.5 is 0.007. As for other pollutants like CO2 and PM2.5, their emission factors are proportional to FC. (3)EFco2=3.18∗EFFCEFPM2.5=3∗10-5∗EFFCFigure 7
Interring traffic emissions of 126th road segment.


## 4.4.4. Other Applications

Table4 compares the applications about traffic prediction in recent two years. It can be seen from Table 4 that the traffic prediction methods is more inclined to use machine learning and deep learning algorithm to achieve more accurate and larger regional prediction; the advance cannot be separated from the rapid development of machine learning and deep learning in recent years.Table 4
Applications and comparisons about the traffic prediction.
Year Literature Basic data source Target Term Core algorithm Complexity Granularity Object-based  2018 [18] web camera traffic density short Convolutional neural network high fine-grained intersection [27] an open dataset traffic flow long/short Generative adversarial network high coarse-grained freeway  2017 [17] web camera traffic density short Fully convolutional networks high fine-grained restricted area [15] an experimental car vehicle speed short Auto-regressive model middle fine-grained road segment [14] floating car vehicle speed short HMMs+SUMO middle coarse-grained motorway [13] Loop Detector traffic volume short ST semi-supervised learning low fine-grained road segment [1] traffic loops traffic flow long Gaussian process regression low coarse-grained region


## 5. Conclusions

Urban road traffic system is the lifeblood of a city, which ensures its operation. Predicting traffic conditions for road segments is the prelude of working on intelligent transportation. In this paper, we proposed MapLSTM, a traffic predicting mechanism for road segments, to promote the development of ITS. MapLSTM can accelerate the landing of many applications in a lightweight and fine-grained way. In the future, autonomous humanlike driving based on road topography is worth concern, and we will focus on complex spatial correlations in traffic environment.



---

*Source: 9242598-2019-01-14.xml*