# Map Matching Based on Seq2 Seq with Topology Information
###### 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 (seq2 seq) 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. deep learning; map matching; GIS +
Footnote †: journal:  
sections reduced matching errors. [PERSON] [5] and [PERSON] [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. [PERSON] [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, [PERSON] 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. [PERSON] [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 seq2 seq 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.