Path planning method, device, equipment, medium and program product

By identifying user needs, generating and optimizing path planning, and using the roulette wheel algorithm and gene crossover/mutation operation to generate new paths that satisfy local order constraints, the problem that existing technologies cannot satisfy users' specific order access is solved, achieving the optimization effect of minimizing global length and taking local order into account.

CN118392178BActive Publication Date: 2025-11-18CHERY AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410434325.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2025-11-18
Estimated Expiration
2044-04-10

AI Technical Summary

Technical Problem

Existing technologies cannot effectively meet users' specific sequential access needs in path planning, resulting in increased global path length and a poor user experience.

Method used

By identifying the actual needs of user path planning, multiple original paths are generated, and new paths that satisfy local order constraints are generated using the roulette wheel algorithm and gene crossover/mutation operations. The path planning is then optimized through multiple iterations using the tournament algorithm.

Benefits of technology

The generated path takes into account both the shortest global length and the local order satisfaction, improving the user experience and the applicability of the path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118392178B_ABST
    Figure CN118392178B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of path planning, in particular to a path planning method, device, equipment, medium and program product, wherein the method comprises the following steps: identifying actual requirements of user path planning; determining a starting point position, a final destination and a local sequence constraint condition according to the actual requirements, generating a plurality of original paths based on the starting point position and the final destination, and performing node sequence coding on the original paths to generate a plurality of node sequences, wherein the local sequence constraint condition is a local sequence constraint for a plurality of destination nodes in the original paths; executing a second preset algorithm on any preset length node sequence in a plurality of original paths of the same species based on a first preset algorithm to generate a corresponding new path meeting the local sequence constraint condition; and generating an optimal path by performing multiple iterations on the plurality of new paths by using a third preset algorithm. Thus, the problems that the path generated by the global optimal solution in the related art does not meet the sequence access requirements of the user and the user experience is poor are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of path planning technology, and in particular to a path planning method, apparatus, equipment, medium and program product. Background Technology

[0002] In many navigation and route planning applications, there is a need to visit multiple points in a specific order. For example, when repairing a power transmission network, substations must be turned on / off in sequence, and logistics delivery needs to deliver goods in the order specified by the customer.

[0003] Most related technologies attempt to find the globally optimal solution using shortest path and navigation algorithms, resulting in paths that fail to meet users' sequential access requirements. Forcibly satisfying sequential constraints would also significantly increase the global length of the path. Summary of the Invention

[0004] This application provides a path planning method, apparatus, device, medium, and program product to solve the problems in related technologies where the path generated by the globally optimal solution does not meet the user's sequential access requirements, resulting in a poor user experience.

[0005] The first aspect of this application provides a path planning method, comprising the following steps: identifying the actual needs of a user's path planning; determining the starting point, final destination, and local order constraints based on the actual needs; generating multiple original paths based on the starting point and final destination, and encoding the node sequences of the original paths, wherein the local order constraints are applied to multiple destination nodes in the original paths; selecting any preset length node sequence from the multiple original paths of the same population based on a first preset algorithm, executing a second preset algorithm to generate corresponding new paths that satisfy the local order constraints; and iterating multiple times using a third preset algorithm to generate the optimal path from the multiple new paths.

[0006] Optionally, the step of selecting any preset length node sequence from the multiple original paths of the same population based on the first preset algorithm and executing the second preset algorithm to generate a corresponding new path that satisfies the local order constraint condition includes: obtaining preset length node sequences of any two original paths; swapping the preset length node sequences to generate two new paths, and determining whether the overall sequence of the two new paths satisfies the local order constraint condition; if the overall sequence does not satisfy the local order constraint condition, then correcting the overall sequence of the new paths according to the local order constraint condition, and generating two corresponding new paths.

[0007] Optionally, after generating two new paths by exchanging the preset length sequences of the two original paths, the method includes: determining whether there are duplicate destination nodes in the two new paths; if there are duplicate destination nodes, replacing the duplicate destination nodes with destination nodes that meet preset conditions.

[0008] Optionally, the step of selecting any preset length node sequence from the multiple original paths of the same population based on the first preset algorithm and executing the second preset algorithm to generate a corresponding new path that satisfies the local order constraint condition includes: selecting a preset length node sequence from any original path; reversing the preset length node sequence to generate a new path, and determining whether the overall sequence of the new path satisfies the local order constraint condition; if the overall sequence does not satisfy the local order constraint condition, then correcting the overall sequence of the new path according to the local order constraint condition and generating a corresponding new path.

[0009] Optionally, after generating multiple original paths based on the starting position and the final destination, the method includes: obtaining the total length of the original paths; dividing the original paths of the same length into the same population, wherein the population consists of n complete node sequences between the starting position and the final destination.

[0010] Optionally, after generating the optimal path by iterating through multiple new paths using a third preset algorithm, the process includes: visualizing the optimal path.

[0011] A second aspect of this application provides a path planning device, comprising: an identification module for identifying the actual needs of a user's path planning; a determination module for determining a starting point, a final destination, and local order constraints based on the actual needs, generating multiple original paths based on the starting point and the final destination, and encoding the original paths into node sequences, wherein the local order constraints are applied to multiple destination nodes in the original paths; and a selection module for selecting any preset length node sequences of the same group from the multiple original paths based on a first preset algorithm, executing a second preset algorithm to generate corresponding new paths that satisfy the local order constraints, and iterating multiple times using a third preset algorithm to generate an optimal path from the multiple new paths.

[0012] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the path planning method as described in the above embodiments.

[0013] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the path planning method as described in the above embodiments.

[0014] A fifth aspect of this application provides a computer program product, characterized in that, when the computer program is executed, it is used to implement the path planning method described in the above embodiments.

[0015] Therefore, this application has at least the following beneficial effects:

[0016] This application embodiment can determine the starting position, destination sequence, and ordered sequence list according to the actual needs of user path planning. Based on the starting position and destination sequence, multiple original paths are generated, and the original paths are encoded into node sequences to generate multiple node sequences. Using the roulette wheel algorithm, node sequences of any preset length from multiple original paths of the same population are selected to perform gene crossover and / or gene mutation operations to generate corresponding new paths that satisfy the ordered sequence list. The multiple new paths are iterated multiple times using the tournament algorithm to obtain the optimal path. The final path can simultaneously take into account the shortest global length and satisfy the local order, which has high applicability, meets the user's sequential access needs, and improves the user experience.

[0017] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0019] Figure 1 This is a flowchart of a path planning method provided according to an embodiment of this application;

[0020] Figure 2 This is a flowchart of a locally ordered path planning method based on a genetic algorithm, according to an embodiment of this application.

[0021] Figure 3 This is an example diagram of gene crossover provided according to embodiments of this application;

[0022] Figure 4 This is an example diagram of gene mutations provided according to embodiments of this application;

[0023] Figure 5 This is a block diagram of a path planning device provided according to an embodiment of this application;

[0024] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0025] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0026] In many navigation and route planning applications, there is a need to visit multiple points in a specific order. For example, when repairing a power transmission network, substations must be shut down / started in sequence, and logistics delivery requires goods to be delivered in a customer-specified order. Traditional route planning algorithms often ignore the constraints on the order of visits between points and cannot meet the needs of these practical problems with local order requirements.

[0027] For example, a pedestrian needs to start from a specified starting point (o), pass through multiple destinations, and return to the starting point. Some of these destinations have a specific order. There are 10 destinations to visit, D = {d1, d2, d3, d4, d5, d6, d7, d8, d9, d...}. 10 Given a sequence [d1, d3, d7] and [d2, d5, d9], there exist two locally ordered sequences. Taking the first ordered sequence as an example, d1 indicates that d3 must be visited before d7. However, it's important to note that d1 must be visited before d3, but this doesn't mean that d3 is visited immediately after d1. There can be other destinations between d1 and d3. For example, the following visiting order is valid: [d8, d1, d2, d5, d3, d7, d4, d9]. 10 ,d9,d6].

[0028] This application presents a novel path planning model that considers local order constraints between points, making the formal modeling of the problem more closely aligned with practical needs. It adds order verification and processing logic to the traditional shortest path algorithm, generating paths that simultaneously consider both the shortest global length and the satisfaction of local order, achieving optimization results. It has universality and can be widely applied to various navigation path planning problems with local order constraints.

[0029] The path planning method, apparatus, electronic device, storage medium, and computer program product of this application are described below with reference to the accompanying drawings. Specifically, Figure 1 This is a flowchart illustrating a path planning method provided in an embodiment of this application.

[0030] like Figure 1 As shown, this path planning method includes the following steps:

[0031] In step S101, the actual needs of user route planning are identified.

[0032] It is understood that the embodiments of this application can identify the actual needs of path planning, so as to determine the starting point, final destination and local sequence constraints according to the actual needs.

[0033] In step S102, the starting position, final destination, and local order constraints are determined according to the actual requirements. Multiple original paths are generated based on the starting position and the final destination, and the original paths are encoded with node sequences. The local order constraints are applied to the local order of multiple destination nodes in the original paths.

[0034] It is understood that, according to actual needs, the starting point, final destination and local order constraints can be determined in the embodiments of this application. Multiple original paths are generated based on the starting point and final destination, and the original paths are encoded into node sequences to generate multiple node sequences, so as to generate the optimal path in subsequent iterations.

[0035] It should be noted that this application can be applied to logistics supply chain management, intelligent delivery systems, network optimization and navigation, etc. Taking intelligent delivery systems as an example, in order to save time or reduce resource waste, multiple delivery routes are generated based on the starting point and final destination, including the shortest distance, avoiding congested sections, and the fewest traffic lights. A delivery route is selected according to the user's actual needs, and the delivery route meets the delivery address of all delivery needs.

[0036] Specifically, based on the user's input of the starting position [o], the destination sequence is [d1,d2,d3,d4,d5,d6,d7,d8,d9,d10] and the required ordered destination sequence list [d1,d3,d7] and [d2,d5,d9]. The ordered destination sequence list is the local order constraint condition of this application.

[0037] In this embodiment of the application, after generating multiple original paths based on the starting position and the final destination, the method includes: obtaining the total length of the original paths; dividing the original paths of the same length into the same population, wherein the population consists of n complete node sequences between the starting position and the final destination.

[0038] It is understood that embodiments of this application can divide original paths of the same length into the same group so that the optimal path can be obtained in subsequent iterations.

[0039] Specifically, calculate the distance matrix between the starting point and the final destination, and between any two destinations; initialize n initial paths, and correct paths that do not meet the requirements according to the ordered list of destination sequences. Each path is called an individual, and n individuals are called a population.

[0040] In step S103, based on the first preset algorithm, any preset length node sequence in the multiple original paths of the same population is selected and the second preset algorithm is executed to generate a corresponding new path that satisfies the local order constraint condition. The multiple new paths are iterated multiple times using the third preset algorithm to generate the optimal path.

[0041] The first preset algorithm is the roulette wheel algorithm, the second preset algorithm is gene crossover and / or gene mutation, and the third preset algorithm is the tournament algorithm, without specific limitations.

[0042] It is understood that the embodiments of this application can use the roulette wheel algorithm to select any preset length node sequence in multiple original paths of the same population, perform gene crossover and / or gene mutation operations to generate corresponding new paths that satisfy the ordered sequence list, and use the tournament algorithm to iterate multiple times to obtain the optimal path. The final path can simultaneously take into account the shortest global length and satisfy the local order, which has high applicability, meets the user's sequential access needs, and improves the user experience.

[0043] In this embodiment of the application, a second preset algorithm is executed to generate a corresponding new path that satisfies local order constraints by selecting any preset length node sequence from multiple original paths of the same population based on a first preset algorithm. This includes: obtaining preset length node sequences of any two original paths; exchanging preset length node sequences to generate two new paths, and determining whether the overall sequence of the two new paths satisfies local order constraints; if the overall sequence does not satisfy local order constraints, then the overall sequence of the new paths is corrected according to the local order constraints, and two corresponding new paths are generated.

[0044] The preset length of the node list can be set according to the actual situation, without specific limitations.

[0045] It is understood that the embodiments of this application can exchange node sequences of a preset length to generate two new paths, and determine whether the overall sequence of the two new paths satisfies the local order constraint. If the overall sequence does not satisfy the constraint, it is corrected so that the generated new path takes into account both the shortest global length and the satisfaction of local order.

[0046] Specifically, gene crossover (such as...) Figure 3The operation (as shown) is as follows: Based on the roulette wheel algorithm, select two individuals, assuming the two individuals we select are [o,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,o] and [o,d1,d3,d10,d2,d4,d5,d7,d6,d9,d8,o]. Randomly select a continuous gene segment, the gene segment selected by individual 1 is [d4,d5,d6,d7], and the gene segment selected by individual 2 is [d2,d4,d5,d7]. Swap these two gene segments to obtain: individual 1 [o,d1,d2,d3,d2,d4,d5,d7,d9,d10,o], individual 2 [o,d1,d3,d10,d4,d5,d6,d7,d6,d9,d8,o].

[0047] In this embodiment of the application, after generating two new paths by exchanging sequences of preset lengths of two original paths, the process includes: determining whether there are duplicate destination nodes in the two new paths; if there are duplicate destination nodes, replacing the duplicate destination nodes with destination nodes that meet preset conditions.

[0048] The preset conditions can be destination nodes that are not included in the new path compared to the original path, without specific limitations.

[0049] It is understood that if there are duplicate destination nodes in this application embodiment, they will be replaced with destination nodes that meet preset conditions to generate a new path that meets the order constraints.

[0050] Specifically, after the swap, it was found that both individuals 1 and 2 had duplicate destinations. Therefore, the duplicate genes need to be deleted and replaced with cities that have not yet been included. After the gene deduplication operation, it is also necessary to check whether each individual meets the requirements of the local order constraint. Individual 1 meets the requirements of the local order constraint, while individual 2 does not, so a gene order correction operation needs to be performed on individual 2. In individual 2, d5 needs to be visited after d2, so it is only necessary to swap the order of d5 and d2. The specific operation is as follows: Figure 3 As shown, repeating this step n / 2 times will yield n new individuals.

[0051] In this embodiment of the application, a new path that satisfies local order constraints is generated by executing a second preset algorithm on any preset length node sequence from multiple original paths of the same population based on a first preset algorithm. This includes: selecting a preset length node sequence from any original path; reversing the preset length node sequence to generate a new path, and determining whether the overall sequence of the new path satisfies local order constraints; if the overall sequence does not satisfy local order constraints, then the overall sequence of the new path is corrected according to the local order constraints, and a corresponding new path is generated.

[0052] It is understood that the embodiments of this application can reverse the preset length node sequence to generate a new path, and determine whether the overall sequence of the new path satisfies the local order constraint conditions, and correct the overall sequence that does not satisfy the constraint conditions, so that the generated new path simultaneously takes into account the shortest global length and the satisfaction of local order.

[0053] Specifically, gene mutations (such as Figure 4 The operation (as shown) is as follows: Based on the new individual obtained in step

[0020] , an individual is selected using the roulette wheel algorithm, a continuous gene segment is randomly selected, and the gene segment is reversed. If the reversed segment does not meet the local order constraint condition, the non-compliant part is corrected.

[0054] For example, an individual's genes are: [o,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,o], and a randomly selected continuous segment is [d3,d4,d5,d6,d7,d8,d9]. The reversed segment results in a new individual: [o,d1,d2,d9,d8,d7,d6,d5,d4,d3,d10,o]. This new individual does not meet the local order constraint requirements, so d9 and d5, and d7 and d3 need to be swapped. Therefore, the final genes of the new individual are: [o,d1,d2,d5,d8,d3,d6,d9,d4,d7,d10,o].

[0055] In this embodiment of the application, after generating the optimal path by iterating through multiple new paths using the tournament algorithm, the process includes: visualizing the optimal path.

[0056] It is understood that the embodiments of this application can visualize the optimal path, thereby improving the user experience.

[0057] The path planning method proposed in this application determines the starting point, final destination, and local order constraints based on the actual needs of user path planning. Multiple original paths are generated based on the starting point and final destination. Node sequences are encoded into the original paths to generate multiple node sequences. A roulette wheel algorithm is used to select any preset length node sequence from the multiple original paths of the same population and perform gene crossover and / or gene mutation operations to generate corresponding new paths that satisfy the local order constraints. The tournament algorithm is used to iterate multiple times on the multiple new paths to generate the optimal path. The final path can simultaneously achieve the shortest global length and satisfy the local order constraints, exhibiting high applicability, meeting the user's sequential access needs, and improving the user experience.

[0058] The following will combine Figures 2 to 4 The path planning method will be explained in detail below:

[0059] Step 1: Randomly generate multiple individuals based on the list of starting points and final destinations. Each individual represents a path, and a complete path is called an individual. Input the starting point position [o], the destination sequence [d1,d2,d3,d4,d5,d6,d7,d8,d9,d10], and the local order constraints [d1,d3,d7] and [d2,d5,d9] according to the user's requirements.

[0060] Step 2 involves refining the individuals, correcting those that do not meet the local ordering condition. Step 1 is repeated n times. These n individuals are called the first generation population.

[0061] Calculate the distance matrix between the starting point and the final destination, and between any two destinations; initialize n initial paths, and correct paths that do not meet the requirements according to the ordered list of final destinations. Each path is called an individual, and n individuals are called a population.

[0062] Step 3: Calculate the fitness of each individual. Fitness represents the total length of the path to each initial solution.

[0063] Step 4: Select two individuals using the roulette wheel algorithm and exchange a segment of their genes. Each gene represents a continuous destination sequence within the individual. If, after the gene exchange, one individual no longer satisfies the condition of local order, then the genes of that individual are corrected. Repeat step 4 (n / 2) times to generate n new individuals.

[0064] Based on the roulette wheel algorithm, two individuals are selected, assuming the selected individuals are [o,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,o] and [o,d1,d3,d10,d2,d4,d5,d7,d6,d9,d8,o]. A continuous gene segment is randomly selected; individual 1 selects the gene segment [d4,d5,d6,d7], and individual 2 selects the gene segment [d2,d4,d5,d7]. These two gene segments are swapped, resulting in: individual 1 [o,d1,d2,d3,d2,d4,d5,d7,d9,d10,o], and individual 2 [o,d1,d3,d10,d4,d5,d6,d7,d6,d9,d8,o]. After the swap, it was found that both individuals 1 and 2 have duplicate destination nodes. Therefore, the duplicate genes need to be deleted and replaced with cities that have not yet been included. After deduplication, it is also necessary to check whether each individual meets the local order constraint requirements. Individual 1 meets the local order constraint requirements, while individual 2 does not, so gene order correction is required for individual 2. In individual 2, d5 needs to be visited after d2, so it is only necessary to swap the order of d5 and d2. The specific operation is as follows: Figure 2As shown, repeating this step n / 2 times will yield n new individuals.

[0065] Step 5: Select an individual using the roulette wheel algorithm, randomly choose a continuous gene segment from the current individual, and reverse this continuous gene segment. It is necessary to determine whether the reversed individual meets the local order constraint requirements. If not, the genes of the disqualified individual are corrected. Repeat step 5 (n) times to generate n new individuals.

[0066] Based on the new individual obtained in step 4, the roulette wheel algorithm is used to select another individual, randomly select a continuous gene segment, and reverse the order of that gene segment. If the reversed segment does not meet the local order constraint, the non-compliant part is corrected.

[0067] For example, an individual's genes are: [o,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,o], and a randomly selected continuous segment is [d3,d4,d5,d6,d7,d8,d9]. The reversed segment results in a new individual: [o,d1,d2,d9,d8,d7,d6,d5,d4,d3,d10,o]. This new individual does not meet the local order constraint requirements, so d9 and d5, and d7 and d3 need to be swapped. Therefore, the final genes of the new individual are: [o,d1,d2,d5,d8,d3,d6,d9,d4,d7,d10,o].

[0068] Step 6: Combine the n new individuals obtained in Step 5 with the previous n individuals from the previous generation to obtain n new individuals using the tournament algorithm. Treat these n new individuals as the new generation and repeat Steps 3-6 m times to obtain a population of m generations. Then, select the best individual from the last generation for visualization.

[0069] In summary, this application models and solves the path planning problem through mechanisms such as encoding, selection, crossover, and mutation in a genetic algorithm. The key is to encode the node sequence of the path and design a fitness function that simultaneously considers path length and order constraints. Further improvements are needed to the genetic operators to ensure that the results inherit the local order characteristics of the parents. Through repeated testing and verification, the genetic algorithm can ultimately be effectively combined with the local order constraint mechanism of the problem, allowing its stochastic global search capability to be fully utilized, thereby effectively solving this constrained optimal path planning problem.

[0070] Next, the path planning apparatus proposed according to the embodiments of this application is described with reference to the accompanying drawings.

[0071] Figure 5 This is a block diagram of a path planning device according to an embodiment of this application.

[0072] like Figure 5 As shown, the path planning device 10 includes: an identification module 100, a determination module 200, and a selection module 300.

[0073] The identification module 100 is used to identify the actual needs of user route planning; the determination module 200 is used to determine the starting position, final destination and local order constraints according to the actual needs, generate multiple original paths based on the starting position and final destination, and encode the node sequence of the original paths, wherein the local order constraints are applied to the local order constraints of multiple destination nodes in the original paths; the selection module 300 is used to select node sequences of any preset length from multiple original paths of the same population based on a first preset algorithm, execute a second preset algorithm to generate corresponding new paths that satisfy the local order constraints, and use a third preset algorithm to iterate multiple times to generate the optimal path for the multiple new paths.

[0074] In this embodiment of the application, a second preset algorithm is executed to generate a corresponding new path that satisfies local order constraints by selecting any preset length node sequence from multiple original paths of the same population based on a first preset algorithm. This includes: obtaining preset length node sequences of any two original paths; exchanging preset length node sequences to generate two new paths, and determining whether the overall sequence of the two new paths satisfies local order constraints; if the overall sequence does not satisfy local order constraints, then the overall sequence of the new paths is corrected according to the local order constraints, and two corresponding new paths are generated.

[0075] In this embodiment of the application, after generating two new paths by exchanging the preset length sequences of the two original paths, the method includes: determining whether there are duplicate destination nodes in the two new paths; if there are duplicate destination nodes, replacing the duplicate destination nodes with destination nodes that meet preset conditions.

[0076] In this embodiment of the application, a new path that satisfies local order constraints is generated by executing a second preset algorithm on any preset length node sequence from multiple original paths of the same population based on a first preset algorithm. This includes: selecting a preset length node sequence from any original path; reversing the preset length node sequence to generate a new path, and determining whether the overall sequence of the new path satisfies local order constraints; if the overall sequence does not satisfy local order constraints, then the overall sequence of the new path is corrected according to the local order constraints, and a corresponding new path is generated.

[0077] In this embodiment of the application, after generating multiple original paths based on the starting position and the final destination, the method includes: obtaining the total length of the original paths; dividing the original paths of the same length into the same population, wherein the population consists of n complete node sequences between the starting position and the final destination.

[0078] In this embodiment of the application, after obtaining the optimal path by iterating through multiple new paths using the tournament algorithm, the process includes: visualizing the optimal path.

[0079] It should be noted that the foregoing explanation of the path planning method embodiment also applies to the path planning device of this embodiment, and will not be repeated here.

[0080] The path planning method proposed in this application determines the starting point, final destination, and local order constraints based on the actual needs of user path planning. Multiple original paths are generated based on the starting point and final destination. Node sequences are encoded into the original paths to generate multiple node sequences. A roulette wheel algorithm is used to select any preset length node sequence from the multiple original paths of the same population and perform gene crossover and / or gene mutation operations to generate corresponding new paths that satisfy the local order constraints. The tournament algorithm is used to iterate multiple times on the multiple new paths to generate the optimal path. The final path can simultaneously achieve the shortest global length and satisfy the local order constraints, exhibiting high applicability, meeting the user's sequential access needs, and improving the user experience.

[0081] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:

[0082] The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.

[0083] When the processor 602 executes the program, it implements the path planning method provided in the above embodiments.

[0084] Furthermore, electronic devices also include:

[0085] Communication interface 603 is used for communication between memory 601 and processor 602.

[0086] The memory 601 is used to store computer programs that can run on the processor 602.

[0087] The memory 601 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.

[0088] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0089] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.

[0090] The processor 602 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.

[0091] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the path planning method described above.

[0092] This application also provides a computer program product, which, when executed, is used to implement the path planning method described above.

[0093] 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. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. 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 different embodiments or examples.

[0094] 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, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0095] 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 N executable instructions for implementing custom logic functions or processes, and 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 functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0096] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.

[0097] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0098] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A path planning method, characterized in that, Includes the following steps: Identify the actual needs of user path planning; The starting point, final destination, and local order constraints are determined according to the actual requirements. Multiple original paths are generated based on the starting point and final destination, and the original paths are encoded with node sequences. The local order constraints are applied to the local order of multiple destination nodes in the original paths. Based on the first preset algorithm, select any preset length node sequence from the multiple original paths of the same population, execute the second preset algorithm to generate a corresponding new path that satisfies the local order constraint condition, and use the third preset algorithm to iterate multiple times to generate the optimal path for the multiple new paths. The step of selecting any preset length node sequence from the multiple original paths of the same population based on the first preset algorithm and executing the second preset algorithm to generate a corresponding new path that satisfies the local order constraint condition includes: obtaining preset length node sequences of any two original paths; swapping the preset length node sequences to generate two new paths, and determining whether the overall sequence of the two new paths satisfies the local order constraint condition; if the overall sequence does not satisfy the local order constraint condition, then correcting the overall sequence of the new paths according to the local order constraint condition, and generating two corresponding new paths. After generating two new paths by exchanging sequences of preset lengths of the two original paths, the process includes: determining whether there are duplicate destination nodes in the two new paths; if there are duplicate destination nodes, replacing the duplicate destination nodes with destination nodes that meet preset conditions.

2. The path planning method according to claim 1, characterized in that, The step of selecting any preset length node sequence from the multiple original paths of the same population based on the first preset algorithm and executing the second preset algorithm to generate a corresponding new path that satisfies the local order constraint condition includes: Select a node sequence of a preset length from any of the original paths; Reverse the preset length node sequence to generate a new path, and determine whether the overall sequence of the new path satisfies the local order constraint condition; If the overall sequence does not satisfy the local order constraint, the overall sequence of the new path is modified according to the local order constraint, and a corresponding new path is generated.

3. The path planning method according to claim 1, characterized in that, After generating multiple original paths based on the starting point and the final destination, the process includes: Obtain the total length of the original path; Original paths of the same length are divided into the same population, where each population consists of n complete node sequences between the starting point and the final destination.

4. The path planning method according to claim 1, characterized in that, After generating the optimal path by iterating through multiple new paths using a third preset algorithm, the process includes: The optimal path is then visualized.

5. A path planning device, characterized in that, include: The identification module identifies the actual needs of users for route planning; The determination module is used to determine the starting position, final destination and local order constraints according to the actual needs, generate multiple original paths based on the starting position and final destination, and encode the node sequence of the original paths, wherein the local order constraints are applied to the local order constraints of multiple destination nodes in the original paths. The selection module is used to select any preset length node sequence from the multiple original paths of the same population based on the first preset algorithm, execute the second preset algorithm to generate a corresponding new path that satisfies the local order constraint condition, and use the third preset algorithm to iterate multiple times to generate the optimal path for the multiple new paths. The step of selecting any preset length node sequence from the multiple original paths of the same population based on the first preset algorithm and executing the second preset algorithm to generate a corresponding new path that satisfies the local order constraint condition includes: obtaining preset length node sequences of any two original paths; swapping the preset length node sequences to generate two new paths, and determining whether the overall sequence of the two new paths satisfies the local order constraint condition; if the overall sequence does not satisfy the local order constraint condition, then correcting the overall sequence of the new paths according to the local order constraint condition, and generating two corresponding new paths. After generating two new paths by exchanging sequences of preset lengths of the two original paths, the process includes: determining whether there are duplicate destination nodes in the two new paths; if there are duplicate destination nodes, replacing the duplicate destination nodes with destination nodes that meet preset conditions.

6. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the path planning method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the path planning method as described in any one of claims 1-4.

8. A computer program product, characterized in that, When the computer program is executed, it is used to implement the path planning method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Unmanned ship path planning method and system based on improved genetic algorithm

    CN110442135A

  • Path planning method and device, equipment and storage medium

    CN113865607A