A map matching method and system

By acquiring GPS trajectory data and road network data, repairing road network connectivity and pre-calculating key information, and using the Viterbi algorithm for road network matching, the problem of insufficient road network matching efficiency and accuracy in the existing technology is solved, achieving a more efficient and Exact match results.

CN118670406BActive Publication Date: 2025-01-24HANGZHOU ZHECHENG DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411162653.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2025-01-24
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

The existing road network matching algorithm based on the hidden Markov model has high computational complexity when processing large-scale road network or high-frequency sampling GPS data, and lacks perception and correction of road network connectivity, resulting in insufficient matching efficiency and accuracy. .

Method used

By acquiring GPS trajectory data and road network data, the connectivity of the road network is repaired, key information of the road network is pre-calculated, and the Viterbi algorithm is used to calculate the state transition probability and single-state generation probability of the candidate road section of the GPS trajectory point in the road network. Realize road network matching.

Benefits of technology

Before matching, automatically repair the non -connected node to reduce the probability of matching failure, reduce the real -time calculation burden through the estimated calculation and storage road network, and improve the matching speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118670406B_ABST
    Figure CN118670406B_ABST
Patent Text Reader

Abstract

The present application relates to a map matching method and system, wherein the method includes: obtaining GPS trajectory data and road network data; repairing the connectivity of the road network based on the road network data; pre-calculating key information of the road network based on the GPS trajectory data and the repaired road network data, and storing the obtained key information of the road network; calculating the state transition probability and single state generation probability for matching based on the GPS trajectory data, the road network data and the stored key information of the road network; and then matching the GPS trajectory with the road network through the Viterbi algorithm. Through the present application, it is realized that before map matching, the disconnected nodes of the road network are automatically repaired, the probability of matching failure caused by road network problems is reduced, and the key information in the road network is pre-calculated and stored, so as to avoid unnecessary repeated calculations in each matching process, and solve the problem of how to improve the efficiency and accuracy of road network matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of geographic information processing technology, and in particular to a map matching method and system. Background Art

[0002] Road network matching, also known as map matching or road matching, is a geographic information system technology used to accurately match vehicle or pedestrian trajectory points recorded by GPS to actual roads on the road network. The purpose of road network matching is to correct the error of GPS positioning, because the original GPS data may deviate from the actual road due to signal interference, multipath effect or equipment accuracy limitation. It has a wide range of applications in scenarios such as navigation and traffic management. Road network matching generally uses specific algorithms to match each trajectory point to the nearest road segment or node on the road network, such as: nearest neighbor matching algorithm, hidden Markov model (HMM), particle filter algorithm, multi-similarity metric algorithm, etc.

[0003] Although the existing road network matching scheme based on hidden Markov model has made significant progress, it still has some limitations and shortcomings. For example, when the HMM road network matching algorithm processes large-scale road networks or high-frequency sampled GPS data, it may encounter high computational complexity, resulting in slow algorithm operation; the HMM road network matching algorithm is extremely dependent on the connectivity of the underlying road network. The calculation of transition probability is its core step, and the connectivity of the road network directly affects the calculation of transition probability. The existing HMM matching algorithm lacks the perception and correction of road network connectivity;

[0004] Currently, no effective solution has been proposed for the problem of how to improve the efficiency and accuracy of road network matching in related technologies. Summary of the invention

[0005] The embodiments of the present application provide a map matching method and system to at least solve the problem of how to improve the efficiency and accuracy of road network matching in the related art.

[0006] In a first aspect, an embodiment of the present application provides a map matching method, the method comprising:

[0007] Get GPS track data and road network data;

[0008] Based on the road network data, repairing the connectivity of the road network;

[0009] Pre-calculating key information of the road network based on the GPS trajectory data and the repaired road network data, and storing the calculated key information of the road network;

[0010] Based on the GPS trajectory data, the road network data and the stored road network key information, the state transition probability and the single state generation probability of the candidate road section of the GPS trajectory point in the road network are calculated;

[0011] Based on the state transition probability and the single state generation probability, the matching result between the GPS trajectory and the road network is calculated by the Viterbi algorithm.

[0012] In some embodiments, repairing the connectivity of the road network based on the road network data includes:

[0013] For each node in the road network, based on the road network data, determining a set of edges whose distance to the node is less than a first distance threshold;

[0014] For each edge in the edge set, based on the road network data, calculate the projection point from the node to the edge; if the distance between the projection point and the endpoint of the edge is less than a second distance threshold, perform a direct connection repair between the node and the endpoint; otherwise, perform an interrupt repair between the node and the projection point.

[0015] In some embodiments, precalculating key road network information based on the GPS trajectory data and the repaired road network data includes:

[0016] Based on the repaired road network data, pre-calculate the shortest path between each pair of nodes in the road network to obtain the shortest path information of the road network nodes;

[0017] Based on the repaired road network data, pre-calculate the direction vector of each road section in the road network to obtain the road network section direction vector;

[0018] Based on the GPS track data, the direction vector of each GPS track point is pre-calculated to obtain the direction vector of the GPS track point.

[0019] In some embodiments, storing the calculated road network key information includes:

[0020] The shortest path information of the road network nodes, the direction vector of the road network sections and the direction vector of the GPS track points are stored.

[0021] In some embodiments, based on the GPS trajectory data, the road network data and the stored road network key information, calculating the single state generation probability of the candidate road segment of the GPS trajectory point in the road network includes:

[0022] Based on the stored road network key information, calculating a heading angle reduction coefficient between a direction vector of a GPS track point and a direction vector of a projection point of the GPS track point on a candidate road segment in the road network;

[0023] Based on the heading angle reduction coefficient, the GPS track data and the road network data, a single state generation probability of a candidate road section of a GPS track point in the road network is calculated.

[0024] In some embodiments, based on the stored road network key information, calculating the heading angle reduction coefficient between the direction vector of the GPS track point and the direction vector of the projection point of the GPS track point on the candidate road segment in the road network includes:

[0025] Determine the direction vector of the projection point of the GPS track point on the candidate road section in the road network based on the road network section direction vector in the stored road network key information;

[0026] Calculate the angle between the direction vectors using the formula , calculate the angle between the direction vector of the GPS track point and the direction vector of the projection point of the GPS track point on the candidate road segment in the road network θ ,in, u is the direction vector of the projection point of the GPS trajectory point on the candidate road segment in the road network, v is the direction vector of the GPS track point;

[0027] Based on the preset number of intervals N , the angle between the direction vectors θ Divide and get the heading angle reduction coefficient K (< θ * N / 180>), where < x >Representative x Round off, K (n) Representative K No. n elements.

[0028] In some embodiments, based on the heading angle reduction coefficient, the GPS trajectory data and the road network data, calculating the single state generation probability of the candidate road segment of the GPS trajectory point in the road network includes:

[0029] Based on the GPS track data and the road network data, calculating the projection distance from the GPS track point to the candidate road section in the road network;

[0030] The single-state generation probability calculation formula , calculate the single-state generation probability of the candidate road section of the GPS trajectory point in the road network, where, GPS track point GPS i To candidate road segment e j The projection distance, K (< * N / 180>) is the heading angle reduction coefficient, GPS track point GPS i The direction vector and the candidate road segment e j The angle between the direction vectors of the projection points on σ is the standard deviation of the observation error.

[0031] In some embodiments, based on the GPS trajectory data, the road network data and the stored road network key information, calculating the state transition probability of the GPS trajectory point in the candidate road segment in the road network includes:

[0032] Based on the GPS track data, the straight-line distance between two consecutive GPS track points is calculated.

[0033] Based on the GPS trajectory data, the road network data and the stored road network key information, a path distance between projection points of the two GPS trajectory points on respective candidate road sections in the road network is calculated;

[0034] The state transition probability of the candidate road section is calculated based on the straight-line distance and the path distance.

[0035] In some embodiments, after repairing the connectivity of the road network based on the road network data, the method further includes:

[0036] The GPS track data and the repaired road network data are preprocessed, wherein the preprocessing includes down-conversion and densification of GPS track points and spatial hierarchical indexing of the road network.

[0037] In a second aspect, an embodiment of the present application provides a map matching system, the system is used to execute the method described in any one of the first aspects above, the system includes a data acquisition module, a road network repair module, a pre-calculation module and a map matching module;

[0038] The data acquisition module is used to acquire GPS trajectory data and road network data;

[0039] The road network repair module is used to repair the connectivity of the road network according to the road network data;

[0040] The pre-calculation module is used to pre-calculate key road network information according to the GPS trajectory data and the repaired road network data, and store the calculated key road network information;

[0041] The map matching module is used to calculate the state transition probability and single state generation probability of the candidate road section of the GPS track point in the road network according to the GPS track data, the road network data and the stored road network key information;

[0042] The map matching module is used to calculate the matching result between the GPS track and the road network through the Viterbi algorithm according to the state transition probability and the single state generation probability.

[0043] Compared with the related art, the embodiment of the present application provides a map matching method and system, wherein the method obtains GPS trajectory data and road network data; repairs the connectivity of the road network based on the road network data; pre-calculates key information of the road network based on the GPS trajectory data and the repaired road network data, and stores the calculated key information of the road network; calculates the state transition probability and single-state generation probability of the candidate road sections of the GPS trajectory point in the road network based on the GPS trajectory data, the road network data and the stored key information of the road network; calculates the matching result of the GPS trajectory and the road network through the Viterbi algorithm based on the state transition probability and the single-state generation probability, and realizes automatic repair of disconnected nodes in the road network before map matching, reduces the probability of matching failure due to road network problems, and pre-calculates and stores key information in the road network to avoid unnecessary repeated calculations in each matching process. This preloading mechanism reduces the burden of real-time calculations, improves the matching speed, and solves the problem of how to improve the efficiency and accuracy of road network matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0045] Figure 1 is a flowchart of the steps of the map matching method according to an embodiment of the present application;

[0046] Figure 2a is a schematic diagram of road network connectivity repair according to an embodiment of the present application;

[0047] Figure 2b is a schematic diagram of road network connectivity repair according to an embodiment of the present application;

[0048] Figure 3It is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0050] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.

[0051] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0052] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantity limitation, and may indicate the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0053] The present application embodiment provides a map matching method. Figure 1 is a flowchart of the steps of the map matching method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0054] Step S102, obtaining GPS trajectory data and road network data;

[0055] Step S102 Specifically, the data model of the road network data adopts a directed graph G =( V , E ),in, V ={ v 1, v 2,…, v N} represents nodes in the road network, such as intersections, starting points, end points, and road segment division points. Each node has latitude and longitude attributes to determine its position in geographic space. Different from nodes, inflection points are the middle points on the road segment and are used to simulate the curved line type of the road segment. The road segment direction vectors before and after the inflection points in the same road segment are different. E = { e 1, e 2,…, e N} represents the edge (road segment) in the road network, Each edge e i Can be represented as a slave node v fromi To Node v toi The directed edge of e i =( v fromi , v toi ).

[0056] It should be noted that based on the GPS trajectory data and road network data, the candidate sections and projection points of the GPS trajectory points in the road network can be determined. On the basis of determining the candidate sections and projection points of the GPS trajectory points in the road network, the projection distance from the GPS trajectory point to the candidate section, the coordinates of the projection point from the GPS trajectory point to the candidate section, and the distance from the projection point from the GPS trajectory point to the candidate section to the topological starting point of the candidate section can be calculated through spherical trigonometry formulas and the Haversian formula.

[0057] Step S104, repairing the connectivity of the road network based on the road network data;

[0058] Step S104 specifically includes the following steps:

[0059] Step S1041, for each node in the road network, based on the road network data, determine a set of edges whose distance to the node is less than a first distance threshold;

[0060] Step S1041 Specifically, for each node in the road network v i , define a detection radius buffer , calculate the edge set within the detection radius with the node as the center Candidate .

[0061] Step S1042, Figure 2a and Figure 2b is a schematic diagram of road network connectivity repair according to an embodiment of the present application, such as Figure 2a and Figure 2b As shown, for the edge set Candidate For each edge in , based on the road network data, the projection point from the node to the edge is calculated. If the distance between the projection point and the endpoint of the edge is less than the second distance threshold, a direct connection repair between the node and the endpoint is performed; otherwise, an interruption repair between the node and the projection point is performed.

[0062] It should be noted that, by introducing a road network node connectivity repair mechanism in step S104, the road network can be checked before matching, and disconnected nodes can be automatically repaired, thereby reducing the probability of matching failure due to road network problems.

[0063] Step S106, pre-calculating key road network information based on the GPS trajectory data and the repaired road network data, and storing the calculated key road network information;

[0064] Step S106 specifically includes the following steps:

[0065] Step S1061, based on the repaired road network data, pre-calculate the shortest path between each pair of nodes in the road network to obtain the shortest path information of the road network nodes;

[0066] Step S1061 Specifically, the strategy of pre-calculating the shortest path is performed on the node pairs in the road network. G =( V , E ) in each pair of nodes ( v i , v j ) Calculate the shortest path, the pre-calculated shortest path is stored in the hash table D In the example, the shortest path cost is stored in the hash table F Among them, D ij = path i->j Represents a slave node v i arrive v j The shortest path node sequence, F ij = d a->b Represents a slave node v i arrive v j The shortest path length.

[0067] It should be noted that, considering that the straight-line distance between adjacent GPS track points will not be too far, the corresponding path length will not be too far either. For a certain node: a cutoff distance parameter will be introduced when calculating the shortest path, and the node path whose path distance exceeds the cutoff value will not be calculated to avoid searching too many irrelevant nodes. On the one hand, it can improve the calculation efficiency of matching, and on the other hand, it can also reduce the computer's memory usage. When the shortest path between two GPS track points needs to be calculated during the map matching process, these track points are first mapped to the starting node of the section where the projection point is located. Then, through the index Dand F , the shortest path length and the shortest path node sequence between the two nodes can be quickly found without recalculating during the matching process. This method reduces the computational complexity of the shortest path by O ( n 2 ) is reduced to O (1).

[0068] Step S1062, based on the restored road network data, pre-calculate the direction vector of each road segment in the road network to obtain the road network segment direction vector;

[0069] Specifically, step S1062 pre-calculates the road segment direction vector, that is, pre-calculates the direction vector of each road segment in the road network. Define the road segment direction vector set V Used to store the direction vector of each road segment in the road network. e i , since it only has a starting and ending point v starti and v endi , there is no inflection point, its direction vector can be directly obtained by calculating the coordinate difference of the two endpoints; and for a road segment containing multiple inflection points e j , there are multiple road segment direction vectors, calculate each segment direction vector, and form a nested direction vector set.

[0070] It should be noted that in the process of projecting GPS trajectory points to candidate road sections, the road section direction vector set is queried through the road section ID. V , the direction vector of the candidate road section where the GPS track point is located can be quickly determined. For straight road sections, the stored direction vector is directly used; for road sections with multiple inflection points, the path distance from the projection point to the road section topological starting point is combined to further query the corresponding sub-road section direction vector. This multi-level vector set structure not only reduces the computational overhead in the matching process, but also significantly optimizes the algorithm performance and accelerates the matching process through a fast retrieval mechanism.

[0071] Step S1063, based on the GPS track data, pre-calculate the direction vector of each GPS track point to obtain the direction vector of the GPS track point.

[0072] It should be noted that the GPS trajectory data contains location coordinates and timestamps, and the heading angle (i.e., direction vector) can be calculated and stored by the differential direction method to improve the efficiency of calculating the heading angle reduction coefficient for the subsequent single-state transition probability.

[0073] Step S108, based on the GPS trajectory data, the road network data and the stored road network key information, the state transition probability and the single state generation probability of the candidate road section of the GPS trajectory point in the road network are calculated;

[0074] The step S108 calculates the single state generation probability of the candidate road section of the GPS track point in the road network based on the GPS track data, the road network data and the stored road network key information, and specifically includes the following steps:

[0075] Step S1081, based on the stored road network key information, calculating the heading angle reduction coefficient between the direction vector of the GPS track point and the direction vector of the projection point of the GPS track point on the candidate road section in the road network;

[0076] Step S1081 specifically, based on the road network segment direction vector in the stored road network key information, determine the direction vector of the projection point of the GPS trajectory point on the candidate road segment in the road network;

[0077] Calculate the angle between the direction vectors using the formula , calculate the angle between the direction vector of the GPS trajectory point and the direction vector of the projection point of the GPS trajectory point on the candidate road segment in the road network θ ,in, u is the direction vector of the projection point of the GPS trajectory point on the candidate road segment in the road network, v is the direction vector of the GPS track point;

[0078] Based on the preset number of intervals N , the angle between the direction vectors θ Divide and get the heading angle reduction coefficient K (< θ * N / 180>), where < x >Representative x Round off, K (n) Representative K No. n elements, K This reduction factor array can be freely defined.

[0079] Step S1082, based on the heading angle reduction coefficient, the GPS trajectory data and the road network data, the single state generation probability of the GPS trajectory point in the candidate road section in the road network is calculated.

[0080] Step S1082 specifically, based on the GPS track data and the road network data, calculate the projection distance from the GPS track point to the candidate road segment in the road network;

[0081] The single-state generation probability calculation formula , calculate the single-state generation probability of the candidate road section of the GPS trajectory point in the road network, where, GPS track point GPS i To candidate road segment e j The projection distance, K (< * N / 180>) is the heading angle reduction coefficient, GPS track point GPS i The direction vector and the candidate road segment e j The angle between the direction vectors of the projection points on σ is the standard deviation of the observation error.

[0082] It should be noted that in the traditional hidden Markov model, the single-state generation probability is: the probability that a given observed GPS trajectory point is generated by each candidate section state in the state space, which quantifies the possibility of generating observation data under a specific hidden state. In this embodiment, the calculation of the single-state generation probability of the GPS trajectory point not only considers the projection distance between the GPS observation point and the candidate section, but also integrates the influence of the heading angle on the probability, and is achieved by introducing a heading angle reduction coefficient. By integrating the heading angle information and introducing the heading angle reduction coefficient, when calculating the single-state generation probability, the directional consistency between the GPS observation point and the candidate section is more finely considered, thereby improving the matching accuracy of special cases such as U-shaped bends and two-way roads.

[0083] The step S108 calculates the state transition probability of the GPS track point in the candidate road section in the road network based on the GPS track data, the road network data and the stored road network key information, and specifically includes the following steps:

[0084] Step S1083, based on the GPS track data, calculate the straight-line distance between two consecutive GPS track points.

[0085] Step S1083 Specifically, the GPS track data contains the longitude and latitude information of the GPS track points, and the straight-line distance between two consecutive GPS track points is calculated using the spherical trigonometry formula or the Haversian formula. .

[0086] Step S1084, based on the GPS trajectory data, the road network data and the stored road network key information, the path distance between the projection points of the two GPS trajectory points on the respective candidate road sections in the road network is calculated;

[0087] Step S1084 Specifically, the stored road network key information used in step S1084 is mainly the shortest path information of the road network nodes. First, based on the GPS track data and the road network data, the projection point of the GPS track point on the candidate road section in the road network can be obtained, and then based on the projection point and the stored shortest path information of the road network nodes, the path distance between the projection points of two GPS track points can be quickly obtained. .

[0088] Step S1085, based on the straight-line distance and the path distance, the state transition probability of the candidate road segment is calculated.

[0089] Step S1085 Specifically, based on the straight-line distance and path distance , through the formula The state transition probability of the candidate road section is calculated.

[0090] It should be noted that the state transition probability follows an exponential distribution, reflecting the transition probability between two consecutive states. Steps S1083 to S1085 provide a comprehensive state transition probability framework for the HMM map matching algorithm, enabling the algorithm to evaluate and select the most likely state transition sequence, thereby optimizing the matching of GPS trajectories with the road network.

[0091] In addition, during the state transition probability calculation process, there is a GPS path that does not go along the shortest path. Since the above steps S1083 to S1085 are calculated based on the shortest path, it may cause GPS path recognition errors in this case. Based on this, a strategy for identifying detour situations is proposed. If it is determined that the GPS does not go along the shortest path, a larger path distance will be returned. , in order to reduce the state transition probability between two candidate sections.

[0092] Step S110, based on the state transition probability and the single state generation probability, the matching result between the GPS trajectory and the road network is calculated by the Viterbi algorithm.

[0093] Specifically, step S110 performs recursive calculation on each subsequent GPS trajectory point based on the state transition probability and the single state generation probability through the Viterbi algorithm to update F MAT and I MAT ,in, F MAT Generate a final state probability hash table (used to store the final state generation probability), I MAT is the optimal index hash table (used to record the optimal previous state index to achieve these probabilities);

[0094] Through the above steps in the embodiment of the present application, it is possible to automatically repair disconnected nodes in the road network before map matching, reduce the probability of matching failure due to road network problems, and pre-calculate and store key information in the road network to avoid unnecessary repeated calculations during each matching process. This preloading mechanism reduces the burden of real-time calculations, improves the matching speed, and solves the problem of how to improve the efficiency and accuracy of road network matching.

[0095] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0096] In some embodiments, after repairing the connectivity of the road network based on the road network data, the method further includes:

[0097] The GPS trajectory data and the repaired road network data are preprocessed, wherein the preprocessing includes down-conversion and densification of GPS trajectory points and spatial hierarchical indexing of the road network.

[0098] The embodiment of the present application provides a map matching system, the system includes a data acquisition module, a road network repair module, a pre-calculation module and a map matching module;

[0099] Data acquisition module, used to obtain GPS trajectory data and road network data;

[0100] The road network repair module is used to repair the connectivity of the road network based on the road network data;

[0101] A pre-calculation module is used to pre-calculate key road network information based on GPS trajectory data and repaired road network data, and store the calculated key road network information;

[0102] A map matching module is used to calculate the state transition probability and single state generation probability of the candidate road sections of the GPS track point in the road network based on the GPS track data, the road network data and the stored key information of the road network;

[0103] The map matching module is used to obtain the matching result between the GPS trajectory and the road network through the Viterbi algorithm according to the state transition probability and the single state generation probability.

[0104] Through the data acquisition module, road network repair module, pre-calculation module and map matching module in the embodiments of the present application, it is possible to automatically repair disconnected nodes in the road network before map matching, reduce the probability of matching failure due to road network problems, and pre-calculate and store key information in the road network to avoid unnecessary repeated calculations during each matching process. This preloading mechanism reduces the burden of real-time calculations, improves the matching speed, and solves the problem of how to improve the efficiency and accuracy of road network matching.

[0105] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0106] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0107] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0108] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0109] In addition, in combination with the map matching method in the above embodiments, the present application embodiment may provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the map matching methods in the above embodiments is implemented.

[0110] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a map matching method is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball, or touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0111] In one embodiment, Figure 3 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 3 As shown, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 3 As shown. The electronic device includes a processor, a network interface, an internal memory and a non-volatile memory connected through an internal bus, wherein the non-volatile memory stores an operating system, a computer program and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with an external terminal through a network connection, the internal memory is used to provide an environment for the operation of the operating system and the computer program, the computer program is executed by the processor to implement a map matching method, and the database is used to store data.

[0112] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0113] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0114] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0115] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A map matching method, characterized in that: The method comprises: Get GPS track data and road network data; Based on the road network data, repairing the connectivity of the road network; Pre-calculating key information of the road network based on the GPS trajectory data and the repaired road network data, and storing the calculated key information of the road network; Based on the GPS trajectory data, the road network data and the stored road network key information, a state transition probability of a GPS trajectory point in a candidate road section in the road network is calculated; Determine the direction vector of the projection point of the GPS track point on the candidate road section in the road network based on the road network section direction vector in the stored road network key information; Calculate the angle between the direction vectors using the formula , calculate the angle between the direction vector of the GPS track point and the direction vector of the projection point of the GPS track point on the candidate road segment in the road network θ ,in, u is the direction vector of the projection point of the GPS trajectory point on the candidate road segment in the road network, v is the direction vector of the GPS track point; Based on the preset number of intervals N , the angle between the direction vectors θ Divide and get the heading angle reduction coefficient , where < x >Representative x Rounding, K (n) Representative K No. n elements; Based on the heading angle reduction coefficient, the GPS trajectory data and the road network data, a single state generation probability of a candidate road section of a GPS trajectory point in a road network is calculated; Based on the state transition probability and the single state generation probability, the matching result between the GPS trajectory and the road network is calculated by the Viterbi algorithm.

2. The method according to claim 1, characterized in that: Based on the road network data, repairing the connectivity of the road network includes: For each node in the road network, based on the road network data, determining a set of edges whose distance to the node is less than a first distance threshold; For each edge in the edge set, based on the road network data, calculate the projection point from the node to the edge; if the distance between the projection point and the endpoint of the edge is less than a second distance threshold, perform a direct connection repair between the node and the endpoint; otherwise, perform an interrupt repair between the node and the projection point.

3. The method according to claim 1, characterized in that Pre-calculating key road network information based on the GPS trajectory data and the repaired road network data includes: Based on the repaired road network data, pre-calculate the shortest path between each pair of nodes in the road network to obtain the shortest path information of the road network nodes; Based on the repaired road network data, pre-calculate the direction vector of each road section in the road network to obtain the road network section direction vector; Based on the GPS track data, the direction vector of each GPS track point is pre-calculated to obtain the direction vector of the GPS track point.

4. The method according to claim 3, characterized in that Storing the calculated road network key information includes: The shortest path information of the road network nodes, the direction vector of the road network sections and the direction vector of the GPS track points are stored.

5. The method according to claim 1, characterized in that: Calculating the single state generation probability of the candidate road section of the GPS track point in the road network based on the heading angle reduction coefficient, the GPS track data and the road network data includes: Based on the GPS track data and the road network data, calculating the projection distance from the GPS track point to the candidate road section in the road network; The single-state generation probability calculation formula , calculate the single-state generation probability of the candidate road section of the GPS trajectory point in the road network, where, GPS track point GPS i To candidate road segment e j The projection distance, is the heading angle reduction factor, N is the number of preset intervals, < x >Representative x Rounding, K (n) Representative K No. n elements, GPS track point GPS i The direction vector and the candidate road segment e j The angle between the direction vectors of the projection points on σ is the standard deviation of the observation error.

6. The method according to claim 1, characterized in that Based on the GPS trajectory data, the road network data and the stored road network key information, calculating the state transition probability of the GPS trajectory point in the candidate road section in the road network includes: Based on the GPS track data, the straight-line distance between two consecutive GPS track points is calculated. Based on the GPS trajectory data, the road network data and the stored road network key information, a path distance between projection points of the two GPS trajectory points on respective candidate road sections in the road network is calculated; The state transition probability of the candidate road section is calculated based on the straight-line distance and the path distance.

7. The method according to claim 1, characterized in that After repairing the connectivity of the road network based on the road network data, the method further includes: The GPS track data and the repaired road network data are preprocessed, wherein the preprocessing includes down-conversion and densification of GPS track points and spatial hierarchical indexing of the road network.

8. A map matching system, characterized in that: The system is used to execute the method according to any one of claims 1 to 7, and the system comprises a data acquisition module, a road network repair module, a pre-calculation module and a map matching module; The data acquisition module is used to acquire GPS trajectory data and road network data; The road network repair module is used to repair the connectivity of the road network according to the road network data; The pre-calculation module is used to pre-calculate key road network information according to the GPS trajectory data and the repaired road network data, and store the calculated key road network information; The map matching module is used to calculate the state transition probability and single state generation probability of the candidate road section of the GPS track point in the road network according to the GPS track data, the road network data and the stored road network key information; The map matching module is used to calculate the matching result between the GPS track and the road network through the Viterbi algorithm according to the state transition probability and the single state generation probability.