Skip to Content
You are currently on the new version of our website. Access the old version .
Applied SciencesApplied Sciences
  • Article
  • Open Access

2 December 2023

16 Pages

Map Matching Based on Seq2Seq with Topology Information

,
,
,
,
and
1
School of Automation and lnformation Engineering, Sichuan University of Science and Engineering, Yibin 644002, China
2
Sichuan Provincial Engineering Laboratory of Big Data Visual Analysis, Yibin 644002, China
3
Sichuan Key Provincial Research Base of Intelligent Tourism, Yibin 644002, China
4
School of Computer Science and Engineering, Sichuan University of Science and Engineering, Yibin 644002, China

Abstract

Most existing road network matching algorithms are designed based on previous rules and do not fully utilize the potential of big data and historical tracks. To solve this problem, we introduce a new road network matching algorithm based on deep learning and using the topology information of the road network. Taking inspiration from the sequence-to-sequence (seq2seq) model popular in natural language processing, our algorithm builds multiple grid-dependent dictionaries based on the topology of road networks. Then the Byte Pair Encoding (BPE) algorithm is used to compress the grid dictionary, which effectively restricts the output range. A Bidirectional gated loop unit (Bi-GRU) with attention mechanisms is used as a recurrent neural network to capture information from a sequence of trajectory points. The model output feedback obtained by training the road network on Yibin City and the empirical evidence of the comparison in this experiment prove the effectiveness of the algorithm. When juxtaposed with similar algorithms, it shows superior accuracy and faster training speeds in road networks matching different scenarios.

1. Introduction

Road network matching refers to the precise positioning of discrete GPS (Global Positioning System) trajectory points onto an actual traffic road network [1], enabling the accurate depiction of vehicle locations. This process finds extensive applications in areas such as trajectory visualization, navigation implementation, intelligent transportation systems, and path planning.
Numerous scholars both domestically and internationally have put forth a plethora of algorithms for road network matching. For instance, in geometric-based matching algorithms, Bernstein [2] initially proposed the computation of distances between GPS points and each node within the road network, subsequently associating the GPS points with their nearest corresponding nodes. This algorithm is straightforward to implement and computationally efficient. However, its practicality is significantly influenced by the node density in the road network. In light of this limitation, Quddus [3] proposed a weighted topological matching algorithm that incorporates the topological relationship of the road network. This approach assigns weights to trajectory direction, geometric distance, and road relevance to determine the overall weight of each road segment. Subsequently, it selects the road segment with the highest weight as the matching counterpart. Wang Xiaohan [4] and colleagues introduced a method that combines a linear regression model for more accurate identification of changes in road shape at intersections. By referring to the matching situation of multiple subsequent points, the map matching at complex road sections reduced matching errors. Abbour [5] and Nadine [6] proposed the confidence interval matching method, which selected multiple road segments within the confidence region and added them to the candidate road segment. Then, a score operation was performed on each candidate road segment, and the road segment with the highest score was selected as the matching road segment. In the algorithm based on Kalman filtering [7,8,9,10], the road network matching was carried out by considering the characteristics of GPS system errors and analyzing whether the error characteristics of the Kalman filtering model meet the Gaussian white noise distribution. The algorithm based on the HMM (Hidden Markov Model) [11,12,13] model has become a widely used benchmark method due to its applicability in sequence modeling and road network connectivity. Among them, the IVVM [12] algorithm fully considers the topological structure of the road network and the mutual influence between GPS trajectory points. By weighted processing the relationship between these points, the matching accuracy is improved. Yan Shenglong [14] and others improved IVVM and proposed the interactive voting algorithm IIVVM, which fully considers the distance characteristics, topological structure of roads, and a series of road attributes. By filtering noisy road segments through constraint conditions, the matching efficiency is improved.
In recent years, the advancement of artificial intelligence and computer processing capabilities has prompted various fields to explore the potential of big data. In the domain of road network matching, Zhao et al. [15] introduced the DeepMM algorithm, which reevaluates road network matching from a data-centric perspective. This algorithm leverages all trajectory data for joint training and knowledge sharing. It employs a sequence learning model that incorporates embedding techniques and attention mechanisms to conduct road network matching in latent spaces while ensuring stability in noisy environments. Lu Jia-Pin [16] proposed a map matching approach based on ranking learning, wherein the scoring function of candidate roads is learned from known matching outcomes. This method selects the optimal matched road segment by assigning scores to candidate road segments.
Inspired by seq2seq models in the field of natural language processing, this paper proposes a novel approach to represent road network data. It leverages multiple dictionaries that capture topological relationships based on road network topology and subdivision into fine-grained grids. To compress these dictionaries, the BPE algorithm is employed. The scope of our results is focused on the road network using fine-grained grids exclusively. In order to provide robust data support for deep learning, we generate a substantial number of simulation standard paths through Gaussian noise path generation within the Frechet distance framework, combined with efficient path search algorithms. Bi-GRU (Bi-directional GRU) is employed as a bidirectional recurrent network to reduce parameters and assimilate information from both trajectory history and future sequences during model training and prediction. Additionally, an attention mechanism is incorporated to augment the model’s proficiency in extracting hidden value information from sequences. Experimental findings demonstrate the commendable performance of our algorithm in road network matching tasks, showcasing improved accuracy compared to similar algorithms while significantly reducing training time.

3. Model Design

In Feng J’s work [15], a unidirectional LSTM (Long short-term memory) was used as the recurrent neural network for state transfer in seq2seq. Although LSTM has slightly higher accuracy in processing large-scale data, it is extremely time consuming. Related experiments have shown that in situations where the data volume is moderately large, the effect of GRU is comparable to that of LSTM, and it has the advantage of faster processing time. The structure of GRU is shown in Figure 5.
Figure 5. GRU structure diagram.
The GRU uses a reset gate to control the amount of data in the current and memory information. It uses an update gate to calculate the output of the current hidden state, generating new memory information to continue forward propagation. The relevant mathematical formulas are shown in Equations (3)–(6).
z t = σ W z x t + U z h t − 1 .
r t = σ W z x t + U z h t − 1 + b z .
h ~ = t a n h ⁡ ( W X t + r t U h t − 1 + b h ) .
h t = 1 − z t h t + z T h t − 1 ,
where h t − 1 is the hidden layer of the previous time, x t is the current input, and the output is the hidden layer information h t of the current time. r t is the reset gate, used to calculate the candidate hidden layer h ~ , in order to retain how much h t − 1 information. z t is the update gate, which is used to control how much h ~ information is added to get the output h t .
In this paper, Bi-GRU is used to transfer the state of model coding phase. Its main feature is that it can absorb historical and future information, so as to capture information of a complete trajectory sequence. The structure of Bi-GRU is shown in Figure 6. In the Figure 6, FD represents the last GRU unit of forward propagation, and BD represents the last GRU unit of backward propagation.
Figure 6. Bi-GRU Structure Diagram.
In addition, in order to enhance the ability of the model to capture the dependency between noisy trajectories and real road network trajectories, this article applies the Bahdanau [18] attention mechanism, as shown in Figure 7.
Figure 7. Attention structure diagram.
First, a weight coefficient αtj is generated for each hidden state hj. The weight coefficients are then subjected to a Softmax operation to obtain the attention weights αtj for each hidden state. The attention vector context is obtained by calculating the weighted sum of the attention weights and each hidden state. Finally, the attention vector is integrated with a fully connected layer to form the output value. The calculation process is shown in Equations (7)–(9).
e t , j = a s t − 1 , h j .
α t , j = s o f t m a x e t , j = exp ⁡ e t , j ∑ k = 1 n exp ⁡ e t k .
c o n t e x t = ∑ t = 1 T ( α t , j s t ) .
The final output value will be calculated using a Softmax function to obtain a probability matrix for the grid. The highest probability value for each grid will be outputted to form a grid sequence. By converting it to the real coordinates using the dictionary of the road network, the actual trajectory output can be obtained. The overall structure of the algorithmic model is shown in Figure 8.
Figure 8. Global network structure.

4. Experiment

4.1. Experimental Environment

The models involved in the experiment were built using the TensorFlow-gpu (2.3.0) framework and trained on a NVIDIA Quadro RTX 6000 graphics card with a 24 GB memory. The model parameters are shown in Table 4. The dictionary compression refers to the proportion of the original mesh dictionary compressed using the BPE algorithm, and the data augmentation multiplier is the number of noise paths generated based on a single path.
Table 4. Model Parameters.

4.2. Experimental Data

The training data used for the model consisted of the road network of Yibin City downloaded from OpenStreetMap, where standard trajectory data were generated through simple path search in NetWork X, and simulated noisy trajectory data. A total of 260,389 standard paths and 13,019,450 simulated noisy paths were used.

4.3. Evaluation Index

Since the problem of road network matching is the matching of noise track sequence to road segment sequence, the absolute accuracy of the model cannot be simply used as the evaluation criterion. In this paper, the accuracy evaluation method of road section mentioned in article [15] is followed, as shown in Equation (10).
a c c = l e n t r u e t r a ∩ p r e t r a max l e n t r u e t r a , l e n p r e t r e   .
l e n t r u e t r a is the total length of the standard trajectory of the section, l e n p r e t r e is the total length of the matched trajectory, and l e n t r u e t r a ∩ p r e t r a is the total length of the intersection between the correct trajectory and the matched trajectory. In this article, the Haversine formula is used to calculate the distance between latitude and longitude points, as shown in Equation (11).
d = 2 r   sin − 1 sin 2 θ 2 − θ 1 2 + cos α 1 cos α 2 sin 2 α 2 − α 1 2   ,
where r is the radius of the Earth (6371 km), θ 1 and θ 2 are the latitude between two points, and α 1 and α 2 are the longitude between two points.

4.4. Experimental Result

4.4.1. Visualization of Matching Effect

Two simulated noise tracks were selected to match the road network through the model, and the results were visualized as shown in Figure 9.
Figure 9. Matching result visualization.
It can be seen that the results obtained by the model match the topology characteristics of the road network and are consistent with the real trajectory. Vehicle track data is strictly restricted to the road network, so the noise track is confined to the road network with a certain distribution law of data. The simulation trajectory generated by the data expansion method in this paper can almost look like the actual driving trajectory. However, in order to ensure the rigor of the experiment, it is still necessary to use the real driving track for actual verification. Therefore, this paper collected a section of Yibin City driving routes for test verification. The software that collects track information is the Android App (GPS racking Route Map). The track is approximately 31.31 km long and contains 1467 GPS track points.
The overall trajectory is shown in Figure 10 below. The green area represents the recorded track points, and the red is the route formed by the points.
Figure 10. The red line represents the actual trajectory and the green part represents the generated noise points.
The overall trajectory was decomposed and piecewise put into the model for matching. The total length of matching was 31.31 km. The correct trajectory length calculated by Equation (10) was 28.89 km, and the matching accuracy was 92.27%. The matching results of some conventional sections are shown in Figure 11. In the figure, the red path is the matching path, and the green path is the path formed by the direct connection of the collected original track points.
Figure 11. Conventional road section matching results. The green line represents the wrong trajectory and the red line represents the corrected trajectory.
The matching results of conventional sections are shown in Figure 11.
According to Figure 12 depicting matching results, it can be seen that the matching effect is very good whether it is in the conventional road section or the complex intersection road section. There is no wrong lane matching, large deviation matching, or other types of wrong matching. Some mismatched sections are shown in Figure 13 below.
Figure 12. Matching results of complex intersection sections. The green line represents the wrong trajectory and the red line represents the corrected trajectory.
Figure 13. Wrong match. The green line represents the wrong trajectory and the red line represents the corrected trajectory.
The left side of Figure 13 shows the turntable area, and the matching results produced an error loop. Our estimation is that there was a traffic jam when the trajectory was collected, which resulted in excessive positioning in a short time, resulting in a deviation of the model prediction. The right side of Figure 13 shows the intersecting multi-road section, and the correct route should be the route in the yellow area.

4.4.2. Model Performance Comparison

The overall model training accuracy rate and loss curve in this paper are shown in Figure 14.
Figure 14. Accuracy and Loss.
The absolute accuracy of the model on the training set is 89.93%, and the absolute accuracy of the model on the verification set is 89.88%. Through Equation (10), the accuracy of the verification set is re-converted, and the accuracy of the converted model is 95.45%. It shows that the road network matching method proposed in this paper is effective.
Through the comparison of LSTM, Bi-LSTM, Bi-LSTM-ATTN, and other model structures under the experimental conditions of the same parameters in Table 4, the parameters are shown in Table 5, and all accuracy rates are absolute accuracy rates in the verification set. It can be seen that after 20 iterations, the accuracy of the model trained by the bidirectional LSTM is 1.81 points higher than that of the unidirectional LSTM, and the accuracy of the model with the addition of attention mechanisms on this basis is 86.71 points, and the accuracy of the model in this paper is 89.93 points. It shows that the accuracy of the model can be improved to some extent by using bidirectional recurrent neural network and attention mechanisms.
Table 5. Model Comparison Experiment.

4.4.3. Optimized Controlled Experiment

In order to verify the validity of the data expansion method and the effect of the compressed dictionary on the training time and training accuracy, based on different data expansion conditions, the compression degree of dictionary compression is shown in Figure 15. Several groups of control experiments were set, and other experimental parameters remained unchanged as shown in Table 4. Accuracy is the absolute accuracy of the verification set.
Figure 15. Data expansion controlled experiment.
From the data expansion control test in Figure 15, it can be seen that when the expansion multiple is between 10 and 50 times, the absolute accuracy of the model will be greatly improved, and when the expansion multiple is above 50 times, the accuracy tends to be stable and oscillates between 89.57% and 89.93%.
The experimental results show that the data expansion method is effective to improve the absolute accuracy of the model.
It can be seen from the controlled experiments in Figure 16 that when the compressed data range is between 1/5 and 1/10, the accuracy rate of the model is maintained between 88.11 points and 89.04 points, and the training speed is increased from 276 ms/Step to 27 ms/Step. When the compression degree was increased to 1/15, the absolute accuracy of the model began to decline significantly to 62.37 points, and when the compression was continued to 1/20, the absolute accuracy of the model dropped to 43.37 points.
Figure 16. Data compression controlled experiment.
The experimental results show that the data compression method is effective for improving the training speed, and has limited influence on the accuracy of the model within a certain compression range. Beyond a certain compression range, the absolute accuracy of the model will be seriously affected.

5. Conclusions

To solve the matching problem between GPS tracking and real road networks, this paper proposes a method based on seq2seq combined with topological information, modeling road network matching into seq2seq sequence model, creating multiple dependency dictionaries according to the topological relationship of a road network, fine grid division, and limiting the matching results to road network. Using the BPE algorithm to compress the grid dictionary, the length of the word vector is reduced and the training time is optimized. Standard trajectory data sets are established through simple path search through NetWork X, and a large number of noise trajectories are generated based on Gaussian noise within a certain Frechet distance to support large data volume in deep learning. Bi-GRU is used as a bidirectional recurrent neural network to extract the information of both historical trajectory sequence and future trajectory sequence. We added attention mechanisms to enhance the ability of extracting sequence hidden value information. The experimental results show that this road network matching method is effective and has higher matching accuracy and less model training time than other methods.

Author Contributions

Methodology, Y.B.; Software, Y.B. and G.L.; Formal analysis, W.Z.; Validation, Y.B. and T.L.; Resources, W.Z.; Data curation, Y.B.; Writing—original draft, Y.B.; Writing—review & editing, T.L.; Supervision, Y.W.; Project administration, Y.W.; Funding acquisition, Y.W. and Y.F. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the Talent Introduction Project of Sichuan University of Science & Engineering (2020RC20), Innovation Fund of Postgraduate, Sichuan University of Science & Engineering (Y2022106) and the Sichuan Key Provincial Research Base of Intelligent Tourism (No. ZHYJ23-03).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Gao, W.; Li, G.; Ta, N. Overview of road network matching algorithms. J. Softw. 2018, 29, 225–250. [Google Scholar]
  2. Bernstein, D.; Kornhauser, A. An introduction to map matching for personal navigation assistants. Geom. Distrib. 1996, 122, 1082–1083. [Google Scholar]
  3. Quddus, M.A.; Ochieng, W.Y.; Zhao, L.; Noland, R.B. A general map matching algorithm for transport telematics applications. GPS Solut. 2003, 7, 157–167. [Google Scholar] [CrossRef] [Scilit]
  4. Xiaohan, W.; Zengyu, H.; Wangwu, H.; Pei, W.; Long, Y. Method of Angle difference and follow-up point map matching for complex Road sections. Appl. Res. Comput. 2022, 39, 379–384. [Google Scholar]
  5. Abbour, M.; Bonnifait, P.; Cherfaoui, V. Map matching integrity using multi-sensor fusion and multi-hypothesis road tracking. J. Intell. Transp. Syst. Technol. Planllingand Oper. 2008, 6, 189–201. [Google Scholar] [CrossRef] [Scilit]
  6. Nadine, S.; Kay, W.A. Map matching of GPS traces on high-resolution navigation networks using the multiple hypothesis techniique (MHT). Work. Pap. Transp. Spat. Plan. 2009, 568, 568–588. [Google Scholar]
  7. Obradovic, D.; Lenz, H.; Schupfner, M. Fusion of map and sensor data in a modern car navigation system. J. Signal Process. 2006, 45, 111–122. [Google Scholar] [CrossRef] [Scilit]
  8. Yu, H.; Liu, H.C.; Tan, C.W.; Bao, Y. Development and application of an enhanced kalman filter and global positioning system errorcorrection approach for improved map matching. J. Intell. Transp. Syst. Technol. Plan. Oper. 2010, 14, 27–36. [Google Scholar]
  9. Kim, W.; Jee, G.I.; Lee, J.G. Efficient use of digital road map in various positioning for ITS. In Proceedings of the IEEE 2000. Position Location and Navigation Symposium (Cat. No.00CH37062), San Diego, CA, USA, 13–16 March 2000; pp. 170–176. [Google Scholar]
  10. Li, Z.; Chen, W. A new approach to map-matching and parameter correcting for vehicle navigation system in the area of shadow of GPS signal. In Proceedings of the 2005 IEEE Intelligent Transportation Systems, Vienna, Austria, 16 September 2005; pp. 425–430. [Google Scholar]
  11. Lou, Y.; Zhang, C.; Zheng, Y.; Wang, W.; Huang, Y. Map-Matching for low-sampling-rate GPS trajectories. In Proceedings of the GIS’09: Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, Seattle, WA, USA, 4–6 November 2009; pp. 352–361. [Google Scholar]
  12. Yuan, J.; Zheng, Y.; Zhang, C.; Xie, X.; Sun, G.Z. An interactive-voting based map matching algorithm. In Proceedings of the 2010 Eleventh International Conference on Mobile Data Management, Kansas City, MO, USA, 23–26 May 2010; pp. 43–52. [Google Scholar]
  13. Miwa, T.; Kiuchi, D.; Yamamoto, T.; Morikawa, T. Development of map matching algorithm for low frequency probe data. Transp. Res. Part C Emerg. Technol. 2012, 22, 132–145. [Google Scholar] [CrossRef] [Scilit]
  14. Shenglong, Y.; Juan, Y.; Houpan, Z. IIVMM: An improved interactive voting matching algorithm for Low frequency GPS trajectory. Comput. Sci. 2019, 46, 325–332. [Google Scholar]
  15. Feng, J.; Li, Y.; Zhao, K.; Xu, Z.; Xia, T.; Zhang, J.; Jin, D. DeepMM: Deep Learning Based Map Matching with Data Augmentation. IEEE Trans. Mob. Comput. 2020, 21, 2372–2384. [Google Scholar] [CrossRef] [Scilit]
  16. Lu, J.; Luo, Y.; Huang, Z.; Zhang, Y.-K.; Chen, W. Map matching method based on ranked learning and multi-source information. J. Zhejiang Univ. (Sci. Ed.) 2019, 47, 27–35. [Google Scholar]
  17. Sennrich, R.; Haddow, B.; Birch, A. Neural Machine Translation of Rare Words with Subword Units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, Berlin, Germany, 7–12 August 2016; pp. 1715–1725. [Google Scholar]
  18. Bahdanau, D.; Cho, K.; Bengio, Y. Neural Machine Translation by Jointly Learning to Align and Translate. arXiv 2014, arXiv:1409.0473. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.