CN111461403B - Vehicle path planning method and device, computer readable storage medium and terminal - Google Patents
Vehicle path planning method and device, computer readable storage medium and terminal Download PDFInfo
- Publication number
- CN111461403B CN111461403B CN202010151343.3A CN202010151343A CN111461403B CN 111461403 B CN111461403 B CN 111461403B CN 202010151343 A CN202010151343 A CN 202010151343A CN 111461403 B CN111461403 B CN 111461403B
- Authority
- CN
- China
- Prior art keywords
- training
- distance
- name sequence
- path
- sequence
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/26—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
- G01C21/34—Route searching; Route guidance
- G01C21/3407—Route searching; Route guidance specially adapted for specific applications
- G01C21/343—Calculating itineraries, i.e. routes leading from a starting point to a series of categorical destinations using a global route restraint, round trips, touristic trips
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/26—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
- G01C21/34—Route searching; Route guidance
- G01C21/3446—Details of route searching algorithms, e.g. Dijkstra, A*, arc-flags, using precalculated routes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Resources & Organizations (AREA)
- Automation & Control Theory (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Game Theory and Decision Science (AREA)
- Development Economics (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a vehicle path planning method and device, a computer readable storage medium and a terminal, wherein a path planning model is obtained by training a depth network of a pointer network type, a name sequence and a distance sequence of an access site to be planned, which are obtained by coding, are input into the path planning model, the name sequence is reordered by the path planning model based on the distance sequence, and a new name sequence which can enable the planned path distance of the access site to be shortest is output, so that a planned path corresponding to the new name sequence is obtained. Based on the application, the path planning strategy can be molded by the deep network, so that the optimization result of the vehicle path planning problem can be directly calculated without searching.
Description
Technical Field
The present application relates to the field of logistics technologies, and in particular, to a vehicle path planning method and apparatus, a computer readable storage medium, and a terminal.
Background
The vehicle path planning problem (VRP) is a combination optimization problem that has proven to be an NP-hard problem, and the optimal solution to the problem cannot be determined unless all combinations are exhaustive. In common scenes such as actual logistics transportation, vehicle scheduling, route planning and the like, the solving requirement of the vehicle path planning problem is often met.
At present, common optimization methods for solving the problems are heuristic algorithms, such as genetic algorithm, ant colony algorithm, particle swarm algorithm, simulated annealing, tabu search and the like. When the calculation scale of the problem is not large, the optimal path can be solved by using a dynamic programming algorithm, the time complexity and the space complexity required by the dynamic programming for solving the problem are high, and the calculation speed is very slow when more than 20 sites are generally visited. However, there is generally no specific optimization rule for such a problem, and the heuristic algorithm is essentially to gradually find a solution with better performance in a random search manner, so that it is undoubtedly necessary to consume time to wait for the solution to be continuously searched randomly. That is, the more likely a search is, the closer to the optimal solution is possible.
However, considering that the solving time of the problem is limited in the actual scenario, how to balance the performance of the solution and the computation loss time becomes a problem to be solved.
Disclosure of Invention
In view of the above, the present application provides a vehicle path planning method and apparatus, a computer readable storage medium, and a terminal. The technical proposal is as follows:
a vehicle path planning method, the method comprising:
encoding a name sequence and a distance sequence of access sites to be planned, wherein the name sequence comprises a name encoding value of each site in the access sites, and the distance sequence comprises a distance value between every two sites in the access sites;
inputting the name sequence and the distance sequence into a pre-trained path planning model, so that the path planning model reorders the name sequence based on the distance sequence and outputs a new name sequence, wherein the new name sequence can enable the planned path distance of the access site to be the shortest, and the path planning model is obtained by training a depth network of a pointer network type in advance;
and acquiring a planning path corresponding to the new name sequence.
Preferably, the process of training the depth network of the pointer network type in advance to obtain the path planning model includes:
acquiring training samples, wherein the training samples comprise a plurality of groups of name sequence samples and distance sequence samples of a training access site, and one group of name sequence samples corresponds to one planned training path and one distance sequence sample;
extracting a group of name sequence samples for the current training from the training samples, inputting the group of name sequence samples and corresponding distance sequence samples into the depth network of the pointer network type, so that the depth network of the pointer network type outputs one target name sequence sample capable of converging the distance of the corresponding planned training path in the group of name sequence samples based on the input distance sequence samples, wherein the initial value of the network parameter of the depth network of the pointer network type is preset;
the network parameters are adjusted through calculating the distance of the planned training path corresponding to the target name sequence sample, so that the depth network of the pointer network type re-executes the target name sequence sample which can enable the corresponding planned training path distance to be converged in the group of name sequence samples based on the input distance sequence sample, the training is finished when the finishing condition of the training is met, and a pointer is set for the final target name sequence sample output by the depth network of the pointer network type when the training is finished, wherein the pointer is the basis or the basis for re-training the depth network of the pointer network type;
and taking the depth network of the pointer network type after multiple training as the path planning model.
Preferably, the adjusting the network parameter by calculating the distance of the training planned path corresponding to the target name sequence sample includes:
calculating the distance of the planned training path corresponding to the target name sequence sample;
calculating the reference distance of the group of name sequence samples for the training;
calculating the gradient of the network parameter according to the distance of the planned training path and the reference distance;
the network parameters are updated based on the gradient of the network parameters.
Preferably, the calculating the reference distance of the set of name sequence samples for the training includes:
under the condition that the training is not the first training, acquiring a historical reference distance of the last training;
and calculating the reference distance of the group of name sequence samples for the training by utilizing the distance of the planned training path and the historical reference distance.
Preferably, the calculating the reference distance of the set of name sequence samples for the training further includes:
under the condition that the training is the first training, determining an optimized path of the set of name sequence samples by using a heuristic algorithm, and taking the distance of the optimized path as the reference distance of the set of name sequence samples in the training.
A vehicle path planning apparatus, the apparatus comprising: the system comprises an encoding module, a path planning module and a path acquisition module, wherein the path planning module comprises a model training unit;
the model training unit is used for training the depth network of the pointer network type in advance to obtain a path planning model;
the coding module is used for coding a name sequence and a distance sequence of the access sites to be planned, wherein the name sequence comprises a name coding value of each site in the access sites, and the distance sequence comprises a distance value between every two sites in the access sites;
the path planning module is used for inputting the name sequence and the distance sequence into the path planning model so that the path planning model reorders the name sequence based on the distance sequence and outputs a new name sequence, and the new name sequence can enable the planned path distance for accessing the access site to be the shortest;
the path acquisition module is used for acquiring the planning path corresponding to the new name sequence.
Preferably, the model training unit is configured to train the depth network of the pointer network type in advance to obtain a path planning model, and is specifically configured to:
acquiring training samples, wherein the training samples comprise a plurality of groups of name sequence samples and distance sequence samples of a training access site, and one group of name sequence samples corresponds to one planned training path and one distance sequence sample; extracting a group of name sequence samples for the current training from the training samples, inputting the group of name sequence samples and corresponding distance sequence samples into the depth network of the pointer network type, so that the depth network of the pointer network type outputs one target name sequence sample capable of converging the distance of the corresponding planned training path in the group of name sequence samples based on the input distance sequence samples, wherein the initial value of the network parameter of the depth network of the pointer network type is preset; the network parameters are adjusted through calculating the distance of the planned training path corresponding to the target name sequence sample, so that the depth network of the pointer network type re-executes the target name sequence sample which can enable the corresponding planned training path distance to be converged in the group of name sequence samples based on the input distance sequence sample, the training is finished when the finishing condition of the training is met, and a pointer is set for the final target name sequence sample output by the depth network of the pointer network type when the training is finished, wherein the pointer is the basis or the basis for re-training the depth network of the pointer network type; and taking the depth network of the pointer network type after multiple training as the path planning model.
Preferably, the model training unit is configured to adjust the network parameter by calculating a distance of a planned training path corresponding to the target name sequence sample, and is specifically configured to:
calculating the distance of the planned training path corresponding to the target name sequence sample; calculating the reference distance of the group of name sequence samples for the training; calculating the gradient of the network parameter according to the distance of the planned training path and the reference distance; the network parameters are updated based on the gradient of the network parameters.
A computer readable storage medium having stored thereon computer instructions, which when run perform the steps of any of the vehicle path planning methods described herein.
A terminal comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of any of the vehicle path planning methods.
The vehicle path planning method, the vehicle path planning device, the computer-readable storage medium and the terminal provided by the application have the advantages that the path planning model is obtained by training the depth network of the pointer network type, the name sequence and the distance sequence of the access site to be planned, which are obtained by encoding, are input into the path planning model, the name sequence is reordered by the path planning model based on the distance sequence, and a new name sequence which can enable the planned path distance of the access site to be shortest is output, so that the planned path corresponding to the new name sequence is obtained. Based on the application, the path planning strategy can be molded by the deep network, so that the optimization result of the vehicle path planning problem can be directly calculated without searching.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a vehicle path planning method according to an embodiment of the present application;
fig. 2 is a network structure diagram of a pointer network type deep network according to an embodiment of the present application;
FIG. 3 is a partial method flow chart of a vehicle path planning method provided by an embodiment of the present application;
fig. 4 is a schematic structural diagram of a vehicle path planning apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the present disclosure, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a vehicle path planning method, a flow chart of the method is shown in fig. 1, and the method comprises the following steps:
s10, encoding a name sequence and a distance sequence of the access sites to be planned, wherein the name sequence comprises a name code value of each site in the access sites, and the distance sequence comprises a distance value between every two sites in the access sites.
In the embodiment of the application, the name of each site in the access sites on the path to be planned can be subjected to integer coding, and a sequence containing the name coding value of each site is recorded as a name sequence, and the name of one site corresponds to a unique name coding value; and meanwhile, the distance between every two stations in the access stations is coded, and a sequence containing the distance value between every two stations is recorded as a distance sequence.
For ease of understanding, three access sites A, B, C on the path to be planned are described below as an example, where the distance from site a to site B is a, the distance from site a to site C is B, the distance from site B to site C is C, and b=a+c:
the method comprises the steps of (1) carrying out integer coding on the site names of A, B, C three access sites, wherein the coded name code value of the site A is 1, the coded name code value of the site B is 2, and the coded name code value of the site C is 3, and the name sequence X= [1 2 3];
the distance between every two stations of the A, B, C three access stations is coded, and the distance value from the station A to the station A after coding is (A, A): the distance between site A and site B is (A, B) a, the distance between site A and site C is (A, C) B, the distance between site B and site A is (B, A) a, the distance between site B and site B is (B, B) 0, the distance between site B and site C is (B, C) C, the distance between site C and site A is (C, A) B, the distance between site C and site B is (C, B) C, the distance between site C and site C is (C, C) 0, and the distance sequence Y = { (A, A) 0 (A, B) a (A, C) B (B, A) a (B, B) 0 (B, C) C (C, A) B (C, C) 0}.
S20, inputting the name sequence and the distance sequence into a pre-trained path planning model, so that the path planning model reorders the name sequence based on the distance sequence and outputs a new name sequence, the new name sequence can enable the planned path distance of the access site to be the shortest, and the path planning model is obtained by training a pointer network type deep network in advance.
See figure 2 for a network structure diagram of a pointer network type of deep network. The pointer network type of deep network is an improved version of the attention mechanism network, which has two special recurrent neural networks, one of which encodes an input sequence as an encoder and converts it into a vector, and the other of which re-decodes the encoded vector as a decoder into a sequence and outputs it. Compared with the attention mechanism network, the output sequence and the input sequence of the network have one-to-one pointer relation, so that the input sequence and the output sequence of the network are identical in length and content and only different in arrangement order.
In the embodiment of the application, the network can be trained in a reinforcement learning mode, and the path planning model obtained after a period of training can be automatically approximated to a real optimal path planning strategy. The path planning model may encode the input name sequence and convert it into a vector, and re-decode the encoded vector into a new name sequence based on the input distance sequence and output. The new name sequence and the name sequence have the same length and content and are only different in arrangement order, and the planned path distance indicated by the new name sequence is shortest, namely an optimized path is planned.
In the specific implementation process, the deep network of the pointer network type can be repeatedly trained and modified in a reinforcement learning mode, so that the path planning strategy can be adjusted and improved according to actual conditions. In step S20, the process of training the pointer network type deep network in advance to obtain the path planning model may adopt the following steps, where the method flowchart is shown in fig. 2:
s201, acquiring training samples, wherein the training samples comprise a plurality of groups of name sequence samples and distance sequence samples of a training access site, and one group of name sequence samples corresponds to one planned training path and one distance sequence sample.
In the embodiment of the application, when training samples are accumulated for training of the pointer network type deep network, K groups of training access sites are assumed to be optimized in the training samples, and one group of training access sites corresponds to one training planning path. For each of the K sets of training access sites, performing integer encoding on the name of each of the K sets of training access sites, and recording a sequence containing the name encoding value of each of the K sets of training access sites as a name sequence sample; and simultaneously encoding the distance between every two stations in the group of training access stations, and recording a sequence containing the distance value between every two stations as a distance sequence sample.
S202, extracting a group of name sequence samples for the current training from the training samples, inputting the group of name sequence samples and the corresponding distance sequence samples into a depth network of a pointer network type, so that the depth network of the pointer network type outputs one target name sequence sample which can enable the corresponding planned training path distance to be converged in the group of name sequence samples based on the input distance sequence samples, wherein the initial value of the network parameter of the depth network of the pointer network type is preset.
In the embodiment of the application, a small batch of samples are randomly extracted from training samples to train the depth network of the pointer network type, and the number of the samples is set to be a fixed value B. This training is performed using a set of name sequence samples, denoted s, of randomly extracted samples i The target name sequence sample of the depth network solving output of the pointer network type is recorded as o i Wherein i is more than or equal to 1 and less than or equal to B.
It should be noted that, the network parameter θ of the deep network of the pointer network type is initialized in advance, and the network parameter determines the output characteristics of the network.
S203, the network parameters are adjusted by calculating the distance of the planned training path corresponding to the target name sequence sample, so that the depth network of the pointer network type re-executes the output of one target name sequence sample which can enable the corresponding planned training path distance to be converged in the group of name sequence samples based on the input distance sequence sample, the current training is ended when the ending condition of the current training is met, and a pointer is set for the final target name sequence sample output by the depth network of the pointer network type when the current training is ended, wherein the pointer is the basis or the basis of the depth network of the pointer network type for the re-training.
In the embodiment of the application, according to the conditional probability p (o) of the mathematical relationship between the input sequence and the output sequence of the depth network representing the pointer network type i |s i ) To calculate the target name sequence sample o i Distance Dis (o) of representative planned training path i |s i )。
Further, the network parameters are adjusted through a preset parameter adjustment strategy corresponding to the distance of the planned path for training, and the depth network of the pointer network type is enabled to output a target name sequence sample which can enable the corresponding planned path distance for training to be converged again until the end condition of the training is met, for example, the iteration number reaches the maximum value, and for example, the training is ended when the planned path distance for training meets the performance index.
In some other embodiments, the "adjusting the network parameter by calculating the distance of the planned training path corresponding to the target name sequence sample" in step S203 may include the following steps:
calculating the distance of a planned training path corresponding to the target name sequence sample; calculating the reference distance of the group of name sequence samples for the training; calculating the gradient of the network parameters according to the distance of the planned path for training and the reference distance; the network parameters are updated based on the gradient of the network parameters.
In the embodiment of the application, the probability p (o) i |s i ) To calculate the distance Dis (o) of the planned training path i |s i )。
In the process of calculating the reference distance, if the training is the first training, determining the set of name sequence samples s by using a heuristic algorithm i And taking the distance of the optimized path as the reference distance b of the set of name sequence samples in the training i . Note that the heuristic algorithm may be one of genetic algorithm, simulated annealing, particle swarm algorithm, ant colony algorithm, and tabu search, but is not limited to the above algorithm.
If the training is not the first training, the reference distance used in the last training, namely the historical reference distance b, can be obtained i ' and calculate the reference distance b of the group of name sequence samples trained this time according to the following formula (1) i :
b i =b i ′+α(Dis(o i |s i )-b i ′) (1)
Wherein alpha is a preset learning rate.
The embodiment of the application sets the reference distance b i The purpose of (a) is to ensure that the final optimization effect of deep reinforcement learning is at least greater than benchmark b in subsequent training i Good.
Further, it can be expressed as follows(2) Calculating the gradient g of the network parameter θ θ :
Finally, the network parameter theta is updated by using a gradient descent method, and the updating process can adopt a traditional gradient descent method or an improved gradient updating method such as Newton method, ADAM (advanced dynamic random access memory) method and the like.
S204, taking the depth network of the pointer network type after multiple training as a path planning model.
In the embodiment of the application, a depth network of a pointer network type trained by using a small batch of samples randomly extracted from training samples is used as a path planning model. The path planning model is trained to achieve the optimal effect, and only the access site to be planned is required to be input into the path planning model in a sequence format, the path planning model can output a sequence representing the access sequence of the actual site, and the output sequence is the solution of the planned path with the shortest required distance.
After the path planning model is trained, an optimized path planning result can be directly calculated according to the access site to be planned, a large number of searching and exploring processes are not needed, and the quality of the solution is not lower than that of a heuristic algorithm for providing a reference. In addition, the path planning model is trained based on the intensity learning mode, parameters can be updated in real time, the planning performance of the model is improved, the model gradually adapts to a real scene along with the growth of time and experience, and the planning result is further improved to be closer to a theoretical optimal solution. Finally, the path planning model can be suitable for most combination optimization problems, and has strong algorithm universality.
S30, acquiring a planning path corresponding to the new name sequence.
In the embodiment of the application, one name code value in the name sequence uniquely corresponds to the name of one access site to be planned, and the new name sequence is identical with the length and the content of the name sequence and is only different in arrangement order, so that the order of accessing the access site to be planned can be obtained based on the order of the name code values in the new name sequence, thereby determining the corresponding planned path, and the distance of the planned path is shortest.
According to the vehicle path planning method provided by the embodiment of the application, the path planning model is obtained by training the depth network of the pointer network type, the name sequence and the distance sequence of the access site to be planned, which are obtained by encoding, are input into the path planning model, the name sequence is reordered by the path planning model based on the distance sequence, and a new name sequence which can enable the planned path distance of the access site to be shortest is output, so that the planned path corresponding to the new name sequence is obtained. Based on the application, the path planning strategy can be molded by the deep network, so that the optimization result of the vehicle path planning problem can be directly calculated without searching.
Based on the vehicle path planning method provided by the foregoing embodiment, an embodiment of the present application provides an apparatus for executing the vehicle path planning method, where a schematic structural diagram of the apparatus is shown in fig. 4, and the apparatus includes: the device comprises an encoding module 10, a path planning module 20 and a path acquisition module 30, wherein the path planning module 20 comprises a model training unit 201;
the model training unit 201 is configured to train the depth network of the pointer network type in advance to obtain a path planning model;
the encoding module 10 is configured to encode a name sequence of the access site to be planned, where the name sequence includes a name encoding value of each site in the access site, and a distance sequence including a distance value between every two sites in the access site;
the path planning module 20 is configured to input the name sequence and the distance sequence into the path planning model, so that the path planning model reorders the name sequence based on the distance sequence and outputs a new name sequence, where the new name sequence can minimize a planned path distance for accessing the site;
the path obtaining module 30 is configured to obtain a planned path corresponding to the new name sequence.
Optionally, the model training unit 201 is configured to train the depth network of the pointer network type in advance to obtain a path planning model, and is specifically configured to:
acquiring training samples, wherein the training samples comprise a plurality of groups of name sequence samples and distance sequence samples of access sites for training, and one group of name sequence samples corresponds to one planned training path and one distance sequence sample; extracting a group of name sequence samples for the current training from the training samples, inputting the group of name sequence samples and the corresponding distance sequence samples into a depth network of a pointer network type, so that the depth network of the pointer network type outputs one target name sequence sample which can enable the corresponding planned training path distance to be converged in the group of name sequence samples based on the input distance sequence samples, wherein the initial value of the network parameter of the depth network of the pointer network type is preset; the method comprises the steps that network parameters are adjusted through calculating the distance of a planned training path corresponding to a target name sequence sample, so that a depth network of a pointer network type re-executes the output of one target name sequence sample which can enable the distance of the corresponding planned training path to be converged in the group of name sequence samples based on the input distance sequence sample, the training is finished when the finishing condition of the training is met, a pointer is set for a final target name sequence sample output by the depth network of the pointer network type when the training is finished, and the pointer is the basis or the basis of the depth network of the pointer network type for the re-training; and taking the depth network of the pointer network type after multiple training as a path planning model.
Optionally, the model training unit 201 is configured to adjust a network parameter by calculating a distance of a planned training path corresponding to the target name sequence sample, and is specifically configured to:
calculating the distance of a planned training path corresponding to the target name sequence sample; calculating the reference distance of the group of name sequence samples for the training; calculating the gradient of the network parameters according to the distance of the planned path for training and the reference distance; the network parameters are updated based on the gradient of the network parameters.
Optionally, the model training unit 201 is configured to calculate a reference distance for training the set of name sequence samples this time, and is specifically configured to:
under the condition that the training is not the first training, acquiring a historical reference distance of the last training; and calculating the reference distance of the group of name sequence samples for the training by utilizing the distance of the planned training path and the historical reference distance.
Optionally, the model training unit 201 configured to calculate the reference distance for training the set of name sequence samples this time is further configured to:
under the condition that the training is the first training, determining an optimized path of the set of name sequence samples by using a heuristic algorithm, and taking the distance of the optimized path as the reference distance of the set of name sequence samples in the training.
According to the vehicle path planning device provided by the embodiment of the application, the path planning model is obtained by training the depth network of the pointer network type, the name sequence and the distance sequence of the access site to be planned, which are obtained by encoding, are input into the path planning model, the name sequence is reordered by the path planning model based on the distance sequence, and a new name sequence which can enable the planned path distance of the access site to be shortest is output, so that the planned path corresponding to the new name sequence is obtained. Based on the application, the path planning strategy can be molded by the deep network, so that the optimization result of the vehicle path planning problem can be directly calculated without searching.
The embodiment of the application also provides a computer readable storage medium, on which computer instructions are stored, which when run execute the steps of the vehicle path planning method shown in the embodiment of the application. The computer readable storage medium may include, for example, a non-volatile memory (non-volatile) or a non-transitory memory (non-transitory) and may also include an optical disc, a mechanical hard disc, a solid state hard disc, and the like.
The embodiment of the application also provides a terminal, which comprises a memory and a processor, wherein the memory stores computer instructions capable of running on the processor, and the processor executes the steps of the vehicle path planning method shown in the embodiment of the application when running the computer instructions. The terminal comprises, but is not limited to, a mobile phone, a computer, a tablet personal computer and other terminal equipment.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.
Claims (8)
1. A vehicle path planning method, the method comprising:
encoding a name sequence and a distance sequence of access sites to be planned, wherein the name sequence comprises a name encoding value of each site in the access sites, and the distance sequence comprises a distance value between every two sites in the access sites;
inputting the name sequence and the distance sequence into a pre-trained path planning model, so that the path planning model reorders the name sequence based on the distance sequence and outputs a new name sequence, wherein the new name sequence can enable the planned path distance of the access site to be the shortest, and the path planning model is obtained by training a depth network of a pointer network type in advance;
acquiring a planning path corresponding to the new name sequence;
the process of training the depth network of the pointer network type in advance to obtain the path planning model comprises the following steps:
acquiring training samples, wherein the training samples comprise a plurality of groups of name sequence samples and distance sequence samples of a training access site, and one group of name sequence samples corresponds to one planned training path and one distance sequence sample;
extracting a group of name sequence samples for the current training from the training samples, inputting the group of name sequence samples and corresponding distance sequence samples into the depth network of the pointer network type, so that the depth network of the pointer network type outputs one target name sequence sample capable of converging the distance of the corresponding planned training path in the group of name sequence samples based on the input distance sequence samples, wherein the initial value of the network parameter of the depth network of the pointer network type is preset;
the network parameters are adjusted through calculating the distance of the planned training path corresponding to the target name sequence sample, so that the depth network of the pointer network type re-executes the target name sequence sample which can enable the corresponding planned training path distance to be converged in the group of name sequence samples based on the input distance sequence sample, the training is finished when the finishing condition of the training is met, and a pointer is set for the final target name sequence sample output by the depth network of the pointer network type when the training is finished, wherein the pointer is the basis or the basis for re-training the depth network of the pointer network type;
and taking the depth network of the pointer network type after multiple training as the path planning model.
2. The method of claim 1, wherein said adjusting the network parameters by calculating distances of the training planned paths corresponding to the target name sequence samples comprises:
calculating the distance of the planned training path corresponding to the target name sequence sample;
calculating the reference distance of the group of name sequence samples for the training;
calculating the gradient of the network parameter according to the distance of the planned training path and the reference distance;
the network parameters are updated based on the gradient of the network parameters.
3. The method of claim 2, wherein calculating the reference distance for the set of name sequence samples for the present training comprises:
under the condition that the training is not the first training, acquiring a historical reference distance of the last training;
and calculating the reference distance of the group of name sequence samples for the training by utilizing the distance of the planned training path and the historical reference distance.
4. A method according to claim 3, wherein said calculating the reference distance for the set of name sequence samples for the present training further comprises:
under the condition that the training is the first training, determining an optimized path of the set of name sequence samples by using a heuristic algorithm, and taking the distance of the optimized path as the reference distance of the set of name sequence samples in the training.
5. A vehicle path planning apparatus, the apparatus comprising: the system comprises an encoding module, a path planning module and a path acquisition module, wherein the path planning module comprises a model training unit;
the model training unit is used for training the depth network of the pointer network type in advance to obtain a path planning model;
the coding module is used for coding a name sequence and a distance sequence of the access sites to be planned, wherein the name sequence comprises a name coding value of each site in the access sites, and the distance sequence comprises a distance value between every two sites in the access sites;
the path planning module is used for inputting the name sequence and the distance sequence into the path planning model so that the path planning model reorders the name sequence based on the distance sequence and outputs a new name sequence, and the new name sequence can enable the planned path distance for accessing the access site to be the shortest;
the path acquisition module is used for acquiring a planning path corresponding to the new name sequence;
the model training unit is used for training the depth network of the pointer network type in advance to obtain a path planning model, and is specifically used for:
acquiring training samples, wherein the training samples comprise a plurality of groups of name sequence samples and distance sequence samples of a training access site, and one group of name sequence samples corresponds to one planned training path and one distance sequence sample; extracting a group of name sequence samples for the current training from the training samples, inputting the group of name sequence samples and corresponding distance sequence samples into the depth network of the pointer network type, so that the depth network of the pointer network type outputs one target name sequence sample capable of converging the distance of the corresponding planned training path in the group of name sequence samples based on the input distance sequence samples, wherein the initial value of the network parameter of the depth network of the pointer network type is preset; the network parameters are adjusted through calculating the distance of the planned training path corresponding to the target name sequence sample, so that the depth network of the pointer network type re-executes the target name sequence sample which can enable the corresponding planned training path distance to be converged in the group of name sequence samples based on the input distance sequence sample, the training is finished when the finishing condition of the training is met, and a pointer is set for the final target name sequence sample output by the depth network of the pointer network type when the training is finished, wherein the pointer is the basis or the basis for re-training the depth network of the pointer network type; and taking the depth network of the pointer network type after multiple training as the path planning model.
6. The apparatus according to claim 5, wherein the model training unit for adjusting the network parameters by calculating the distances of the planned training paths corresponding to the target name sequence samples is specifically configured to:
calculating the distance of the planned training path corresponding to the target name sequence sample; calculating the reference distance of the group of name sequence samples for the training; calculating the gradient of the network parameter according to the distance of the planned training path and the reference distance; the network parameters are updated based on the gradient of the network parameters.
7. A computer readable storage medium having stored thereon computer instructions, which when run perform the steps of the vehicle path planning method of any of claims 1 to 4.
8. A terminal comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of the vehicle path planning method of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010151343.3A CN111461403B (en) | 2020-03-06 | 2020-03-06 | Vehicle path planning method and device, computer readable storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010151343.3A CN111461403B (en) | 2020-03-06 | 2020-03-06 | Vehicle path planning method and device, computer readable storage medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111461403A CN111461403A (en) | 2020-07-28 |
CN111461403B true CN111461403B (en) | 2023-09-29 |
Family
ID=71682699
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010151343.3A Active CN111461403B (en) | 2020-03-06 | 2020-03-06 | Vehicle path planning method and device, computer readable storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111461403B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116090688B (en) * | 2023-04-10 | 2023-06-23 | 中国人民解放军国防科技大学 | Moving target traversal access sequence planning method based on improved pointer network |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106225797A (en) * | 2016-06-30 | 2016-12-14 | 银江股份有限公司 | A kind of paths planning method |
CN107038496A (en) * | 2017-03-29 | 2017-08-11 | 中南大学 | Paths planning method and system are delivered in a kind of unmanned plane express delivery automatically |
CN109489667A (en) * | 2018-11-16 | 2019-03-19 | 楚天智能机器人(长沙)有限公司 | A kind of improvement ant colony paths planning method based on weight matrix |
CN109724611A (en) * | 2019-01-08 | 2019-05-07 | 北京三快在线科技有限公司 | Paths planning method, device, electronic equipment and storage medium |
CN109764884A (en) * | 2019-01-02 | 2019-05-17 | 北京科技大学 | A kind of school bus paths planning method and device for planning |
CN110348636A (en) * | 2019-07-12 | 2019-10-18 | 南方科技大学 | Path planning prediction method, device, equipment and computer readable storage medium |
CN209525760U (en) * | 2019-04-11 | 2019-10-22 | 上海汽车集团股份有限公司 | A kind of vehicle location assistance searching system |
WO2019232869A1 (en) * | 2018-06-04 | 2019-12-12 | 平安科技(深圳)有限公司 | Handwriting model training method, text recognition method and apparatus, device, and medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10885622B2 (en) * | 2018-06-29 | 2021-01-05 | Photogauge, Inc. | System and method for using images from a commodity camera for object scanning, reverse engineering, metrology, assembly, and analysis |
-
2020
- 2020-03-06 CN CN202010151343.3A patent/CN111461403B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106225797A (en) * | 2016-06-30 | 2016-12-14 | 银江股份有限公司 | A kind of paths planning method |
CN107038496A (en) * | 2017-03-29 | 2017-08-11 | 中南大学 | Paths planning method and system are delivered in a kind of unmanned plane express delivery automatically |
WO2019232869A1 (en) * | 2018-06-04 | 2019-12-12 | 平安科技(深圳)有限公司 | Handwriting model training method, text recognition method and apparatus, device, and medium |
CN109489667A (en) * | 2018-11-16 | 2019-03-19 | 楚天智能机器人(长沙)有限公司 | A kind of improvement ant colony paths planning method based on weight matrix |
CN109764884A (en) * | 2019-01-02 | 2019-05-17 | 北京科技大学 | A kind of school bus paths planning method and device for planning |
CN109724611A (en) * | 2019-01-08 | 2019-05-07 | 北京三快在线科技有限公司 | Paths planning method, device, electronic equipment and storage medium |
CN209525760U (en) * | 2019-04-11 | 2019-10-22 | 上海汽车集团股份有限公司 | A kind of vehicle location assistance searching system |
CN110348636A (en) * | 2019-07-12 | 2019-10-18 | 南方科技大学 | Path planning prediction method, device, equipment and computer readable storage medium |
Non-Patent Citations (1)
Title |
---|
运钞车车辆路径规划策略;刘晓;戴敏;郑刚;黄庆军;;计算机应用(第04期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111461403A (en) | 2020-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111091199B (en) | Federal learning method, device and storage medium based on differential privacy | |
CN109195135B (en) | Base station selection method based on deep reinforcement learning in LTE-V | |
US20170357910A1 (en) | System for iteratively training an artificial intelligence using cloud-based metrics | |
CN111176807A (en) | Multi-satellite cooperative task planning method | |
CN109947940B (en) | Text classification method, device, terminal and storage medium | |
CN108665506A (en) | Image processing method, device, computer storage media and server | |
CN115829024B (en) | Model training method, device, equipment and storage medium | |
CN110458287B (en) | Parameter updating method, device, terminal and storage medium of neural network optimizer | |
CN111461403B (en) | Vehicle path planning method and device, computer readable storage medium and terminal | |
CN111694974A (en) | Depth hash vehicle image retrieval method integrating attention mechanism | |
CN115659807A (en) | Method for predicting talent performance based on Bayesian optimization model fusion algorithm | |
CN113936219B (en) | Hyperspectral image wave band selection method based on reinforcement learning | |
CN116321255A (en) | Compression and user scheduling method for high-timeliness model in wireless federal learning | |
CN114158105B (en) | Routing method and device of wireless sensor network applied to comprehensive energy system | |
CN116432780A (en) | Model increment learning method, device, equipment and storage medium | |
CN112104863B (en) | Method and related device for training video quality evaluation model and evaluating video quality | |
CN112214592B (en) | Method for training reply dialogue scoring model, dialogue reply method and device thereof | |
CN116756536B (en) | Data identification method, model training method, device, equipment and storage medium | |
CN107622301B (en) | Method for predicting number of vacant parking positions in parking lot | |
CN115630566B (en) | Data assimilation method and system based on deep learning and dynamic constraint | |
CN109685242B (en) | Photovoltaic ultra-short term combined prediction method based on Adaboost algorithm | |
CN116017528A (en) | Traffic prediction method, traffic prediction device and server | |
CN116644783A (en) | Model training method, object processing method and device, electronic equipment and medium | |
CN115293324A (en) | Quantitative perception training method and related device | |
CN115496175A (en) | Newly-built edge node access evaluation method and device, terminal equipment and product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |