Method, device, computer device and computer readable storage medium for switching a travel route
Patent Information
- Application Number
- CN202211640957.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2042-12-20
AI Technical Summary
[0005]1、采用双版本:即只要在旧版本中有订单未结束,就需要一套完整的、包含各功能的旧版本持续运行,这样新旧版本同时运行,成本很高
[0022] In this embodiment, if route navigation is incomplete when switching to a new version of the road network, the unique identifiers of each road segment unit of the remaining route are obtained from the old version of the road network. Within a preset search time, the road segment units are searched in the new version of the road network based on the unique identifiers. For discontinuous road segment units, the broken line is repaired using a local route expansion method to obtain a new broken line. Finally, a new route composed of the newly searched road segment units and the broken line is returned, which is similar to the original route selected by the user.
Smart Images

Figure CN116401469B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of road network information technology, and in particular to a method, apparatus, computer equipment, and computer-readable storage medium for route switching. Background Technology
[0002] With the development of road network information technology, an increasing number of network service platforms and mobile applications with navigation functions have emerged. Due to the merging, splitting, deletion, and reconstruction of roads, these navigation applications need to regularly upgrade their road network versions to update basic data. Because of the massive amount of data, upgrading and updating versions takes a long time, ranging from tens of minutes to several hours, and some navigation trips happen to span the version switching process.
[0003] Changes to the road network version can cause routes from the old version to not be perfectly mapped in the new version, resulting in broken or unusable routes. This in turn affects functions such as estimated arrival time, traffic conditions, and guidance during navigation, greatly reducing the user experience.
[0004] To resolve issues related to road network version changes, the following methods are typically used:
[0005] 1. Use dual versions: As long as there are orders in the old version that have not been completed, a complete old version containing all functions is required to continue running. This means that the old and new versions are running at the same time, which is very costly.
[0006] 2. Recalculate routes: Recalculating routes in the new version of the road network increases the computational cost significantly, and the recalculated routes may differ from the original routes selected by the user, affecting the user experience.
[0007] In view of the problems existing in the current methods, there is an urgent need to provide a method, apparatus, computer equipment and computer-readable storage medium for route conversion that is low in cost and provides a good customer experience. Summary of the Invention
[0008] The purpose of this application is to provide a method, apparatus, computer device, and computer-readable storage medium for route switching that is low-cost and provides a good customer experience, in order to solve one of the aforementioned technical problems.
[0009] In a first aspect, embodiments of this application provide a route conversion method for converting routes from an old version of a road network to a new version of a road network, comprising: loading road network data of the old and new versions; obtaining unique identifiers of each road segment unit in the old version of the road network; searching for road segment units in the new version of the road network based on the unique identifiers within a preset search time; repairing broken routes using a local route expansion method to obtain new broken routes; and returning a new route composed of the newly searched road segment units and the broken routes; wherein the route is composed of multiple continuous road segment units; and wherein each road segment unit is a unit road segment having a starting point and an ending point, connecting the starting point and the ending point, and having no branching roads in between.
[0010] Preferably, the above-mentioned method of searching for road segment units in the new version of the road network based on the unique identifier within a preset search time specifically includes: c1, setting a preset search time; c2, searching for road segment units in the new version of the road network based on the unique identifier; c3, determining whether the preset search time has been reached; if yes, stopping the search; if no, proceeding to the next step; c4, determining whether all road segment units of the route have been found; if yes, stopping the search; if no, returning to step c2.
[0011] Preferably, after the step of searching for road segment units in the new version of the road network according to the unique identifier within the preset search time, the method further includes: determining whether the road segment units searched in the new version of the road network are continuous; if so, returning the line composed of the newly searched road segment units; if not, proceeding to the next step.
[0012] Preferably, the above-mentioned determination of whether the road segment units searched in the new version of the road network are continuous specifically means: determining whether the end point of the road segment unit searched in the new version of the road network is the starting point of the adjacent road segment unit.
[0013] Preferably, the method of repairing broken lines using the local route expansion method specifically involves using a breadth-first search method to repair broken lines.
[0014] Preferably, the method of repairing broken lines using a local route extension method to obtain new broken lines specifically includes: extending the broken lines using a local route extension method to obtain multiple broken lines; calculating the overlap length between each broken line and the original line; dividing the overlap length by the length of the original line as the overlap score; and determining the broken line with the highest score as the new broken line.
[0015] Preferably, after the step of dividing the overlap length by the original route length to obtain the overlap score, the method further includes: setting the road grade score when the length of different grades of roads at the breakpoint is equal to that of the original route.
[0016] Calculate the length of each level of road along each of the broken routes; calculate the length of each level of road along the original route; compare the length of each level of road along the broken route with the length of the same level road along the original route; if yes, obtain the corresponding road level score; if no, the corresponding road level score is zero; add the overlap score to the road level score to obtain the final score.
[0017] Secondly, embodiments of this application provide a route conversion device for converting routes from an old version of a road network to a new version of the road network. The device includes: an initial loading module for loading road network data from both the old and new versions; an identifier acquisition module for acquiring unique identifiers for each road segment unit in the old version of the road network; a unit search module for searching for road segment units in the new version of the road network based on the unique identifiers within a preset search time; a breakpoint repair module for repairing broken lines using a local route expansion method to obtain new broken lines; and a new route return module for returning a new route composed of the newly searched road segment units and the broken lines. The route consists of multiple consecutive road segment units; each road segment unit is a unit road segment with a starting point and an ending point, connecting the starting point and the ending point, and without any branching roads in between.
[0018] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the travel path conversion method described above.
[0019] Fourthly, embodiments of this application provide a computer device, including: one or more processors; a memory; and one or more computer programs, wherein the processors and the memory are connected via a bus, and wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, wherein when the processors execute the computer programs, they implement the steps of the travel line switching method as described above.
[0020] In this embodiment, both old and new versions of road network data are loaded first for subsequent road segment unit lookup and broken line repair. The road network data contains all road segment units in the road network. Each road segment unit has a start and an end point; it is a unit road segment connecting the start and end points without intermediate branching. Each line consists of multiple consecutive road segment units. Each road segment unit has a unique identifier, which can be used to find the corresponding road segment unit in the road network. Road segment units that are identical in both the new and old versions of the road network system typically use the same unique identifier.
[0021] The system retrieves the unique identifiers of each road segment unit from the old version of the road network. Within a preset search time, it searches for these road segment units in the new version of the road network based on these unique identifiers. The search is stopped after the preset search time to avoid unlimited searching and conserve system resources. For discontinuous road segment units, a local route extension method is used to repair broken lines, obtaining new broken lines; that is, the broken lines are repaired from their starting point to their ending point. Finally, the new route, composed of the newly searched road segment units and the broken lines, is returned in the new version of the road network.
[0022] In this embodiment, if route navigation is incomplete when switching to a new version of the road network, the unique identifiers of each road segment unit of the remaining route are obtained from the old version of the road network. Within a preset search time, the road segment units are searched in the new version of the road network based on the unique identifiers. For discontinuous road segment units, the broken line is repaired using a local route expansion method to obtain a new broken line. Finally, a new route composed of the newly searched road segment units and the broken line is returned, which is similar to the original route selected by the user.
[0023] In this embodiment, it is not necessary to run two versions simultaneously as in the prior art, resulting in low operating costs; and it is not necessary to recalculate the remaining routes, only the broken routes need to be repaired, resulting in low computational costs; and it only repairs the broken routes of the remaining routes, and the repaired routes are recalculated relative to the entire new routes in the prior art. The new routes in this embodiment are more similar to the original routes selected by the user, and will not significantly change the original routes selected by the user due to the upgrade of the road network version, resulting in a better user experience. Attached Figure Description
[0024] Figure 1 This is a flowchart of a route conversion method provided in an embodiment of this application;
[0025] Figure 2 This is a flowchart of a route conversion method provided in an embodiment of this application, which searches for road segment units in a new version of the road network based on a unique identifier within a preset search time;
[0026] Figure 3 This is a flowchart illustrating how a local route expansion method is used to repair broken lines and obtain new broken lines in a route conversion method provided in an embodiment of this application.
[0027] Figure 4 This is a flowchart of a route conversion method provided in another embodiment of this application, which uses a local route expansion method to repair broken routes and obtain new broken routes;
[0028] Figure 5 This is a schematic diagram of the travel route switching device provided in one embodiment of this application;
[0029] Figure 6 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation
[0030] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0031] To illustrate the technical solution of this application, specific embodiments are described below.
[0032] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0033] To illustrate the technical solution of this application, specific embodiments are described below.
[0034] Please see Figure 1 This is a flowchart of a route conversion method provided in an embodiment of this application, used to convert routes from an old version of the road network to a new version of the road network. This embodiment of the application provides a route conversion method, including:
[0035] S101, Load old and new versions of road network data;
[0036] S102. Obtain the unique identifier of each segment unit of the route in the old version of the road network;
[0037] S103. Within the preset search time, search for road segment units in the new version of the road network based on their unique identifiers;
[0038] S104. Use the local route extension method to repair broken lines and obtain new broken lines;
[0039] S105. Return to the new route consisting of the newly searched route segment unit and the breakpoint route;
[0040] The route consists of multiple continuous road segment units; a road segment unit is a unit road segment that has a starting point and an ending point, connects the starting point and the ending point, and has no branching roads in between.
[0041] A new breakpoint line can consist of one or more consecutive road segment units, and a new line can have one or more new breakpoint lines.
[0042] Road network data includes all road segment units within the network. Each road segment unit has a start and an end point, and is a unit road segment connecting the start and end points without intermediate branching. Each route consists of multiple consecutive road segment units. Each road segment unit has a unique identifier, which can be a road segment unit number, name, or other attributes that uniquely identify the road segment unit. The corresponding road segment unit can be located within the road network using its unique identifier. In new and old versions of the road network system, identical road segment units typically use the same unique identifier.
[0043] In this embodiment, both old and new versions of road network data are first loaded for subsequent segment unit search and broken line repair. The unique identifier of each segment unit in the old version of the road network is obtained, and the segment unit is searched in the new version of the road network based on the unique identifier within a preset search time. The search is stopped after the preset search time to avoid unlimited searching and conserve system resources. For discontinuous segment units, a local route expansion method is used to repair broken lines, obtaining new broken lines; that is, breaking lines are repaired from the start to the end of the broken line to obtain new broken lines. Finally, a new line composed of the newly searched segment units and broken lines is returned in the new version of the road network.
[0044] In this embodiment, if route navigation is incomplete when switching to a new version of the road network, the unique identifiers of each road segment unit of the remaining route are obtained from the old version of the road network. Within a preset search time, the road segment units are searched in the new version of the road network based on the unique identifiers. For discontinuous road segment units, the broken line is repaired using a local route expansion method to obtain a new broken line. Finally, a new route composed of the newly searched road segment units and the broken line is returned, which is similar to the original route selected by the user.
[0045] In this embodiment, it is not necessary to run two versions simultaneously as in the prior art, resulting in low operating costs; and it is not necessary to recalculate the remaining routes, only the broken routes need to be repaired, resulting in low computational costs; and it only repairs the broken routes of the remaining routes, and the repaired routes are recalculated relative to the entire new routes in the prior art. The new routes in this embodiment are more similar to the original routes selected by the user, and will not significantly change the original routes selected by the user due to the upgrade of the road network version, resulting in a better user experience.
[0046] Please see Figure 2 This is a flowchart illustrating a route conversion method provided in an embodiment of this application, which involves searching for road segment units in a new version of the road network based on a unique identifier within a preset search time. The method includes the following steps:
[0047] S201. Set the preset search time;
[0048] S202. Locate road segment units in the new version of the road network based on their unique identifiers;
[0049] S203. Determine whether the preset search time has been reached; if yes, proceed to step S205; if no, proceed to the next step.
[0050] S204. Determine whether all road segment units of the line have been found. If yes, proceed to step S205; otherwise, return to step S202.
[0051] S205, Stop searching.
[0052] The preset search time can be set according to needs. Based on the unique identifier, the system searches for road segment units in the new version of the road network. If all road segment units of the route are found within the preset search time, the search stops. If not all road segment units of the route are found within the preset search time, the search continues until the preset search time expires, at which point the search stops.
[0053] The purpose of searching within a preset search time is to avoid unlimited searching. The search will stop after the preset search time is exceeded in order to save system resources.
[0054] Preferably, after the step of searching for road segment units in the new version of the road network based on the unique identifier within the preset search time, the method further includes: determining whether the road segment units searched in the new version of the road network are continuous; if so, returning the line composed of the newly searched road segment units; if not, executing the next step, i.e., executing the above step S104: repairing the broken line using the local route extension method to obtain the new broken line.
[0055] Specifically, determining whether road segment units searched within the new version of the road network are continuous can be achieved by checking whether the endpoint of the road segment unit searched within the new version of the road network is the starting point of the adjacent road segment unit.
[0056] In other words, when the road segment units found in the new version of the road network are continuous, the route composed of the newly found road segment units is directly returned without the need for broken line repair or recalculation as required by existing technologies, greatly improving calculation speed and saving system resources. Only when the road segment units found in the new version of the road network are not continuous, a local route expansion method is used to repair broken lines and obtain new broken lines. This can greatly reduce route calculation, improve the efficiency of returning routes in the new version, and save system resources.
[0057] Specifically, the local route expansion method for repairing broken lines involves using a breadth-first search (BFS) approach. BFS starts the search from the origin of the broken line and continues until the endpoint of the road segment is found. Using BFS allows for rapid repair of broken lines and efficient discovery of new broken lines.
[0058] Please see Figure 3 This is a flowchart illustrating the process of repairing broken lines and obtaining new broken lines using a local route expansion method in a route conversion method provided in an embodiment of this application. Specifically, the process of repairing broken lines and obtaining new broken lines using a local route expansion method in a route conversion method provided in an embodiment of this application includes the following steps:
[0059] S301. Use the local route extension method to extend the broken line and obtain multiple broken lines;
[0060] S302. Calculate the overlap length between each break point and the original line;
[0061] S303. The overlap length divided by the original line length is used as the overlap score.
[0062] S304. The breakpoint with the highest score is determined as the new breakpoint.
[0063] Extending a broken route using the local route extension method typically yields multiple different broken routes. These need to be selected as the new broken route. This embodiment selects the broken route with the longest overlap with the original route as the new broken route. For example, if the original broken route is 10 kilometers long, extending it using the local route extension method in the new road network yields two broken routes: the first overlaps with the original route for 9 kilometers, and the second overlaps for 8 kilometers. The overlap score for the first broken route is 9 divided by 10, which equals 0.9; the overlap score for the second broken route is 8 divided by 10, which equals 0.8. Since 0.9 is greater than 0.8, the overlap score for the first broken route is higher than that for the second broken route. Therefore, the first broken route is selected as the new broken route. This ensures that the final new broken route in the new road network is most similar to the original route selected by the user, improving the user experience.
[0064] Please see Figure 4This is a flowchart illustrating the process of repairing broken lines and obtaining new broken lines using a local route expansion method in another embodiment of the route conversion method provided in this application. Specifically, the process of repairing broken lines and obtaining new broken lines using a local route expansion method in another embodiment of the route conversion method provided in this application includes the following steps:
[0065] S401. Use the local route extension method to extend the broken line and obtain multiple broken lines;
[0066] S402. Calculate the overlap length between each break point and the original line;
[0067] S403. The overlap length divided by the original line length is used as the overlap score.
[0068] S404. Road grade score obtained when the length of different grades of roads at the breakpoint is equal to that of the original route;
[0069] S405. Calculate the length of each road class for each breakpoint route;
[0070] S406. Compare the lengths of roads of different grades along the breakpoint route with the lengths of roads of the same grade along the original route. If yes, proceed to step S407; otherwise, proceed to step S408.
[0071] S407. Obtain the corresponding road grade score and proceed to step S409.
[0072] S408, the corresponding road grade score is zero;
[0073] S409. The final score is obtained by adding the overlap score and the road grade score.
[0074] S410, the breakpoint line with the highest score is determined as the new breakpoint line.
[0075] Extending a broken route using local route extension methods typically yields multiple different broken routes. These broken routes then need to be selected as the new broken route. In this embodiment, the selection process comprehensively considers the overlap length between the broken route and the original route, as well as the similarity between the lengths of the broken route at various road levels and the corresponding lengths of the original route at various road levels. The broken route with the highest score is selected as the new broken route.
[0076] The scoring system includes road grade scores, which are obtained when the lengths of roads of different grades at the breakpoints are equal to those of the original route. Road grades can be categorized as highways, provincial roads, national roads, urban roads, main roads, and auxiliary roads, etc., as needed. Road grade scores can be set as required. For example, a score of 0.2 can be assigned when the length of a highway at the breakpoint in the new version of the road network is the same as that of a highway at the breakpoint in the original route; a score of 0.1 can be assigned when the length of a provincial road at the breakpoint in the new version of the road network is the same as that of a provincial road at the breakpoint in the original route; and other road grade scores can be set as needed. Alternatively, the calculation method for road grade scores can be changed as required. The final score is the sum of the overlap score and the road grade score. For example, if the overlap score of one breakpoint is 0.9, and the sum of all road grade scores is 0.3, then the final score for this breakpoint is 0.9 plus 0.3, which equals 1.2.
[0077] This application embodiment comprehensively considers the overlap length between the breakpoint route and the original route, as well as the similarity between the road lengths of the breakpoint route and the corresponding road lengths of the original route at each level during the selection process. This ensures that the new breakpoint route determined in the new version of the road network is most similar to the original route selected by the user, thereby improving the user experience.
[0078] Please see Figure 5 This application provides a route conversion device 10 for converting routes from an old version of the road network to a new version of the road network, including:
[0079] Initial loading module 11 is used to load old and new versions of road network data;
[0080] The identifier acquisition module 12 is used to obtain the unique identifier of each segment unit of the route in the old version of the road network;
[0081] Unit search module 13 is used to search for road segment units in the new version of the road network based on the unique identifier within a preset search time.
[0082] Breakpoint repair module 14 is used to repair broken lines using the local route expansion method to obtain new broken lines;
[0083] The new route return module 15 is used to return a new route consisting of newly searched route segments and broken routes;
[0084] The route consists of multiple continuous road segment units; a road segment unit is a unit road segment that has a starting point and an ending point, connects the starting point and the ending point, and has no branching roads in between.
[0085] The travel route conversion device 10 provided in one embodiment of this application belongs to the same concept as the travel route conversion method provided in the above embodiments of this application. The specific implementation process is detailed in the full text of the specification and will not be repeated here.
[0086] An embodiment of this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the travel route conversion method provided in the above embodiments of this application.
[0087] Figure 6 This illustration shows a specific structural block diagram of a computer device provided in an embodiment of this application. A computer device 100 includes: one or more processors 101, a memory 102, and one or more computer programs, wherein the processors 101 and the memory 102 are connected via a bus, and the one or more computer programs are stored in the memory 102 and configured to be executed by one or more processors 101. When the processors 101 execute the computer programs, they implement the steps of the travel line conversion method provided in the embodiments of this application as described above.
[0088] Computer devices can be desktop computers, mobile terminals, etc. Mobile terminals include mobile phones, tablets, laptops, personal digital assistants, etc.
[0089] In this embodiment, both old and new versions of road network data are loaded first for subsequent road segment unit lookup and broken line repair. The road network data contains all road segment units in the road network. Each road segment unit has a start and an end point; it is a unit road segment connecting the start and end points without intermediate branching. Each line consists of multiple consecutive road segment units. Each road segment unit has a unique identifier, which can be used to find the corresponding road segment unit in the road network. Road segment units that are identical in both the new and old versions of the road network system typically use the same unique identifier.
[0090] The system retrieves the unique identifiers of each road segment unit from the old version of the road network. Within a preset search time, it searches for these road segment units in the new version of the road network based on these unique identifiers. The search is stopped after the preset search time to avoid unlimited searching and conserve system resources. For discontinuous road segment units, a local route extension method is used to repair broken lines, obtaining new broken lines; that is, the broken lines are repaired from their starting point to their ending point. Finally, the new route, composed of the newly searched road segment units and the broken lines, is returned in the new version of the road network.
[0091] In this embodiment, if route navigation is incomplete when switching to a new version of the road network, the unique identifiers of each road segment unit of the remaining route are obtained from the old version of the road network. Within a preset search time, the road segment units are searched in the new version of the road network based on the unique identifiers. For discontinuous road segment units, the broken line is repaired using a local route expansion method to obtain a new broken line. Finally, a new route composed of the newly searched road segment units and the broken line is returned, which is similar to the original route selected by the user.
[0092] In this embodiment, it is not necessary to run two versions simultaneously as in the prior art, resulting in low operating costs; and it is not necessary to recalculate the remaining routes, only the broken routes need to be repaired, resulting in low computational costs; and it only repairs the broken routes of the remaining routes, and the repaired routes are recalculated relative to the entire new routes in the prior art. The new routes in this embodiment are more similar to the original routes selected by the user, and will not significantly change the original routes selected by the user due to the upgrade of the road network version, resulting in a better user experience.
[0093] It should be understood that the steps in the various embodiments of this application are not necessarily executed sequentially according to the order indicated by the step numbers. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0094] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be accomplished by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), and enhanced SDRAM.
[0095] ESDRAM, Synchlink DRAM (SLDRAM), Rambus Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM), etc.
[0096] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0097] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for converting travel routes from an old version of a road network to a new version of the road network, characterized in that, include: Load both old and new versions of road network data; If navigation for a route is incomplete, the unique identifier of each segment unit of the remaining route will be obtained from the old version of the road network. Within a preset search time, search for road segment units in the new version of the road network based on the unique identifier; For discontinuous road segment units, the local route extension method is used to repair the discontinuous line from the starting point to the ending point to obtain a new discontinuous line. Returns a new route consisting of the newly found route segments and breakpoints; The route is composed of multiple continuous road segment units; each road segment unit is a unit road segment that has a starting point and an ending point, connects the starting point and the ending point, and has no branching roads in between; The method of repairing broken lines from their origin to their destination using local route extension to obtain new broken lines specifically includes: The local route extension method is used to extend the broken line to obtain multiple broken lines; Calculate the overlap length between each of the aforementioned breakpoint lines and the original line; The overlap length divided by the original line length is used as the overlap score. The breakpoint with the highest score is designated as the new breakpoint.
2. The route conversion method as described in claim 1, characterized in that, The specific steps of searching for road segment units in the new version of the road network based on the unique identifier within a preset search time include: c1. Set the preset search time; c2. Locate the road segment unit in the new version of the road network based on the unique identifier; c3. Determine if the preset search time has been reached; if yes, stop the search; if no, proceed to the next step. c4. Determine whether all road segment units of the line have been found. If yes, stop the search; otherwise, return to step c2.
3. The route conversion method as described in claim 2, characterized in that, Following the step of searching for road segment units in the new version of the road network based on the unique identifier within a preset search time, the method further includes: Determine whether the road segment units found in the new version of the road network are continuous. If they are, return the route composed of the newly found road segment units; otherwise, proceed to the next step.
4. The route conversion method as described in claim 3, characterized in that, Specifically, determining whether the road segment units searched in the new version of the road network are continuous involves determining whether the end point of the road segment unit searched in the new version of the road network is the starting point of the adjacent road segment unit.
5. The route conversion method as described in claim 4, characterized in that, The method of repairing broken lines from the starting point to the ending point using the local route expansion method specifically involves using a breadth-first search method to repair broken lines.
6. The route conversion method as described in claim 5, characterized in that, The step of dividing the overlap length by the original line length to obtain the overlap score also includes: The road grade score is obtained when the length of different grades of roads at the breakpoints is equal to that of the original route. Calculate the length of each road class for each of the aforementioned breakpoint routes; Calculate the length of each grade of road along the original route; Compare the lengths of each level of roads along the breakpoint route with the lengths of roads of the same level along the original route; if yes, obtain the corresponding road level score; if no, the corresponding road level score is zero. The overlap score is added to the road grade score to obtain the final score.
7. A route conversion device for converting routes from an old version of a road network to a new version of a road network, characterized in that, include: The initial loading module is used to load both old and new versions of road network data; The identifier acquisition module is used to obtain the unique identifier of each segment unit of the remaining route in the old version of the road network if the navigation of the trip route is not completed. The unit search module is used to search for road segment units in the new version of the road network based on the unique identifier within a preset search time. The breakpoint repair module is used to repair discontinuous road segment units by using a local route expansion method from the start point to the end point of the breakpoint line, thereby obtaining a new breakpoint line. Specifically, it includes: expanding the breakpoint line using the local route expansion method to obtain multiple breakpoint lines; calculating the overlap length between each breakpoint line and the original line; dividing the overlap length by the length of the original line as the overlap score; and determining the breakpoint line with the highest score as the new breakpoint line. The new route return module is used to return a new route consisting of newly found route segments and broken routes; The route consists of multiple continuous road segment units; each road segment unit is a unit road segment that has a starting point and an ending point, connects the starting point and the ending point, and has no branching roads in between.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the route conversion method as described in any one of claims 1 to 6.
9. A computer device, comprising: One or more processors; Memory; as well as One or more computer programs, wherein the processor and the memory are connected via a bus, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, characterized in that the processors, when executing the computer programs, implement the steps of the travel line conversion method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for updating road network data, electronic equipment and storage medium
CN114996283A