Multistage distribution network path planning method and device, electronic equipment and storage medium

By establishing a total travel cost minimization objective function in a multi-level delivery network, and combining resource reallocation and caching techniques, a genetic algorithm is used to optimize path planning. This solves the problem that traditional methods cannot obtain the optimal path in multiple scenarios, and achieves efficient and robust path planning.

CN121961392APending Publication Date: 2026-05-01CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHERY AUTOMOBILE CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional methods cannot obtain the optimal planning path for multi-level delivery tasks in various scenarios, especially under dynamic demand disturbances, which result in high computational complexity and high resource consumption.

Method used

By establishing an objective function to minimize the total travel cost under multiple scenarios, combining resource reallocation mechanisms and caching acceleration techniques, a genetic algorithm framework is used for path planning. The calculated path costs are cached using a hash data structure, and iterative optimization is performed until the convergence condition is met.

Benefits of technology

It significantly improves the robustness of the path scheme to demand fluctuations, increases solution efficiency, reduces computational resource consumption, and generates high-quality, executable final optimized path schemes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121961392A_ABST
    Figure CN121961392A_ABST
Patent Text Reader

Abstract

The invention provides a multi-level distribution network path planning method and device, electronic equipment and a storage medium, and in the method, the total travel cost minimization under multiple scenes is taken as a target, and a resource redistribution mechanism and a cache acceleration technology are fused, so that the path planning efficiency is improved. The defect that adaptability, optimality and calculation efficiency of a solution cannot be considered in a traditional method is effectively overcome. Specifically, the method significantly improves the robustness of the final optimization path scheme for demand fluctuation, so that the final optimization path scheme can adapt to various actual scenes; meanwhile, through staged optimization and intelligent caching, the efficiency of the solving process is greatly improved, the consumption of computing resources is reduced, and the quality of a final solution is effectively improved, so that the final solution is closer to global optimum. Finally, the technical effect of quickly and automatically generating a high-quality and executable final optimization path scheme in a complex and uncertain environment is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Route planning methods, devices, electronic equipment, and storage media for multi-level distribution networks Technical Field

[0001] This invention relates to the technical field of route planning, and in particular to a route planning method, apparatus, electronic device, and storage medium for a multi-level distribution network. Background Technology

[0002] The Vehicle Routing Problem (VRP) is a fundamental challenge in operations research and logistics, focusing on optimizing vehicle routes to efficiently serve a set of customers. It involves finding the optimal route for a fleet while satisfying various constraints, such as vehicle capacity, travel time, and service preferences. However, traditional VRP typically assumes that all vehicles start and end their routes from the same warehouse and that the demand of all customers is known before route planning. In reality, these assumptions are often difficult to meet in real-world transportation scenarios. Taking express delivery as an example, the number of packages generated (i.e., customer demand) is influenced by factors such as seasons and population movement, exhibiting a degree of randomness. Furthermore, a large metropolis usually has a central hub and multiple express delivery distribution and transfer stations. Therefore, in the express delivery problem, vehicles need to depart from a central station, travel to various community express transfer stations within the city, and then deliver the packages to individual customers. This type of problem involves two levels: the first level is the Capacitated Vehicle Routing Problem (CVRP), which connects the central facility with multiple transfer facilities; the second level is the Multi-depot Vehicle Routing Problem (MDVRP), which connects multiple transfer facilities with their respective customers. Due to the strong path coupling between these levels and the fact that dynamic demand disturbances can trigger cascading failures across multiple levels, the problem becomes even more complex. In recent years, various algorithms have been developed to solve the Two-Echelon Vehicle Routing Problem (2E-VRP), primarily including exact algorithms, heuristic algorithms, and evolutionary algorithms. Exact algorithms are mathematical optimization algorithms, typically based on branch and bound or other optimization techniques, which can find the optimal solution in a reasonable time. Heuristic algorithms are usually based on empirical or intuitive strategies and can find an approximate optimal solution in a shorter time. Evolutionary algorithms are a class of optimization algorithms that simulate the biological evolution process, searching for the optimal solution in a population of candidate solutions through mechanisms such as natural selection, heredity, and mutation.

[0003] However, precise algorithms in related technologies have high computational complexity, requiring significant time and computational resources, and are only suitable for delivery tasks with few routes and small scale. Heuristic algorithms have lower computational complexity than precise algorithms, but are susceptible to local optima and cannot readily obtain the global optimum. Evolutionary algorithms can maintain population diversity through continuous iterative optimization, thus escaping local optima, but for some high-dimensional complex problems, they still require substantial computational resources. Furthermore, under uncertain conditions, sampling and evaluation of multiple scenarios further exacerbates the consumption of computational resources. In summary, the above technologies cannot obtain optimal planning paths suitable for two-level vehicle delivery tasks in various scenarios.

[0004] In summary, obtaining the optimal planning path for multi-level delivery tasks in various scenarios has become a pressing technical problem that needs to be solved. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a path planning method, apparatus, electronic device and storage medium for a multi-level delivery network, so as to alleviate the technical problem that traditional technologies cannot obtain the optimal planned path for multi-level delivery tasks in various scenarios.

[0006] In a first aspect, the present invention provides a path planning method for a multi-level delivery network. The method includes: establishing a multi-level path planning problem model with the objective function of minimizing the total travel cost under multiple scenarios; solving the multi-level path planning problem model to obtain an optimized path scheme; reallocating the resource allocation scheme in the optimized path scheme, and using a caching mechanism to accelerate the scheme evaluation process, iteratively optimizing until the convergence condition is met, and then outputting the final optimized path scheme.

[0007] Furthermore, the multi-level delivery network includes a two-level vehicle delivery network, comprising a central hub, multiple satellite warehouses, and multiple customer nodes. The multi-level path planning problem model includes a two-level vehicle path planning problem model. The objective function includes the first-level path cost, the second-level path cost, and the average additional cost evaluated across multiple scenarios. The two-level vehicle path planning problem model also includes multiple constraints, including resource capacity constraints, traffic balance constraints, task allocation constraints, path structure constraints, and decision variable constraints.

[0008] Further, solving the multi-level path planning problem model includes: obtaining the geographical location information and demand of all customer nodes, and sorting all customer nodes in descending order according to the demand to generate a customer sequence; for each customer node in the customer sequence, calculating its distance to all satellite warehouses, and sequentially assigning the current customer node to the nearest satellite warehouse whose remaining capacity meets the current customer node's demand according to the order of the customer sequence; if the remaining capacity of the nearest satellite warehouse does not meet the current customer node's demand, then assigning the current customer node to the next nearest satellite warehouse, and so on, until a satellite warehouse that meets the current customer node's demand is found. After completing the assignment of all customer nodes in the customer sequence, an initial customer allocation scheme is obtained; starting from the initial customer allocation scheme, a genetic algorithm framework is used to solve the two-level vehicle path planning problem model to obtain the optimized path scheme.

[0009] Furthermore, starting with the initial customer allocation scheme, a genetic algorithm framework is used to solve the two-level vehicle routing problem model, including: randomly generating multiple vehicle routing schemes that satisfy the constraints based on the initial customer allocation scheme to form an initial population, wherein the vehicle routing schemes include: a first-level routing scheme and a second-level routing scheme; obtaining the parent population, randomly generating multiple scenarios within the uncertainty interval of customer demand, and calculating the average travel cost of each individual in the parent population under the multiple scenarios according to the objective function, wherein the first parent population is the initial population; based on the average travel cost, using a tournament selection method to select from the parent population... Individuals are selected to enter the mating pool; individuals in the mating pool are crossbred using a simulated binary crossbration operator, and the resulting individuals are mutated using a 2-opt mutation operator to generate offspring populations; the average travel cost of each individual in the offspring population is calculated according to the objective function; the parent population and the offspring population are merged, and the individuals are sorted according to the average travel cost, and the optimal individuals are selected to form a new generation of parent populations, which is then used as the parent population; the process of obtaining the parent population is repeated until the stopping condition is met, and the optimal individual in the final new generation of parent populations is output as the optimized path scheme.

[0010] Furthermore, the resource allocation scheme in the optimized path scheme is reallocated, and a caching mechanism is used to accelerate the scheme evaluation process. This includes: constructing a probability matrix for customer reallocation based on the distance difference between customer nodes and satellite warehouses in the optimized path scheme; adjusting the allocation relationship between customer nodes and satellite warehouses according to the probability matrix to generate a new customer allocation scheme; caching and querying the calculated total travel cost of the second-level path using a hash data structure based on the new customer allocation scheme to accelerate the optimization solution process; returning to the step of adjusting the allocation relationship between customer nodes and satellite warehouses according to the probability matrix until a preset stopping condition is met, and outputting the final optimized path scheme.

[0011] Furthermore, based on the distance difference between the customer node and each satellite warehouse in the optimized path scheme, a probability matrix for customer reassignment is constructed, including: calculating the difference between the distance of each customer node to other satellite warehouses and the distance to the nearest satellite warehouse, forming an original distance difference matrix; sorting and transforming the original distance difference matrix; and calculating the probability that each customer node is reassigned to each satellite warehouse based on the transformed distance difference matrix, forming the probability matrix.

[0012] Furthermore, based on the new customer allocation scheme, a hash data structure is used to cache and query the calculated total travel cost of the second-level path to accelerate the optimization process. This includes: using a sequence generated by sorting the set of customer nodes corresponding to the new customer allocation scheme according to a preset rule as a hash key; querying a hash table based on the hash key; if the hash key exists in the hash table, reading and caching the total travel cost of the second-level path corresponding to that hash key; if the hash key does not exist in the hash table, using a genetic algorithm framework to optimize the new customer allocation scheme to obtain the latest second-level path scheme, and writing the calculated total travel cost of the latest second-level path scheme as a hash value into the hash table; the stopping condition is that the degree to which the best individual obtained in the current iteration is better than the best individual in the past does not exceed a preset threshold.

[0013] Secondly, the present invention also provides a path planning device for a multi-level delivery network. The device includes: a modeling unit for establishing a multi-level path planning problem model with the objective function of minimizing the total travel cost under multiple scenarios; a solving unit for solving the multi-level path planning problem model to obtain an optimized path scheme; and a reallocation unit for reallocating resource allocation schemes in the optimized path scheme, accelerating the scheme evaluation process using a caching mechanism, iteratively optimizing until the convergence condition is met, and then outputting the final optimized path scheme.

[0014] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method described in the first aspect.

[0015] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method described in the first aspect.

[0016] This invention provides a path planning method for a multi-level delivery network. The method includes: establishing a multi-level path planning problem model with the objective function of minimizing the total travel cost under multiple scenarios; solving the multi-level path planning problem model to obtain optimized path solutions; reallocating resource allocation schemes within the optimized path solutions and utilizing a caching mechanism to accelerate the solution evaluation process; iteratively optimizing until convergence conditions are met, and then outputting the final optimized path solution. As described above, the path planning method for a multi-level delivery network of this invention, by minimizing the total travel cost under multiple scenarios as the objective and integrating a resource reallocation mechanism and caching acceleration technology, effectively overcomes the shortcomings of traditional methods that cannot simultaneously consider the adaptability, optimality, and computational efficiency of the solution. Specifically, this method significantly improves the robustness of the final optimized path solution to demand fluctuations, enabling it to adapt to various real-world scenarios; simultaneously, through phased optimization and intelligent caching, it greatly improves the efficiency of the solution process, reduces computational resource consumption, and effectively improves the quality of the final solution, making it closer to the global optimum. Ultimately, this technology achieves the ability to quickly and automatically generate high-quality, executable final optimized path solutions in complex and uncertain environments, alleviating the technical problem that traditional technologies cannot obtain optimal planning paths that adapt to multi-level delivery tasks in various scenarios. Attached Figure Description

[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 is a flowchart of a path planning method for a multi-level distribution network provided in an embodiment of the present invention; Figure 2 is a diagram of the encoding scheme of the solution provided in an embodiment of the present invention; Figure 3 is a diagram of the correlation matrix transformation provided in an embodiment of the present invention; Figure 4 is a diagram of the hash data structure mapping provided in an embodiment of the present invention; Figure 5 is a schematic diagram of a path planning device for a multi-level distribution network provided in an embodiment of the present invention; Figure 6 is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Traditional technologies cannot obtain the optimal planning path for multi-level delivery tasks in various scenarios.

[0021] Based on this, the multi-level delivery network path planning method of this invention takes minimizing the total travel cost under multiple scenarios as its objective, and integrates resource reallocation mechanisms and caching acceleration technology to effectively overcome the shortcomings of traditional methods that cannot simultaneously consider the adaptability, optimality, and computational efficiency of the solution. Specifically, this method significantly improves the robustness of the final optimized path solution to demand fluctuations, enabling it to adapt to various real-world scenarios; simultaneously, through phased optimization and intelligent caching, it greatly improves the efficiency of the solution process, reduces computational resource consumption, and effectively improves the quality of the final solution, making it closer to the global optimum. Ultimately, it achieves the technical effect of quickly and automatically generating high-quality, executable final optimized path solutions in complex and uncertain environments.

[0022] To facilitate understanding of this embodiment, a path planning method for a multi-level distribution network disclosed in this embodiment of the invention will first be described in detail.

[0023] Example 1: According to an embodiment of the present invention, an embodiment of a path planning method for a multi-level distribution network is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0024] Figure 1 is a flowchart of a path planning method for a multi-level delivery network according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps: Step S102, establishing a multi-level path planning problem model with the objective function of minimizing the total travel cost under multiple scenarios; In this embodiment of the present invention, the multi-level delivery network includes a two-level vehicle delivery network, which includes a center, multiple satellite warehouses, and multiple customer nodes. The multi-level path planning problem model includes a two-level vehicle path planning problem model; The two-level vehicle path planning problem model also includes multiple constraints, including resource capacity constraints, traffic balance constraints, task allocation constraints, path structure constraints, and decision variable constraints. Of course, the multi-level delivery network can also be a three-level delivery network or a four-level delivery network, and its specific implementation process can also be executed according to the method of the present invention, first solving the global solution, and then optimizing the local solution.

[0025] This route planning method can be applied to a distribution network consisting of a central hub, multiple satellite warehouses, and multiple customer nodes; that is, it can be applied to a network consisting of a central hub, ns satellite warehouses, nc customer nodes (i.e., distribution customer nodes), and K... 1 K 2 In vehicle delivery tasks consisting of undifferentiated first-level and second-level vehicles with capacity limitations.

[0026] In implementation, the total travel cost reflecting the vehicle driving route plan under multiple scenario requirements is used as the objective function, and resource capacity constraints, traffic balance constraints, task allocation constraints, path structure constraints, and decision variable constraints are used as constraints to construct a two-level vehicle route planning problem model (i.e., a two-level vehicle delivery task model) that can generate multiple route planning schemes.

[0027] Specifically, the above constraints can be: each customer node is assigned to only one satellite warehouse; each satellite warehouse is assigned to one center; each customer node and satellite warehouse can only receive one delivery service; each vehicle cannot travel from one satellite warehouse to another; customer nodes assigned to different satellite warehouses cannot receive delivery services from the same vehicle; the initial and final locations of each vehicle's delivery route must be in the same satellite warehouse; and sub-routes must be eliminated.

[0028] Step S104: Solve the multi-level path planning problem model to obtain the optimized path scheme; specifically, as in the two-level vehicle path planning problem model above, customer nodes are greedily grouped based on distance and demand. In implementation, the customer node with the largest demand is assigned to the nearest satellite warehouse first to obtain the initial customer allocation scheme. The initial customer allocation scheme is the scheme of assigning customer nodes to satellite warehouses, that is, the affiliation relationship between customer nodes and satellite warehouses.

[0029] After obtaining the initial customer allocation scheme, the 2E-VRP (two-level vehicle routing problem) is decomposed into a first-level single CVRP (constrained vehicle routing problem) and a second-level multiple CVRP (constrained vehicle routing problem) for solving. At the same time, when solving the second-level route (i.e. the vehicle route between satellite warehouses and customer nodes), the mapping relationship between the second-level route sub-objective (i.e. the total travel cost calculated after the customer group is determined (i.e., it is known which customers are served by which satellite warehouses) and the customer allocation scheme is constructed.

[0030] Step S106: The resource allocation scheme in the optimized path scheme is reallocated, and the caching mechanism is used to accelerate the scheme evaluation process. The optimization is iteratively performed until the convergence condition is met, and then the final optimized path scheme is output.

[0031] Specifically, as in the two-level vehicle routing problem model mentioned above, the customer allocation scheme (i.e., resource allocation scheme) is optimized through a customer redistribution mechanism, and the solution is obtained based on a hash data structure. The optimal solution is continuously updated and optimized before the stopping condition is reached, and finally the final optimized route scheme is obtained.

[0032] This invention provides a path planning method for a multi-level delivery network. The method includes: establishing a multi-level path planning problem model with the objective function of minimizing the total travel cost under multiple scenarios; solving the multi-level path planning problem model to obtain optimized path solutions; reallocating resource allocation schemes within the optimized path solutions and utilizing a caching mechanism to accelerate the solution evaluation process; iteratively optimizing until convergence conditions are met, and then outputting the final optimized path solution. As described above, the path planning method for a multi-level delivery network of this invention, by minimizing the total travel cost under multiple scenarios as the objective and integrating a resource reallocation mechanism and caching acceleration technology, effectively overcomes the shortcomings of traditional methods that cannot simultaneously consider the adaptability, optimality, and computational efficiency of the solution. Specifically, this method significantly improves the robustness of the final optimized path solution to demand fluctuations, enabling it to adapt to various real-world scenarios; simultaneously, through phased optimization and intelligent caching, it greatly improves the efficiency of the solution process, reduces computational resource consumption, and effectively improves the quality of the final solution, making it closer to the global optimum. Ultimately, this technology achieves the ability to quickly and automatically generate high-quality, executable final optimized path solutions in complex and uncertain environments, alleviating the technical problem that traditional technologies cannot obtain optimal planning paths that adapt to multi-level delivery tasks in various scenarios.

[0033] The above provides a brief overview of the path planning method for the multi-level distribution network of the present invention. The specific details involved are described in detail below.

[0034] In an optional embodiment of the present invention, the objective function includes: first-level path cost, second-level path cost, and average additional cost obtained by evaluating using the Monte Carlo method in multiple scenarios; resource capacity constraints include: vehicle quantity constraints and load capacity constraints; traffic balancing constraints are used to ensure the continuity of traffic in the network; task allocation constraints include: customer unique allocation constraints, service uniqueness constraints, and hierarchical coupling constraints; path structure constraints include: path closure constraints and sub-loop elimination constraints; decision variable constraints are used to define the mathematical properties and value range of the variables in the two-level vehicle path planning problem model.

[0035] Specifically, a node set consisting of a central hub, ns satellite warehouses, and nc client nodes is defined:

[0036] in, This represents the central node (i.e., the center). Represents a collection of satellite warehouses. Indicates the first A satellite warehouse, Represents a set of client nodes. Indicates the first For each customer node, the uncertainty range of customer demand is defined as follows: Where demi is the baseline demand of customer node i, and ε is the demand fluctuation coefficient.

[0037] Construct the objective function for the two-level vehicle delivery task:

[0038] The above formula represents the total travel cost of the solution (i.e., the planned path), which consists of the first-level path cost, the second-level path cost, and the average additional cost obtained by evaluating them using the Monte Carlo method in multiple scenarios. For the first level... If the center and satellite warehouse If there is a route, then ;otherwise , Indicates from the center To the satellite warehouse The unit basic cost, Represents a set of scenes. Indicating uncertainty in scenarios Below, with decision-making options (i.e., all) The additional costs associated with the set. For the second level If the client node and Assigned to satellite warehouse And if a path exists, then ,otherwise , Indicates from the client node To customer node The unit basic cost, Represents a set of scenes. Indicating uncertainty in scenarios Below, with decision-making options (i.e., all) Additional costs associated with the set of (the set of)

[0039] The constraints for the two-tier vehicle delivery task are as follows: Formula 1: ,in, This indicates direct allocation from the center to the satellite warehouse. The volume of diagnostic tasks Indicates the maximum parallel scheduling capacity of the center (upper limit of the number of available vehicles); Formula 2: ,in, Represents a node To the node Diagnostic task flow; Formula 3: ,in, This represents the system's total global service capacity limit; Formula 4: ,in, Indicates a specific service node (satellite warehouse). Individual service capacity; Formula 5: Formula 2 restricts the balance of vehicles entering and leaving the satellite warehouse. The capacity limit of the satellite warehouse is satisfied by Formula 4. Formula 5 mandates that each secondary route (the path between the satellite warehouse and the customer node) begins and ends at a satellite warehouse, while indicating that the outbound and inbound routes associated with each satellite warehouse are equal. According to Formulas 1 and 3, the number of routes at each level must not exceed the number of vehicles at that level.

[0040] Formula 6: ,in, This indicates that in the first-level scheduling network, from the node Transmit to node Diagnostic task data traffic, Indicates service node The original diagnostic request traffic that is generated by itself and needs to be forwarded upwards. Indicates a single vehicle Request traffic; Formula 7: ,in, This refers to any link in the first-level network (backbone network). → Maximum transmission capacity; Formula 8: ,in, In the second-level service network, it refers to the service node. Traffic from nodes Flow to Node This means that traffic occurs between the service node and the vehicle. Indicates the allocation coefficient. Indicates vehicle The generated diagnostic request traffic, Indicates vehicle The generated diagnostic request traffic In the process, it is assigned to a dedicated service node. The part being processed, Indicates service node In the second-level network, the traffic generated in the first-level network needs to be consumed. ;Formula 9: ,in, This indicates the maximum transmission capacity of a single link in the second-level network (access network). Represents a 0 / 1 decision variable, indicating the state of the service node. In a private network, is it enabled from arrive Transmission path; Formula 10: ;Formula 11: Equations 6 and 8 indicate that the flow balance at each node equals the demand of that node. The capacity constraints for the first level (between the center and satellite warehouses) and the second level are expressed as Equations 7 and 9, respectively. Equations 10 and 11 do not allow residual flow on the routes.

[0041] Formula 12: ,in, Let the vehicle be a 0 / 1 binary decision variable. Was this diagnostic task assigned to a service node? To handle; Formula 13: ,in, Let the vehicle be a 0 / 1 binary decision variable. Was this diagnostic task assigned to a service node? To handle; Formula 14: ;Formula 15: ;Formula 16: ;Formula 17: Formula 12 shows that the client node The satellite warehouse is only used when receiving goods from the same satellite warehouse. Provide services. Formula 14 assigns each customer to only one satellite warehouse, when the customer node... Assigned to satellite warehouse hour, =1, while Equation 13 indicates that only one secondary route passes through each customer. Equation 15 allows secondary routes to start from satellite warehouse k only if a primary route serves it. Finally, Equations 16-17 specify the range of the variables.

[0042] Resource capacity constraints include Formulas 2, 4, 5, 8, and 10, which include vehicle quantity constraints (the number of vehicles used cannot exceed the total number of vehicles in the fleet) and load capacity constraints (each vehicle cannot be overloaded). This is crucial to ensuring the practical usability of the solution. Flow balance constraints include Formulas 3, 7, and 9, which ensure that the amount of goods flowing into a node minus the amount of goods flowing out equals the demand of that node (receiving goods for customers and shipping goods for warehouses). It ensures that goods shipped from the center are accurately delivered to each customer, without any leftovers or unnecessary additions. Task allocation constraints include: Formulas 13, 14, 15, and 16, including customer uniqueness allocation constraints (each customer can only be served by one satellite warehouse), service uniqueness constraints (each customer / satellite warehouse is only accessed once), and hierarchical coupling constraints (only satellite warehouses served by primary paths can initiate secondary path services to customers). Path structure constraints include: Formulas 6, 11, and 12, including path closure constraints (vehicles departing from a warehouse must return to the same warehouse) and sub-loop elimination constraints (preventing the generation of multiple discontinuous small loops and ensuring a complete large path). Decision variable constraints include: Formulas 17 and 18, which explicitly specify whether the variables are continuous (e.g., cargo quantity Q) or discrete 0-1 variables (e.g., path selection variables x, y), and their value ranges.

[0043] In an optional embodiment of the present invention, solving the multi-level path planning problem model specifically includes the following steps: (1) obtaining the geographical location information and demand of all customer nodes, and sorting all customer nodes in descending order according to the demand to generate a customer sequence; (2) calculating the distance from each customer node in the customer sequence to all satellite warehouses; (3) assigning the current customer node to the nearest satellite warehouse with remaining capacity that meets the current customer node's demand in the order of the customer sequence; (4) if the remaining capacity of the satellite warehouse closest to the current customer node does not meet the current customer node's demand, then assigning the current customer node to the satellite warehouse with remaining capacity that meets the current customer node's demand. Allocation to the next nearest satellite warehouse, and so on, until a satellite warehouse that meets the current customer node’s demand is found. After allocating all customer nodes in the customer sequence, an initial customer allocation scheme is obtained. The initial customer allocation scheme is a scheme in binary encoding form, where the horizontal axis represents the customer node and the vertical axis represents the satellite warehouse. A matrix element of 1 indicates that the customer node is allocated to the corresponding satellite warehouse, and a matrix element of 0 indicates that the customer node is not allocated to the corresponding satellite warehouse. (5) Starting from the initial customer allocation scheme, the genetic algorithm framework is used to solve the two-level vehicle path planning problem model to obtain the optimized path scheme.

[0044] Specifically, customer allocation schemes and vehicle routing schemes are coded separately. Figure 2 shows the corresponding customer allocation scheme and its first-level and second-level routing scheme coding methods for 1 center, 3 satellite warehouses, and 15 customer nodes. In the customer allocation scheme, the horizontal axis represents the customer node sequence, and the vertical axis represents the satellite warehouse. 1 indicates that a customer node is assigned to the corresponding satellite warehouse, otherwise it is 0. (Looking at the first row (satellite warehouse 1): columns 1, 2, 4, 5, 10, 13, and 15 are 1. This means that customer nodes 1, 2, 4, 5, 10, 13, and 15 are assigned to satellite warehouse 1. Looking at the second row (satellite warehouse 2): columns 6, 9, and 11 are 1. This means that customer node 6...) 9 and 11 were assigned to satellite warehouse 2); meanwhile, vehicle path planning is based on customer allocation scheme, that is, path optimization is performed after the customer determines the group, and the individual in the population is represented by the serialized vehicle access path, where the access sequence of each vehicle starts and ends at 0, to ensure that the vehicle starts from the satellite warehouse and eventually returns to the warehouse. The access sequences of multiple vehicles constitute the complete solution under the current satellite (as shown in the first level path in Figure 2, the vehicle starts from the center (0) → satellite warehouse 1 → satellite warehouse 3 → center (0) → satellite warehouse 2 → center (0), indicating that the vehicle starts from the center, visits satellite warehouse 1 and 3 in sequence, and then returns to the center; then it starts again, visits satellite warehouse 2, and finally returns to the center).

[0045] Calculate the Euclidean distance between the customer node and each satellite warehouse, sort the customer node numbers from largest to smallest according to the initial fixed demand, assign each customer node to the nearest satellite warehouse in sequence and check the constraints. If the constraints are not met, assign it to the second nearest satellite warehouse, thus obtaining the initial customer allocation scheme.

[0046] In an optional embodiment of the present invention, starting with the initial customer allocation scheme, a genetic algorithm framework is used to solve the two-level vehicle routing problem model, specifically including the following steps: (1) Based on the initial customer allocation scheme, multiple vehicle routing schemes that satisfy the constraints are randomly generated to form an initial population, wherein the vehicle routing scheme is a scheme in binary encoding form, and the vehicle routing scheme includes: a first-level routing scheme and a second-level routing scheme, where 0 in the first-level routing scheme represents the center and 0 in the second-level routing scheme represents the satellite warehouse; (2) Obtain the parent population, randomly generate multiple scenarios within the uncertainty interval of customer demand, and calculate the average travel cost of each individual in the parent population in multiple scenarios according to the objective function, wherein the first parent population is the initial population, and the uncertainty interval of customer demand is defined as [demi-ε*demi] ,demi+ε*demi], where demi is the baseline demand of customer node i and ε is the demand fluctuation coefficient; (3) Based on the average travel cost, the tournament selection method is used to select individuals from the parent population to enter the mating pool; (4) The individuals in the mating pool are cross-operated using the simulated binary cross-operator, and the individuals generated after cross-operation are mutated using the 2-opt mutation operator to generate the offspring population; (5) The average travel cost of each individual in the offspring population is calculated according to the objective function; (6) The parent population and the offspring population are merged, and the individuals are sorted according to the average travel cost. The optimal multiple individuals are selected to form a new generation of parent population, and the new generation of parent population is used as the parent population; (7) The step of obtaining the parent population is returned until the stopping condition is met, and the optimal individual in the final new generation of parent population is output as the optimized path scheme of the two-level vehicle path planning problem model.

[0047] Specifically, this process is a global optimization process. Given a fixed initial customer allocation scheme, the genetic algorithm primarily optimizes the vehicle travel paths (i.e., first determining "which customer is served by which satellite warehouse," and then optimizing "the order in which vehicles serve these customers"—specifically, a two-level path). Output: A "globally optimized solution" with the optimal path within the initial allocation framework. This solution includes the optimized path and the initial customer allocation scheme.

[0048] S231, based on the initial customer allocation scheme (which determines which customer node is served by which satellite warehouse), randomly generate PopNum vehicle path schemes that satisfy the constraints (as shown in Figure 2, the first-level and second-level paths, which determine the order in which vehicles serving the center access their assigned satellite warehouses (i.e., how vehicles depart from the center, visit each satellite warehouse, and finally return to the center), and the order in which vehicles serving each satellite warehouse access their assigned customer nodes (i.e., how vehicles from each satellite warehouse depart, visit the customer nodes assigned to them, and return to that satellite warehouse) as individuals in the initial population (referring to a complete and specific solution. Here, an "individual" = a complete "delivery plan," and the population consists of a set of multiple such "individuals." A complete solution contains at least two major pieces of coded information: the customer allocation scheme and the vehicle path scheme, i.e., all of them shown in Figure 2 constitute a complete solution).

[0049] S232, randomly generate scene set SC within the interval [demi -ε*demi ,demi +ε*demi ].

[0050] S233, calculate the solution F1 of the initial population based on the objective function (the average travel cost of each individual in the initial population in multiple scenarios, and the average of the sum of the total travel costs of each individual in each scenario).

[0051] S234, based on average travel cost, uses a tournament selection method to select a mating pool.

[0052] S235 uses simulated binary crossover and 2-0pt mutation operators to generate offspring populations from the parent generation and mating pool, and calculates the offspring target value (i.e., the average travel cost of each individual in the offspring population) according to the objective function.

[0053] S236, merge parent and offspring generations and sort them according to the target value (average travel cost), and select the top PopNum individuals as the next generation parent population.

[0054] S237, Repeat steps S233-S236 until the stopping condition is met and the loop is exited, and save the best solution of the final population.

[0055] In an optional embodiment of the present invention, the resource allocation scheme in the optimized path scheme is reallocated, and the caching mechanism is used to accelerate the scheme evaluation process. Specifically, the following steps are included: (1) Based on the distance difference between the customer node and each satellite warehouse in the optimized path scheme, a probability matrix for customer reallocation is constructed. Specifically, the following steps are included: 11) Calculate the difference between the distance of each customer node to other satellite warehouses and the distance to the nearest satellite warehouse to form the original distance difference matrix; 12) Sort and transform the original distance difference matrix; 13) Based on the transformed distance difference matrix, calculate the probability that each customer node is reallocated to each satellite warehouse to form a probability matrix.

[0056] During the sorting process, as shown in Figure 3, firstly, each column of ΔD (corresponding to a candidate satellite warehouse) is arranged in ascending order of distance difference (arrow direction in Figure 3). Then, the entire matrix is ​​arranged in ascending order of the value of the first column (optimal candidate satellite). After sorting, the value in the top left corner is the smallest, meaning that the adjustment scheme with the smallest "additional distance increase caused by reassigning a client node to a satellite warehouse" is placed at the front. Simultaneously with sorting the ΔD matrix, the client number list and satellite index list are also rearranged according to the same rules. As shown at the bottom of Figure 3, the rows of the Satellite index matrix also change order with the sorting of ΔD. This ensures that the correspondence between clients, distance differences, and satellites remains consistent.

[0057] Based on the sorted ΔD matrix, using Calculate the probability matrix P. The core logic is: the smaller the distance difference ΔD, the higher the probability of the adjustment being selected. This is like a "smart guide," telling the algorithm which customer reallocation schemes seem more "cost-effective" to try first.

[0058] (2) Based on the probability matrix, the allocation relationship between customer nodes and satellite warehouses is adjusted to generate a new customer allocation scheme. Specifically, based on the probability matrix P, the system selectively selects a portion of customer nodes and reassigns them from the current satellite warehouse to other satellites indicated in the satellite index. This results in a new customer allocation scheme.

[0059] (3) Based on the new customer allocation scheme, a hash data structure is used to cache and query the total travel cost of the calculated second-level path to accelerate the optimization process; specifically, the following steps are included: 31) The sequence generated by sorting the set of customer nodes corresponding to the new customer allocation scheme according to a preset rule is used as the hash key; 32) The hash table is queried according to the hash key; 33) If the hash key exists in the hash table, the total travel cost of the second-level path corresponding to the hash key is read and cached in the hash table; 34) If the hash key does not exist in the hash table, the new customer allocation scheme is optimized using a genetic algorithm framework to obtain the latest second-level path scheme, and the total travel cost of the latest second-level path scheme is written as the hash value into the hash table; Specifically, evaluating a new scheme (mainly calculating the cost of its second-level path) is very time-consuming. The role of the hash table is to remember the results calculated before and avoid repeated calculations.

[0060] As shown on the left side of Figure 4, a group of customers corresponding to the new customer allocation scheme (such as {5,2,14,6,18,9}) will be sorted in ascending order (resulting in {2,5,6,9,14,18}). This unique sorted sequence is the "fingerprint" (key, i.e., hash key) of the scheme.

[0061] The system queries the "memory", as shown on the right side of Figure 4. It uses this key to query the hash table.

[0062] If found, it means the path cost for this customer combination has already been calculated and cached (e.g., Solution is 36.8). The system reads this value directly, skipping the time-consuming calculation.

[0063] If no matching key is found, as indicated by the arrow "No matching key" in the diagram, it means this is a completely new customer group. In this case, the system needs to execute the complete steps of invoking the genetic algorithm to plan the optimal path for this new customer group and calculate the total cost (Solution). Then, this new (Key, Solution) key-value pair is inserted into the hash table for subsequent queries.

[0064] (4) Return to the execution basis probability matrix and adjust the allocation relationship between customer nodes and satellite warehouses until the preset stopping conditions are met, and output the final optimized path scheme of the two-level vehicle path planning problem model.

[0065] Specifically, the stopping condition is that the degree to which the best individual obtained in the current iteration is better than the best individual in the past does not exceed a preset threshold.

[0066] The above process is a local optimization process. Local optimization algorithms recognize that although the path has been optimized well, the initial customer allocation scheme may not be optimal. Therefore, it proactively and strategically (based on the distance difference probability matrix) adjusts the customer allocation relationships in the "global optimal solution" (e.g., reassigning customer A from satellite warehouse 1 to the closer satellite warehouse 2). The goal is to break out of the current solution space by changing the affiliation between customer nodes and satellite warehouses, exploring higher-quality "neighborhood solutions," thereby further improving the overall quality of the solution.

[0067] The customer reallocation operation is a fine-tuning of the customer allocation scheme based on the already obtained global optimal solution, in order to find a better solution. It is a further refinement and improvement of the optimal solution in the previous stage.

[0068] The above process will be described in detail below: S31, as shown in Figure 3, construct the distance difference matrix. This represents the difference between all customers' distances from other satellites and the nearest satellite. Each column is first sorted in non-decreasing order, and then sorted in non-decreasing order according to the first column.

[0069] S32, simultaneously sort the client sequence and the satellite index matrix according to Arrange them.

[0070] S33, based on the transformed distance difference matrix Constructing the probability matrix P is calculated by the following formula.

[0071]

[0072] S34. Based on the customer sequence and probability matrix P, customers are redistributed to obtain a new customer allocation scheme.

[0073] S35, based on the new customer allocation scheme, uses a hash data structure for searching, as shown in Figure 4. The hash data structure is used to calculate the target value of the secondary sub-route.

[0074] S351, use the sequence obtained by ascendingly sorting the input client node sequence as the key of the hash table, and use the target value obtained by secondary route optimization as the value of the hash table.

[0075] S352, after changing the customer allocation scheme, first search the hash table. If it exists, map it first; otherwise, proceed to step S23 (i.e., S231 to S237) and add the new mapping relationship to the hash table.

[0076] S36, Repeat steps S34-S35 until the current optimal solution is greater than the historical optimal solution. The loop is broken by multiplying the total travel cost of the second-level path by two steps (achieved by comparing the total travel cost of the two second-level paths), and the final population is output.

[0077] This invention uses the travel cost of vehicle routing schemes under multiple scenario requirements as the objective function, combined with several practical constraints, to effectively improve the flexibility and adaptability of route planning, enabling the acquisition of optimal route planning schemes in different scenarios. Through a greedy grouping strategy based on distance and demand, customer nodes with high demand are prioritized for allocation to the nearest satellite warehouse, significantly reducing the complexity of initial allocation and improving overall delivery efficiency. Simultaneously, the combination of a customer reallocation mechanism and a hash data structure gives the route planning process excellent iterative optimization capabilities, further improving solution efficiency and route planning quality. Furthermore, by decomposing the two-level vehicle routing problem into a first-level single-center vehicle routing problem (CVRP) and a second-level multiple CVRP for separate solving, the complexity of problem solving is effectively reduced. In the second-level routing solution process, a mapping relationship between sub-objectives and customer allocation schemes is constructed, enhancing the model's adaptability to changes in multiple scenarios, ultimately obtaining an optimal planned route adaptable to various scenarios.

[0078] Example 2: This embodiment of the invention also provides a path planning device for a multi-level delivery network. This path planning device for a multi-level delivery network is mainly used to execute the path planning method for a multi-level delivery network provided in Example 1 of the invention. The path planning device for a multi-level delivery network provided in this embodiment of the invention will be described in detail below.

[0079] Figure 5 is a schematic diagram of a path planning device for a multi-level delivery network according to an embodiment of the present invention. As shown in Figure 5, the device includes: a modeling unit 10, a solution unit 20, and a reallocation unit 30, wherein: the modeling unit is used to establish a multi-level path planning problem model with the objective function of minimizing the total travel cost under multiple scenarios; the solution unit is used to solve the multi-level path planning problem model to obtain an optimized path scheme; the reallocation unit is used to reallocate the resource allocation scheme in the optimized path scheme, and use a caching mechanism to accelerate the scheme evaluation process, iteratively optimize until the convergence condition is met, and then output the final optimized path scheme.

[0080] This invention provides a path planning device for a multi-level delivery network. The device includes: establishing a multi-level path planning problem model with the objective function of minimizing total travel cost across multiple scenarios; solving the multi-level path planning problem model to obtain optimized path schemes; reallocating resource allocation schemes within the optimized path schemes and utilizing a caching mechanism to accelerate the scheme evaluation process; iteratively optimizing until convergence conditions are met, and then outputting the final optimized path scheme. As described above, the path planning device for a multi-level delivery network of this invention, by minimizing total travel cost across multiple scenarios as the objective and integrating a resource reallocation mechanism and caching acceleration technology, effectively overcomes the shortcomings of traditional methods that cannot simultaneously consider the adaptability, optimality, and computational efficiency of the solution. Specifically, this method significantly improves the robustness of the final optimized path scheme to demand fluctuations, enabling it to adapt to various real-world scenarios; simultaneously, through phased optimization and intelligent caching, it greatly improves the efficiency of the solution process, reduces computational resource consumption, and effectively improves the quality of the final solution, making it closer to the global optimum. Ultimately, this technology achieves the ability to quickly and automatically generate high-quality, executable final optimized path solutions in complex and uncertain environments, alleviating the technical problem that traditional technologies cannot obtain optimal planning paths that adapt to multi-level delivery tasks in various scenarios.

[0081] Optionally, the multi-level delivery network includes a two-level vehicle delivery network, which consists of a central hub, multiple satellite warehouses, and multiple customer nodes. The multi-level route planning problem model includes a two-level vehicle route planning problem model. The objective function includes the first-level route cost, the second-level route cost, and the average additional cost evaluated under multiple scenarios. The two-level vehicle route planning problem model also includes multiple constraints, including resource capacity constraints, traffic balance constraints, task allocation constraints, route structure constraints, and decision variable constraints.

[0082] Optionally, the solution unit is also used to: obtain the geographical location information and demand of all customer nodes, and sort all customer nodes in descending order according to the demand to generate a customer sequence; for each customer node in the customer sequence, calculate its distance to all satellite warehouses, and allocate the current customer node to the nearest satellite warehouse with remaining capacity that meets the current customer node's demand in the order of the customer sequence; if the remaining capacity of the nearest satellite warehouse does not meet the current customer node's demand, then allocate the current customer node to the next nearest satellite warehouse, and so on, until a satellite warehouse that meets the current customer node's demand is found. After allocating all customer nodes in the customer sequence, an initial customer allocation scheme is obtained; starting from the initial customer allocation scheme, a genetic algorithm framework is used to solve the two-level vehicle routing problem model to obtain an optimized route scheme.

[0083] Optionally, the solving unit is also used to: randomly generate multiple vehicle path schemes that satisfy the constraints based on the initial customer allocation scheme to form an initial population, wherein the vehicle path schemes include: first-level path schemes and second-level path schemes; obtain the parent population, randomly generate multiple scenarios within the uncertainty interval of customer demand, and calculate the average travel cost of each individual in the parent population under multiple scenarios according to the objective function, wherein the first parent population is the initial population; based on the average travel cost, use a tournament selection method to select individuals from the parent population to enter the mating pool; and process the individuals in the mating pool... A simulated binary crossover operator is used for crossover operations, and the individuals generated after crossover are mutated using the 2-opt mutation operator to produce offspring populations. The average travel cost of each individual in the offspring population is calculated according to the objective function. The parent and offspring populations are merged, and the individuals are sorted according to their average travel costs. The optimal individuals are selected to form a new generation of parent populations, which is then used as the parent population. The process of obtaining the parent population is repeated until the stopping condition is met, and the optimal individual in the final new generation of parent populations is output as the optimized path scheme.

[0084] Optionally, the redistribution unit is also used to: construct a probability matrix for customer redistribution based on the distance difference between customer nodes and satellite warehouses in the optimized path scheme; adjust the allocation relationship between customer nodes and satellite warehouses according to the probability matrix to generate a new customer allocation scheme; cache and query the total travel cost of the calculated second-level path using a hash data structure based on the new customer allocation scheme to accelerate the optimization solution process; return to execute the step of adjusting the allocation relationship between customer nodes and satellite warehouses according to the probability matrix until the preset stopping condition is met, and output the final optimized path scheme.

[0085] Optionally, the redistribution unit is also used to: calculate the difference between the distance of each customer node to other satellite warehouses and the distance to the nearest satellite warehouse, forming an original distance difference matrix; perform sorting transformation on the original distance difference matrix; and calculate the probability that each customer node is redistributed to each satellite warehouse based on the transformed distance difference matrix, forming a probability matrix.

[0086] Optionally, the reallocation unit is further configured to: use the sequence generated by sorting the set of customer nodes corresponding to the new customer allocation scheme according to a preset rule as a hash key; query the hash table according to the hash key; if the hash key exists in the hash table, read and cache the total travel cost of the second-level path corresponding to the hash key in the hash table; if the hash key does not exist in the hash table, use a genetic algorithm framework to optimize the new customer allocation scheme, obtain the latest second-level path scheme, and write the total travel cost of the latest second-level path scheme as a hash value into the hash table; the stopping condition is that the degree to which the best individual obtained in the current iteration is better than the best individual in the past does not exceed a preset threshold.

[0087] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0088] As shown in Figure 6, an electronic device 600 provided in this application embodiment includes: a processor 601, a memory 602, and a bus. The memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 via the bus. The processor 601 executes the machine-readable instructions to perform the steps of the path planning method for the multi-level distribution network described above.

[0089] Specifically, the memory 602 and processor 601 mentioned above can be general-purpose memory and processor, without any specific limitations. When the processor 601 runs the computer program stored in the memory 602, it can execute the path planning method of the multi-level distribution network mentioned above.

[0090] The processor 601 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 601 or by instructions in software form. The processor 601 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 602, and processor 601 reads the information from memory 602 and, in conjunction with its hardware, completes the steps of the above method.

[0091] Corresponding to the path planning method for the multi-level delivery network described above, this application embodiment also provides a computer-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to perform the steps of the path planning method for the multi-level delivery network described above.

[0092] The multi-level delivery network route planning device provided in this application embodiment can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.

[0093] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0094] For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0095] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0096] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0097] If the aforementioned functions are implemented as 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 this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the path planning method for the multi-level delivery network described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0098] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0099] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A path planning method for a multi-level distribution network, characterized in that, The method includes: establishing a multi-level path planning problem model with the objective function of minimizing the total travel cost under multiple scenarios; solving the multi-level path planning problem model to obtain an optimized path scheme; reallocating the resource allocation scheme in the optimized path scheme, using a caching mechanism to accelerate the scheme evaluation process, iteratively optimizing until the convergence condition is met, and then outputting the final optimized path scheme.

2. The method according to claim 1, characterized in that, The multi-level delivery network includes a two-level vehicle delivery network, comprising a central hub, multiple satellite warehouses, and multiple customer nodes. The multi-level route planning problem model includes a two-level vehicle route planning problem model. The objective function includes the first-level route cost, the second-level route cost, and the average additional cost evaluated under multiple scenarios. The two-level vehicle route planning problem model also includes multiple constraints, including resource capacity constraints, traffic balance constraints, task allocation constraints, route structure constraints, and decision variable constraints.

3. The method according to claim 2, characterized in that, Solving the multi-level path planning problem model includes: obtaining the geographical location information and demand of all customer nodes, and sorting all customer nodes in descending order according to the demand to generate a customer sequence; for each customer node in the customer sequence, calculating its distance to all satellite warehouses, and sequentially assigning the current customer node to the nearest satellite warehouse whose remaining capacity meets the current customer node's demand according to the order of the customer sequence; if the remaining capacity of the nearest satellite warehouse does not meet the current customer node's demand, then assigning the current customer node to the next nearest satellite warehouse, and so on, until a satellite warehouse that meets the current customer node's demand is found. After completing the assignment of all customer nodes in the customer sequence, an initial customer allocation scheme is obtained; starting from the initial customer allocation scheme, a genetic algorithm framework is used to solve the two-level vehicle path planning problem model to obtain the optimized path scheme.

4. The method according to claim 3, characterized in that, Starting with the initial customer allocation scheme, a genetic algorithm framework is used to solve the two-level vehicle routing problem model, including: randomly generating multiple vehicle routing schemes that satisfy the constraints based on the initial customer allocation scheme to form an initial population, wherein the vehicle routing schemes include: first-level routing schemes and second-level routing schemes; obtaining the parent population, randomly generating multiple scenarios within the uncertainty interval of customer demand, and calculating the average travel cost of each individual in the parent population under the multiple scenarios according to the objective function, wherein the first parent population is the initial population; and selecting individuals from the parent population based on the average travel cost using a tournament selection method. Individuals enter the mating pool; crossover is performed on the individuals in the mating pool using a simulated binary crossover operator, and the resulting individuals are mutated using a 2-opt mutation operator to generate offspring populations; the average travel cost of each individual in the offspring population is calculated according to the objective function; the parent population and the offspring population are merged, and the individuals are sorted according to the average travel cost, and the optimal individuals are selected to form a new generation of parent populations, which is then used as the parent population; the process of obtaining the parent population is repeated until the stopping condition is met, and the optimal individual in the final new generation of parent populations is output as the optimized path scheme.

5. The method according to claim 1, characterized in that, The resource allocation scheme in the optimized path plan is reallocated, and a caching mechanism is used to accelerate the scheme evaluation process. This includes: constructing a probability matrix for customer reallocation based on the distance difference between customer nodes and satellite warehouses in the optimized path plan; adjusting the allocation relationship between customer nodes and satellite warehouses according to the probability matrix to generate a new customer allocation scheme; caching and querying the total travel cost of the calculated second-level path using a hash data structure based on the new customer allocation scheme to accelerate the optimization solution process; returning to the step of adjusting the allocation relationship between customer nodes and satellite warehouses according to the probability matrix until a preset stopping condition is met, and outputting the final optimized path plan.

6. The method according to claim 5, characterized in that, Based on the distance differences between customer nodes and satellite warehouses in the optimized path scheme, a probability matrix for customer reassignment is constructed, including: calculating the difference between the distance from each customer node to other satellite warehouses and the distance to the nearest satellite warehouse, forming an original distance difference matrix; sorting and transforming the original distance difference matrix; and calculating the probability that each customer node is reassigned to each satellite warehouse based on the transformed distance difference matrix, forming the probability matrix.

7. The method according to claim 5, characterized in that, Based on the new customer allocation scheme, a hash data structure is used to cache and query the calculated total travel cost of the second-level path to accelerate the optimization process. This includes: using a sequence generated by sorting the set of customer nodes corresponding to the new customer allocation scheme according to a preset rule as a hash key; querying a hash table based on the hash key; if the hash key exists in the hash table, reading and caching the total travel cost of the second-level path corresponding to that hash key; if the hash key does not exist in the hash table, optimizing the new customer allocation scheme using a genetic algorithm framework to obtain the latest second-level path scheme, and writing the calculated total travel cost of the latest second-level path scheme as a hash value into the hash table; the stopping condition is that the degree to which the best individual obtained in the current iteration is better than the best individual in the past does not exceed a preset threshold.

8. A path planning device for a multi-level distribution network, characterized in that, The apparatus includes: a modeling unit for establishing a multi-level path planning problem model with the objective function of minimizing the total travel cost under multiple scenarios; a solving unit for solving the multi-level path planning problem model to obtain an optimized path scheme; and a reallocation unit for reallocating resource allocation schemes in the optimized path scheme, accelerating the scheme evaluation process using a caching mechanism, iteratively optimizing until the convergence condition is met, and then outputting the final optimized path scheme.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the method of any one of claims 1 to 7.