A GPS track and road matching method, device, storage medium and terminal

Through the dual graph matching method, the problem of difficulty in matching GPS trajectories and roads in urban environments is solved, accurate filtering and matching of trajectory point data is achieved, and matching accuracy and efficiency are improved.

CN114443885BActive Publication Date: 2024-10-25CEL TERMINUS (SHANGHAI) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111677899.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-10-25
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The matching of GPS trajectories and roads in urban environments is limited by buildings and radio wave interference, which leads to offset or missing GPS data points, affecting the accuracy and visualization of the matching.

Method used

The GPS trajectory and road matching method based on the dual graph is used to compress the trajectory point data to form a polyline through the Douglas-Pook algorithm. A buffer zone and road layer overlay are built around the polyline. The Kuhn-Munkres algorithm is used for dual graph matching to obtain the maximum weighted dual graph. Map matching values ​​to determine the best matching road.

Benefits of technology

Effectively filter the offset of trajectory point data, improve the accuracy and efficiency of matching, reduce the complexity of the original matching process, and ensure the accurate matching of trajectory points and roads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114443885B_ABST
    Figure CN114443885B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, storage medium and terminal for matching GPS tracks and roads, wherein the method comprises: compressing track point data to form a polyline; obtaining a road set according to the polyline and road layer; performing a pairwise graph matching on multiple roads in the road set and the polyline to obtain a road that best matches the polyline. The present application can filter and compress the offset of track point data, and can accurately select the road that best matches the track point data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of GPS track and road matching, and more specifically, to a GPS track and road matching method, device, storage medium and terminal. Background Art

[0002] With the rapid development of location services based on positioning technology, a large amount of vehicle trajectory data is constantly generated. Analyzing these trajectory data and mining useful information can provide better information services. Due to the error of GPS positioning data, the GPS positioning results deviate from the actual geographical location, which makes location-based services difficult. At this time, it is necessary to match the GPS trajectory to the road where the vehicle actually runs for map matching for subsequent use.

[0003] At present, the matching operation of GPS trajectory and road through GPS measurement is suitable for areas with wide field of vision and few obstacles. In cities, interference from buildings and radio waves will cause the offset or loss of GPS data points, which will lead to the inability to accurately match the actual movement trajectory with the road, affecting the visualization effect.

[0004] The present invention proposes a GPS track and road matching method based on a dual graph, which can filter the offset of GPS track points and accurately select the road that best matches the track point data. Summary of the invention

[0005] The embodiments of the present application provide a method, device, storage medium and terminal for matching GPS tracks and roads. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.

[0006] In a first aspect, an embodiment of the present application provides a method for matching a GPS track and a road, the method comprising:

[0007] Compress the trajectory point data to form a polyline;

[0008] Obtain a road set according to the polyline and road layer;

[0009] Perform bigraph matching on multiple roads in the road set and the polyline to obtain a road that best matches the polyline.

[0010] Optionally, compressing the trajectory point data to form a broken line includes:

[0011] The trajectory point data is compressed by Douglas-Peucker algorithm to form the broken line.

[0012] Optionally, obtaining a road set according to the polyline and road layer includes:

[0013] Constructing a buffer zone around the polyline with a certain buffer distance;

[0014] The buffer zone is superimposed on the road layer to obtain the road set in the buffer zone.

[0015] Optionally, the performing of dual graph matching on the multiple roads in the road set and the broken line to obtain a road that best matches the broken line may use an algorithm including: Kuhn-Munkres algorithm.

[0016] Optionally, performing bigraph matching on the multiple roads in the road set and the polyline to obtain a road that best matches the polyline includes:

[0017] Performing dual graph matching on a plurality of roads in the road set and the polyline to obtain a weighted dual graph matching value corresponding to each of the roads;

[0018] The road corresponding to the maximum weighted even graph matching value is selected as the road that best matches the polyline.

[0019] Optionally, performing dual graph matching on the multiple roads in the road set and the polyline to obtain a weighted dual graph matching value corresponding to each of the roads includes:

[0020] Divide the multiple roads in the road set into equal parts to obtain a road equal division point set;

[0021] Divide the broken line into equal parts to obtain a set of points divided into equal parts;

[0022] A dual graph is constructed according to the equally divided point set of the road and the equally divided point set of the broken line, and a weighted dual graph matching value corresponding to each of the roads is obtained.

[0023] Optionally, the dual graph constructed according to the road equally divided point set and the broken line equally divided point set is:

[0024] G = {N, P, E}

[0025] Wherein, N represents the road equally divided point set, P represents the polyline equally divided point set, and E represents the edge set of nodes connecting the road equally divided point set N and the polyline equally divided point set P;

[0026] The obtained weighted dual graph matching value is the weight of the edge set E, which is expressed as:

[0027] R=∑ i ∑ j w i,j

[0028] in, i represents the i-th node, j represents the j-th node; d i,j =||d i -d j ||2 represents the node d of the road equally divided point set N i To the node d where the polyline divides the point set P equally j , exp represents the exponential function, and σ represents the reduction factor of the distance between control nodes.

[0029] In a second aspect, an embodiment of the present application provides a device for matching a GPS track and a road, the device comprising:

[0030] A polyline acquisition module is used to compress the trajectory point data to form a polyline;

[0031] A road set acquisition module, used to obtain a road set according to the polyline and road layer;

[0032] The road matching module is used to perform dual graph matching on the multiple roads in the road set and the polyline to obtain a road that best matches the polyline.

[0033] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0034] In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0035] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0036] In the embodiment of the present application, the trajectory point data is first compressed to form a polyline, then a road set is obtained based on the polyline and the road layer, and finally multiple roads in the road set are matched with the polyline by a pair graph to obtain a road that best matches the polyline. The present application can filter and compress the offset of the trajectory point data, and can accurately select the road that best matches the trajectory point data; the complexity of the original matching process is reduced through pair graph matching, and the solution efficiency and accuracy are improved.

[0037] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0039] Figure 1 It is a flowchart of a method for matching a GPS track and a road provided in an embodiment of the present application;

[0040] Figure 2 It is a schematic diagram of a part of the road network and the track line c of a method for matching a GPS track and a road provided in an embodiment of the present application;

[0041] Figure 3 It is a schematic diagram of a broken line A of a method for matching a GPS track and a road provided in an embodiment of the present application;

[0042] Figure 4 It is a schematic diagram of a road set M of a GPS track and road matching method provided in an embodiment of the present application;

[0043] Figure 5 It is a schematic diagram of a pair graph matching of a road equally divided point set N and a broken line equally divided point set P in a GPS track and road matching method provided in an embodiment of the present application;

[0044] Figure 6 It is a flowchart of another method for matching GPS tracks and roads provided in an embodiment of the present application;

[0045] Figure 7 It is a schematic diagram of a device for matching a GPS track and a road provided in an embodiment of the present application;

[0046] Figure 8 This is a terminal schematic diagram provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.

[0048] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are only examples of systems and methods consistent with some aspects of the present invention as detailed in the attached claims.

[0050] In the description of the present invention, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances. In addition, in the description of the present invention, unless otherwise specified, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.

[0051] Road network matching is a key preprocessing step in location services. In practical applications, the reduction of GPS sampling frequency, the increase of positioning error, and the loss of signal will seriously affect the results of road network matching.

[0052] In the existing geometric matching algorithms, the geometric information of the road network is usually used for matching: each positioning point is matched to the node closest to it on the road network. The computational efficiency of this method will be affected by the density and distribution of the road network nodes. The matching algorithm using probabilistic information is used for matching: first set an elliptical or rectangular area for each GPS sample point, then obtain the probability value based on the distance between the trajectory point and the location in the area, and finally match the best road based on the probability. When using this method, if the GPS trajectory point deviates from the known road network, it may match to a road that is not actually where it is when matching with the road.

[0053] The present application proposes a GPS track and road matching method, which compresses each track line, and can reduce the track data volume to the maximum while retaining the track shape; connects the compressed track points into a broken line and performs buffer analysis with the road layer, eliminating the influence of the road network node density in the prior art, and filtering the offset of the track points; performs dual graph matching on the results of the buffer analysis, and converts the track point and road matching problem into the minimum cost problem of perfect matching in the dual graph, which reduces the complexity of the original matching process and improves the solution efficiency and accuracy; in order to obtain the maximum matching result, the road and the track line are re-divided into the same number of parts, which simplifies the calculation process.

[0054] The following will be combined with the attached Figure 1 -Attached Figure 6, a method for matching GPS trajectories and roads provided by an embodiment of the present application will be introduced in detail.

[0055] Please refer to Figure 1-5 , which is a schematic flowchart of a method for matching GPS trajectories and roads provided by an embodiment of the present application. As Figure 1-5 shown, the method of the embodiment of the present application may include the following steps:

[0056] S110, compress the trajectory point data to form a polyline. S110 includes: compressing the trajectory point data into the polyline by using the Douglas-Peucker algorithm.

[0057] For example, Figure 2 is a schematic diagram of a partial road network and a trajectory line c in an embodiment of the present application. In the embodiment of the present application, the trajectory point data of the trajectory line c is compressed by using the Douglas-Peucker algorithm, a finite number of key points are extracted on the trajectory line c, and the finite number of key points are connected to form a polyline, so that the polyline maintains the original trajectory shape to a certain extent. The polyline is the polyline A as Figure 3 shown.

[0058] The basic idea of the Douglas-Peucker algorithm adopted in the embodiment of the present application is:

[0059] Virtually connect the first and last trajectory points of each curve (i.e., the trajectory line) into a straight line, find the distances from all trajectory points to the straight line, and find the maximum distance value dmax between the trajectory points and the straight line. Compare dmax with the tolerance F: if dmax < F, discard all the trajectory points between the first and last trajectory points on this curve; if dmax ≥ F, then retain the trajectory point corresponding to dmax, and the trajectory point corresponding to dmax is a key point extracted; taking the trajectory point corresponding to dmax as the boundary, divide the curve into two parts, and repeat this method for these two parts to extract the second trajectory point; successively, extract the third trajectory point, the fourth trajectory point...; connect all the extracted trajectory points to form a polyline.

[0060] S120, obtain a road set according to the polyline and the road layer; the road set is the road set around the polyline. S120 includes: constructing a buffer zone around the polyline with a certain buffer distance (width); after constructing the buffer zone, overlay the buffer zone with the road layer to obtain the road set within the buffer zone. In the present application, a certain distance is used as the buffer zone around the compressed polyline for analysis with the road layer, reducing the matching inaccuracy caused by the deviation or loss of the trajectory point data.

[0061] As Figure 4 shown, M is the road set within the buffer zone.

[0062] For example, the road set is represented by a node-arc model, which is derived from a graph. A graph can be abstracted into a node set and an arc set. Let H be a graph consisting of Z nodes n S The node set composed of (S=1,2,…Z), that is, H={n1,n2,…n Z}, K is a line consisting of L lines D q The arc segment set composed of (q=1,2,…L), that is, K={D1,D2,…D L}, and any line in K has a node in H as its endpoint, and any two lines have no other common nodes except the endpoints, then H and F form a graph I, denoted by I =<H,K> According to this principle, roads are abstracted, with the centerline of the road segment representing the elements in the arc set K corresponding to the road layer; the intersection of the road represents the elements in the node set H corresponding to the buffer zone, and the graph composed of the arc set K and the node set H is the road set M.

[0063] S130, performing a dual graph matching on the multiple roads in the road set and the polyline to obtain a road that best matches the polyline. The algorithm used for performing a dual graph matching on the multiple roads in the road set and the polyline to obtain a road that best matches the polyline includes: Kuhn-Munkres algorithm. The embodiment of the present application uses the Kuhn-Munkres algorithm to calculate the maximum weighted dual graph matching value R, that is, ∑ i ∑ j w i,j The larger the R value is, the more similar the shapes of road B and broken line A are before the road dividing point set is divided.

[0064] Specifically, S130 includes:

[0065] S131, performing dual graph matching on the multiple roads in the road set and the polyline, and obtaining a weighted dual graph matching value corresponding to each of the roads; the S131 includes: S1311, S1312 and S1313.

[0066] S1311, dividing the multiple roads in the road set into equal parts to obtain a road equal division point set;

[0067] S1312, dividing the broken line into equal parts to obtain a point set of the broken line;

[0068] Since the number of nodes constituting a road in the road set is not equal to the number of key nodes in the polyline, each road and polyline in the road set is divided into the same number of parts to form a road equal-division point set and a polyline equal-division point set. The road equal-division point set is a point set after a road in the road set is divided into equal parts.

[0069] The following S1313 and S132 are the process of calculating the maximum weighted dual graph matching value using the Kuhn-Munkres algorithm.

[0070] S1313, constructing a dual graph according to the equally divided point set of the road and the equally divided point set of the polyline, and obtaining a weighted dual graph matching value corresponding to each of the roads, including:

[0071] S13131, select the first node in the road equally divided point set N as the starting node, select the first node in the polyline equally divided point set P as the initial matching node of the first iteration, and calculate the weights between the group of matching nodes;

[0072] S13132, constructing pairs of the road equally divided point set N and other nodes in the polyline equally divided point set P according to the order of the nodes, and calculating the weights in sequence;

[0073] S13133, sum the weights of all matching nodes as the weighted even graph matching value of the first iteration.

[0074] S13134, change the second node in the polyline equally divided point set P as the initial matching node for the second iteration, repeat S13132 and S13133, and then change the initial matching nodes in the polyline equally divided point set P in turn during the iteration process until all nodes in the polyline equally divided point set P are traversed, that is, all roads in the road set M are evenly matched with the polyline A.

[0075] Among them, the dual graph constructed according to the road equally divided point set and the broken line equally divided point set is:

[0076] G = {N, P, E}

[0077] Wherein, N represents the road equally divided point set, P represents the polyline equally divided point set, and E represents the edge set that connects the nodes in the road equally divided point set N and the polyline equally divided point set P in a one-to-one correspondence; Figure 5 As shown, the number of nodes of the even graph G is |G|=|N|+|P|; the number of equal parts can be expressed as |N|=|P|.

[0078] Perfect matching of a bipartite graph is determined as follows: if all nodes of a bipartite graph are matching nodes (the endpoints of one of the matching edges), then this matching is called a perfect matching. All nodes are matching nodes, which means that the number of equal parts of the road equal-division point set and the polyline equal-division point set is the same, that is, the above |N|=|P| is established.

[0079] The obtained weighted dual graph matching value is the weight of the edge set E, which is expressed as:

[0080] R=∑ i ∑ j wi,j

[0081] in, i represents the i-th node, j represents the j-th node; exp represents an exponential function, and σ represents a reduction factor for controlling the distance between nodes. In most cases, σ is an empirical value, and this application can set σ to 15.

[0082] In the embodiment of the present application, the weight of the edge set E is the node d in the road equally divided point set N. i and the node d in the polyline that divides the point set P equally j The spatial distance d i,j OK. Set the node of the road equally divided point set N to d i =[x i ,y i , c N ] T , where x i Represents node d i The coordinate on the x-axis; y i Represents node d i The coordinate on the y-axis; c N Represents node d i The coordinate on the z-axis represents the height value of road B;

[0083] The node that divides the point set P equally is d j =[x j ,y j , c g ] T , where x j Represents node d j The coordinate on the x-axis; y j Represents node d j The coordinate on the y-axis; c g Represents node d j The coordinate on the z-axis represents the height value of the polyline A; 1≤i, j≤n; T represents the transpose of the matrix;

[0084] d i,j =||d i -d j ||2 represents the node d of the road equally divided point set N i To the node d where the polyline divides the point set P equally j The spatial distance, d i,j represents the Euclidean distance.

[0085] In the embodiment of the present application, when ∑ i ∑ j w i,jWhen maximized, the road equally divided point set N and the polyline equally divided point set P will be in a 1:1 mapping relationship, forming a maximum match, which means that each node in the road equally divided point set N matches only one node in the polyline equally divided point set P.

[0086] In the embodiment of the present application, let G=<V,E> is an undirected graph. If V can be partitioned into two subsets V1 and V2, So that any edge (v i , v j )∈E,v i ∈V1,v j ∈V2, then G is called a bipartite graph, also called a bipartite graph or an even graph; and V1 and V2 are called complementary node subsets of G. In this case, V1 is the set of points N divided equally by the road, and V2 is the set of points P divided equally by the broken line.

[0087] S132, selecting the road corresponding to the maximum weighted even graph matching value as the road that best matches the polyline. After the above iterations are completed, the set of matches with the maximum weighted even graph matching value can be obtained as the perfect match of the road equally divided point set N and the polyline equally divided point set P.

[0088] The determination of the maximum perfect matching of the even graph is: if there is an even graph G, each edge has a weight (which can be a negative number), and the perfect matching with the maximum sum of weights is the maximum perfect matching of the even graph. Applied to the present application, the maximum sum of weights is the maximum weighted even graph matching value of the embodiment of the present application; the maximum perfect matching of the sum of weights is the road corresponding to the maximum weighted even graph matching value of the embodiment of the present application and the broken line that best matches; therefore, the embodiment of the present application selects the road corresponding to the maximum weighted even graph matching value as the road that best matches the broken line.

[0089] In the embodiment of the present application, the trajectory point data is first compressed to form a polyline, then a road set is obtained based on the polyline and the road layer, and finally multiple roads in the road set are matched with the polyline by a pair graph to obtain a road that best matches the polyline. The present application can filter and compress the offset of the trajectory point data, and can accurately select the road that best matches the trajectory point data; the complexity of the original matching process is reduced through pair graph matching, and the solution efficiency and accuracy are improved.

[0090] See also Figure 6 A flowchart of a method for matching a GPS track and a road is provided for an embodiment of the present application. Figure 6 As shown, the method of the embodiment of the present application may include the following steps:

[0091] S200, compressing the trajectory point data to form the broken line by using Douglas-Peucker algorithm;

[0092] S201, constructing a buffer zone around the polyline with a certain buffer distance;

[0093] S202, superimposing the buffer zone and the road layer to obtain the road set in the buffer zone;

[0094] S203, dividing the multiple roads in the road set into equal parts to obtain a road equal division point set;

[0095] S204, dividing the broken line into equal parts to obtain a point set of equal parts of the broken line;

[0096] S205, constructing a dual graph according to the equally divided point set of the road and the equally divided point set of the broken line, and obtaining a weighted dual graph matching value corresponding to each of the roads;

[0097] S206: Select the road corresponding to the maximum weighted even graph matching value as the road that best matches the broken line.

[0098] In the embodiment of the present application, the trajectory point data is first compressed to form a polyline, then a road set is obtained based on the polyline and the road layer, and finally multiple roads in the road set are matched with the polyline by a pair graph to obtain a road that best matches the polyline. The present application can filter and compress the offset of the trajectory point data, and can accurately select the road that best matches the trajectory point data; the complexity of the original matching process is reduced through pair graph matching, and the solution efficiency and accuracy are improved.

[0099] The following are embodiments of the device of the present invention, which can be used to implement the method embodiments of the present invention. For details not disclosed in the device embodiments of the present invention, please refer to the method embodiments of the present invention.

[0100] See also Figure 7 , which shows a schematic diagram of the structure of a GPS track and road matching device provided by an exemplary embodiment of the present invention. The device 7 includes: a broken line acquisition module 10, a road set acquisition module 20 and a road matching module 30.

[0101] A broken line acquisition module 10, used for compressing the trajectory point data to form a broken line;

[0102] A road set acquisition module 20, used to obtain a road set according to the polyline and road layer;

[0103] The road matching module 30 is used to perform bigraph matching between the multiple roads in the road set and the polyline to obtain a road that best matches the polyline.

[0104] It should be noted that the GPS track and road matching device provided in the above embodiment only uses the division of the above functional modules as an example when executing the GPS track and road matching method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the GPS track and road matching device provided in the above embodiment and the GPS track and road matching method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0105] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0106] In the embodiment of the present application, the trajectory point data is first compressed to form a polyline, then a road set is obtained based on the polyline and the road layer, and finally multiple roads in the road set are matched with the polyline by a pair graph to obtain a road that best matches the polyline. The present application can filter and compress the offset of the trajectory point data, and can accurately select the road that best matches the trajectory point data; the complexity of the original matching process is reduced through pair graph matching, and the solution efficiency and accuracy are improved.

[0107] The present invention also provides a computer-readable medium having program instructions stored thereon, and when the program instructions are executed by a processor, the GPS track and road matching methods provided by the above-mentioned various method embodiments are implemented.

[0108] The present invention also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the GPS track and road matching methods of the above-mentioned various method embodiments.

[0109] See also Figure 8 , which is a schematic diagram of the structure of a terminal provided in an embodiment of the present application. Figure 8 As shown, the terminal 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .

[0110] The communication bus 1002 is used to realize the connection and communication between these components.

[0111] The user interface 1003 may include a display screen (Display) and a camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.

[0112] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0113] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.

[0114] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Figure 8 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an availability analysis application for vehicle running trajectory data.

[0115] exist Figure 8In the terminal 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1001 can be used to call the GPS track and road matching application stored in the memory 1005, and specifically perform the following operations:

[0116] Compress the trajectory point data to form a polyline;

[0117] Obtain a road set according to the polyline and road layer;

[0118] Perform bigraph matching on multiple roads in the road set and the polyline to obtain a road that best matches the polyline.

[0119] In one embodiment, when the processor 1001 compresses the trajectory point data to form a polyline, the following operations are specifically performed:

[0120] The trajectory point data is compressed by Douglas-Peucker algorithm to form the broken line.

[0121] In one embodiment, when the processor 1001 executes the step of obtaining a road set according to the polyline and road layer, the processor 1001 specifically performs the following operations:

[0122] Constructing a buffer zone around the polyline with a certain buffer distance;

[0123] The buffer zone is superimposed on the road layer to obtain the road set in the buffer zone.

[0124] In one embodiment, when the processor 1001 performs bigraph matching on the multiple roads in the road set and the polyline to obtain a road that best matches the polyline, the processor 1001 specifically performs the following operations:

[0125] The Kuhn-Munkres algorithm is used to perform bigraph matching between the multiple roads in the road set and the polyline, so as to obtain a road that best matches the polyline.

[0126] In one embodiment, when the processor 1001 performs the dual graph matching of the multiple roads in the road set with the polyline to obtain a road that best matches the polyline, the processor 1001 specifically performs the following operations:

[0127] Performing dual graph matching on a plurality of roads in the road set and the polyline to obtain a weighted dual graph matching value corresponding to each of the roads;

[0128] The road corresponding to the maximum weighted even graph matching value is selected as the road that best matches the polyline.

[0129] In one embodiment, when the processor 1001 performs the dual graph matching between the multiple roads in the road set and the polyline to obtain the weighted dual graph matching value corresponding to each of the roads, the processor 1001 specifically performs the following operations:

[0130] Divide the multiple roads in the road set into equal parts to obtain a road equal division point set;

[0131] Divide the broken line into equal parts to obtain a set of points divided into equal parts;

[0132] A dual graph is constructed according to the equally divided point set of the road and the equally divided point set of the broken line, and a weighted dual graph matching value corresponding to each of the roads is obtained.

[0133] In one embodiment, when the processor 1001 constructs a dual graph according to the equally divided point set of the road and the equally divided point set of the polyline, and obtains the weighted dual graph matching value corresponding to each of the roads, the processor 1001 specifically performs the following operations:

[0134] The dual graph constructed according to the road equally divided point set and the broken line equally divided point set is:

[0135] G = {N, P, E}

[0136] Wherein, N represents the road equally divided point set, P represents the polyline equally divided point set, and E represents the edge set of nodes connecting the road equally divided point set N and the polyline equally divided point set P;

[0137] The obtained weighted dual graph matching value is the weight of the edge set E, which is expressed as:

[0138] R=∑ i Σ j w i,j

[0139] in, i represents the i-th node, j represents the j-th node; d i,j =||d i -d j ||2 represents the node d of the road equally divided point set N i To the node d where the polyline divides the point set P equally j , exp represents the exponential function, and σ represents the reduction factor of the distance between control nodes.

[0140] In the embodiment of the present application, the trajectory point data is first compressed to form a polyline, then a road set is obtained based on the polyline and the road layer, and finally multiple roads in the road set are matched with the polyline by a pair graph to obtain a road that best matches the polyline. The present application can filter and compress the offset of the trajectory point data, and can accurately select the road that best matches the trajectory point data; the complexity of the original matching process is reduced through pair graph matching, and the solution efficiency and accuracy are improved.

[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0142] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for matching GPS tracks and roads, characterized in that: The following steps are involved: Compress the trajectory point data to form a polyline; Constructing a buffer zone around the polyline with a certain buffer distance; Superimposing the buffer zone and the road layer to obtain a road set in the buffer zone; Divide the multiple roads in the road set into equal parts to obtain a road equal division point set; Divide the broken line into equal parts to obtain a set of points divided into equal parts; Constructing a dual graph according to the equally divided point set of the road and the equally divided point set of the broken line, and obtaining a weighted dual graph matching value corresponding to each of the roads; Selecting a road corresponding to a maximum weighted even graph matching value as a road that best matches the polyline; The step of constructing a dual graph according to the equally divided point set of the road and the equally divided point set of the broken line, and obtaining a weighted dual graph matching value corresponding to each of the roads includes: Step 1: Select the first node in the road equally divided point set N as the starting node, select the first node in the polyline equally divided point set P as the initial matching node of the first iteration, and calculate the weights between the set of matching nodes; Step 2: Construct pairs of the road equally divided point set N and other nodes in the polyline equally divided point set P according to the order of the nodes, and calculate the weights in turn; Step 3: Sum the weights of all matching nodes as the weighted dual graph matching value of the first iteration; Step 4: Change the second node in the polyline equally divided point set P as the initial matching node for the second iteration, repeat steps 2 and 3, and then change the initial matching nodes in the polyline equally divided point set P in turn during the iteration until all nodes in the polyline equally divided point set P are traversed, that is, all roads in the road set M are evenly matched with the polyline A; Among them, the dual graph constructed according to the road equally divided point set and the broken line equally divided point set is: G = {N, P, E} Wherein, N represents the road equally divided point set, P represents the polyline equally divided point set, and E represents the edge set of nodes connecting the road equally divided point set N and the polyline equally divided point set P; The obtained weighted dual graph matching value is the weight of the edge set E, which is expressed as: R=∑i∑jwi,j in, i represents the i-th node, j represents the j-th node; di,j=‖di-dj‖2 represents the spatial distance from the node di of the road equally divided point set N to the node dj of the polyline equally divided point set P, exp represents the exponential function, and σ represents the reduction factor of the distance between the control nodes; When ∑i∑jwi,j is maximized, the road equally divided point set N and the polyline equally divided point set P will be in a 1:1 mapping relationship, forming a maximum match, which means that each node in the road equally divided point set N matches only one node in the polyline equally divided point set P; The selecting the road corresponding to the maximum weighted even graph matching value as a road that best matches the polyline includes: After the above iterations are completed, the set of matches with the maximum weighted even graph matching value is obtained as the matches of the road equally divided point set N and the polyline equally divided point set P.

2. The matching method according to claim 1, characterized in that: The step of compressing the trajectory point data to form a broken line includes: The trajectory point data is compressed by Douglas-Peucker algorithm to form the broken line.

3. A GPS track and road matching device, characterized in that: include: A polyline acquisition module is used to compress the trajectory point data to form a polyline; A road set acquisition module is used to construct a buffer zone around the polyline with a certain buffer distance; superimpose the buffer zone with the road layer to obtain a road set in the buffer zone; A road matching module is used to divide the multiple roads in the road set into equal parts to obtain a road equal-division point set; divide the polyline into equal parts to obtain a polyline equal-division point set; construct a dual graph according to the road equal-division point set and the polyline equal-division point set, and obtain a weighted dual graph matching value corresponding to each of the roads; and select a road corresponding to a maximum weighted dual graph matching value as a road that best matches the polyline; Wherein, constructing a dual graph according to the equally divided point set of the road and the equally divided point set of the broken line, and obtaining a weighted dual graph matching value corresponding to each of the roads includes: Step 1: Select the first node in the road equally divided point set N as the starting node, select the first node in the polyline equally divided point set P as the initial matching node of the first iteration, and calculate the weights between the set of matching nodes; Step 2: Construct pairs of the road equally divided point set N and other nodes in the polyline equally divided point set P according to the order of the nodes, and calculate the weights in turn; Step 3: Sum the weights of all matching nodes as the weighted dual graph matching value of the first iteration; Step 4: Change the second node in the polyline equally divided point set P as the initial matching node for the second iteration, repeat steps 2 and 3, and then change the initial matching nodes in the polyline equally divided point set P in turn during the iteration until all nodes in the polyline equally divided point set P are traversed, that is, all roads in the road set M are evenly matched with the polyline A; Among them, the dual graph constructed according to the road equally divided point set and the broken line equally divided point set is: G = {N, P, E} Wherein, N represents the road equally divided point set, P represents the polyline equally divided point set, and E represents the edge set of nodes connecting the road equally divided point set N and the polyline equally divided point set P; The obtained weighted dual graph matching value is the weight of the edge set E, which is expressed as: R=∑i∑jwi,j in, i represents the i-th node, j represents the j-th node; di,j=‖di-dj‖2 represents the spatial distance from the node di of the road equally divided point set N to the node dj of the polyline equally divided point set P, exp represents the exponential function, and σ represents the reduction factor of the distance between the control nodes; When ∑i∑jwi,j is maximized, the road equally divided point set N and the polyline equally divided point set P will be in a 1:1 mapping relationship, forming a maximum match, which means that each node in the road equally divided point set N matches only one node in the polyline equally divided point set P; The selecting the road corresponding to the maximum weighted even graph matching value as a road that best matches the polyline includes: After the above iterations are completed, the set of matches with the maximum weighted even graph matching value is obtained as the matches of the road equally divided point set N and the polyline equally divided point set P.

4. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps of claim 1 or 2 .

5. A terminal, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, the computer program being suitable for being loaded by the processor and executing the method steps as claimed in claim 1 or 2.