Method and device for comparing multiple planned routes
阅读说明:本技术 多条规划路线比较方法及装置 (Method and device for comparing multiple planned routes ) 是由 徐平 于 2018-07-20 设计创作,主要内容包括:本发明提供了一种多条规划路线比较方法和装置。该多条规划路线比较方法包括:获取多条规划路线中的第一规划路线对应的第一路链列表;获取多条规划路线中的第二规划路线对应的第二路链列表;以及根据第一路链列表和第二路链列表确定差异路链,差异路链包括第一路链列表和第二路链列表中不同的路链。本发明的多条规划路线比较方法及装置,可以确定出任意两条路链的差异路链,并可以在显示两条规划路线的不同,可以极大地方便用户选区规划路线。(The invention provides multi-route planning comparison methods and devices, wherein the multi-route planning comparison method comprises the steps of obtaining a th link list corresponding to a th planned route in the multi-route planning, obtaining a second link list corresponding to a second planned route in the multi-route planning, and determining a difference link according to the th link list and the second link list, wherein the difference link comprises different links in the th link list and the second link list.)
1, a method of comparing a plurality of planned routes, the plurality of planned routes including a th planned route and a second planned route, the method comprising:
acquiring a th link list corresponding to the th planned route;
acquiring a second road chain list corresponding to the second planned route; and
determining a differential link according to the th link list and the second link list, where the differential link includes a different link in the th link list and the second link list.
2. The method of comparing multiple planned routes according to claim 1, wherein the step of determining a differential link from the th link list and the second link list comprises:
determining the same links in the link list and the second link list to get the common links, and
and determining the differential link according to the th link list, the second link list and the public link.
3. The method of comparing multiple planned routes according to claim 2, wherein the step of determining the same link in the th and second lists of links comprises iteratively performing the steps of:
extracting th link from the th link list;
comparing the th road chain with or more second road chains in the second road chain list, and
if the th link is the same as the second links, the th link is the same link.
4. The method of claim 2, wherein the step of determining the difference link according to the th link list, the second link list and the public link list comprises:
removing the public link from the th link list to obtain th differential link, and
removing the public link from the second link list to obtain a second differential link;
wherein the th differential link and the second differential link together constitute the differential link.
5. The method of comparing multiple planned routes according to claim 1, wherein the step of determining a differential link from the th link list and the second link list comprises:
the following steps are performed iteratively:
extracting th link from the th link list;
aligning the th road link with every second road link of the second road links;
if the th link is different from all the second links, the th link is a different link;
and/or iteratively performing the following steps:
fetching a second link from the second link list;
aligning the second strand to every th th strand of the th strands;
and if the second link is different from all the th links, the second link is a different link.
6. The method for comparing multiple planned routes according to claim 3 or 5, wherein the comparing of the th road link and the second road link is performed by comparing road link identifications.
7. The method of comparing multiple planned routes according to claim 1, further comprising the steps of:
analyzing the coordinates and/or road names corresponding to the different road links;
and displaying the difference road chain.
8. The method of claim 7, wherein the diverse links in the st list of links are displayed in an th pattern, and the diverse links in the second list of links are displayed in a second pattern.
9, a multiple planned route comparison device, comprising:
a computer-readable storage medium for storing instructions executable by a processor;
a processor configured to execute the instructions to implement the method of any of claims 1-8.
10, a plurality of planned route comparison devices, the plurality of planned routes including a th planned route and a second planned route, comprising:
an th link list obtaining module, configured to obtain a th link list corresponding to the th planned route;
the second road chain list acquisition module is used for acquiring a second road chain list corresponding to the second planned route; and
a differential link determining module, configured to determine a differential link according to the th link list and the second link list;
wherein the different link list comprises different links in the th link list and the second link list.
Technical Field
The invention mainly relates to the field of navigation, in particular to a method and a device for comparing multiple planned routes.
Background
The electronic map is designed according to different planning strategies, and a plurality of different planned routes are obtained, wherein the different planned routes generally comprise public sections (namely, the same sections) and different sections (namely, different sections).
Disclosure of Invention
The technical problem to be solved by the invention is to provide comparison methods and devices for multiple planned routes, which can determine differences among multiple planned routes so as to further display different road sections in steps.
In order to solve the technical problem, an aspect of the present invention provides multiple planned routes comparing methods, where the multiple planned routes include a th planned route and a second planned route, the method includes obtaining a th link list corresponding to the th planned route, obtaining a second link list corresponding to the second planned route, and determining a difference link according to the th link list and the second link list, where the difference link includes different links in the th link list and the second link list.
In an embodiment of the present invention, the determining the different link according to the th link list and the second link list includes determining the same link in the th link list and the second link list to obtain a common link, and determining the different link according to the th link list, the second link list and the common link.
In an embodiment of the present invention, the step of determining the identical links in the th link list and the second link list includes iteratively performing the steps of taking th th links from the th link list, comparing the th links with or more second links in the second link list, and if the th links are identical to second links, determining the th links as the identical links.
In an embodiment of the present invention, the determining the differential link according to the st link list, the second link list and the common link list includes removing the common link from the th link list to obtain a th differential link, and removing the common link from the second link list to obtain a second differential link, where the th differential link and the second differential link together form the differential link.
In an embodiment of the present invention, the step of determining the different links according to the th link list and the second link list includes iteratively performing the steps of taking the th th link from the th link list, comparing the th link with every second link in the second links, and if the th link is different from all the second links, determining the th link as a different link.
In an embodiment of the present invention, the step of determining the different links according to the th link list and the second link list includes iteratively performing the steps of extracting second links from the second link list, comparing the second links with every th th link in the th links, and if the second links are different from all th links, determining that the second links are different links.
In example of the present invention, the alignment of the th road link and the second road link is performed by aligning road link identifiers.
In the embodiment of the invention, the method further comprises the steps of resolving the coordinates and/or the road names corresponding to the different link chains, and displaying the different link chains.
Another aspect of the invention provides multiple planned route comparison apparatus comprising a computer readable storage medium storing instructions executable by a processor, the processor executing the instructions to implement the method described above.
In yet another aspect of the present invention, there are comparison devices for multiple planned routes, where the multiple planned routes include a th planned route and a second planned route, and the comparison devices include a th road link list obtaining module configured to obtain a th road link list corresponding to the th planned route, a second road link list obtaining module configured to obtain a second road link list corresponding to the second planned route, and a difference road link determining module configured to determine a difference road link according to the th road link list and the second road link list, where the difference road link includes different road links in the th road link list and the second road link list.
Compared with the prior art, the invention has the following advantages:
according to the method and the device for comparing the multiple planned routes, the different road links are determined by comparing the road link lists corresponding to any two planned routes, and the difference between the two planned routes can be displayed, so that a user can select the planned routes conveniently.
Drawings
FIG. 1 is a schematic diagram of multiple planned routes in accordance with embodiments of the invention.
Fig. 2 is a schematic block diagram of a multiple planned route comparison apparatus according to embodiments of the present invention.
Fig. 3 is a block diagram of a multiple planned route comparison apparatus according to embodiments of the present invention.
Fig. 4 is a flow chart of a multiple planned route comparison method according to embodiments of the invention.
Fig. 5 is a flow chart illustrating the determination of the differential link according to some embodiments of the invention .
Fig. 6 is a flow chart illustrating the determination of a common link according to some embodiments of the invention .
Fig. 7 is a flow chart illustrating determination of a common link according to further embodiments of the present invention.
Fig. 8 is a flow chart illustrating the determination of the differential link according to some embodiments of the invention .
Fig. 9 is a flow chart illustrating the determination of the differential link according to some embodiments of the invention .
Fig. 10 is a flow chart illustrating the determination of the differential link according to some embodiments of the invention .
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described herein, and thus the present invention is not limited to the specific embodiments disclosed below.
As used in this application and in the claims, the terms "," "," "," and/or "the" do not denote the singular but rather the plural, , the terms "comprising" and "including" merely indicate that the steps and elements so specified are included and do not constitute an exclusive list, and that the method or apparatus may include other steps or elements.
When an electronic map is used for route planning navigation, the electronic map usually provides a plurality of planned routes, the planned routes are usually composed of or a plurality of links connected in sequence, fig. 1 is a schematic diagram of the plurality of planned routes according to embodiments of the invention, referring to fig. 1, the electronic map provides a plurality of planned routes from a departure point a to a destination B, for example, a th planned route including a
A link generally represents directed paths existing between two adjacent connectivity nodes, roads that can travel in both directions, divided into two links in opposite directions according to the direction, links may include or more nodes, or more links, etc. taking link 2 as an example, link 2 includes node 21, node 22, node 23, link 21, and link 22. in an electronic map, a link may include a link Identification (ID), a link start node ID, a link end node ID, a link ID array, a link direction, a link length, link attributes (e.g., freeway, express, main, branch, etc.), etc. link IDs are unique serial numbers in the road network per link.
Connectivity nodes may be road intersections, road starting points, road ending points, road entrances, road exits, points of road grade changes, etc., such as nodes 21, nodes 23.
In an electronic map, road segments may include segment Identifications (IDs), segment start node IDs, segment end node IDs, link chain IDs where the road segments are located, link lengths, link directions, segment attributes (e.g., start of link, middle of link, end of link, unique segments of link, etc.), etc. road segment IDs are unique serial numbers in the road network for each road segment.
Fig. 2 is a schematic block diagram of a plurality of planned
, the
Computer-
The
The
In embodiments, the plurality of planned
In , the plurality of planned
In embodiments, the plurality of planned
In some embodiments, the plurality of planned
In , the plurality of planned
Fig. 3 is a block diagram of multiple planned route comparison devices according to embodiments of the invention, in embodiments, multiple planned
The th road link
The second road link
The differential
Fig. 4 is a flowchart of a multiple planned route comparison method according to embodiments of the invention, the multiple planned
step 320: acquiring a second road chain list corresponding to a second planned route; and
and step 330, determining a differential link according to the th link list and the second link list.
In
After the electronic map plans the second planned route, a second planned route list may be determined according to links included in the second planned route, in
In
Fig. 5 is a flow chart illustrating the determination of the differentiated links according to some embodiments of the present invention , referring to fig. 5, step 330 may include:
and step 332, determining the differential link according to the th link list, the second link list and the public link.
Fig. 6 is a flow chart illustrating the determination of the public link according to some embodiments of the present invention , referring to fig. 6, step 331 may include the following steps performed iteratively:
step 331a, taking th link from th link list;
in
In , the st link and the second link are compared in 331b by comparing the link IDs, specifically, if the ID of the th link is the same as the ID of the second link, the th link is considered the same as the second link.
In a more specific embodiment of , assume that the th road link list includes m th road links, and the second road link list includes n second road links, where m and n are any positive integers, fig. 7 is a schematic flow chart of determining a common road link in other embodiments of the present invention, referring to fig. 7, step 331 may include:
step 331a1, the ith th link is taken from the th link list, where i is 1,2,3, …, m, when step 331a1 is executed th time, i is 1.
And step 331b1, taking the jth second link from the second link list, wherein j is 1,2,3, …, n. in each cycle of the ith link, when step 331b1 is executed times, j is 1.
And a step 331b2, comparing whether the ith link and the jth second link are the same, if so, jumping to a step 331c1, if not, when j is less than n, j is j +1, jumping to a step 331b1, and when j is less than n, i is i +1, and jumping to a
And step 331c1, the ith th link is the same link, when i is less than m, i is equal to i +1, and the process jumps to step 331a1, and when i is equal to m, the process ends.
It is understood that the alignment of the ith th link with the jth second link in step 331b2 can be performed by aligning the link IDs as well.
Taking the th planned route and the second planned route in fig. 1 as an example, a public
Fig. 8 is a flow chart illustrating the determination of the differentiated links according to some embodiments of the present invention , referring to fig. 8, step 332 may include:
step 332a, removing the public link from the th link list to obtain a th differential link;
step 332 b: and removing the public link from the second link list to obtain a second differential link.
It is understood that the th differential link and the second differential link together form a differential link, that is, the differential link is a union of the th differential link and the second differential link.
It should be noted that, in step 332a, the common link may be removed from the th link list copy to obtain th differential link, so as to prevent the th link list from being affected.
In step 332a, taking the th planned route in fig. 1 as an example, the th road link list includes a
Likewise, in step 332b, the common link may be removed from the copy of the second link list to obtain a second differential link, so as to prevent the second link list from being affected.
In step 332b, taking the second planned route in fig. 1 as an example, the second link list includes
After th differential link and the second differential link are obtained, differential links including link 2, link 3, link 4, link 6, link 7 and link 8 can be obtained.
Fig. 9 is a flow chart illustrating the determination of the differentiated links according to some embodiments of the present invention , referring to fig. 9, step 330 may include the following steps performed iteratively:
and 330c, if the th link is not the same as all the second links, the th link is a different link.
In embodiments, the th link and the second link are compared in
Fig. 10 is a flow chart illustrating the determination of the differentiated links according to some embodiments of the present invention , referring to fig. 10,
in
step 330 b', comparing the second link with each th link in the th link;
in
In , the st link and the second link are compared in
In , the
step 340: analyzing coordinates and/or road names corresponding to the different road links;
step 350: and displaying the difference road chain.
In
For example, the different links in link list may be displayed in style, the different links in the second link list may be displayed in second style, and the common links may be displayed in third style style, second style, third style may be colors, line style, etc., or combinations thereof, wherein style and second style may be different, third style may be the same as style or second style, or third style may be different from both 4625 style and style.
Taking the th planned route and the second planned route in fig. 1 as an example, the public link,
Continuing with the th planned route and the second planned route in fig. 1 as an example, their common links, link 1 and link 5, may be shown in solid lines, the different links, link 2, link 3 and link 4, in the th planned route may be shown in dotted lines, and the different links, link 6, link 7 and link 8, in the second planned route may be shown in dotted and horizontal lines.
In , coordinates, road names, etc. of the links of the different roads may be displayed in
In still other embodiments, the differentiated link may be displayed in different styles, as well as the coordinates, names, etc. of the differentiated link.
Having thus described the basic concept, it will be apparent to those skilled in the art that the foregoing disclosure is by way of example only, and is not intended to limit the present application. Various modifications, improvements and adaptations to the present application may occur to those skilled in the art, although not explicitly described herein. Such modifications, improvements and adaptations are proposed in the present application and thus fall within the spirit and scope of the exemplary embodiments of the present application.
Thus, it is emphasized and should be noted that " embodiment" or " embodiment" or " alternate embodiment" referred to twice or more at different locations in this specification are not intended to refer to the same embodiment, and furthermore, certain features, structures or characteristics may be combined as appropriate in or more embodiments of this application.
Accordingly, aspects of the present application may be embodied entirely in hardware, may be embodied entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software.
A computer readable signal medium may comprise propagated data signals with computer program code embodied therein, for example, on baseband or as part of a carrier wave.
Computer program code required for operation of portions of the present application may be written in any or more programming languages, including object oriented programming languages such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C + +, C #, VB.NET, Python, and the like, conventional programming languages such as C, Visual Basic, Fortran 2003, Perl, COBOL 2002, PHP, ABAP, dynamic programming languages such as Python, Ruby, and Groovy, or other programming languages, and the like.
While have been discussed in the foregoing disclosure by way of examples for purposes of illustrating certain presently contemplated inventive embodiments, it is to be understood that such details are solely for that purpose and that the appended claims are not limited to the disclosed embodiments, but, on the contrary, are intended to cover all modifications and equivalent arrangements that are within the spirit and scope of the embodiments of the present application.
Similarly, it should be noted that in the preceding description of embodiments of the present application, various features are sometimes grouped together in embodiments, figures, or description thereof for the purpose of streamlining the disclosure aiding in the understanding of or more embodiments of the invention.
in some embodiments numerals describing the components, attributes, etc. are used, it is understood that such numerals used in the description of the embodiments, and in in some embodiments the modifiers "about", "approximately" or "substantially" etc. are used unless otherwise indicated, "about", "approximately" or "substantially" indicates that the numerals allow for variations as indicated by the ± clarity.
Accordingly, by way of example and not limitation, alternative configurations of the embodiments of the present application may be seen as consistent with the teachings of the present application.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:物业机器人导航方法、装置、计算机设备和存储介质