Navigation route generation method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202310344742.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-03-28
AI Technical Summary
这种情况下,导航路线较少,对于用户而言可选范围不大,甚至有可能漏掉用户期望选择的路线,影响导航体验
[0019] In response to a navigation request from the origin to the destination, the system obtains initial endpoint road segments on the map. If either the origin or the destination is a boundary between closed and open road segments, it searches the map for road segments related to the boundary from the initial endpoint road segments to obtain supplementary endpoint road segments. The initial endpoint road segments and supplementary endpoint road segments are merged to obtain a candidate set. The navigation route is calculated based on the origin and destination road segments in the candidate set. This process supplements the endpoint road segments, expands the path, and can provide users with more optional navigation routes in scenarios where the origin or destination is a boundary between closed and open road segments. This expands the navigation route, reduces the possibility of missing the user's desired route, and improves the satisfaction of the navigation experience.
Smart Images

Figure CN116429139B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of navigation technology, and in particular to a navigation route generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the widespread adoption of electronic maps and the development of mobile internet, navigation products are playing an increasingly important role in the transportation sector. After years of development, driving navigation technologies have matured and can handle increasingly complex navigation needs. However, during driving navigation, if the destination is located at the boundary between closed and open roads, such as a highway tollbooth, traditional navigation algorithms will default to generating routes from the highway direction, automatically excluding routes from non-highway directions. In this case, the number of navigation routes is limited, offering users a narrow range of choices, and may even miss the user's desired route, impacting the navigation experience. Summary of the Invention
[0003] This application provides a navigation route generation method, apparatus, electronic device, and storage medium to expand navigation routes and improve user experience.
[0004] In a first aspect, embodiments of this application provide a navigation route generation method, including:
[0005] In response to a navigation request from the origin to the destination, an initial endpoint road segment is obtained from the map, the initial endpoint road segment including the origin road segment and the destination road segment;
[0006] If either the starting point or the ending point is the boundary between a closed road segment and an open road segment, search the map to supplement the endpoint road segment.
[0007] After merging the initial endpoint road segment and the supplementary endpoint road segment and removing duplicates, a candidate set is obtained;
[0008] The navigation route is calculated based on the starting and ending road segments in the candidate set;
[0009] Among them, a road segment is the smallest unit representing a real road on the map, the starting road segment is the first road segment after leaving the starting point, and the ending road segment is the last road segment after entering the ending point.
[0010] In a second aspect, embodiments of this application provide a navigation route generation apparatus, comprising:
[0011] The acquisition module is used to acquire the initial endpoint road segment in the map in response to a navigation request from the starting point to the destination. The initial endpoint road segment includes the starting point road segment and the destination road segment.
[0012] The search module is used to search for road segments that meet the conditions in the map, starting from the road segments related to the boundary point in the initial endpoint road segments, to obtain supplementary endpoint road segments if either the starting point or the ending point is the boundary point between closed road segments and open road segments.
[0013] The merging module is used to merge the initial endpoint road segment and the supplementary endpoint road segment to obtain a candidate set;
[0014] The calculation module is used to calculate the navigation route based on the starting road segment and the ending road segment in the candidate set;
[0015] Among them, a road segment is the smallest unit representing a real road on the map. The starting road segment is the first road segment after leaving the starting point, and the ending road segment is the last road segment after entering the ending point. A road segment that meets the conditions is a valid road segment where there is a way to enter or leave the road segment.
[0016] In a third aspect, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method described in any of the above-mentioned embodiments.
[0017] In a fourth aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the preceding claims.
[0018] Compared with the prior art, this application has the following advantages:
[0019] In response to a navigation request from the origin to the destination, the system obtains initial endpoint road segments on the map. If either the origin or the destination is a boundary between closed and open road segments, it searches the map for road segments related to the boundary from the initial endpoint road segments to obtain supplementary endpoint road segments. The initial endpoint road segments and supplementary endpoint road segments are merged to obtain a candidate set. The navigation route is calculated based on the origin and destination road segments in the candidate set. This process supplements the endpoint road segments, expands the path, and can provide users with more optional navigation routes in scenarios where the origin or destination is a boundary between closed and open road segments. This expands the navigation route, reduces the possibility of missing the user's desired route, and improves the satisfaction of the navigation experience.
[0020] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application, it can be implemented according to the contents of the specification. In order to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description
[0021] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments according to this application and should not be construed as limiting the scope of this application.
[0022] Figure 1 This is a flowchart of a navigation route generation method according to an embodiment of this application;
[0023] Figure 2 This is a flowchart of a navigation route generation method according to another embodiment of this application;
[0024] Figure 3 This is a flowchart of a navigation route generation method according to another embodiment of this application;
[0025] Figure 4 This is a structural block diagram of a navigation route generation device according to an embodiment of this application;
[0026] Figure 5 This is a block diagram of an electronic device used to implement embodiments of this application. Detailed Implementation
[0027] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the concept or scope of this application. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0028] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application are described below. The following relevant technologies are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and all of them fall within the protection scope of the embodiments of this application.
[0029] First, the terms used in this application will be explained.
[0030] Road segment: The smallest unit on the map that represents a real road.
[0031] Starting point segment: The first segment after leaving the starting point. One starting point can correspond to multiple starting point segments, and each starting point segment represents a possible departure segment for the user.
[0032] Destination segment: The last segment leading to the destination. One destination can correspond to multiple destination segments, each representing a possible route the user can take.
[0033] Path: A route from a starting point to an end point, which may include one or more segments. When a path includes one segment, that segment is both the starting segment and the ending segment. When a path includes multiple segments, the first segment of the path is the starting segment, and the last segment of the path is the ending segment.
[0034] Valid road sections: Non-closed public road sections with normal traffic capacity and not dead-end sections. Public road sections refer to road sections that any vehicle can pass through, not road sections exclusive to certain specific vehicles.
[0035] Search depth: The total length of the actual roads corresponding to the searched road segments in the graph search algorithm.
[0036] The navigation route generation method provided in this application can be applied to any electronic device, including but not limited to computers, tablets, laptops, or servers. In electronic devices, navigation routes can be generated using this method, thereby providing navigation services to users. Specific application scenarios are varied, including but not limited to scenarios where the method is used on a server to provide navigation to client users.
[0037] This application provides a navigation route generation method, such as... Figure 1 The diagram shown is a flowchart of a navigation route generation method according to an embodiment of this application. The method may include the following steps S101 to S104.
[0038] S101: In response to a navigation request from the origin to the destination, obtain the initial endpoint segment in the map, which includes the origin segment and the destination segment.
[0039] In this embodiment, the navigation request can be initiated by the user on the client, with the start and end points being the user-input departure and destination locations. The initial endpoint segments refer to the initially acquired endpoint segments, such as those obtained using a default algorithm, which include start and end point segments. For example, if the navigation request's start point is A and the end point is B, the initial endpoint segments include 3 start segments leading out of start point A and 5 end segments leading into end point B.
[0040] S102: If either the starting point or the ending point is the boundary between a closed road segment and an open road segment, search for road segments that meet the conditions in the map, starting from the road segments related to the boundary point in the initial endpoint road segments, to obtain supplementary endpoint road segments.
[0041] In this embodiment of the application, the following three scenarios are included when either the starting point or the ending point is the boundary between a closed road segment and an unclosed road segment: 1) The starting point is the boundary between a closed road segment and an unclosed road segment; 2) The ending point is the boundary between a closed road segment and an unclosed road segment; 3) Both the starting point and the ending point are the boundary between a closed road segment and an unclosed road segment.
[0042] Regardless of the scenario described above, it is necessary to search for supplementary endpoint road segments on the map. For the first scenario, search for supplementary start-point road segments on the map; in this case, supplementary endpoint road segments include supplementary start-point road segments. For the second scenario, search for supplementary end-point road segments on the map; in this case, supplementary endpoint road segments include supplementary end-point road segments. For the third scenario, search for both supplementary start-point and supplementary end-point road segments on the map; in this case, supplementary endpoint road segments include both supplementary start-point and supplementary end-point road segments.
[0043] In this embodiment, the aforementioned eligible road segment refers to a valid road segment that allows entry or exit from that segment. For example, if road segment A is found, and there are no valid road segments that allow entry or exit from it, then road segment A is determined not to be an eligible road segment. If road segment B is found, and there are valid road segments that allow entry into it, then road segment B is determined to be an eligible road segment. If road segment C is found, and there are valid road segments that allow exit from it, then road segment C is determined to be an eligible road segment. If road segment D is found, and there are both valid road segments that allow entry into and exit from it, then road segment D is determined to be an eligible road segment.
[0044] In this embodiment, the conditions for triggering the search for supplementary endpoint road segments include, in addition to either the start point or the end point being the boundary between a closed road segment and an open road segment, the vehicle attributes meeting specified conditions. In other words, the operation of searching for supplementary endpoint road segments is only executed when both of the above conditions are met.
[0045] Vehicle attributes refer to information that reflects the characteristics of a vehicle, and may include at least one of vehicle type and usage nature. For example, vehicle type may be passenger car, truck, sedan, lorry, trailer, or tractor. Usage nature may be commercial vehicle, rental vehicle, non-commercial vehicle, police car, fire truck, or ambulance.
[0046] In scenarios involving boundary points, users can reach their destination via either highways or regular roads. Depending on their needs, users may choose different routes. For example, a user on a long-distance road trip or picking up family or friends is more likely to choose a regular road. Conversely, a user commuting to work, using a commercial vehicle, or only planning half the route is more likely to choose a highway. Therefore, by combining the boundary point scenario with vehicle attributes, we can ensure that a navigation route more closely matches the user's intent, improving the quality of the navigation route and the user experience.
[0047] S103: Merge the initial endpoint road segment and the supplementary endpoint road segment to obtain the candidate set.
[0048] In this embodiment, merging the initial endpoint road segment and the supplementary endpoint road segment to obtain a candidate set includes: merging the initial starting road segment in the initial endpoint road segment and the supplementary starting road segment in the supplementary endpoint road segment; and merging the initial ending road segment in the initial endpoint road segment and the supplementary ending road segment in the supplementary endpoint road segment, thus obtaining the final candidate set. Therefore, the candidate set includes starting road segments and ending road segments. If duplicate road segments exist during any of the above merging processes, deduplication can be performed to ensure that all road segments in the candidate set are unique, thereby avoiding redundant calculations and reduced efficiency during the generation of the navigation route.
[0049] S104: Calculate the navigation route based on the starting and ending road segments in the candidate set.
[0050] In this embodiment, the calculated navigation route can be one or more paths, typically including multiple paths. Each path starts from a starting point, passes through a first starting segment, several intermediate segments, and finally reaches the destination segment. Because the candidate set expands the starting and ending segments, more navigation routes can be generated compared to before the expansion, thus providing users with more choices. Furthermore, knowing the user's intent, routes that better match the user's intent can be selected and recommended, thereby improving user satisfaction.
[0051] The method described in this embodiment expands the route by supplementing endpoint road segments. This addresses scenarios where the starting or ending point is the boundary between closed and open road segments, providing users with more navigation route options and reducing the possibility of missing the user's desired route. Furthermore, the navigation route generated after expanding the endpoint road segments is more reasonable and accurate, with a higher degree of matching with the user's intent. This avoids detours caused by users selecting routes with low matching accuracy, thus improving the quality of the navigation route and the satisfaction of the navigation experience.
[0052] Another embodiment of this application provides a navigation route generation method, such as... Figure 2 The diagram shown is a flowchart of a navigation route generation method according to another embodiment of this application. The method may include the following steps S201 to S207.
[0053] S201: In response to a navigation request from the origin to the destination, obtain the initial endpoint segment in the map, which includes the origin segment and the destination segment.
[0054] The initial endpoint road segment can be obtained based on a map and road database using a preset algorithm. Commonly used algorithms include R-trees, GeoHash, or machine learning algorithms. The initial endpoint road segment can be selected based on the endpoint coordinates by choosing at least one road segment near the endpoint coordinates, or it can be selected by generating different weights for different road segments based on road attributes, origin and destination attributes, POI (Point of Interest) attributes, vehicle and driving parameters, historical information, etc. This application does not specifically limit this.
[0055] S202: If either the starting point or the ending point is the boundary between a closed road segment and an open road segment, an iterative search algorithm is used in the map, and the current road segment on the search path is judged in each iteration.
[0056] The scenarios for dividing points are varied, including but not limited to toll booths, overpasses, or highway entrances and exits. The graph search algorithm used in this application embodiment can be of various types, including but not limited to breadth-first search, depth-first search, or other algorithms with similar functions; no specific limitation is specified. An iterative search is performed based on the adopted graph search algorithm. In each iteration, the current road segment on the search path is evaluated to determine whether to terminate the search of the current iteration branch.
[0057] S203: Determine if there is a valid road segment associated with the current road segment but outside the search path; if yes, execute S204; otherwise, execute S205.
[0058] Valid road segments are non-closed public road segments with normal traffic capacity that are not dead-end segments. For example, a valid road segment can be a public road segment other than bridges, tunnels, toll roads, expressways, ramps, closed sections, or sections under construction. Valid road segments outside the search path can also be understood as valid road segments not searched within the search path. Similarly, valid road segments within the search path can be understood as valid road segments already searched within the search path.
[0059] Furthermore, the aforementioned association exists in two scenarios. In the first scenario, the road segment associated with the boundary point is the starting road segment, and the association refers to exiting. In this case, a valid road segment associated with the current road segment outside the search path refers to a valid road segment that has exited the current road segment and is outside the search path; it can also be described as a valid out-degree road segment of the current road segment outside the search path. In the second scenario, the road segment associated with the boundary point is the ending road segment, and the association refers to entering. In this case, a valid road segment associated with the current road segment outside the search path refers to a valid road segment that has entered the current road segment and is outside the search path; it can also be described as a valid in-degree road segment of the current road segment outside the search path. In-degree is a concept in graph theory algorithms, typically referring to an edge pointing to a node in a directed graph. In this embodiment, a valid out-degree road segment of the current road segment refers to an out-degree road segment of the current road segment that is also valid, and a valid in-degree road segment of the current road segment refers to an in-degree road segment of the current road segment that is also valid.
[0060] In step S203 above, the determination of valid road segments involves the determination of dead-end road segments, which can be done in the following way: An additional search is performed on the road segment to be determined; if the search depth is greater than the second threshold and the search path has not ended, the road segment to be determined is determined not to be a dead-end road segment and the search is terminated; if the search depth does not reach the second threshold when the search path ends, the road segment to be determined is determined to be a dead-end road segment. This additional search can be a depth-first search or a breadth-first search, or other similar search algorithms; this embodiment does not specifically limit this.
[0061] S204: Determine the current road segment as a supplementary endpoint road segment, terminate the search of the current iteration branch, and then execute S206.
[0062] S205: Continue searching until the end of the search path or the search depth is greater than the first threshold, then terminate the search and execute S206.
[0063] The search depth is the total length of the real road corresponding to the searched road segment. The first threshold and the second threshold can be preset as needed. They can be the same or different. For example, the first threshold can be set to 1km and the second threshold can be set to 2km, or both the first threshold and the second threshold can be set to 1km. The specific values are not limited.
[0064] S206: Merge the initial endpoint road segment and the supplementary endpoint road segment to obtain the candidate set.
[0065] In this process, the initial starting point segment and the supplementary starting point segment are merged, and the initial ending point segment and the supplementary ending point segment are merged, ultimately resulting in a candidate set that includes both the starting point segment and the ending point segment.
[0066] S207: Based on the starting point and ending point in the candidate set, calculate the path with the minimum cost from the starting point to the ending point as the navigation route.
[0067] In one implementation, step S207 may specifically include: based on the starting road segment and the ending road segment in the candidate set, using a one-to-one shortest path algorithm or a one-to-many shortest path algorithm, calculating the path with the minimum cost from the starting road segment to the ending road segment as the navigation route.
[0068] In this embodiment, the one-to-one shortest path algorithm can be applied to scenarios with one or more starting road segments and / or one or more ending road segments, without specific limitations. The one-to-many shortest path algorithm can be applied to scenarios with multiple starting road segments and / or multiple ending road segments, without specific limitations. Regardless of whether it's a one-to-one or one-to-many mode, the shortest path algorithm can employ various specific algorithms, including but not limited to: Dijkstra, Bellman-Ford, hierarchical, divide-and-conquer, labeling, CH (Contraction Hierarchy), CBR (Cell-Based Routing), etc. The calculated path with the minimum cost can be one or more, meaning the generated navigation routes can be one or more.
[0069] Another embodiment of this application provides a navigation route generation method, such as... Figure 3 The diagram shown is a flowchart of a navigation route generation method according to another embodiment of this application. The method may include the following steps S301 to S306.
[0070] S301: In response to a navigation request from the origin to the destination, obtain the initial endpoint segment in the map, which includes the origin segment and the destination segment.
[0071] S302: If the starting point is a dividing point and the starting point segment in the initial endpoint segment is a specified segment, search for a matching segment in the map starting from the specified segment to obtain a supplementary starting point segment. If the ending point is a dividing point and the ending segment in the initial endpoint segment is a specified segment, search for a matching segment in the map starting from the specified segment to obtain a supplementary ending segment.
[0072] In one implementation, step S302 can be replaced by the following steps:
[0073] If the starting point is a dividing point and the vehicle attributes meet the specified conditions, then the map will search for road segments that meet the conditions, starting from the road segments related to the dividing point in the initial endpoint road segment, to obtain the supplementary starting point road segment.
[0074] If the destination is a dividing point and the vehicle attributes meet the specified conditions, then the map will search for road segments that meet the conditions, starting from the road segments related to the dividing point in the initial endpoint road segment, to obtain the supplementary destination road segment.
[0075] In another implementation, step S302 can be replaced by the following steps:
[0076] If the starting point is a dividing point, the starting segment in the initial endpoint segment is a specified segment, and the vehicle attributes meet the specified conditions, then a supplementary starting segment is obtained by searching for a matching segment in the map starting from the specified segment.
[0077] If the endpoint is a dividing point, the endpoint segment in the initial endpoint segment is a specified segment, and the vehicle attributes meet the specified conditions, then a supplementary endpoint segment will be obtained by searching for a matching segment in the map starting from the specified segment.
[0078] The aforementioned dividing point refers to the boundary between a closed road segment and an open road segment. The specified road segment may include a one-way closed highway segment or a one-way ramp. The aforementioned vehicle attributes may include at least one of vehicle type and usage nature.
[0079] S303: Merge the initial endpoint road segment and the supplementary endpoint road segment to obtain the candidate set.
[0080] S304: Calculate the navigation route based on the starting and ending road segments in the candidate set.
[0081] S305: Determine the preferred route and alternative routes from among the calculated multiple navigation routes.
[0082] In this embodiment, the calculated navigation routes can be used to determine a preferred route and alternative routes according to preset rules. The preferred route is one, and the alternative routes can be one or more. The preset rules include, but are not limited to, shortest length, shortest time, most fuel-efficient, or least congested conditions, etc., and are not specifically limited.
[0083] S306: If the endpoint of the preferred route is a closed section, then alternative routes with open endpoints will be recommended first. If the endpoint of the first route is an open section, then alternative routes with closed endpoints will be recommended first.
[0084] For example, the navigation route includes: preferred route A, alternative routes B and C. If the destination segment of preferred route A is a closed road, the destination segment of alternative route B is also a closed road, and the destination segment of alternative route C is an open road, then alternative route C is recommended first. If the starting segment of preferred route A is an open road, the starting segment of alternative route B is a closed road, and the starting segment of alternative route C is an open road, then alternative route B is recommended first.
[0085] In this embodiment, when there are multiple alternative routes, the alternative routes can be recommended in a prioritized manner as described above. The advantage of this approach is that, based on the complementary relationship between closed and open road segments, it avoids overlooking routes that might match the user's intent, providing the user with more effective and reasonable choices, and improving the quality of navigation routes and user experience.
[0086] Corresponding to the application scenarios and methods provided in the embodiments of this application, the embodiments of this application also provide a navigation route generation device. For example... Figure 4 The diagram shown is a structural block diagram of a navigation route generation device according to an embodiment of this application. The device may include:
[0087] The acquisition module 401 is used to acquire the initial endpoint road segment in the map in response to a navigation request from the starting point to the destination. The initial endpoint road segment includes the starting point road segment and the destination road segment.
[0088] The search module 402 is used to search for road segments that meet the conditions in the map, starting from the road segments related to the boundary point in the initial endpoint road segments, if either the starting point or the ending point is the boundary point between closed road segments and open road segments, to obtain supplementary endpoint road segments.
[0089] The merging module 403 is used to merge the initial endpoint road segment and the supplementary endpoint road segment to obtain a candidate set.
[0090] The calculation module 404 is used to calculate the navigation route based on the starting road segment and the ending road segment in the candidate set.
[0091] Among them, a road segment is the smallest unit representing a real road on the map. The starting road segment is the first road segment after leaving the starting point, and the ending road segment is the last road segment after entering the ending point. A road segment that meets the conditions is a valid road segment where there is a way to enter or leave the road segment.
[0092] In one implementation, the search module 402 is used for:
[0093] If either the starting point or the ending point is the boundary between a closed road segment and an open road segment, the graph search algorithm is used to iteratively search the map, starting from the road segment related to the boundary point in the initial endpoint road segment, and the current road segment on the search path is judged in each iteration.
[0094] Determine if there are any valid road segments associated with the current road segment but outside the search path;
[0095] If so, determine the current road segment as a supplementary endpoint road segment and terminate the search of the current iteration branch;
[0096] Otherwise, continue searching until the end of the search path or the search depth exceeds the first threshold, at which point the search will terminate.
[0097] Among them, the effective road segment is a non-closed public road segment with normal traffic capacity and is not a dead-end road segment. The search depth is the total length of the real road corresponding to the searched road segment. If the road segment related to the dividing point is the starting road segment, the above association is exiting. If the road segment related to the dividing point is the ending road segment, the above association is entering.
[0098] In one implementation, when the search module 402 determines whether a valid road segment exists, the dead-end road segment is determined in the following way:
[0099] Perform an additional search on the road segment to be judged;
[0100] If the search depth is greater than the second threshold and the search path has not ended, the segment to be judged is determined to be a non-dead-end segment and the search is terminated.
[0101] If the search depth does not reach the second threshold when the search path ends, the road segment to be judged is determined to be a dead-end road segment.
[0102] In this embodiment of the application, the effective road segment is a public road segment other than bridges, tunnels, toll roads, expressways, ramps, closed roads, or roads under construction.
[0103] In one implementation, the computing module 404 is used for:
[0104] Based on the starting and ending road segments in the candidate set, the path with the minimum cost from the starting road segment to the ending road segment is calculated as the navigation route.
[0105] In one implementation, the search module 402 can be used to:
[0106] If the starting point is a dividing point and the starting segment in the initial endpoint segment is a specified segment, the map searches for matching segments to obtain supplementary starting points; if the ending point is a dividing point and the ending segment in the initial endpoint segment is a specified segment, the map searches for matching segments to obtain supplementary ending segments; where the dividing point is the dividing point between closed and open segments, and the specified segment is a one-way highway closed segment or a one-way ramp.
[0107] In one implementation, the search module 402 can be used to:
[0108] If either the starting point or the ending point is the boundary between a closed road segment and an open road segment, and the vehicle attributes meet the specified conditions, supplementary endpoint road segments are obtained by searching for road segments that meet the conditions, starting from the road segments related to the boundary point in the initial endpoint road segments on the map; wherein, the vehicle attributes include at least one of vehicle type and usage nature.
[0109] In one embodiment, the above-described apparatus may further include:
[0110] The recommendation module is used to determine the preferred route and alternative routes among the calculated multiple navigation routes. If the endpoint segment of the preferred route is a closed segment, the alternative route with an open segment is recommended first. If the endpoint segment of the preferred route is an open segment, the alternative route with a closed segment is recommended first.
[0111] The functions of each module in each device in the embodiments of this application can be found in the corresponding description in the above method, and they have corresponding beneficial effects, which will not be repeated here.
[0112] The device provided in this embodiment expands the route by supplementing the endpoint road segment. It can solve the problem of providing users with more optional navigation routes in scenarios where the starting point or ending point is the boundary between closed and open road segments. This expands the navigation route, reduces the possibility of missing the user's expected route, and improves the satisfaction of the navigation experience.
[0113] Figure 5 This is a block diagram of an electronic device used to implement embodiments of this application. For example... Figure 5 As shown, the electronic device includes a memory 510 and a processor 520. The memory 510 stores a computer program that can run on the processor 520. When the processor 520 executes the computer program, it implements the method described in the above embodiments. The number of memories 510 and processors 520 can be one or more.
[0114] The electronic device also includes a communication interface 530 for communicating with external devices and exchanging and transmitting data.
[0115] If the memory 510, processor 520, and communication interface 530 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be categorized as an address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0116] Optionally, in a specific implementation, if the memory 510, processor 520, and communication interface 530 are integrated on a single chip, then the memory 510, processor 520, and communication interface 530 can communicate with each other through an internal interface.
[0117] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in this application.
[0118] This application also provides a chip including a processor for calling and executing instructions stored in a memory, causing a communication device with the chip installed to perform the method provided in this application.
[0119] This application also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in the application embodiment.
[0120] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0121] Further, optionally, the aforementioned memory may include read-only memory and random access memory. The memory may be volatile memory or non-volatile memory, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0122] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0123] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0124] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0125] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.
[0126] The logic and / or steps described in the flowchart or otherwise herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0127] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.
[0128] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.
[0129] It should be noted that the embodiments of this application may involve the use of user data. In practical applications, user-specific personal data may be used in the scheme described herein within the scope permitted by applicable laws and regulations, provided that it complies with the applicable laws and regulations of the country (e.g., with the user's explicit consent, with the user being properly notified, etc.).
[0130] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope described in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for generating navigation routes, characterized in that, The method includes: In response to a navigation request from the origin to the destination, an initial endpoint road segment is obtained from the map, the initial endpoint road segment including the origin road segment and the destination road segment; If either the starting point or the ending point is the boundary between a closed road segment and an open road segment, then in the map, starting from the road segment related to the boundary point in the initial endpoint road segment, search for road segments that meet the conditions to obtain supplementary endpoint road segments. The initial endpoint segment and the supplementary endpoint segment are merged to obtain a candidate set; The navigation route is calculated based on the starting and ending road segments in the candidate set; Among them, a road segment is the smallest unit representing a real road on the map. The starting road segment is the first road segment after leaving the starting point, and the ending road segment is the last road segment after entering the ending point. A road segment that meets the conditions is a valid road segment that has both entry and exit points. The step of searching for supplementary endpoint road segments in the map, starting from the road segments related to the boundary point in the initial endpoint road segments, includes: Starting from the road segment related to the boundary point in the initial endpoint road segment on the map, an iterative search algorithm is used, and the current road segment on the search path is judged in each iteration: Determine if there are any valid road segments associated with the current road segment but outside the search path; If so, determine the current road segment as a supplementary endpoint road segment and terminate the search of the current iteration branch; Otherwise, continue searching until the end of the search path or the search depth exceeds the first threshold, at which point the search will terminate. Wherein, the effective road segment is a non-closed public road segment with normal traffic capacity and is not a dead-end road segment; the search depth is the total length of the actual road corresponding to the searched road segments; if the road segment related to the dividing point is the starting road segment, the association is exit; if the road segment related to the dividing point is the ending road segment, the association is entry.
2. The method according to claim 1, characterized in that, The dead-end road section is determined in the following way: Perform an additional search on the road segment to be judged; If the search depth is greater than the second threshold and the search path has not ended, the segment to be judged is determined to be a non-dead-end segment and the search is terminated. If the search depth does not reach the second threshold when the search path ends, the road segment to be judged is determined to be a dead-end road segment.
3. The method according to claim 1, characterized in that, The valid road section refers to public road sections other than bridges, tunnels, toll roads, expressways, ramps, closed roads, or roads under construction.
4. The method according to claim 1, characterized in that, The step of calculating the navigation route based on the starting and ending road segments in the candidate set includes: Based on the starting and ending road segments in the candidate set, the path with the minimum cost from the starting road segment to the ending road segment is calculated as the navigation route.
5. The method according to claim 1, characterized in that, If either the starting point or the ending point is the boundary between a closed road segment and an open road segment, supplementary endpoint road segments are obtained by searching the map for road segments that meet the conditions, starting from the road segments related to the boundary point in the initial endpoint road segments, including: If the starting point is a dividing point and the starting point segment in the initial endpoint segment is a specified segment, then starting from the specified segment on the map, search for segments that meet the conditions to obtain supplementary starting point segments; If the endpoint is a dividing point and the endpoint segment in the initial endpoint segment is a specified segment, then starting from the specified segment on the map, search for segments that meet the conditions to obtain supplementary endpoint segments. The dividing point is the boundary between a closed road section and an open road section, and the designated road section is a one-way closed highway section or a one-way ramp.
6. The method according to claim 1, characterized in that, If either the starting point or the ending point is the boundary between a closed road segment and an open road segment, supplementary endpoint road segments are obtained by searching the map for road segments that meet the conditions, starting from the road segments related to the boundary point in the initial endpoint road segments, including: If either the starting point or the ending point is the boundary between a closed road segment and an open road segment, and the vehicle attributes meet the specified conditions, then in the map, starting from the road segment related to the boundary point in the initial endpoint road segment, search for road segments that meet the conditions to obtain supplementary endpoint road segments. The vehicle attributes include at least one of vehicle type and usage characteristics.
7. The method according to claim 1, characterized in that, Also includes: Determine the preferred route and alternative routes from the calculated multiple navigation routes; If the endpoint of the preferred route is a closed section, then alternative routes with open endpoints will be recommended first. If the endpoint of the first route is a non-closed section, then alternative routes with closed endpoints will be recommended first.
8. A navigation route generation device, characterized in that, The device includes: The acquisition module is used to acquire the initial endpoint road segment in the map in response to a navigation request from the starting point to the destination. The initial endpoint road segment includes the starting point road segment and the destination road segment. The search module is used to search for road segments that meet the conditions in the map, starting from the road segments related to the boundary point in the initial endpoint road segments, to obtain supplementary endpoint road segments if either the starting point or the ending point is the boundary point between closed road segments and open road segments. The merging module is used to merge the initial endpoint road segment and the supplementary endpoint road segment to obtain a candidate set; The calculation module is used to calculate the navigation route based on the starting road segment and the ending road segment in the candidate set; Among them, a road segment is the smallest unit representing a real road on the map. The starting road segment is the first road segment after leaving the starting point, and the ending road segment is the last road segment after entering the ending point. A road segment that meets the conditions is a valid road segment that has both entry and exit points. The step of searching for supplementary endpoint road segments in the map, starting from the road segments related to the boundary point in the initial endpoint road segments, includes: Starting from the road segment related to the boundary point in the initial endpoint road segment on the map, an iterative search algorithm is used, and the current road segment on the search path is judged in each iteration: Determine if there are any valid road segments associated with the current road segment but outside the search path; If so, determine the current road segment as a supplementary endpoint road segment and terminate the search of the current iteration branch; Otherwise, continue searching until the end of the search path or the search depth exceeds the first threshold, at which point the search will terminate. Wherein, the effective road segment is a non-closed public road segment with normal traffic capacity and is not a dead-end road segment; the search depth is the total length of the actual road corresponding to the searched road segments; if the road segment related to the dividing point is the starting road segment, the association is exit; if the road segment related to the dividing point is the ending road segment, the association is entry.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method of any one of claims 1-7.
10. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of any one of claims 1-7.
Citation Information
Patent Citations
Navigation route determination method and device
CN115183789A