Vehicle path planning method and device

By dividing customer sites into multiple partitions in large-scale vehicle path planning, and using partition adjustment networks for partition fusion and rezoning, the problems of low performance and efficiency of large-scale vehicle path planning in the existing technology are solved, and more efficient path planning is achieved.

CN114330800BActive Publication Date: 2025-03-04HITACHI LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011056281.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-29
Publication Date
2025-03-04
Estimated Expiration
2040-09-29

AI Technical Summary

Technical Problem

The prior art has low performance and efficiency in large-scale vehicle path planning, making it difficult to apply to problems such as real-time response and high-capacity vehicle pick-up and dispatch.

Method used

By dividing multiple customer sites into multiple partitions, vehicle path planning is carried out separately under each partition, pre-trained partition adjustment network is used for partition fusion and re-partition, iteratively calculate local and global optimization routes, and update the total cost of the optimal route.

Benefits of technology

It improves the performance and efficiency of large-scale vehicle path planning, and can find the optimal or near-optimal routes and costs more quickly, suitable for large-scale VRP problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114330800B_ABST
    Figure CN114330800B_ABST
Patent Text Reader

Abstract

The present invention provides a vehicle path planning method and device, wherein the method includes: a data acquisition step, an initial calculation step, a repartitioning step, an iterative calculation step, an update processing step, and an iterative stop judgment step, wherein in the initial calculation step, the customer sites are clustered and partitioned according to the geographical locations of the multiple customer sites in the input data to obtain multiple partitions, and the local optimized route and local route cost of each partition are calculated; in the repartitioning step, the partition adjustment network obtained by pre-training is used to merge and repartition two partitions in the multiple partitions to obtain two new partitions. The vehicle path planning method and device provided by the present invention can improve the performance and efficiency of large-scale VRP solutions by dividing multiple customer sites into multiple partitions and performing VRP solutions in each partition respectively, thereby avoiding direct solutions to a large number of customer sites.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle routing problem (VRP), and in particular to a vehicle routing planning method and device. Background Art

[0002] Large-scale vehicle routing planning (VRP) problems are widely used in reality, such as bus planning, freight transportation, etc. For this problem, the existing technical solutions mainly include traditional methods and reinforcement learning-based methods.

[0003] Among them, traditional methods specifically include precise algorithms and heuristic methods. Precise algorithms are inefficient and have no practical value; the performance of heuristic methods relies on sophisticated manual design and is not efficient enough.

[0004] Methods based on reinforcement learning can also be divided into two categories: "generating solutions directly" and "generating solutions first and then continuously improving them". The former is difficult to apply to large-scale vehicle VRP problems because the model is difficult to expand and the performance drops sharply as the scale increases; the latter has the characteristics of exponential growth of training time and difficulty in converging the training process on large-scale VRP problems due to the small improvement each time and the long time consumption, and has low practicality.

[0005] For example, a Chinese patent application (CN110147901A) uses a pointer network to directly generate a solution to the VRP problem. When the scale of the VRP increases, the model will become difficult to train and its performance will drop significantly due to the substantial increase in the number of states, the number of action spaces, and the model size. Therefore, it is difficult to apply to large-scale VRP problems.

[0006] For another example, another Chinese patent application (CN106251009A) uses an ant colony optimization algorithm to solve the VRP problem and generate solutions, but it has defects such as slow generation speed and lack of real-time response capability in large-scale data distribution.

[0007] In addition, most of the patent applications of the prior art are about obstacle avoidance control in vehicle path planning problems, which is irrelevant to vehicle scheduling in VRP problems and cannot handle the passenger pickup scheduling problem of vehicles with capacity.

[0008] Therefore, there is an urgent need for a VRP method that can achieve both high performance and high efficiency to solve large-scale vehicle path planning problems. Summary of the invention

[0009] The technical problem to be solved by the embodiments of the present invention is to provide a vehicle path planning method and device, which can improve the performance and efficiency of path planning in large-scale vehicle path planning.

[0010] In order to solve the above technical problems, an embodiment of the present invention provides a vehicle path planning method, comprising:

[0011] A data acquisition step, obtaining, as input data, the originating station to be routed, the maximum load capacity of the delivery vehicle, the geographical locations of multiple customer stations, and the delivery demand information of each customer station;

[0012] The initial calculation step is to cluster and partition the customer sites according to the geographical locations of the multiple customer sites in the input data to obtain multiple partitions; calculate the local optimal route and local route cost of each partition according to the originating site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the input data, and obtain the global optimal route and total route cost of all customer sites, and update the optimal optimal route and the optimal route total cost according to the global optimal route and the total route cost;

[0013] a repartitioning step, using a pre-trained partition adjustment network to fuse and repartition two of the multiple partitions to obtain two new partitions;

[0014] Iterative calculation step, calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost;

[0015] An update processing step, determining whether the updated route total cost is lower than the optimal route total cost, if so, updating the optimal optimized route and the optimal route total cost according to the updated global optimized route and the route total cost, and returning to the repartitioning step; otherwise, entering the iteration stop determination step;

[0016] The iteration stop judgment step determines whether a preset iteration stop condition is met. If so, the optimal optimization route is output; otherwise, the process returns to the repartitioning step.

[0017] Optionally, the iteration stopping condition is: the total cost of the route after N consecutive updates is not less than the total cost of the optimal route, and N is a preset integer greater than 2.

[0018] Optionally, the merging and repartitioning two partitions among the multiple partitions to obtain two new partitions includes:

[0019] Generate a local feature vector for each partition according to the local optimized route and the local route cost of each partition, and generate a global feature vector according to the local feature vectors of all partitions;

[0020] According to the global feature vector and the local feature vector, two partitions are selected from the multiple partitions, and the two partitions are merged into one partition;

[0021] A local optimization route of the fused partition is calculated, and the fused partition is re-divided into two new partitions according to the local optimization route of the fused partition.

[0022] Optionally, generating a local feature vector for each partition according to the local optimization route and the local route cost of each partition includes:

[0023] For each partition, the customer site sequence in the local optimized route of the partition is input as an input sequence into the long short-term memory (LSTM) network to generate a primary feature sequence of the partition;

[0024] The primary feature sequence and the local route cost of the partition are input into a fully convolutional network to generate a local feature vector of the partition.

[0025] Optionally, generating a global feature vector according to the local feature vectors of all partitions includes:

[0026] The local feature vectors of all partitions are averaged to obtain the global feature vector.

[0027] Optionally, selecting two partitions from the multiple partitions according to the global feature vector and the local feature vector includes:

[0028] Using the global feature as an index, an attention mechanism is used to generate selection probability values ​​of all partitions, and a partition with the largest selection probability value is selected as the first partition to be selected;

[0029] The local area features of the first partition are used as indexes, and the attention mechanism is used to generate selection probability values ​​of the remaining partitions, and a partition with the largest probability value is selected as the second partition to be selected.

[0030] Optionally, the re-dividing the fused partition into two new partitions according to the local optimization route of the fused partition includes:

[0031] For each path in the local optimized route of the fused partition, a coordinate average point is selected, and principal component analysis is performed on the coordinate average point to obtain a one-dimensional representation of the path; based on the one-dimensional representation of each path, the paths in the local optimized route of the fused partition are divided into two groups, and the sites in each group of paths belong to the same new partition.

[0032] Optionally, before the data input step, the method further includes:

[0033] A training step is performed to obtain the partition adjustment network.

[0034] Optionally, the training step specifically includes:

[0035] The first step is to obtain a training set, wherein the training set includes multiple sets of training data, each set of training data includes an originating station, a maximum load capacity of a delivery vehicle, geographic locations of multiple customer stations, and delivery demand information of each customer station;

[0036] The second step is to initialize a reference model of the partition adjustment network;

[0037] The third step is to select a set of unused training data, and use the selected training data to perform a round of training to train the partition adjustment network, wherein at the beginning of each round of training, the partition adjustment network adopts the current reference model; during each round of training, the model parameters of the partition adjustment network are updated using the training data, and when the performance of the updated partition adjustment network is improved relative to the current reference model, the reference model is updated according to the updated partition adjustment network;

[0038] The fourth step is to determine whether the preset network training end condition is met at the end of each round of training. If so, the training of the partition adjustment network is terminated and the reference model is output as the partition adjustment network obtained by the final training; otherwise, return to the third step.

[0039] Optionally, performing a round of training using the selected training data to train the partition adjustment network includes:

[0040] In a first training sub-step, the customer sites are clustered and partitioned according to the geographical locations of the multiple customer sites in the training data to obtain multiple partitions; based on the originating site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site, and the delivery demand information of the customer site in the training data, the local optimized route and the local route cost of each partition are calculated, and the global optimized route and the total route cost of all customer sites are obtained, and, based on the global optimized route and the total route cost, the optimal optimized route and the optimal route total cost are updated;

[0041] In a second training sub-step, the partition adjustment network is used to fuse and repartition two partitions of the multiple partitions to obtain two new partitions;

[0042] The third training sub-step is to calculate the local optimized routes of the two new partitions, and update the global optimized route and the total route cost;

[0043] The fourth training sub-step is to calculate the reduction in the total cost of the route before and after the update, and use the reduction as the reward function value to guide the partition adjustment network to perform gradient descent to obtain the updated partition adjustment network;

[0044] The fifth training sub-step is to determine whether the updated route total cost is lower than the optimal route total cost. If so, the optimal optimized route and the optimal route total cost are updated according to the updated global optimized route and the route total cost, and the reference model is updated according to the updated partition adjustment network, and the second training sub-step is returned; otherwise, the sixth training sub-step is entered;

[0045] The sixth step is to determine whether the preset stop condition of each round of training is met. If so, end the current round of training; otherwise, return to the second training sub-step.

[0046] Optionally, the method further includes:

[0047] After each round of training, the current reference model is used as the partition adjustment network, and a set of verification data is used as input data to perform the initial calculation step, the repartitioning step, the iterative calculation step, the update processing step, and the iterative stop judgment step to obtain the global optimization route and the total route cost corresponding to the verification data; and according to the total route cost corresponding to the verification data obtained after each round of training, the optimal total route cost corresponding to the verification data is updated;

[0048] The network training termination condition is: the total route cost corresponding to the verification data obtained after M consecutive rounds of training is not less than the total optimal route cost corresponding to the verification data; and M is a preset integer greater than 2.

[0049] The embodiment of the present invention further provides a vehicle path planning device, comprising:

[0050] A data acquisition module is used to obtain, as input data, the originating station to be routed, the maximum load of the delivery vehicle, the geographical locations of multiple customer stations, and the delivery demand information of each customer station;

[0051] an initial calculation module, for clustering and partitioning the customer sites according to the geographical locations of the multiple customer sites in the input data to obtain a plurality of partitions; calculating the local optimized route and the local route cost of each partition according to the originating site, the maximum load of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the input data, and obtaining the global optimized route and the total route cost of all customer sites, and, according to the global optimized route and the total route cost, updating the optimal optimized route and the optimal route total cost;

[0052] A repartitioning module, used to use a pre-trained partition adjustment network to fuse and repartition two partitions of the multiple partitions to obtain two new partitions;

[0053] An iterative calculation module, used for calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost;

[0054] An update processing module, used to determine whether the updated route total cost is lower than the optimal route total cost. If so, the optimal optimized route and the optimal route total cost are updated according to the updated global optimized route and the route total cost, and the repartitioning module is returned; otherwise, the iteration stop judgment module is entered;

[0055] The iteration stop judgment module is used to judge whether the preset iteration stop condition is met. If so, the optimal optimization route is output; otherwise, the optimal optimization route is returned to the repartitioning module.

[0056] Optionally, the repartitioning module includes:

[0057] A first calculation module, used for generating a local feature vector of each partition according to the local optimized route and the local route cost of each partition, and generating a global feature vector according to the local feature vectors of all partitions;

[0058] A selection fusion module is used to select two partitions from the multiple partitions according to the global feature vector and the local feature vector, and fuse them into one partition;

[0059] The partitioning module is used to calculate the local optimization route of the fused partition and re-divide the fused partition into two new partitions according to the local optimization route of the fused partition.

[0060] Optionally, the vehicle path planning device further includes:

[0061] A training module is used to train the partition adjustment network.

[0062] Optionally, the training module specifically includes:

[0063] The first module is used to obtain a training set, wherein the training set includes multiple sets of training data, each set of training data includes an originating station, a maximum load capacity of a delivery vehicle, geographic locations of multiple customer stations, and delivery demand information of each customer station;

[0064] The second module is used to initialize a reference model of a partition adjustment network;

[0065] The third module is used to select a set of unused training data, and use the selected training data to perform a round of training to train the partition adjustment network, wherein at the beginning of each round of training, the partition adjustment network adopts the current reference model; during each round of training, the model parameters of the partition adjustment network are updated using the training data, and when the performance of the updated partition adjustment network is improved relative to the current reference model, the reference model is updated according to the updated partition adjustment network;

[0066] The fourth module is used to determine whether the preset network training end condition is met at the end of each round of training. If so, the training of the partition adjustment network is terminated and the reference model is output as the partition adjustment network obtained by the final training; otherwise, return to the third module.

[0067] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the vehicle path planning method described above are implemented.

[0068] Compared with the prior art, the vehicle path planning method and device provided in the embodiment of the present invention can improve the performance and efficiency of large-scale VRP solving by dividing multiple customer sites into multiple partitions and performing VRP solving in each partition respectively. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0070] Figure 1 A schematic diagram of a process flow of a vehicle path planning method provided by an embodiment of the present invention;

[0071] Figure 2 An example diagram of a vehicle path planning method provided by an embodiment of the present invention;

[0072] Figure 3 The overall flow chart of training the partition adjustment network provided by the embodiment of the present invention;

[0073] Figure 4 A flowchart of each path training of a partition adjustment network provided by an embodiment of the present invention;

[0074] Figure 5 A schematic diagram of the structure of a vehicle path planning device provided by an embodiment of the present invention;

[0075] Figure 6 Another structural schematic diagram of a vehicle path planning device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0076] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail in conjunction with the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help fully understand the embodiments of the present invention. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. In addition, for clarity and brevity, the description of known functions and structures is omitted.

[0077] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0078] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0079] As described in the background technology, the vehicle path planning methods in the prior art usually have problems such as low performance and efficiency, or even lack of practicality when applied to large-scale VRP. To solve at least one of the above problems, an embodiment of the present invention provides a vehicle path planning method, such as Figure 1 As shown, the method includes:

[0080] Step 101, obtaining the starting site for route planning, the maximum load capacity of the delivery vehicle, the geographical locations of multiple customer sites, and the delivery demand information of each customer site as input data.

[0081] Here, the embodiment of the present invention performs vehicle route planning, and needs to input the departure site to be planned, the maximum load of the delivery vehicle, the geographical location of multiple customer sites, and the delivery demand information of each customer site, and can also input the maximum load of the vehicle (such as maximum capacity, maximum load, etc.). The geographical location can be represented by longitude and latitude coordinates, and the delivery demand information can be the load demand of the delivery goods (such as volume demand, load demand, etc.). Optionally, when performing route planning, the embodiment of the present invention can also input more information, such as the service time window of each customer site (that is, the customer site can only be served within this time window), road congestion information, vehicle quantity limit and other conditions.

[0082] The embodiment of the present invention is particularly suitable for executing the delivery task of the plurality of customer sites with a single vehicle. Specifically, when executing a delivery task, the vehicle usually starts from the originating site, travels along a planned route, serves each customer site in the route in turn, and returns to the initial site after serving all sites in the route, thereby completing a delivery task. When there are a large number of customer sites and / or a large amount of goods to be delivered, the vehicle may need to execute multiple delivery tasks to serve all customer sites, and each delivery task corresponds to a planned route.

[0083] Step 102, clustering and partitioning the customer sites according to the geographical locations of the multiple customer sites in the input data to obtain multiple partitions; calculating the local optimized route and local route cost of each partition according to the starting site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the input data, and obtaining the global optimized route and total route cost of all customer sites, and, according to the global optimized route and total route cost, updating the optimal optimized route and the optimal route total cost.

[0084] Here, the embodiment of the present invention performs clustering processing on the customer sites according to the geographic location coordinates of the customer sites to obtain multiple classes, each class corresponding to a partition, including at least one customer site. Specifically, a clustering algorithm such as K-means can be used to cluster and partition the site customers. Usually, during clustering processing, the maximum number of sites after partitioning can be set. For example, the number of sites in each partition obtained after partitioning is about 50. When performing clustering processing, the partitioning conditions calculated by the geographic coordinates can include one or more of the following conditions:

[0085] 1) The relative distance between customer sites, which can be expressed as the straight-line distance between sites.

[0086] 2) The azimuth of the client site relative to the originating site and the calibration coordinate axis. For example, the azimuth is determined based on the angle between the line between the client site and the originating site and the calibration coordinate axis, taking the true north direction as the calibration coordinate axis.

[0087] When the above two conditions are used for clustering, the outline of the partition obtained is similar to a fan, such as Figure 2 As shown in FIG. 1 , 7 partitions are obtained through clustering. When the clustering process is performed using the first condition, the obtained partition outline is similar to a rectangle or a circle.

[0088] After partitioning, the embodiment of the present invention performs VRP solution for each partition. Specifically, various small-scale VRP solution algorithms in the prior art may be used. For example, a small-scale solution algorithm based on reinforcement learning is used. By inputting the geographical location coordinates of each customer site in the partition, the geographical location coordinates of the departure site, and the maximum loading capacity of the vehicle, an optimized route for the delivery task in the partition, i.e., a local optimized route, is generated, and the local route cost of the local optimized route in the partition is obtained. Figure 2 The local optimized routes in each partition are shown in , wherein each partition includes a path. Generally, the local optimized route of a partition may include at least one path, and the starting point and the end point of each path are both the originating site. The local route cost is the sum of the route costs of all paths in the partition, and the route cost can be represented by a parameter selected from the group consisting of driving distance, driving fee, and driving time, or can be represented by the combination of the above parameters. After obtaining the local optimized routes and local route costs of each partition, the local optimized routes of all partitions can be summarized to obtain the global optimized routes of all customer sites, and the sum of the local route costs of all partitions can be calculated to obtain the total route cost of the global optimized routes of all customer sites.

[0089] In addition, the embodiment of the present invention also maintains an optimal optimization route and an optimal route total cost. After the global optimization route and the total route cost of all customer sites are calculated in step 102, the above-mentioned optimal optimization route and the optimal route total cost can be updated. Here, the update means that if the total route cost of the currently calculated global optimization route is lower, the optimal optimization route and the optimal route total cost are respectively updated to the currently calculated global optimization route and its total route cost, otherwise, the current optimal optimization route and the optimal route total cost are kept unchanged. Since the optimized route and the optimal route total cost have not been obtained before step 102, at this time, the initially calculated global optimization route and its total route cost can be directly used as the optimal optimization route and the optimal route total cost.

[0090] Step 103: using the pre-trained partition adjustment network, two partitions among the multiple partitions are merged and repartitioned to obtain two new partitions.

[0091] Here, the embodiment of the present invention uses a pre-trained partition adjustment network to fuse two partitions of the multiple partitions obtained in step 102, and divide the fused partition obtained by fusion into two partitions again, thereby obtaining two new partitions. The input of the partition adjustment network is the multiple partitions obtained in step 102, the local optimized route and local route cost of each partition, and the total route cost of the global optimized route, and the output is two new partitions. The training of the partition adjustment network will be further described below.

[0092] In step 103, the partition adjustment network selects two partitions from the multiple partitions for fusion and repartitioning in the following manner:

[0093] A) Generate a local feature vector for each partition according to the local optimized route and the local route cost of each partition, and generate a global feature vector according to the local feature vectors of all partitions.

[0094] Here, the local optimization route of the partition may include one or more paths, and the customer sites in each path are combined according to the order in the path to obtain the customer site sequence in the local optimization route. For each partition, the customer site sequence in the local optimization route of the partition is input as an input sequence to the Long Short-Term Memory (LSTM) network to obtain the primary feature sequence of the partition output by the LSTM network. Then, the primary feature sequence of the partition and the local route cost are input into a Fully Convolutional Networks (FCN), and the feature vector output by the FCN is used as the local feature vector of the partition. In addition, the local feature vectors of all partitions can be averaged to obtain the global feature vector.

[0095] B) selecting two partitions from the multiple partitions according to the global feature vector and the local feature vector, and merging the two partitions into one partition.

[0096] Here, after obtaining the global feature vector and the local feature vectors of each partition, two partitions may be selected from the multiple partitions for fusion in the following manner:

[0097] First, the global feature is used as an index and the attention mechanism is used to generate selection probability values ​​of all partitions. According to the selection probability values ​​of all partitions, a partition with the largest probability value is selected as the first partition to be selected;

[0098] Then, taking the local area features of the first partition as an index, the attention mechanism is used to generate the selection probability values ​​of the remaining partitions (the remaining partitions refer to the partitions other than the first partition), and according to the selection probability values ​​of all the remaining partitions, a partition with the largest probability value is selected as the second partition to be selected, so that the first partition and the second partition are used as the partitions to be fused.

[0099] C) calculating a local optimization route of the fused partition, and re-dividing the fused partition into two new partitions according to the local optimization route of the fused partition.

[0100] Here, various small-scale VRP solving algorithms using existing technologies can be used, such as a small-scale solving algorithm based on reinforcement learning, by inputting the geographical coordinates of each customer site in the fusion zone, the geographical coordinates of the origin site, and the maximum loading capacity of the vehicle, to generate a local optimized route for the delivery task in the fusion zone. Then, according to the local optimized route of the fusion zone, the fusion zone is re-divided into two new zones. A method of re-dividing zones that can be used in an embodiment of the present invention is as follows:

[0101] For each path in the local optimized route of the fused partition, a coordinate average point is selected. The coordinate average point can be the average point of the geographical coordinates of all customer sites in the path, or the center point of the geometric shape surrounded by each path. Then, the coordinate average point is subjected to principal component analysis (PCA) to obtain a one-dimensional representation of the path; according to the one-dimensional representation of each path, the paths in the local optimized route of the fused partition are divided into two groups, and the sites in each group of paths belong to the same new partition. For example, the one-dimensional representations of each path of the fused partition are divided into two groups, and the paths contained in each group are determined according to the one-dimensional representations contained in each group, so that each customer site in the path in each group belongs to the same new partition, thereby obtaining two new partitions and customer sites in each new partition. The one-dimensional representations are grouped, and one grouping method can be: calculating the average value of all one-dimensional representations, taking the one-dimensional representations that are not less than the average value as one group, and taking the remaining one-dimensional representations as another group.

[0102] Step 104, calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost.

[0103] Here, various small-scale VRP solving algorithms using existing technologies can be used, such as a small-scale solving algorithm based on reinforcement learning, by inputting the geographical coordinates of each customer site in the new partition, the geographical coordinates of the origin site, and the maximum loading capacity of the vehicle, to generate the local optimized route and local route cost of the distribution task in the new partition. Since the local route cost of the two new partitions after re-partitioning may change relative to the local route cost of the original partition, it is necessary to update the global optimized route and total route cost of all customer sites obtained in step 102 according to the local optimized route and local route cost of the two new partitions.

[0104] Step 105 , determining whether the updated route total cost is lower than the optimal route total cost, if so, proceeding to step 106 ; otherwise, proceeding to step 107 for determining when iteration should be stopped.

[0105] Here, the updated route total cost obtained in step 104 is compared with the optimal route total cost to determine whether the route total cost is reduced after the re-dividing of the zones.

[0106] Step 106 , updating the optimal optimized route and the optimal route total cost according to the updated global optimized route and the route total cost, and returning to step 103 .

[0107] Here, when the total cost of the route is reduced after the re-division, it is necessary to update the optimal optimization route and the optimal route total cost according to the updated global optimization route and the total cost of the route, and then return to step 103, continue to select two partitions from the current partitions for fusion and re-dividing the partitions, and iterate the above steps to solve for a better route and cost.

[0108] Step 107 , determining whether a preset iteration stop condition is satisfied, if so, proceeding to step 108 , otherwise, returning to the repartitioning step 103 .

[0109] Here, when the total cost of the route after the re-division of the partitions is not reduced, it is determined whether a preset iteration stop condition is met, and the iteration stop condition may specifically be: the total cost of the route after N consecutive updates is not less than the total cost of the optimal route, and N is a preset integer greater than 2. If the iteration stop condition is met, the process proceeds to step 108, otherwise, the process returns to step 103, and two partitions are continuously selected from the current partitions for fusion and re-division of the partitions, and the above steps are iteratively executed to solve for a better route and cost.

[0110] Step 108, output the optimal optimization route and end the process.

[0111] In step 108, the current optimal optimized route is output as the final route planning result. In addition, the total cost of the current optimal route can also be output as the total cost of the optimal optimized route.

[0112] Figure 2 An example of the above iterative calculation is given, Figure 2 In the figure, the large black dot represents the originating site, and each small black dot represents a customer site. Figure 2 For example, partitioning is performed through the above step 102. Assume that after partitioning, 7 partitions are obtained, namely, partition 1 to partition 7 ( Figure 2 Step 201), and obtain the local optimized routes and local route costs of the 7 partitions ( Figure 2 In step 202), the global optimized route and the total route cost are summarized. In the above step 103, partition 1 and partition 2 are merged ( Figure 2 Step 203), and by calculating the local optimization route of the fusion partition ( Figure 2 Step 204), then the fused partition is repartitioned ( Figure 2 Step 205) obtains new partition 1 and new partition 2. At this time, it is necessary to merge the local optimized routes and local route costs of the new partition 1 and the new partition 2 with the local optimized routes and local route costs of the original partitions 3 to 7, so as to obtain a new global optimized route and total route cost. If the total cost of the updated route is reduced, it further returns to step 203 to merge and re-partition the current partitions.

[0113] Through the above steps, the embodiment of the present invention can find the optimal or nearly optimal global optimization route and its total cost through multiple iterative calculations. The embodiment of the present invention can divide a large number of customer sites into multiple partitions, and then perform small-scale VRP solutions under each partition, avoiding the low performance and efficiency problems of directly solving large-scale customer sites, and improving the performance and efficiency of path planning in large-scale vehicle path planning.

[0114] Before the above step 101, the embodiment of the present invention may pre-train a partition adjustment network, as described above, the partition adjustment network may include an LSTM network and an FCN and an attention mechanism network. Figure 3 As shown, the specific training steps include:

[0115] Step 301, obtaining a training set, wherein the training set includes multiple groups of training data, each group of training data includes an originating site, a maximum load capacity of a delivery vehicle, geographic locations of multiple customer sites, and delivery demand information of each customer site.

[0116] Here, the maximum load of the vehicle (such as maximum capacity, maximum load, etc.) can also be entered. Optionally, more information can be entered, such as the service time window of each customer site (that is, the customer site can only be served within this time window), road congestion information, vehicle quantity limit and other conditions.

[0117] Step 302: Initialize a reference model of a partition adjustment network.

[0118] Here, a reference model of a partition adjustment network is initialized, and the reference model may be updated in each subsequent training process. At the beginning of each round of training, the partition adjustment network adopts the current reference model, that is, at the beginning of each round of training, the partition adjustment network is initialized according to the model parameters of the current reference model.

[0119] Step 303, select a group of unused training data, use the selected training data to perform a round of training, and train the partition adjustment network, wherein at the beginning of each round of training, the partition adjustment network adopts the current reference model; during each round of training, the model parameters of the partition adjustment network are updated using the training data, and when the performance of the updated partition adjustment network is improved relative to the current reference model, the reference model is updated according to the updated partition adjustment network.

[0120] Step 304, at the end of each round of training, determine whether the preset network training end condition is met, if so, proceed to step 305; otherwise, return to step 303.

[0121] Here, the network training end condition may be that all training data have been trained.

[0122] In order to prevent overfitting of model training and improve training efficiency, the embodiment of the present invention can verify the model through a set of verification data, and determine whether to stop network training according to the verification result. Specifically:

[0123] After each round of training, the current reference model is used as the partition adjustment network, and a set of verification data is used as input data to execute Figure 1In steps 101 to 108, the global optimization route and total route cost corresponding to the verification data after the end of the round of training are obtained, and the total cost of the optimal route corresponding to the verification data is updated according to the total cost of the route corresponding to the verification data obtained after each round of training. For example, when the total cost of the route is reduced, the total cost of the optimal route corresponding to the verification data is updated according to the total cost of the route corresponding to the verification data obtained after the end of the round of training; if the total cost of the route is not reduced, the total cost of the optimal route corresponding to the verification data is kept unchanged. At this time, the end condition of the network training can be set as: the total cost of the route corresponding to the verification data obtained after M consecutive rounds of training is not less than the total cost of the optimal route corresponding to the verification data; M is a preset integer greater than 2. In this way, when the training has limited performance improvement on the partition adjustment network, the training process can be stopped in time to improve the training efficiency.

[0124] Step 305, ending the training of the partition adjustment network, and outputting the reference model as the partition adjustment network obtained by the final training.

[0125] In the above step 303, a round of training is performed using the selected set of training data to train the partition adjustment network. Each round of training may include multiple iterative processes, specifically, Figure 4 As shown, each round of training includes the following steps:

[0126] Step 3031: cluster and partition the customer sites according to the geographical locations of the multiple customer sites in the training data to obtain multiple partitions; calculate the local optimized route and local route cost of each partition according to the originating site, the maximum load of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the training data, and obtain the global optimized route and the total route cost of all customer sites, and update the optimal optimized route and the optimal route total cost according to the global optimized route and the total route cost. Step 3032: merge and repartition two of the multiple partitions using the partition adjustment network to obtain two new partitions.

[0127] Step 3033, calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost.

[0128] Step 3034, calculate the reduction in the total cost of the route before and after the update, use the reduction as the reward function value, guide the partition adjustment network to perform gradient descent, and obtain the updated partition adjustment network.

[0129] Step 3035 , determine whether the updated total cost of the route is lower than the total cost of the optimal route, if so, proceed to step 3036 , otherwise, proceed to step 3037 .

[0130] Step 3036, based on the updated global optimization route and route total cost, update the optimal optimization route and optimal route total cost, and based on the updated partition adjustment network, update the reference model, and return to step 3032.

[0131] Step 3037, determine whether the preset stop condition for each round of training is met, if so, end the current round of training and enter step 304, otherwise, return to step 3032.

[0132] Some steps in the above training process are similar to Figure 1 To save space, the relevant steps in the workflow are not repeated here.

[0133] Through the above steps, the embodiment of the present invention can solve the problems of long training time of large-scale VRP models and difficulty in convergence of the training process, and improve the performance and efficiency of VRP problem solving.

[0134] The inventors compared the method of the embodiment of the present invention with the ant colony optimization algorithm in the prior art and found that the embodiment of the present invention can greatly reduce the time required for calculation and obtain a solution with a better cost, especially when solving large-scale VRP, the above advantages are more prominent.

[0135] Based on the above vehicle path planning method, an embodiment of the present invention also provides a device for implementing the above method.

[0136] Please refer to Figure 5 , a vehicle path planning device 50 provided by an embodiment of the present invention includes:

[0137] A data acquisition module 51 is used to acquire, as input data, the originating station to be routed, the maximum load of the delivery vehicle, the geographical locations of multiple customer stations, and the delivery demand information of each customer station;

[0138] The initial calculation module 52 is used to cluster and partition the customer sites according to the geographical locations of the multiple customer sites in the input data to obtain multiple partitions; calculate the local optimized route and local route cost of each partition according to the originating site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the input data, and obtain the global optimized route and total route cost of all customer sites, and update the optimal optimized route and the optimal route total cost according to the global optimized route and the total route cost;

[0139] A repartitioning module 53 is used to use a pre-trained partition adjustment network to merge and repartition two partitions of the multiple partitions to obtain two new partitions;

[0140] An iterative calculation module 54, used for calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost;

[0141] An update processing module 55 is used to determine whether the updated route total cost is lower than the optimal route total cost. If so, the optimal optimized route and the optimal route total cost are updated according to the updated global optimized route and the route total cost, and the repartitioning module is returned; otherwise, the iteration stop judgment module is entered;

[0142] The iteration stop judgment module 56 is used to judge whether the preset iteration stop condition is met. If so, the optimal optimization route is output; otherwise, the optimal optimization route is returned to the re-partitioning module.

[0143] Optionally, the iteration stopping condition is: the total cost of the route after N consecutive updates is not less than the total cost of the optimal route, and N is a preset integer greater than 2.

[0144] Optionally, the repartitioning module may specifically include:

[0145] A first calculation module, used for generating a local feature vector of each partition according to the local optimized route and the local route cost of each partition, and generating a global feature vector according to the local feature vectors of all partitions;

[0146] A selection fusion module is used to select two partitions from the multiple partitions according to the global feature vector and the local feature vector, and fuse them into one partition;

[0147] The partitioning module is used to calculate the local optimization route of the fused partition and re-divide the fused partition into two new partitions according to the local optimization route of the fused partition.

[0148] Optionally, the first calculation module may include:

[0149] The first processing module is used for, for each partition, inputting the customer site sequence in the local optimized route of the partition as an input sequence into a long short-term memory (LSTM) network to generate a primary feature sequence of the partition; inputting the primary feature sequence of the partition and the local route cost into a full convolutional network to generate a local feature vector of the partition;

[0150] The second processing module is used to average the local feature vectors of all partitions to obtain the global feature vector.

[0151] Optionally, the selection fusion module is specifically used for:

[0152] Using the global feature as an index, an attention mechanism is used to generate selection probability values ​​of all partitions, and a partition with the largest selection probability value is selected as the first partition to be selected;

[0153] The local area features of the first partition are used as indexes, and the attention mechanism is used to generate selection probability values ​​of the remaining partitions, and a partition with the largest probability value is selected as the second partition to be selected.

[0154] Optionally, the division module is specifically used to:

[0155] For each path in the local optimized route of the fused partition, a coordinate average point is selected, and principal component analysis is performed on the coordinate average point to obtain a one-dimensional representation of the path; based on the one-dimensional representation of each path, the paths in the local optimized route of the fused partition are divided into two groups, and the sites in each group of paths belong to the same new partition.

[0156] Optionally, the vehicle path planning device further includes:

[0157] A training module is used to train the partition adjustment network.

[0158] Optionally, the training module may specifically include:

[0159] The first module is used to obtain a training set, wherein the training set includes multiple sets of training data, each set of training data includes an originating station, a maximum load capacity of a delivery vehicle, geographic locations of multiple customer stations, and delivery demand information of each customer station;

[0160] The second module is used to initialize a reference model of a partition adjustment network;

[0161] The third module is used to select a set of unused training data, and use the selected training data to perform a round of training to train the partition adjustment network, wherein at the beginning of each round of training, the partition adjustment network adopts the current reference model; during each round of training, the model parameters of the partition adjustment network are updated using the training data, and when the performance of the updated partition adjustment network is improved relative to the current reference model, the reference model is updated according to the updated partition adjustment network;

[0162] The fourth module is used to determine whether the preset network training end condition is met at the end of each round of training. If so, the training of the partition adjustment network is terminated and the reference model is output as the partition adjustment network obtained by the final training; otherwise, return to the third module.

[0163] Optionally, the third module may specifically include:

[0164] The first training submodule is used to cluster and partition the customer sites according to the geographical locations of the multiple customer sites in the training data to obtain multiple partitions; calculate the local optimized route and local route cost of each partition according to the originating site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the training data, and obtain the global optimized route and the total route cost of all customer sites; and update the optimal optimized route and the optimal route total cost according to the global optimized route and the total route cost;

[0165] A second training submodule is used to use the partition adjustment network to merge and repartition two partitions of the multiple partitions to obtain two new partitions;

[0166] A third training submodule, used for calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost;

[0167] A fourth training submodule is used to calculate the reduction in the total cost of the route before and after the update, and use the reduction as a reward function value to guide the partition adjustment network to perform gradient descent to obtain the updated partition adjustment network;

[0168] The fifth training submodule is used to determine whether the updated route total cost is lower than the optimal route total cost. If so, the optimal optimization route and the optimal route total cost are updated according to the updated global optimization route and the route total cost, and the reference model is updated according to the updated partition adjustment network, and the second training substep is returned; otherwise, the sixth training submodule is entered;

[0169] The sixth training submodule is used to determine whether the preset stop condition of each round of training is met. If so, the current round of training is terminated; otherwise, the current round of training is returned to the second training submodule.

[0170] Optionally, the vehicle path planning device further includes:

[0171] A verification module, for, after each round of training, using the current reference model as the partition adjustment network and a set of verification data as input data, calling the initial calculation module, the repartitioning module, the iterative calculation module, the update processing module and the iterative stop judgment module to obtain the global optimization route and the total route cost corresponding to the verification data; and, according to the total route cost corresponding to the verification data obtained after each round of training, updating the optimal total route cost corresponding to the verification data;

[0172] The network training termination condition is: the total route cost corresponding to the verification data obtained after M consecutive rounds of training is not less than the total optimal route cost corresponding to the verification data; and M is a preset integer greater than 2.

[0173] Through the above device, the embodiment of the present invention can improve the performance and efficiency of path planning in large-scale vehicle path planning.

[0174] like Figure 6 As shown, the embodiment of the present invention further provides another vehicle path planning device 60, which specifically includes a processor 61, a memory 62, a bus system 63, a receiver 64 and a transmitter 65. The processor 61, the memory 62, the receiver 64 and the transmitter 65 are connected via the bus system 63, the memory 62 is used to store instructions, and the processor 61 is used to execute the instructions stored in the memory 62 to control the receiver 64 to receive signals and control the transmitter 65 to send signals;

[0175] The processor 61 is used to read the program in the memory and execute the following process:

[0176] A data acquisition step, obtaining, as input data, the originating station to be routed, the maximum load capacity of the delivery vehicle, the geographical locations of multiple customer stations, and the delivery demand information of each customer station;

[0177] The initial calculation step is to cluster and partition the customer sites according to the geographical locations of the multiple customer sites in the input data to obtain multiple partitions; calculate the local optimal route and local route cost of each partition according to the originating site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the input data, and obtain the global optimal route and total route cost of all customer sites, and update the optimal optimal route and the optimal route total cost according to the global optimal route and the total route cost;

[0178] a repartitioning step, using a pre-trained partition adjustment network to fuse and repartition two of the multiple partitions to obtain two new partitions;

[0179] Iterative calculation step, calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost;

[0180] An update processing step, determining whether the updated route total cost is lower than the optimal route total cost, if so, updating the optimal optimized route and the optimal route total cost according to the updated global optimized route and the route total cost, and returning to the repartitioning step; otherwise, entering the iteration stop determination step;

[0181] The iteration stop judgment step determines whether a preset iteration stop condition is met. If so, the optimal optimization route is output; otherwise, the process returns to the repartitioning step.

[0182] It should be understood that in the embodiment of the present invention, the processor 61 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0183] The memory 62 may include a read-only memory and a random access memory, and provides instructions and data to the processor 61. A portion of the memory 62 may also include a non-volatile random access memory. For example, the memory 62 may also store information on the device type.

[0184] The bus system 63 may include, in addition to the data bus, a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the bus system 63 in the figure.

[0185] In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 61 or the instruction in the form of software. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 62, and the processor 61 reads the information in the memory 62 and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0186] According to at least one embodiment of the present invention, the iteration stopping condition is: the total cost of the route after N consecutive updates is not less than the total cost of the optimal route, and N is a preset integer greater than 2.

[0187] According to at least one embodiment of the present invention, when the program is executed by the processor 61, the following steps may also be implemented:

[0188] Generate a local feature vector for each partition according to the local optimized route and the local route cost of each partition, and generate a global feature vector according to the local feature vectors of all partitions;

[0189] According to the global feature vector and the local feature vector, two partitions are selected from the multiple partitions, and the two partitions are merged into one partition;

[0190] A local optimization route of the fused partition is calculated, and the fused partition is re-divided into two new partitions according to the local optimization route of the fused partition.

[0191] According to at least one embodiment of the present invention, when the program is executed by the processor 61, the following steps may also be implemented:

[0192] For each partition, the customer site sequence in the local optimized route of the partition is input as an input sequence into the long short-term memory (LSTM) network to generate a primary feature sequence of the partition;

[0193] The primary feature sequence and the local route cost of the partition are input into a fully convolutional network to generate a local feature vector of the partition.

[0194] According to at least one embodiment of the present invention, when the program is executed by the processor 61, the following steps may also be implemented:

[0195] The local feature vectors of all partitions are averaged to obtain the global feature vector.

[0196] According to at least one embodiment of the present invention, when the program is executed by the processor 61, the following steps may also be implemented:

[0197] Using the global feature as an index, an attention mechanism is used to generate selection probability values ​​of all partitions, and a partition with the largest selection probability value is selected as the first partition to be selected;

[0198] The local area features of the first partition are used as indexes, and the attention mechanism is used to generate selection probability values ​​of the remaining partitions, and a partition with the largest probability value is selected as the second partition to be selected.

[0199] According to at least one embodiment of the present invention, when the program is executed by the processor 61, the following steps may also be implemented:

[0200] For each path in the local optimized route of the fused partition, a coordinate average point is selected, and principal component analysis is performed on the coordinate average point to obtain a one-dimensional representation of the path; based on the one-dimensional representation of each path, the paths in the local optimized route of the fused partition are divided into two groups, and the sites in each group of paths belong to the same new partition.

[0201] According to at least one embodiment of the present invention, when the program is executed by the processor 61, the following steps may also be implemented:

[0202] Before the data input step, a training step is performed to obtain the partition adjustment network through training.

[0203] According to at least one embodiment of the present invention, when the program is executed by the processor 61, the following steps may also be implemented:

[0204] The first step is to obtain a training set, wherein the training set includes multiple sets of training data, each set of training data includes an originating station, a maximum load capacity of a delivery vehicle, geographic locations of multiple customer stations, and delivery demand information of each customer station;

[0205] The second step is to initialize a reference model of the partition adjustment network;

[0206] The third step is to select a set of unused training data, and use the selected training data to perform a round of training to train the partition adjustment network, wherein at the beginning of each round of training, the partition adjustment network adopts the current reference model; during each round of training, the model parameters of the partition adjustment network are updated using the training data, and when the performance of the updated partition adjustment network is improved relative to the current reference model, the reference model is updated according to the updated partition adjustment network;

[0207] The fourth step is to determine whether the preset network training end condition is met at the end of each round of training. If so, the training of the partition adjustment network is terminated and the reference model is output as the partition adjustment network obtained by the final training; otherwise, return to the third step.

[0208] According to at least one embodiment of the present invention, when the program is executed by the processor 61, the following steps may also be implemented:

[0209] In a first training sub-step, the customer sites are clustered and partitioned according to the geographical locations of the multiple customer sites in the training data to obtain multiple partitions; based on the originating site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site, and the delivery demand information of the customer site in the training data, the local optimized route and the local route cost of each partition are calculated, and the global optimized route and the total route cost of all customer sites are obtained, and, based on the global optimized route and the total route cost, the optimal optimized route and the optimal route total cost are updated;

[0210] In a second training sub-step, the partition adjustment network is used to fuse and repartition two partitions of the multiple partitions to obtain two new partitions;

[0211] The third training sub-step is to calculate the local optimized routes of the two new partitions, and update the global optimized route and the total route cost;

[0212] The fourth training sub-step is to calculate the reduction in the total cost of the route before and after the update, and use the reduction as the reward function value to guide the partition adjustment network to perform gradient descent to obtain the updated partition adjustment network;

[0213] The fifth training sub-step is to determine whether the updated route total cost is lower than the optimal route total cost. If so, the optimal optimized route and the optimal route total cost are updated according to the updated global optimized route and the route total cost, and the reference model is updated according to the updated partition adjustment network, and the second training sub-step is returned; otherwise, the sixth training sub-step is entered;

[0214] The sixth step is to determine whether the preset stop condition of each round of training is met. If so, end the current round of training; otherwise, return to the second training sub-step.

[0215] According to at least one embodiment of the present invention, when the program is executed by the processor 61, the following steps may also be implemented:

[0216] After each round of training, the current reference model is used as the partition adjustment network, and a set of verification data is used as input data to perform the initial calculation step, the repartitioning step, the iterative calculation step, the update processing step, and the iterative stop judgment step to obtain the global optimization route and the total route cost corresponding to the verification data; and according to the total route cost corresponding to the verification data obtained after each round of training, the optimal total route cost corresponding to the verification data is updated;

[0217] The network training termination condition is: the total route cost corresponding to the verification data obtained after M consecutive rounds of training is not less than the total optimal route cost corresponding to the verification data; and M is a preset integer greater than 2.

[0218] When the program is executed by the processor, it can achieve Figure 1 All implementations of the vehicle path planning method shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0219] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0220] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0221] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0222] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0223] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0224] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0225] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A vehicle path planning method, characterized in that: include: A data acquisition step, obtaining, as input data, the originating station to be routed, the maximum load capacity of the delivery vehicle, the geographical locations of multiple customer stations, and the delivery demand information of each customer station; The initial calculation step is to cluster and partition the customer sites according to the geographical locations of the multiple customer sites in the input data to obtain multiple partitions; calculate the local optimal route and local route cost of each partition according to the originating site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the input data, and obtain the global optimal route and total route cost of all customer sites, and update the optimal optimal route and the optimal route total cost according to the global optimal route and the total route cost; a repartitioning step, using a pre-trained partition adjustment network to fuse and repartition two of the multiple partitions to obtain two new partitions; Iterative calculation step, calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost; An update processing step, determining whether the updated route total cost is lower than the optimal route total cost, and if so, updating the optimal optimized route and the optimal route total cost according to the updated global optimized route and the route total cost, and returning to the repartitioning step; Otherwise, enter the iteration stop judgment step; The iteration stop judgment step determines whether the preset iteration stop condition is met. If so, the optimal optimization route is output; otherwise, the optimal optimization route is returned to the repartitioning step. Before the data entry step, also include: A training step, training to obtain the partition adjustment network, The training steps include: The first step is to obtain a training set, wherein the training set includes multiple sets of training data, each set of training data includes an originating station, a maximum load capacity of a delivery vehicle, geographic locations of multiple customer stations, and delivery demand information of each customer station; The second step is to initialize a reference model of the partition adjustment network; The third step is to select a set of unused training data, and use the selected training data to perform a round of training to train the partition adjustment network, wherein at the beginning of each round of training, the partition adjustment network adopts the current reference model; during each round of training, the model parameters of the partition adjustment network are updated using the training data, and when the performance of the updated partition adjustment network is improved relative to the current reference model, the reference model is updated according to the updated partition adjustment network; The fourth step is to determine whether the preset network training end condition is met at the end of each round of training. If so, the training of the partition adjustment network is terminated and the reference model is output as the partition adjustment network obtained by the final training; otherwise, return to the third step. The step of performing a round of training using the selected training data to train the partition adjustment network includes: In a first training sub-step, the customer sites are clustered and partitioned according to the geographical locations of the multiple customer sites in the training data to obtain multiple partitions; based on the originating site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site, and the delivery demand information of the customer site in the training data, the local optimized route and the local route cost of each partition are calculated, and the global optimized route and the total route cost of all customer sites are obtained, and, based on the global optimized route and the total route cost, the optimal optimized route and the optimal route total cost are updated; In a second training sub-step, the partition adjustment network is used to fuse and repartition two partitions of the multiple partitions to obtain two new partitions; The third training sub-step is to calculate the local optimized routes of the two new partitions, and update the global optimized route and the total route cost; The fourth training sub-step is to calculate the reduction in the total cost of the route before and after the update, and use the reduction as the reward function value to guide the partition adjustment network to perform gradient descent to obtain the updated partition adjustment network; The fifth training sub-step is to determine whether the updated route total cost is lower than the optimal route total cost. If so, the optimal optimized route and the optimal route total cost are updated according to the updated global optimized route and the route total cost, and the reference model is updated according to the updated partition adjustment network, and the second training sub-step is returned; otherwise, the sixth training sub-step is entered; The sixth training sub-step determines whether the preset stop condition of each round of training is met. If so, the current round of training is terminated; otherwise, the process returns to the second training sub-step.

2. The method according to claim 1, characterized in that The iteration stopping condition is: the total cost of the route after N consecutive updates is not less than the total cost of the optimal route, and N is a preset integer greater than 2.

3. The method according to claim 1, characterized in that The step of merging and repartitioning two partitions among the multiple partitions to obtain two new partitions includes: Generate a local feature vector for each partition according to the local optimized route and the local route cost of each partition, and generate a global feature vector according to the local feature vectors of all partitions; According to the global feature vector and the local feature vector, two partitions are selected from the multiple partitions, and the two partitions are merged into one partition; A local optimization route of the fused partition is calculated, and the fused partition is re-divided into two new partitions according to the local optimization route of the fused partition.

4. The method according to claim 3, characterized in that The generating of the local feature vector of each partition according to the local optimization route and the local route cost of each partition comprises: For each partition, the customer site sequence in the local optimized route of the partition is input as an input sequence into the long short-term memory (LSTM) network to generate a primary feature sequence of the partition; The primary feature sequence and the local route cost of the partition are input into a fully convolutional network to generate a local feature vector of the partition.

5. The method according to claim 3, characterized in that The step of generating a global feature vector according to the local feature vectors of all partitions includes: The local feature vectors of all partitions are averaged to obtain the global feature vector.

6. The method according to claim 3, characterized in that The step of selecting two partitions from the plurality of partitions according to the global feature vector and the local feature vector comprises: Using the global feature as an index, an attention mechanism is used to generate selection probability values ​​of all partitions, and a partition with the largest selection probability value is selected as the first partition to be selected; The local area features of the first partition are used as indexes, and the attention mechanism is used to generate selection probability values ​​of the remaining partitions, and a partition with the largest probability value is selected as the second partition to be selected.

7. The method according to claim 3, characterized in that The step of re-dividing the fused partition into two new partitions according to the local optimization route of the fused partition includes: For each path in the local optimized route of the fused partition, a coordinate average point is selected, and principal component analysis is performed on the coordinate average point to obtain a one-dimensional representation of the path; based on the one-dimensional representation of each path, the paths in the local optimized route of the fused partition are divided into two groups, and the sites in each group of paths belong to the same new partition.

8. The method according to claim 1, characterized in that Also includes: After each round of training, the current reference model is used as the partition adjustment network, and a set of verification data is used as input data to perform the initial calculation step, the repartitioning step, the iterative calculation step, the update processing step, and the iterative stop judgment step to obtain the global optimization route and the total route cost corresponding to the verification data; and according to the total route cost corresponding to the verification data obtained after each round of training, the optimal total route cost corresponding to the verification data is updated; The network training termination condition is: the total route cost corresponding to the verification data obtained after M consecutive rounds of training is not less than the total optimal route cost corresponding to the verification data; and M is a preset integer greater than 2.

9. A vehicle path planning device, characterized in that: include: A data acquisition module is used to obtain, as input data, the originating station to be routed, the maximum load of the delivery vehicle, the geographical locations of multiple customer stations, and the delivery demand information of each customer station; an initial calculation module, for clustering and partitioning the customer sites according to the geographical locations of the multiple customer sites in the input data to obtain a plurality of partitions; calculating the local optimized route and the local route cost of each partition according to the originating site, the maximum load of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the input data, and obtaining the global optimized route and the total route cost of all customer sites, and, according to the global optimized route and the total route cost, updating the optimal optimized route and the optimal route total cost; A repartitioning module, used to use a pre-trained partition adjustment network to fuse and repartition two partitions of the multiple partitions to obtain two new partitions; An iterative calculation module, used for calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost; An update processing module, used to determine whether the updated route total cost is lower than the optimal route total cost, and if so, update the optimal optimized route and the optimal route total cost according to the updated global optimized route and the route total cost, and return to the repartitioning module; Otherwise, enter the iteration stop judgment module; The iteration stop judgment module is used to judge whether the preset iteration stop condition is met, and if so, output the optimal optimization route, otherwise, return to the repartitioning module, The vehicle path planning device further includes: a training module, which is used to train the partition adjustment network. The training module includes: The first module is used to obtain a training set, wherein the training set includes multiple sets of training data, each set of training data includes an originating station, a maximum load capacity of a delivery vehicle, geographic locations of multiple customer stations, and delivery demand information of each customer station; The second module is used to initialize a reference model of a partition adjustment network; The third module is used to select a set of unused training data, and use the selected training data to perform a round of training to train the partition adjustment network, wherein at the beginning of each round of training, the partition adjustment network adopts the current reference model; during each round of training, the model parameters of the partition adjustment network are updated using the training data, and when the performance of the updated partition adjustment network is improved relative to the current reference model, the reference model is updated according to the updated partition adjustment network; The fourth module is used to determine whether the preset network training end condition is met at the end of each round of training. If so, the training of the partition adjustment network is terminated and the reference model is output as the partition adjustment network obtained by the final training; otherwise, return to the third module. The third module includes: The first training submodule is used to cluster and partition the customer sites according to the geographical locations of the multiple customer sites in the training data to obtain multiple partitions; calculate the local optimized route and local route cost of each partition according to the originating site, the maximum load capacity of the delivery vehicle, the geographical location of the customer site and the delivery demand information of the customer site in the training data, and obtain the global optimized route and the total route cost of all customer sites; and update the optimal optimized route and the optimal route total cost according to the global optimized route and the total route cost; A second training submodule is used to use the partition adjustment network to merge and repartition two partitions of the multiple partitions to obtain two new partitions; A third training submodule, used for calculating the local optimized routes of the two new partitions, and updating the global optimized route and the total route cost; A fourth training submodule is used to calculate the reduction in the total cost of the route before and after the update, and use the reduction as a reward function value to guide the partition adjustment network to perform gradient descent to obtain the updated partition adjustment network; The fifth training submodule is used to determine whether the updated route total cost is lower than the optimal route total cost. If so, the optimal optimization route and the optimal route total cost are updated according to the updated global optimization route and the route total cost, and the reference model is updated according to the updated partition adjustment network, and the second training substep is returned; otherwise, the sixth training submodule is entered; The sixth training submodule is used to determine whether the preset stop condition of each round of training is met. If so, the current round of training is terminated; otherwise, the current round of training is returned to the second training submodule.

10. The vehicle path planning device according to claim 9, characterized in that: The repartitioning module comprises: A first calculation module, used for generating a local feature vector of each partition according to the local optimized route and the local route cost of each partition, and generating a global feature vector according to the local feature vectors of all partitions; A selection fusion module is used to select two partitions from the multiple partitions according to the global feature vector and the local feature vector, and fuse them into one partition; The partitioning module is used to calculate a local optimization route of the fused partition and re-divide the fused partition into two new partitions according to the local optimization route of the fused partition.

Citation Information

Patent Citations

  • Optimization algorithm for solving vehicle routing problem with time windows

    CN106251009A

  • Vehicle path planning method and system based on pointer neural network, and storage medium

    CN110147901A

  • Planning method and device for navigation route

    CN109323702A

  • Unmanned aerial vehicle and unmanned ground robot collaborative tracking and obstacle avoidance system and method

    CN109901580A