CN110345964B - Path matching method, device, system and storage medium - Google Patents

Path matching method, device, system and storage medium Download PDF

Info

Publication number
CN110345964B
CN110345964B CN201910638749.1A CN201910638749A CN110345964B CN 110345964 B CN110345964 B CN 110345964B CN 201910638749 A CN201910638749 A CN 201910638749A CN 110345964 B CN110345964 B CN 110345964B
Authority
CN
China
Prior art keywords
road
road section
information
path
longitude
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910638749.1A
Other languages
Chinese (zh)
Other versions
CN110345964A (en
Inventor
张小强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Navinfo Co Ltd
Original Assignee
Navinfo Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Navinfo Co Ltd filed Critical Navinfo Co Ltd
Priority to CN201910638749.1A priority Critical patent/CN110345964B/en
Publication of CN110345964A publication Critical patent/CN110345964A/en
Application granted granted Critical
Publication of CN110345964B publication Critical patent/CN110345964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3446Details of route searching algorithms, e.g. Dijkstra, A*, arc-flags, using precalculated routes
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3453Special cost functions, i.e. other than distance or default speed limit of road segments
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3453Special cost functions, i.e. other than distance or default speed limit of road segments
    • G01C21/3461Preferred or disfavoured areas, e.g. dangerous zones, toll or emission zones, intersections, manoeuvre types, segments such as motorways, toll roads, ferries
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3453Special cost functions, i.e. other than distance or default speed limit of road segments
    • G01C21/3492Special cost functions, i.e. other than distance or default speed limit of road segments employing speed data or traffic data, e.g. real-time or historical

Abstract

The invention provides a path matching method, a device, a system and a storage medium, wherein the method comprises the following steps: receiving a planned path sent by a terminal; and analyzing longitude and latitude information from the planned path; searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; in the local road network, determining an ID sequence of a target road section according to a starting point and an end point of a planned path; feeding back the ID sequence of the target road section and additional information contained in the target road section to a terminal; the additional information is used for supplementing missing road section information on the terminal planning path. The method and the device improve the accuracy of path matching, ensure the authenticity and the accuracy of data, enrich terminal data by the additional information contained in the provided target road section, and support the terminal to provide better product experience for users.

Description

Path matching method, device, system and storage medium
Technical Field
The present invention relates to the field of path planning technologies, and in particular, to a path matching method, apparatus, system, and storage medium.
Background
With the rapid development of science and technology, the navigation product is greatly convenient for people to go out. The navigation product is used as one of auxiliary tools with high outgoing use frequency for users. After planning a route using a navigation terminal, a user also desires to acquire some additional information on Link (road segment) of a current driving road. For example, whether the route passes through a toll station and toll limit information, whether the route passes through a bridge tunnel, whether important warning information exists, whether the route passes through a construction site or temporary traffic restriction information, and the like.
Currently, most navigation terminals request various information of links included in a back-end route directly by link IDs or IDs of other road information. Namely, the navigation terminal can transmit information such as the link ID to the back end, and the back end calculates and extracts the information according to the link ID and sends the information to the navigation terminal.
However, in this way, the map data versions of the navigation terminal and the back end need to be completely consistent, otherwise, the situation of inconsistent road section IDs may cause information errors or missing, which causes inconvenience for users and poor user experience.
Disclosure of Invention
The invention provides a path matching method, a device, a system and a storage medium, which solve the problem of information error caused by inconsistent data versions of a terminal and a server, improve the accuracy of path matching, ensure the authenticity and the accuracy of data, enrich terminal data by additional information contained in a target road section, and support a terminal to provide better product experience for users.
In a first aspect, a path matching method is provided, including:
receiving a planned path sent by a terminal; and analyzing longitude and latitude information from the planned path;
searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data;
in the local road network, determining an ID sequence of a target road section according to a starting point and an end point of a planned path;
feeding back the ID sequence of the target road section and additional information contained in the target road section to a terminal; the additional information is used for supplementing missing road section information on the terminal planning path.
In a second aspect, a path matching method is provided, including:
generating a planning path according to the current position information and the end point position information;
sending the planned path to a background server; wherein the backend server is configured to perform the method of any of the first aspects;
receiving an ID sequence of a target road section sent by the background server and additional information contained in the target road section;
displaying an ID sequence of a target road section and additional information contained in the target road section; the additional information is used for supplementing missing road section information on the terminal planning path.
In a third aspect, a path matching apparatus is provided, including:
the receiving and sending module is used for receiving the planned path sent by the terminal; and analyzing longitude and latitude information from the planned path;
the processing module is used for searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; the ID sequence of the target road section is determined according to the starting point and the end point of the planned path in the local road network;
the transceiver module is further configured to feed back the ID sequence of the target road segment and additional information included in the target road segment to a terminal; the additional information is used for supplementing missing road section information on the terminal planning path.
In a fourth aspect, there is provided a path matching apparatus comprising:
the processing module is used for generating a planning path according to the current position information and the end point position information;
sending the planned path to a background server; wherein the backend server is configured to perform the method of any of the first aspects;
the receiving module is used for receiving the ID sequence of the target road section sent by the background server and the additional information contained in the target road section;
displaying an ID sequence of a target road section and additional information contained in the target road section; the additional information is used for supplementing missing road section information on the terminal planning path.
In a fifth aspect, a path matching system is provided, which includes:
a terminal and a server;
the terminal is used for generating a planned path according to the current position information and the end point position information and sending the planned path to the server; receiving an ID sequence of a target road section sent by the server and additional information contained in the target road section; displaying an ID sequence of a target road section and additional information contained in the target road section;
the server is used for receiving the planned path sent by the terminal; and analyzing longitude and latitude information from the planned path; searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; the ID sequence of the target road section is determined according to the starting point and the end point of the planned path in the local road network; feeding back the ID sequence of the target road section and additional information contained in the target road section to the terminal; the additional information is used for supplementing missing road section information on the terminal planning path.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the path matching method according to any one of the first aspects.
The invention provides a path matching method, a device, a system and a storage medium, wherein a planned path sent by a receiving terminal is used; and analyzing longitude and latitude information from the planned path; searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; in the local road network, determining an ID sequence of a target road section according to a starting point and an end point of a planned path; feeding back the ID sequence of the target road section and additional information contained in the target road section to a terminal; the additional information is used for supplementing missing road section information on the terminal planning path. The matching of the path data of the terminal and the path data of the rear end is realized spatially, the problem of information error caused by the fact that the data versions of the terminal and the server are inconsistent is solved, the accuracy of path matching is improved, the authenticity and the accuracy of the data are guaranteed, the additional information contained in the provided target road section enriches the terminal data, and the support terminal provides better product experience for users.
Drawings
FIG. 1 is a schematic diagram of an application scenario of the present invention;
fig. 2 is a flowchart of a path matching method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an original road network according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a local road network construction provided in an embodiment of the present invention;
fig. 5 is a schematic diagram of target link determination provided by an embodiment of the present invention;
fig. 6 is a flowchart of a path matching method according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a path matching apparatus according to a third embodiment of the present invention;
fig. 8 is a schematic structural diagram of a path matching apparatus according to a fourth embodiment of the present invention;
fig. 9 is a schematic structural diagram of a path matching system according to a fifth embodiment of the present invention;
fig. 10 is a schematic structural diagram of a path matching system according to a sixth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the prior art, a terminal mostly requests various information of a link from a back end by directly using a link ID or an ID of other road information. After a terminal has planned a path, it is desirable to obtain some additional information from the back-end. For example, whether the route passes through a toll station and toll limit information, whether the route passes through a bridge tunnel, whether there is a significant warning information, whether the route passes through a construction site or a temporary traffic restriction, and the like. After the terminal transmits information such as the link ID to the back end, the back end extracts the above-mentioned various information according to the link ID. However, a great problem of the prior art is that the map data versions of the terminal and the backend must be completely consistent. If the two map versions are not consistent, the road section IDs are not consistent, so that the road section information extracted by the back end is wrong or missing.
Aiming at the problems in the prior art, the invention aims to provide a path matching method which does not depend on the map version of a terminal and only needs to ensure the authenticity and the accuracy of data as long as the terminal and the rear end are consistent on spatial data. Through additional information contained in the target road section provided by the rear end, the map data of the terminal can be obtained, and the terminal is supported to provide better product experience for users.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a schematic diagram of an application scenario of the present invention, as shown in fig. 1, a user inputs start point and end point information on a navigation terminal 10, and a navigation service of the terminal 10 performs path planning according to the start point and end point information input by the user. If the terminal 10 desires to acquire additional information (e.g., toll amount information, route point information, warning information, traffic information, etc.) on the planned route, the planned route of the navigation service is transmitted to the server 20. The server 20 receives the planned path sent by the terminal 10 and analyzes longitude and latitude information from the planned path; the server 20 searches road sections meeting preset conditions in the R tree according to the longitude and latitude information, and constructs a local road network according to the found road sections; the server 20 determines an ID sequence of a target road section according to a starting point and an end point of a planned path in a local road network; the server 20 feeds back the ID sequence of the target link and additional information contained in the target link to the terminal 10.
By applying the method, the matching of the path data of the terminal and the path data of the rear end can be realized in space, the problem of information error caused by the inconsistent data versions of the terminal and the server is solved, the accuracy of path matching is improved, the authenticity and the accuracy of the data are ensured, the provided additional information contained in the target road section enriches the terminal data, and the support terminal provides better product experience for users.
The following describes the technical solutions of the present invention and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a path matching method according to an embodiment of the present invention, and as shown in fig. 2, the method in this embodiment may include:
s101, receiving a planned path sent by a terminal; and analyzing the longitude and latitude information from the planned path.
In this embodiment, the terminal appropriately rarefies the latitude and longitude of the planned path and compiles the rarefied longitude and latitude into a binary format to reduce network transmission, and sends a request to the server by storing data in a small-end mode. And the server receives the planned path sent by the terminal and decodes the binary system to obtain the latitude and longitude information.
S102, searching road sections meeting preset conditions in the R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections; the R-tree is a road segment spatial index established in advance from the loaded road network data.
In this embodiment, after the latitude and longitude information is determined, the position of the latitude and longitude on the electronic map may be determined according to the latitude and longitude information, and then the search range may be determined with the position of the latitude and longitude on the electronic map as the center. Within the search range, link IDs intersecting the range are found through the R tree.
In an optional implementation manner, the server acquires coordinate values of longitude and latitude on an electronic map (generally, the electronic map of the latest version loaded on a background server), and determines a search area of a road section by taking the coordinate values as a center and a preset first threshold as a radius; searching all road sections intersected with the search area through the R tree to serve as candidate road sections; wherein, R tree means: pre-establishing a road section space index according to the loaded road network data; the road section spatial index comprises road section ID, weight information of the road section, longitude and latitude information of the road section and road section additional information; the link additional information includes: charge amount information, route point information, warning information and traffic road condition information; and constructing a local road network based on the candidate road sections.
Specifically, the R tree includes a road section spatial index established by the road network data, and the R tree itself has the longitude and latitude information of the road section, so that when coordinate values of the longitude and latitude are obtained, the R tree can find a corresponding position on the R tree. When the search area is determined with the coordinate value as the center, the search areas with the same radius may be determined with the corresponding position as the center on the R-tree, and then all the link IDs having the intersection with the search area may be recorded. It should be noted that after the link ID is determined, the link additional information corresponding to the link ID may be queried from the R tree by the link ID. Such as toll line information, route point information, warning information, traffic information, etc. of a certain road section.
Specifically, fig. 3 is a schematic diagram of an original road network provided in an embodiment of the present invention, as shown in fig. 3, dots in the diagram represent road segment nodes, connected thin lines represent connected roads in the road network, and black thick lines represent planned paths sent by a terminal, where the planned paths of the terminal do not necessarily completely match the original road network on a server due to problems such as version problems and allelic accuracy. Fig. 4 is a schematic diagram of a local road network construction provided in an embodiment of the present invention, and as shown in fig. 4, in the present embodiment, route information in a range in which a first threshold is a radius is searched with longitude and latitude of a planned path as a center, and finally, the local network shown in fig. 4 is obtained. In the local road network, some road sections with low relevance with the planned path are removed.
If the road network data is large, layered processing can be carried out, and different road networks are constructed in each layer. For example, the plan is divided into high speed, national road and provincial road according to different road section grades. And searching matched road section information in the road network of which the longitude and the latitude fall into the road network. If the planned path distance is longer, the path with the longer distance can be cut into a plurality of road sections to be matched in a segmented mode. And finally, summarizing results of the hierarchical matching or the segmented matching to construct a local road network. The efficiency of the method for requesting large data volume can be improved to some extent.
It should be noted that the local road network construction is an important link for ensuring the connectivity of the matched target road segments in the present invention. The planned path sent by the terminal does not have the road section ID, the planned path is matched to a road network accurately, and the connectivity of the matched path is critical. The accuracy can be ensured only if the matched road section sequences are connected. Connectivity can only be achieved by threading, i.e. the shortest path between two points. In the embodiment, the longitude and latitude are used for accurate and faultless path matching, and a local road network needs to be constructed to realize connectivity, so that the accuracy of matching the path is ensured.
And S103, determining the ID sequence of the target road section in the local road network according to the starting point and the end point of the planned path.
In the embodiment, a weighted directed graph of all road sections is constructed according to a local road network, wherein the weighted directed graph comprises road section IDs and weight information of the road sections; determining the positions of the starting point and the end point of the planned path in the weighted directed graph; finding all communication paths between the starting point and the end point by adopting a shortest path algorithm and/or a least time-consuming algorithm; according to the communication path, an ID sequence of the target link is determined.
In this embodiment, the link ID of the weighted directed graph is used to identify a link, and the weight information of the link is used to calculate a communication path. In the weighted directed graph of the known link IDs, after the communication paths are determined, the ID sequence of the target link can be obtained from each link ID of the communication path. Specifically, the weight information of the road segment may be a distance of the road segment, an average time consumption of the road segment, and the like, so that all communication paths between the starting point and the ending point may be found by using a shortest path algorithm and/or a least time consumption algorithm according to the weight information of the road segment.
Specifically, fig. 5 is a schematic diagram of determining a target road segment according to an embodiment of the present invention, and as shown in fig. 5, a server constructs a weighted directed graph of all road segments in a local road network, and then finds all communication paths between a starting point and an end point by using a shortest path algorithm and/or a least-time algorithm, and finally obtains the road segments from the starting point to the end point, which are L2, L5, L7, L10, L12, L13, and L14.
In an optional implementation manner, before executing step S103, a first longitude and latitude coordinate value and a last longitude and latitude coordinate value in the longitude and latitude information may also be read; determining a search range of a starting point by taking the first longitude and latitude coordinate value as a center and a preset second threshold value as a radius; taking the node which is positioned in the searching range and is closest to the first longitude and latitude coordinate value as a starting point of the planning path; determining the searching range of the end point by taking the last longitude and latitude coordinate value as a center and a preset third threshold value as a radius; and taking the node which is positioned in the searching range and is closest to the last longitude and latitude coordinate value as the terminal point of the planned path.
It should be noted that the closest in this embodiment means that the straight-line distance between two points is shortest. I.e. the straight-line distance between the node and the point corresponding to the coordinate value is minimal. The longitude and latitude coordinate value of the path is a point string, and the first point of the point string and the last point of the point string are selected. It should be noted here that after a path is determined, the longitude and latitude point string corresponding to the path is also determined, and the acquisition mode may be acquired on the line segment corresponding to the planned path according to a preset distance.
Further, if the node meeting the requirement cannot be found in the current search range, the search range can be expanded until the node which is located in the search range and is closest to the first longitude and latitude coordinate value is found.
S104, feeding back the ID sequence of the target road section and additional information contained in the target road section to the terminal; the additional information is used for supplementing missing road section information on the terminal planning path.
In this embodiment, the ID sequence of the target link determined in step S103 and additional information included in the target link are fed back to the terminal. Wherein the additional information includes: charge amount information, route point information, warning information, traffic road condition information and the like.
In a possible application scenario, if the number of the communication paths is greater than 1, the communication path with the highest matching degree with the route shape of the planned path is taken as a target path; and acquiring the ID sequence of the target road section corresponding to the target path. Matching is carried out through the similarity of the shapes of the paths, other communication paths are removed, and the only communication path with the maximum similarity is returned to the terminal.
It should be noted that the route shape matching degree refers to the similarity of the shapes of two routes after the two routes are scaled to the same size. Specifically, the planned path and the communication path may be stacked, and the higher the coincidence degree is, the higher the matching degree (similarity) thereof is.
In another possible application scenario, if the number of the communication paths is greater than 1, screening out all the communication paths of which the difference between the distance of the communication paths and the distance of the planned path is within a preset range; all the screened communication paths are taken as target paths; and acquiring an ID sequence of a target road section of the target road section corresponding to the target path, and feeding back additional information contained in the target road section to the terminal. The implementation carries out screening according to the distance difference between the communication paths and the distance of the planned path, and carries out sorting according to the distance difference, and returns a plurality of communication paths to the terminal for the user to select.
In this embodiment, the road network data is first loaded into the memory to construct the R tree. The terminal sends the planned path, the longitude and the latitude are properly diluted and compiled into a binary format, network transmission is reduced, data is stored in a small-end mode and a request is sent to a back end, and the back end decodes the binary into the longitude and the latitude. And the rear end side determines the starting point and the ending point according to the longitude and latitude of the request. Specifically, the map sheet or the tile to which the map sheet or the tile belongs may be calculated according to the first longitude and latitude and the last longitude and latitude, and then a node point closest to the longitude and latitude within a certain distance (for example, within 10 meters) is searched within the range of the map sheet or the tile to determine as the starting point or the ending point. Searching all candidate road segments (e.g. in a 30-meter radius area, searching road segments intersecting the area as candidate road segments) in the R-tree (spatial index) according to the longitude and latitude transferred to the back end, constructing a local road network according to the candidate road segments, and generating a weighted directed graph, wherein the weight of the road segments can be set as the length of the road segments. And calculating the shortest distance from the starting point to the end point in the local road network by utilizing a Dijkstra algorithm (or other shortest path algorithms such as A) and the like to obtain a target road section sequence forming the shortest distance. And returning information required by the front end according to the target road section sequence.
Specifically, taking the charging service as an example, after the driving end selects the starting point and the ending point, the route calculation request may be sent to the map server, and the map server performs route planning, and if the planned route includes a high-speed city height, a national province road, the map server returns the part of the longitude and latitude coordinate string and the vehicle related information to the four-dimensional high-speed charging service platform according to a predefined transmission protocol. After the four-dimensional high-speed charging service platform obtains the coordinate string, path matching is carried out according to the path matching algorithm to obtain a plurality of road sections in the four-dimensional road network, and then high-speed cost required by the path is calculated according to the charging standard and the business principle which are connected to the road sections and is returned to the map server. And finally, the map server feeds the charging information and the planned path back to the driving end.
In the prior art, a terminal side plans a path according to a map of a local version, and sends the planned path to a server. Because the map on the server side may be the map of the latest version and the map on the terminal side is the map of the old version, if the road section information is fed back to the terminal directly according to the planned road sent by the terminal, the situation of wrong road section matching is easy to occur, so that the road section information received by the terminal side is inaccurate.
In view of the above problem, in this embodiment, the server first parses the longitude and latitude information from the planned path sent by the terminal (this is because the link IDs of the same link in the maps of different versions may change, but the longitude and latitude information of the same link does not change, so that link matching errors caused by inconsistent map versions can be avoided), and then, searching road sections meeting preset conditions in the R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections (because a road section space index established according to road network data is pre-loaded in the R tree, after the longitude and latitude information is known, the road section matching can be carried out on the planned path of the terminal through the local road network constructed by the R tree.
It should be noted that, because the road segment information on the terminal-side map is often not the latest version, or the loaded road segment information is not comprehensive enough, the terminal side sends the planned route to the server side, so as to obtain more additional information on the road segment corresponding to the planned route from the server side. By applying the method in the embodiment, after the server determines the ID sequence of the target road section, the ID sequence of the target road section and the additional information contained in the target road section are fed back to the terminal, so that accurate road section information can be obtained, the fed-back additional information enriches terminal data, and the terminal can be supported to provide better product experience for users.
In this embodiment, a planned path sent by a receiving terminal is used; and analyzing longitude and latitude information from the planned path; searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; in a local road network, determining an ID sequence of a target road section according to a starting point and an end point of a planned path; feeding back the ID sequence of the target road section and additional information contained in the target road section to the terminal; the additional information is used for supplementing missing road section information on the terminal planning path. The matching of the path data of the terminal and the path data of the rear end is realized spatially, the problem of information error caused by the fact that the data versions of the terminal and the server are inconsistent is solved, the accuracy of path matching is improved, the authenticity and the accuracy of the data are guaranteed, the additional information contained in the provided target road section enriches the terminal data, and the support terminal provides better product experience for users.
Fig. 6 is a flowchart of a path matching method according to a second embodiment of the present invention, and as shown in fig. 6, the method in this embodiment may include:
and S201, generating a planned path according to the current position information and the end point position information.
In this embodiment, the terminal may acquire current position information through the positioning sensor, and then generate a planned path through the map APP based on the end position.
And S202, sending the planned path to a background server.
In this embodiment, the terminal sends the planned path generated in step S201 to the background server, so that the background server executes the method shown in fig. 2.
S203, receiving the ID sequence of the target road section sent by the background server and additional information contained in the target road section.
In this embodiment, the terminal receives the ID sequence of the target road segment and the corresponding accessory information fed back by the background server, where the accessory information may include toll line information, route point information, warning information, traffic road condition information, and the like of the road segment.
S204, displaying the ID sequence of the target road section and additional information contained in the target road section; the additional information is used for supplementing missing road section information on the terminal planning path.
In this embodiment, the terminal may display the ID sequence of the target road segment and additional information included in the target road segment on the current map display interface.
In the embodiment, a planned path is generated according to the current position information and the end point position information; sending the planned path to a background server; receiving an ID sequence of a target road section sent by a background server and additional information contained in the target road section; displaying the ID sequence of the target road section and additional information contained in the target road section; the additional information is used for supplementing missing road section information on the terminal planning path. The matching of the path data of the terminal and the path data of the rear end is realized spatially, the problem of information error caused by the fact that the data versions of the terminal and the server are inconsistent is solved, the accuracy of path matching is improved, the authenticity and the accuracy of the data are guaranteed, the additional information contained in the provided target road section enriches the terminal data, and the support terminal provides better product experience for users.
Fig. 7 is a schematic structural diagram of a path matching device according to a third embodiment of the present invention, and as shown in fig. 7, the path matching device according to the present embodiment may include:
a transceiver module 31, configured to receive a planned path sent by a terminal; and analyzing longitude and latitude information from the planned path;
the processing module 32 is configured to search road segments meeting preset conditions in an R tree according to the longitude and latitude information, and construct a local road network according to the found road segments, where the R tree is a road segment spatial index established in advance according to loaded road network data; the method comprises the steps of determining an ID sequence of a target road section according to a starting point and an end point of a planned path in a local road network;
the transceiver module 31 is further configured to feed back the ID sequence of the target road segment and additional information included in the target road segment to the terminal; the additional information is used for supplementing missing road section information on the terminal planning path.
Optionally, the processing module 32 is specifically configured to:
acquiring coordinate values of longitude and latitude on an electronic map, and determining a search area of a road section by taking the coordinate values as a center and a preset first threshold as a radius;
searching all road sections intersected with the search area through the R tree to serve as candidate road sections; the road section spatial index of the R tree comprises road section ID information, road section weight information, road section longitude and latitude information and road section additional information; the link additional information includes: charge amount information, route point information, warning information and traffic road condition information;
and constructing a local road network based on the candidate road sections. Optionally, the processing module 32 is further configured to: in a local road network, reading a first longitude and latitude coordinate value and a last longitude and latitude coordinate value in longitude and latitude information before determining an ID sequence of a target road section according to a starting point and an end point of a planned path;
determining a search range of a starting point by taking the first longitude and latitude coordinate value as a center and a preset second threshold value as a radius; taking the node which is positioned in the searching range and is closest to the first longitude and latitude coordinate value as a starting point of the planning path;
determining the searching range of the end point by taking the last longitude and latitude coordinate value as a center and a preset third threshold value as a radius; and taking the node which is positioned in the searching range and is closest to the last longitude and latitude coordinate value as the terminal point of the planned path.
Optionally, the processing module 32 is further configured to:
according to the local road network, constructing a weighted directed graph of all road sections, wherein the weighted directed graph comprises road section IDs and weight information of the road sections;
determining the positions of the starting point and the end point of the planned path in the weighted directed graph;
finding all communication paths between the starting point and the end point by adopting a shortest path algorithm and/or a least time-consuming algorithm;
according to the communication path, an ID sequence of the target link is determined.
Optionally, the processing module 32 is further configured to:
if the number of the communication paths is larger than 1, taking the communication path with the highest matching degree with the route shape of the planned path as a target path; acquiring an ID sequence of a target road section corresponding to the target path; or
If the number of the communication paths is larger than 1, screening out all the communication paths of which the difference between the distance of the communication paths and the distance of the planned path is within a preset range; all the screened communication paths are taken as target paths; and acquiring an ID sequence of a target road section of the target road section corresponding to the target path.
In this embodiment, a planned path sent by a receiving terminal is used; and analyzing longitude and latitude information from the planned path; searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; in a local road network, determining an ID sequence of a target road section according to a starting point and an end point of a planned path; feeding back the ID sequence of the target road section and additional information contained in the target road section to the terminal; the additional information is used for supplementing missing road section information on the terminal planning path. The matching of the path data of the terminal and the path data of the rear end is realized spatially, the problem of information error caused by the fact that the data versions of the terminal and the server are inconsistent is solved, the accuracy of path matching is improved, the authenticity and the accuracy of the data are guaranteed, the additional information contained in the provided target road section enriches the terminal data, and the support terminal provides better product experience for users.
The path matching apparatus of this embodiment may execute the technical solution in the method shown in fig. 2, and for the specific implementation process and the technical principle, reference is made to the relevant description in the method shown in fig. 2, which is not described herein again.
Fig. 8 is a schematic structural diagram of a path matching device according to a fourth embodiment of the present invention, and as shown in fig. 8, the path matching device according to the present embodiment may include:
the processing module 41 is configured to generate a planned path according to the current position information and the end point position information;
sending the planned path to a background server; wherein the backend server is configured to perform the method of any one of the first aspect;
a receiving module 42, configured to receive an ID sequence of a target road segment sent by a background server and additional information included in the target road segment;
displaying the ID sequence of the target road section and additional information contained in the target road section; the additional information is used for supplementing missing road section information on the terminal planning path.
In the embodiment, a planned path is generated according to the current position information and the end point position information; sending the planned path to a background server; receiving an ID sequence of a target road section sent by a background server and additional information contained in the target road section; displaying the ID sequence of the target road section and additional information contained in the target road section; the additional information is used for supplementing missing road section information on the terminal planning path. The matching of the path data of the terminal and the path data of the rear end is realized spatially, the problem of information error caused by the fact that the data versions of the terminal and the server are inconsistent is solved, the accuracy of path matching is improved, the authenticity and the accuracy of the data are guaranteed, the additional information contained in the provided target road section enriches the terminal data, and the support terminal provides better product experience for users.
The path matching apparatus of this embodiment may execute the technical solution in the method shown in fig. 6, and for the specific implementation process and technical principle, reference is made to the relevant description in the method shown in fig. 6, which is not described herein again.
Fig. 9 is a schematic structural diagram of a path matching system according to a fifth embodiment of the present invention, and as shown in fig. 9, the path matching system 50 according to the present embodiment may include a terminal 51 and a server 52;
the terminal 51 is used for generating a planned path according to the current position information and the end point position information and sending the planned path to the server; receiving the ID sequence of the target road section sent by the server and additional information contained in the target road section; displaying the ID sequence of the target road section and additional information contained in the target road section;
a server 52, configured to receive the planned path sent by the terminal; and analyzing longitude and latitude information from the planned path; searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; the method comprises the steps of determining an ID sequence of a target road section according to a starting point and an end point of a planned path in a local road network; feeding back the ID sequence of the target road section and additional information contained in the target road section to the terminal; the additional information is used for supplementing missing road section information on the terminal planning path.
The path matching system of this embodiment may execute the technical solutions in the methods shown in fig. 2 and fig. 6, and the specific implementation process and technical principle of the path matching system refer to the related descriptions in the methods shown in fig. 2 and fig. 6, which are not described herein again.
Fig. 10 is a schematic structural diagram of a path matching system according to a sixth embodiment of the present invention, and as shown in fig. 10, the path matching system 60 according to the present embodiment may include: a processor 61 and a memory 62.
A memory 62 for storing a computer program (such as an application program, a functional module, and the like implementing the path matching method described above), computer instructions, and the like;
the computer programs, computer instructions, etc. described above may be stored in one or more memories 62 in partitions. And the above-mentioned computer program, computer instructions, data, etc. can be called by the processor 61.
A processor 61 for executing the computer program stored in the memory 62 to implement the steps of the method according to the above embodiments.
Reference may be made in particular to the description relating to the preceding method embodiment.
The processor 61 and the memory 62 may be separate structures or may be an integrated structure integrated together. When the processor 61 and the memory 62 are separate structures, the memory 62 and the processor 61 may be coupled by a bus 63.
The server in this embodiment may execute the technical solutions in the methods shown in fig. 2 and fig. 6, and the specific implementation process and technical principle of the server refer to the relevant descriptions in the methods shown in fig. 2 and fig. 6, which are not described herein again.
In addition, embodiments of the present application further provide a computer-readable storage medium, in which computer-executable instructions are stored, and when at least one processor of the user equipment executes the computer-executable instructions, the user equipment performs the above-mentioned various possible methods.
Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in user equipment. Of course, the processor and the storage medium may reside as discrete components in a communication device.
The present application further provides a program product comprising a computer program stored in a readable storage medium, from which the computer program can be read by at least one processor of a server, the execution of the computer program by the at least one processor causing the server to carry out the method of any of the embodiments of the invention described above.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A path matching method, comprising:
receiving a planned path sent by a terminal; and analyzing longitude and latitude information from the planned path;
searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; the road sections meeting the preset conditions are all road sections which are intersected with a search area through the R tree search, and the search area is determined according to the longitude and latitude information;
in the local road network, determining an ID sequence of a target road section according to a starting point and an end point of a planned path;
feeding back the ID sequence of the target road section and additional information contained in the target road section to a terminal; the additional information is used for supplementing missing road section information on the terminal planning path.
2. The method according to claim 1, wherein according to the longitude and latitude information, searching for road segments meeting preset conditions in an R tree, and constructing a local road network according to the found road segments; the method comprises the following steps:
acquiring coordinate values of longitude and latitude on an electronic map, and determining a search area of a road section by taking the coordinate values as a center and a preset first threshold as a radius;
searching all road sections intersected with the search area through the R tree to serve as candidate road sections; the road section spatial index of the R tree comprises road section ID, weight information of the road section, longitude and latitude information of the road section and road section additional information; the link additional information includes: charge amount information, route point information, warning information and traffic road condition information;
and constructing a local road network based on the candidate road sections.
3. The method according to claim 1 or 2, wherein before determining the ID sequence of the target road segment according to the starting point and the ending point of the planned path in the local road network, the method further comprises:
reading a first longitude and latitude coordinate value and a last longitude and latitude coordinate value in the longitude and latitude information;
determining a search range of a starting point by taking the first longitude and latitude coordinate value as a center and a preset second threshold value as a radius; taking the node which is positioned in the searching range and is closest to the first longitude and latitude coordinate value as a starting point of a planning path;
determining the searching range of the end point by taking the last longitude and latitude coordinate value as a center and a preset third threshold value as a radius; and taking the node which is positioned in the searching range and is closest to the last longitude and latitude coordinate value as the terminal point of the planned path.
4. The method according to claim 1 or 2, wherein determining the ID sequence of the target road segment according to the starting point and the ending point of the planned path in the local road network comprises:
according to the local road network, constructing a weighted directed graph of all road sections;
determining the positions of a starting point and an end point of a planned path in the weighted directed graph;
finding all communication paths between the starting point and the end point by adopting a shortest path algorithm and/or a least time-consuming algorithm;
and determining an ID sequence of the target road section according to the communication path.
5. The method according to claim 4, wherein determining an ID sequence of a target link according to the communication path includes:
if the number of the communication paths is larger than 1, taking the communication path with the highest matching degree with the route shape of the planned path as a target path; acquiring an ID sequence of a target road section corresponding to the target path; or
Screening all communication paths of which the difference between the distance of the communication paths and the distance of the planned path is within a preset range if the number of the communication paths is more than 1; all the screened communication paths are taken as target paths; and acquiring an ID sequence of a target road section of the target road section corresponding to the target path.
6. A path matching method, comprising:
generating a planning path according to the current position information and the end point position information;
sending the planned path to a background server; wherein the backend server is configured to perform the method of any one of claims 1-5;
receiving an ID sequence of a target road section sent by the background server and additional information contained in the target road section;
displaying an ID sequence of a target road section and additional information contained in the target road section; the additional information is used for supplementing missing road section information on the terminal planning path.
7. A path matching apparatus, comprising:
the receiving and sending module is used for receiving the planned path sent by the terminal; and analyzing longitude and latitude information from the planned path;
the processing module is used for searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; the ID sequence of the target road section is determined according to the starting point and the end point of the planned path in the local road network; the road sections meeting the preset conditions are all road sections which are intersected with a search area through the R tree search, and the search area is determined according to the longitude and latitude information;
the transceiver module is further configured to feed back the ID sequence of the target road segment and additional information included in the target road segment to a terminal; the additional information is used for supplementing missing road section information on the terminal planning path.
8. The apparatus of claim 7, wherein the processing module is specifically configured to:
acquiring coordinate values of longitude and latitude on an electronic map, and determining a search area of a road section by taking the coordinate values as a center and a preset first threshold as a radius;
searching all road sections intersected with the search area through the R tree to serve as candidate road sections; the road section spatial index of the R tree comprises road section ID information, road section weight information, road section longitude and latitude information and road section additional information; the link additional information includes: charge amount information, route point information, warning information and traffic road condition information;
and constructing a local road network based on the candidate road sections.
9. A path matching system, comprising: a terminal and a server;
the terminal is used for generating a planned path according to the current position information and the end point position information and sending the planned path to the server; receiving an ID sequence of a target road section sent by the server and additional information contained in the target road section; displaying an ID sequence of a target road section and additional information contained in the target road section;
the server is used for receiving the planned path sent by the terminal; and analyzing longitude and latitude information from the planned path; searching road sections meeting preset conditions in an R tree according to the longitude and latitude information, and constructing a local road network according to the found road sections, wherein the R tree is a road section space index which is established in advance according to loaded road network data; the ID sequence of the target road section is determined according to the starting point and the end point of the planned path in the local road network; feeding back the ID sequence of the target road section and additional information contained in the target road section to the terminal; the additional information is used for supplementing missing road section information on a terminal planning path;
the road sections meeting the preset conditions are all road sections which are intersected with a search area through the R tree search, and the search area is determined according to the longitude and latitude information.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the path matching method of any one of claims 1 to 6.
CN201910638749.1A 2019-07-16 2019-07-16 Path matching method, device, system and storage medium Active CN110345964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910638749.1A CN110345964B (en) 2019-07-16 2019-07-16 Path matching method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910638749.1A CN110345964B (en) 2019-07-16 2019-07-16 Path matching method, device, system and storage medium

Publications (2)

Publication Number Publication Date
CN110345964A CN110345964A (en) 2019-10-18
CN110345964B true CN110345964B (en) 2021-04-30

Family

ID=68176404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910638749.1A Active CN110345964B (en) 2019-07-16 2019-07-16 Path matching method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN110345964B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111854768B (en) * 2020-03-05 2022-05-24 北京嘀嘀无限科技发展有限公司 Method and system for determining map route, terminal, and computer-readable storage medium
CN112050820A (en) * 2020-09-02 2020-12-08 平安科技(深圳)有限公司 Road matching method and device, electronic equipment and readable storage medium
CN112284405B (en) * 2020-10-09 2022-06-07 腾讯科技(深圳)有限公司 Method, apparatus, computing device and computer readable medium for navigation
CN112800161B (en) * 2021-02-08 2022-03-25 腾讯科技(深圳)有限公司 Road network matching method and device, storage medium and electronic equipment
CN114353811A (en) * 2021-12-30 2022-04-15 广州小鹏自动驾驶科技有限公司 High-precision map loading method and device, vehicle and storage medium
CN115292962B (en) * 2022-09-14 2023-02-14 深圳市城市交通规划设计研究中心股份有限公司 Path similarity matching method and device based on track rarefaction and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944095B (en) * 2009-07-08 2012-09-12 广东瑞图万方科技股份有限公司 Path planning method and system
CN102147261B (en) * 2010-12-22 2013-07-03 广州通易科技有限公司 Method and system for map matching of transportation vehicle GPS (Global Position System) data
US9595209B2 (en) * 2011-12-13 2017-03-14 Telenav, Inc. Navigation system with map matching mechanism and method of operation thereof
CN104567906B (en) * 2015-01-14 2017-06-23 合肥革绿信息科技有限公司 A kind of city road network vehicle path planning method and device based on the Big Dipper
CN106969764B (en) * 2016-01-13 2020-05-01 北京四维图新科技股份有限公司 Road matching method and device and vehicle-mounted map acquisition system
JP2018013924A (en) * 2016-07-20 2018-01-25 株式会社豊田中央研究所 Moving body route retrieve device, symbol string retrieval device and program
CN107806883B (en) * 2016-09-08 2020-02-18 高德信息技术有限公司 Navigation method and device
CN109556612B (en) * 2017-09-26 2022-03-08 腾讯科技(深圳)有限公司 Navigation information processing method, device, server, terminal and storage medium

Also Published As

Publication number Publication date
CN110345964A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN110345964B (en) Path matching method, device, system and storage medium
US20220333930A1 (en) Map-matching for low-sampling-rate gps trajectories
JP5599830B2 (en) Route guidance system, route guidance server device, and navigation terminal device
CN108763558B (en) Crowdsourcing map road quality improvement method based on map matching
AU2009251839C1 (en) Transmission of routes between client and server using route IDs
CN102265114B (en) System and method for storing and providing routes
CN102506853B (en) Path planning method, air navigation aid, location service equipment and server
EP3163466B1 (en) Trajectory data inquiry method and apparatus
EP2659228B1 (en) Generation of a seamless network of road or line segments in a digital map
CN106595682A (en) Differential updating method and system of map data, and server
Shang et al. Finding traffic-aware fastest paths in spatial networks
CN109212571A (en) Navigation locating method and device
CN106855878B (en) Historical driving track display method and device based on electronic map
KR102386786B1 (en) Method for managing travel route database based on location and server for the method
CN104215251A (en) Updating method for navigation topological data in navigation electronic map and related apparatus
CN102331578B (en) Navigation information transmission method as well as navigation server and position service terminal
CN114422885A (en) Route searching method, device, equipment and medium based on topological route
CN110830915B (en) Method and device for determining starting point position
Huang et al. Frequent pattern-based map-matching on low sampling rate trajectories
CN109800360B (en) Cell query method, cell query device, electronic equipment and storage medium
CN112381078B (en) Elevated-based road identification method, elevated-based road identification device, computer equipment and storage medium
US20240096211A1 (en) Processing apparatus and method for generating route navigation data
KR100519627B1 (en) A navigation system, an information providing apparatus, a traffic information generating method, and a navigation method
US10495473B2 (en) Route search apparatus, route search method, computer readable storage medium storing a program and data structure
JP2006170978A (en) Positional information transmitter, positional information receiver, positional information exchanging method, positional information exchanging program, and positional information exchanging system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant