Multi-line method, device, computer equipment and computer readable storage medium
Patent Information
- Application Number
- CN202310875107.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-07-17
AI Technical Summary
[0042]本申请实施例的获取多线路方法,先获取起点至终点的最优线路,并将该最优线路加入至备选图内,然后获取待选线路,判断该待选线路是否合理,如果合理将该待选线路存储至备选图内。
Smart Images

Figure CN116972867B_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 device, and computer-readable storage medium for acquiring multiple routes. 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. Existing navigation service platforms or applications typically only provide one optimal navigation route. When multiple alternative routes are needed, these platforms or applications, in addition to providing the optimal route, will randomly generate other alternative routes. Because these alternative routes are not filtered, they often result in detours or unreasonable routes, thus failing to meet users' needs for multiple alternative routes.
[0003] 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 reasonably obtaining multiple lines. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, computer device, and storage medium for reasonably acquiring multiple lines, in order to solve one of the aforementioned technical problems.
[0005] In a first aspect, a method for obtaining multiple routes includes: obtaining an optimal route connecting a starting point and an ending point in a road network; adding the optimal route to a candidate map; obtaining a candidate route connecting the starting point and the ending point in the road network; determining whether the candidate route is reasonable, and if reasonable, storing it in the candidate map.
[0006] Preferably, the above-mentioned step of obtaining the optimal route connecting the starting point and the ending point in the road network further includes: setting the unit equity value of various road segment units before the step of obtaining the optimal route connecting the starting point and the ending point in the road network.
[0007] The step of obtaining candidate routes connecting the starting point and the ending point in the road network further includes: setting an adjustment ratio coefficient greater than 1;
[0008] The step of determining whether the candidate route is reasonable, and storing it in the candidate map if it is reasonable, specifically involves:
[0009] The candidate routes are compared with the existing routes in the alternative map to obtain the candidate difference sections and the existing difference sections;
[0010] The ratio of the candidate difference is obtained by dividing the length of the candidate difference segment by the total length of the candidate route.
[0011] The ratio of existing differences is obtained by dividing the length of the existing difference section by the total length of the existing lines.
[0012] The total equity value of the candidate differential road segments is obtained based on the unit equity value;
[0013] The total existing equity value of the existing differential road segments is obtained based on the unit equity value;
[0014] The candidate route weight is obtained by multiplying the candidate difference ratio by the candidate total equity value and then by the adjustment ratio coefficient.
[0015] The existing difference ratio is multiplied by the existing total equity value to obtain the existing line weight value;
[0016] Determine whether the weight of the candidate route is greater than or equal to the weight of the existing route. If so, store the candidate route in the candidate map.
[0017] The 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 candidate total equity value is the sum of the unit equity values of all the road segment units of the candidate difference road segment; the existing total equity value is the sum of the unit equity values of all the road segment units of the existing difference road segment.
[0018] Preferably, the unit equity values for setting various road segment units are specifically set according to the route length, road grade, number of lanes, speed limit, road width, road shape, and lane width.
[0019] The specific method for obtaining the optimal route connecting the starting point and the destination in the road network is: to obtain the optimal route connecting the starting point and the destination in the road network using a customized route planning method;
[0020] The specific steps of obtaining candidate routes connecting the starting point and the ending point in the road network are as follows: using the Dijkstra method to obtain candidate routes connecting the starting point and the ending point in the road network.
[0021] Preferably, setting an adjustment ratio coefficient greater than 1 specifically involves: setting an adjustment ratio coefficient formula related to the candidate route; and substituting the relevant values of the candidate route into the adjustment ratio coefficient formula to obtain the adjustment ratio coefficient.
[0022] Preferably, the formula for the adjustment ratio coefficient that is linearly related to the candidate line is as follows:
[0023] Set the first value to be greater than 1;
[0024] Set a second value greater than 1;
[0025] Compare the candidate route with the existing routes in the alternative map to obtain the candidate difference sections;
[0026] The ratio of the candidate difference is obtained by dividing the length of the candidate difference segment by the total length of the candidate route.
[0027] The formula for the proportional coefficient is obtained by multiplying the first value by the ratio of the selected differences and then adding the second value.
[0028] Preferably, the above-mentioned method of obtaining the total equity value of the candidate differential road segment based on the unit equity value specifically involves:
[0029] Obtain all differential road segment units of the candidate differential road segment;
[0030] Obtain the differential unit equity values of all the differential road segment units based on the unit equity values;
[0031] The total equity value of all the aforementioned differential units is summed to obtain the total equity value to be selected;
[0032] The specific steps for obtaining the total existing equity value of the existing differential road segment based on the unit equity value are as follows:
[0033] Obtain all selected road segment units of the existing differential road segments;
[0034] The selected unit equity value of all selected road segment units is obtained based on the unit equity value;
[0035] The total existing equity value is obtained by adding up the equity values of all selected units.
[0036] The differentiated road segment unit is the road segment unit of the candidate differentiated road segment; the differentiated unit equity value is the unit equity value corresponding to the road segment unit of the candidate differentiated road segment;
[0037] The selected road segment unit is the road segment unit of the existing difference road segment; the selected unit equity value is the unit equity value corresponding to the road segment unit of the existing difference road segment.
[0038] Preferably, the step of determining whether the weight of the candidate line is greater than or equal to the weight of the existing lines, and storing the candidate line in the candidate map if so, is as follows: determining whether the weight of the candidate line is greater than or equal to all the weights of the existing lines, and storing the candidate line in the candidate map if so.
[0039] Secondly, embodiments of this application provide a multi-route acquisition device, comprising: an optimal route module for acquiring an optimal route connecting a starting point and an ending point in a road network; an add-candidate module for adding the optimal route to a candidate map; a candidate route module for acquiring candidate routes connecting the starting point and the ending point in the road network; and an add-candidate module for determining whether the candidate routes are reasonable, and if reasonable, storing them in the candidate map.
[0040] 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 method for obtaining multiple lines as described above.
[0041] 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 method for obtaining multiple lines as described above.
[0042] The method for obtaining multiple routes in this application first obtains the optimal route from the starting point to the destination and adds the optimal route to the candidate map. Then, it obtains the candidate route, determines whether the candidate route is reasonable, and if reasonable, stores the candidate route in the candidate map.
[0043] The method for obtaining multiple routes in this application determines whether a candidate route is reasonable and stores reasonable routes in a candidate map. This allows users to select from the candidate map when multiple routes are needed. Since all routes in the candidate map have been evaluated and are deemed reasonable, there are no detours or unreasonable routes. Therefore, routes selected from the candidate map will not exhibit the detours or unreasonable routes found in existing technologies. Consequently, the method for obtaining multiple routes in this application can obtain multiple reasonable routes, improving the user experience. Attached Figure Description
[0044] Figure 1 This is a flowchart of a method for obtaining multiple lines provided in an embodiment of this application;
[0045] Figure 2 This is a flowchart of a method for determining whether a candidate line is reasonable and storing it in a candidate diagram if reasonable, according to an embodiment of this application;
[0046] Figure 3 This is a flowchart of a method for obtaining an adjustment ratio coefficient of multiple lines with a setting greater than 1, provided in an embodiment of this application;
[0047] Figure 4 This is a flowchart of a method for obtaining the adjustment ratio coefficient formula that is linearly related to the settings of multiple lines and the candidate lines, according to an embodiment of this application.
[0048] Figure 5 This is a flowchart of a method for obtaining the total equity value of candidate differential road segments based on the unit equity value of multiple routes, provided in an embodiment of this application;
[0049] Figure 6 This is a flowchart of a method for obtaining the total existing equity value of existing differential road segments based on the unit equity value, according to an embodiment of this application;
[0050] Figure 7 This is a schematic diagram of the structure of a multi-line acquisition device provided in an embodiment of this application;
[0051] Figure 8 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation
[0052] 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.
[0053] To illustrate the technical solution of this application, specific embodiments are described below.
[0054] 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.
[0055] To illustrate the technical solution of this application, specific embodiments are described below.
[0056] Please see Figure 1 This is a flowchart of a method for obtaining multiple lines according to an embodiment of this application. This embodiment of the application provides a method for obtaining multiple lines, including:
[0057] S101. Obtain the optimal route connecting the starting point and the ending point in the road network;
[0058] S102. Add the optimal route to the candidate map;
[0059] S103. Obtain candidate routes connecting the starting point and the ending point from the road network;
[0060] S104. Determine if the candidate route is reasonable. If it is reasonable, store it in the candidate map.
[0061] The road network can be a road network used by existing network service platforms with navigation functions and mobile applications.
[0062] The method for obtaining multiple routes in this application first obtains the optimal route from the starting point to the destination and adds the optimal route to the candidate map. Then, it obtains the candidate route, determines whether the candidate route is reasonable, and if reasonable, stores the candidate route in the candidate map.
[0063] Specifically, to determine whether a candidate route is reasonable, one can identify whether the candidate route has any unreasonable aspects such as detours.
[0064] The method for obtaining multiple routes in this application determines whether a candidate route is reasonable and stores reasonable routes in a candidate map. This allows users to select from the candidate map when multiple routes are needed. Since all routes in the candidate map have been evaluated and are deemed reasonable, there are no detours or unreasonable routes. Therefore, routes selected from the candidate map will not exhibit the detours or unreasonable routes found in existing technologies. Consequently, the method for obtaining multiple routes in this application can obtain multiple reasonable routes, improving the user experience.
[0065] Preferably, obtaining the optimal route connecting the starting point and the destination in the road network specifically involves using a customized route planning method to obtain the optimal route connecting the starting point and the destination in the road network.
[0066] Customizable Route Planning (CRP) is a method for planning optimal routes proposed by three engineers at Microsoft Research in Silicon Valley in 2013. Of course, other methods using existing technologies can also be used to obtain the optimal route connecting the starting point and the destination in a road network.
[0067] Preferably, obtaining candidate routes connecting the starting and ending points in the road network specifically involves using the Dijkstra method to obtain candidate routes connecting the starting and ending points in the road network.
[0068] Dijkstra's method 是 The route calculation method was proposed by Dutch computer scientist Dijkstra in 1959. Of course, other methods with existing technology can also be used to obtain candidate routes connecting the starting and ending points of the road network.
[0069] Preferably, the step of obtaining the optimal route connecting the origin and destination points of the road network includes:
[0070] Set the unit equity value for various road segment units;
[0071] Following the step of obtaining candidate routes connecting the origin and destination points in the road network, the following steps are also included:
[0072] Set an adjustment ratio coefficient greater than 1;
[0073] A road segment unit is a road segment that has a starting point and an ending point, connects the starting point and the ending point, and has no branching points in between. The road segment unit is the basic unit that makes up a road.
[0074] The unit equity value of each road segment unit represents the equity value of selecting each road segment unit. The higher the equity value, the more likely the road segment unit is to be selected in terms of comfort, speed, road conditions, etc.
[0075] Specifically, unit equity values for various road segment units can be set based on factors such as route length, road grade, number of lanes, speed limit, road width, road shape, and lane width. Road grades can be categorized as highways, provincial roads, national roads, urban roads, main roads, and auxiliary roads, etc., as needed. Road shapes can reflect straight-ahead, left-turn, and right-turn traffic, etc. The size of the unit equity value can be set as required.
[0076] Adjust the scaling factor to a value greater than 1 for subsequent calculations to determine whether the candidate route is reasonable. The specific value can be set as needed.
[0077] Please see Figure 2 This is a flowchart of a method for determining whether a candidate line is reasonable and storing it in a candidate diagram if reasonable, according to an embodiment of this application. The method for determining whether a candidate line is reasonable and storing it in a candidate diagram according to an embodiment of this application includes the following steps:
[0078] S201. Compare the candidate route with the existing routes in the alternative map to obtain the candidate difference sections and the existing difference sections.
[0079] S202. The ratio of candidate differences is obtained by dividing the length of the candidate difference section by the total length of the candidate route.
[0080] S203. The proportion of existing differences is obtained by dividing the length of the existing difference section by the total length of the existing lines.
[0081] S204. Obtain the total equity value of the candidate differential road segments based on the unit equity value;
[0082] S205. Obtain the total existing equity value of the existing differential road segments based on the unit equity value;
[0083] S206. The weight of the candidate route is obtained by multiplying the candidate difference ratio by the total equity value of the candidate and then by the adjustment ratio coefficient.
[0084] S207. The weight of the existing line is obtained by multiplying the existing difference ratio by the total existing equity value.
[0085] S208. Determine whether the weight of the candidate line is greater than or equal to the weight of the existing line. If so, store the candidate line in the candidate map.
[0086] The total equity value to be selected is the sum of the unit equity values of all road segment units in the candidate differential road segment. The existing total equity value is the sum of the unit equity values of all road segment units in the existing differential road segment.
[0087] Initially, there is only one route in the candidate map, which is the optimal route. At this time, the candidate route is compared with the existing routes in the candidate map, which is the comparison between the candidate route and the optimal route. When other routes are stored in the candidate map, any route can be selected for comparison with the candidate route.
[0088] When comparing the candidate route with the existing routes in the alternative map, if some routes overlap, then it is not necessary to compare the overlapping routes. Specifically, the non-overlapping parts of the two routes are different paths with the same start and end points in the candidate route and the existing routes, respectively: the candidate route segment and the existing route segment.
[0089] The weight of the candidate route is multiplied by an adjustment coefficient greater than 1, which means that it has been amplified to a certain extent as needed. When the weight of the candidate route is greater than or equal to the weight of the existing route, it indicates that the candidate route is reasonable, and the candidate route is stored in the candidate map. This embodiment of the application judges whether the route is reasonable by comparing the weight of the candidate route with the weight of the existing route. The method is simple and reliable, and the routes selected after judgment are reasonable.
[0090] Of course, it can also be set as needed to store the candidate line in the candidate map when the weight of the candidate line is greater than or equal to the weight of all existing lines.
[0091] Of course, it can also be set as needed to store the candidate route in the alternative map when the weight of the candidate route is greater than or equal to the weight of the optimal route.
[0092] Please see Figure 3 This is a flowchart of a method for obtaining adjustment ratio coefficients of multiple lines with settings greater than 1, provided in an embodiment of this application. The method for obtaining adjustment ratio coefficients of multiple lines with settings greater than 1, provided in an embodiment of this application, includes the following steps:
[0093] S301. Set the adjustment ratio coefficient formula related to the candidate lines;
[0094] S302. Substitute the relevant values of the candidate route into the adjustment ratio coefficient formula to obtain the adjustment ratio coefficient.
[0095] The adjustment ratio coefficient is obtained by substituting the relevant values of the candidate route into the adjustment ratio coefficient formula. The adjustment ratio coefficient formula is related to the candidate route, and the relevant values of the candidate route can be selected as needed. For example, the relevant values can be the length of the candidate difference segment, the candidate difference ratio, etc.
[0096] Please see Figure 4 This is a flowchart of a method for obtaining the adjustment ratio coefficient formula that is linearly related to the settings of multiple lines and the candidate lines, according to an embodiment of this application. The method for obtaining the adjustment ratio coefficient formula that is linearly related to the settings of multiple lines and the candidate lines, according to an embodiment of this application, includes the following steps:
[0097] S401, Set the first value to be greater than 1;
[0098] S402, Set a second value greater than 1;
[0099] S403. Compare the candidate route with the existing routes in the alternative map to obtain the candidate difference sections.
[0100] S404. The ratio of candidate differences is obtained by dividing the length of the candidate difference section by the total length of the candidate route.
[0101] S405, the formula for the proportional coefficient obtained by multiplying the first value by the proportion of the difference to be selected and then adding the second value.
[0102] The formula for the proportional coefficient is the first value multiplied by the candidate difference ratio, plus a second value. The proportional coefficient formula is linearly related to the candidate difference ratio. The larger the candidate difference ratio, the larger the adjustment proportional coefficient, which is usually considered to have replanned a completely different new road segment.
[0103] Since both the first and second values are greater than 1, the adjustment ratio obtained by substituting the candidate difference ratio into the ratio coefficient formula is also greater than 1. The values of the first and second values can be set according to actual needs.
[0104] Please see Figure 5 This is a flowchart of a method for obtaining the total candidate equity value of candidate differential road segments based on unit equity value for multiple routes, according to an embodiment of this application. The method for obtaining the total candidate equity value of candidate differential road segments based on unit equity value for multiple routes, according to an embodiment of this application, includes the following steps:
[0105] S501. Obtain all differential road segment units for the candidate differential road segments;
[0106] S502. Obtain the differential unit equity values of all differential road segment units based on the unit equity values;
[0107] S503. The total equity value of the candidate unit is obtained by summing the equity values of all different units;
[0108] The differentiated road segment unit is the road segment unit of the candidate differentiated road segment; the differentiated unit equity value is the unit equity value corresponding to the road segment unit of the candidate differentiated road segment.
[0109] Since all road segments are composed of road segment units, and the unit equity values for various road segment units are set in advance, to calculate the total equity value of the candidate differential road segments, it is necessary to first break down the candidate differential road segments into differential road segment units, then obtain the differential unit equity value of all differential road segment units based on the unit equity value, and finally obtain the total equity value by adding up the equity values of all differential units. The above method for obtaining the total equity value of the candidates is simple and reliable.
[0110] Please see Figure 6 This is a flowchart of a method for obtaining the total existing equity value of existing differential road segments based on the unit equity value of multiple routes, according to an embodiment of this application. The method for obtaining the total existing equity value of existing differential road segments based on the unit equity value of multiple routes, according to an embodiment of this application, includes the following steps:
[0111] S601. Obtain all selected road segment units of the existing differential road segments;
[0112] S602. Obtain the selected unit equity value of all selected road segment units based on the unit equity value;
[0113] S603. The total equity value is obtained by adding up the equity values of all selected units.
[0114] The selected road segment unit is the road segment unit of the existing differentiated road segment; the selected unit equity value is the unit equity value corresponding to the road segment unit of the existing differentiated road segment.
[0115] Since all road segments are composed of road segment units, and the unit equity values for various road segment units are set in advance, to calculate the total existing equity value of road segments with existing differences, it is necessary to first break down the road segments with existing differences into selected road segment units, then obtain the selected unit equity value of all selected road segment units based on the unit equity value, and finally obtain the total existing equity value by adding up the equity values of all selected units. The above method for obtaining the total existing equity value is simple and reliable.
[0116] Please see Figure 7 A multi-line acquisition device 10, comprising:
[0117] The optimal route module 11 is used to obtain the optimal route connecting the starting point and the ending point in the road network;
[0118] Add alternative module 12 to add the optimal route to the alternative map;
[0119] Candidate route module 13 is used to obtain candidate routes connecting the starting point and the ending point in the road network;
[0120] Add a backup module 14 to determine whether the candidate route is reasonable. If it is reasonable, store it in the backup map.
[0121] The multi-line acquisition device 10 provided in one embodiment of this application and the multi-line acquisition method provided in the above embodiments of this application belong to the same concept. The specific implementation process is detailed in the full text of the specification and will not be repeated here.
[0122] 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 method for obtaining multiple lines provided in the above embodiments of this application.
[0123] Figure 8 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 method for obtaining multiple lines as provided in the embodiments of this application as described above.
[0124] Computer devices can be desktop computers, mobile terminals, etc. Mobile terminals include mobile phones, tablets, laptops, personal digital assistants, etc.
[0125] The method for obtaining multiple routes in this application first obtains the optimal route from the starting point to the destination and adds the optimal route to the candidate map. Then, it obtains the candidate route, determines whether the candidate route is reasonable, and if reasonable, stores the candidate route in the candidate map.
[0126] The method for obtaining multiple routes in this application determines whether a candidate route is reasonable and stores reasonable routes in a candidate map. This allows users to select from the candidate map when multiple routes are needed. Since all routes in the candidate map have been evaluated and are deemed reasonable, there are no detours or unreasonable routes. Therefore, routes selected from the candidate map will not exhibit the detours or unreasonable routes found in existing technologies. Consequently, the method for obtaining multiple routes in this application can obtain multiple reasonable routes, improving the user experience.
[0127] 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.
[0128] 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.
[0129] ESDRAM, Synchlink DRAM (SLDRAM), Rambus Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM), etc.
[0130] 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.
[0131] 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 acquiring multiple lines, characterized in that, include: Obtain the optimal route connecting the starting point and the destination in the road network; Add the optimal route to the candidate map; Obtain candidate routes connecting the starting point and the destination from the road network; Determine whether the candidate route is reasonable; if reasonable, store it in the candidate map. The step of obtaining the optimal route connecting the starting and ending points in the road network also includes: Set the unit equity value for various road segment units; The step of obtaining candidate routes connecting the starting point and the destination in the road network further includes: Set an adjustment ratio coefficient greater than 1; The step of determining whether the candidate route is reasonable, and storing it in the candidate map if it is reasonable, specifically involves: The candidate routes are compared with the existing routes in the alternative map to obtain the candidate difference sections and the existing difference sections; The ratio of the candidate difference is obtained by dividing the length of the candidate difference segment by the total length of the candidate route. The ratio of existing differences is obtained by dividing the length of the existing difference section by the total length of the existing lines. The total equity value of the candidate differential road segments is obtained based on the unit equity value; The total existing equity value of the existing differential road segments is obtained based on the unit equity value; The candidate route weight is obtained by multiplying the candidate difference ratio by the candidate total equity value and then by the adjustment ratio coefficient. The existing difference ratio is multiplied by the existing total equity value to obtain the existing line weight value; Determine whether the weight of the candidate route is greater than or equal to the weight of the existing route. If so, store the candidate route in the candidate map. The 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 candidate total equity value is the sum of the unit equity values of all the road segment units of the candidate difference road segment; the existing total equity value is the sum of the unit equity values of all the road segment units of the existing difference road segment.
2. The method for obtaining multiple lines as described in claim 1, characterized in that, The specific unit equity values for setting various road segment units are as follows: The unit equity values for various road segment units are set based on factors such as route length, road grade, number of lanes, speed limit, road width, road type, and lane width. The specific method for obtaining the optimal route connecting the starting point and the destination in the road network is: to obtain the optimal route connecting the starting point and the destination in the road network using a customized route planning method; The specific steps of obtaining candidate routes connecting the starting point and the ending point in the road network are as follows: using the Dijkstra method to obtain candidate routes connecting the starting point and the ending point in the road network.
3. The method for obtaining multiple lines as described in claim 2, characterized in that, The adjustment ratio coefficient that is set to be greater than 1 is specifically as follows: Set the adjustment ratio coefficient formula related to the candidate lines; Substitute the relevant values of the candidate lines into the adjustment ratio formula to obtain the adjustment ratio.
4. The method for obtaining multiple lines as described in claim 3, characterized in that, The formula for setting the adjustment ratio coefficient that is linearly related to the candidate route is as follows: Set the first value to be greater than 1; Set a second value greater than 1. Compare the candidate route with the existing routes in the alternative map to obtain the candidate difference sections; The ratio of the candidate difference is obtained by dividing the length of the candidate difference segment by the total length of the candidate route. The formula for the proportional coefficient is obtained by multiplying the first value by the ratio of the selected differences and then adding the second value.
5. The method for obtaining multiple lines as described in claim 4, characterized in that, The specific steps for obtaining the total equity value of the candidate differential road segment based on the unit equity value are as follows: Obtain all differential road segment units of the candidate differential road segment; Based on the unit equity value, obtain the differential unit equity value of all the differential road segment units; The total equity value of all the aforementioned differential units is summed to obtain the total equity value to be selected; The specific steps for obtaining the total existing equity value of the existing differential road segment based on the unit equity value are as follows: Obtain all selected road segment units of the existing differential road segments; The selected unit equity value of all selected road segment units is obtained based on the unit equity value; The total existing equity value is obtained by adding up the equity values of all selected units. The differentiated road segment unit is the road segment unit of the candidate differentiated road segment; The difference unit equity value is the unit equity value corresponding to the segment unit of the candidate difference segment; The selected road segment unit is the road segment unit of the existing differential road segment; The selected unit equity value is the unit equity value corresponding to the segment unit of the existing differential segment.
6. The method for obtaining multiple lines as described in claim 5, characterized in that, The step of determining whether the weight of the candidate line is greater than or equal to the weight of the existing lines, and storing the candidate line in the candidate map if so, is as follows: determining whether the weight of the candidate line is greater than or equal to all the weights of the existing lines, and storing the candidate line in the candidate map if so.
7. A device for acquiring multiple lines, comprising: The optimal route module is used to obtain the optimal route connecting the starting point and the destination in the road network; The alternative module is used to add the optimal route to the alternative map; The candidate route module is used to obtain candidate routes connecting the starting point and the ending point from the road network; An alternative module is added to determine whether the candidate route is reasonable. If it is reasonable, it is stored in the alternative map. The step of obtaining the optimal route connecting the starting and ending points in the road network also includes: Set the unit equity value for various road segment units; The step of obtaining candidate routes connecting the starting point and the destination in the road network further includes: Set an adjustment ratio coefficient greater than 1; The step of determining whether the candidate route is reasonable, and storing it in the candidate map if it is reasonable, specifically involves: The candidate routes are compared with the existing routes in the alternative map to obtain the candidate difference sections and the existing difference sections; The ratio of the candidate difference is obtained by dividing the length of the candidate difference segment by the total length of the candidate route. The ratio of existing differences is obtained by dividing the length of the existing difference section by the total length of the existing lines. The total equity value of the candidate differential road segments is obtained based on the unit equity value; The total existing equity value of the existing differential road segments is obtained based on the unit equity value; The candidate route weight is obtained by multiplying the candidate difference ratio by the candidate total equity value and then by the adjustment ratio coefficient. The existing difference ratio is multiplied by the existing total equity value to obtain the existing line weight value; Determine whether the weight of the candidate route is greater than or equal to the weight of the existing route. If so, store the candidate route in the candidate map. The 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 candidate total equity value is the sum of the unit equity values of all the road segment units of the candidate difference road segment; the existing total equity value is the sum of the unit equity values of all the road segment units of the existing difference road segment.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for obtaining multiple lines 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, when the processor executes the computer programs, it implements the steps of the method for obtaining multiple lines as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Determination method and determination apparatus for alternative navigation route
CN105588573A
Path recommendation method and device
CN107643085A