A method and device for generating logistics distribution routes

By grid division and splitting and clustering distribution points, the problem of long computing time in large-scale logistics distribution line planning is solved, and the global optimal solution is quickly found, reducing the computing complexity and logistics cost.

CN110490510BActive Publication Date: 2025-08-12BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910610073.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-08
Publication Date
2025-08-12
Estimated Expiration
2039-07-08

AI Technical Summary

Technical Problem

The existing logistics distribution line planning algorithms are difficult to find the global optimal solution within the effective time when large-scale input sets, and the calculation time is long and the scale is large.

Method used

By meshing the distribution points, local search neighborhoods are determined, and split and clustering is performed. The starting cluster is used as the search starting point to iterate the search distribution points, generate distribution lines, and adopt a fixed grid and density adaptive matching strategy to reduce the scale of the problem and support the expansion of fixed areas and model portraits.

Benefits of technology

It effectively reduces the scale of the wiring problem, speeds up the computing speed, avoids calculation explosions, and can find the global optimal solution in a short time, improves transportation efficiency and reduces logistics costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110490510B_ABST
    Figure CN110490510B_ABST
Patent Text Reader

Abstract

This embodiment of the present application discloses a method and apparatus for generating logistics distribution routes. The method comprises: dividing the distribution points into a grid based on their geographic locations in order data, determining a local search neighborhood based on the grid; performing divisive clustering on the distribution points within the local search neighborhood to obtain a starting cluster; iteratively searching for distribution points within the local search neighborhood using the starting cluster as the search starting point, and generating a distribution route including the distribution points based on preset constraints. The technical solution of this embodiment discretizes high-dimensional spatial data through a grid, effectively reducing the scale of the route planning problem and accelerating computational speed.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Technology Neighborhood

[0002] The present application relates to the field of computer technology, and in particular to a method and device for generating a logistics distribution route. Background Art

[0003] In the logistics and distribution sector, how to rationally allocate transport vehicles, plan delivery routes, and effectively reduce transportation costs for large-scale customer orders is a key concern for companies. The logistics and distribution route planning problem can be described as follows: there are several distribution centers and customer nodes. A number of vehicles are required to provide services (delivery / pickup) from the distribution centers to several customer nodes within a certain area. The requirement is to rationally plan vehicle routes to minimize vehicle travel costs while ensuring delivery completion and satisfying vehicle capacity (or loading rate) constraints.

[0004] Existing distribution route planning algorithms are large in scale, take a long time to run, and are difficult to find the global optimal solution for large-scale input sets (such as hundreds or thousands of input points) within an effective time. Summary of the Invention

[0005] In view of this, an embodiment of the present application provides a method and device for generating logistics distribution routes, which discretizes high-dimensional spatial data through a grid, effectively reducing the scale of the problem, speeding up the calculation speed, and meeting the routing requirements of large-scale input sets.

[0006] According to a first aspect of the present application, a method for generating a logistics distribution route is provided, comprising:

[0007] Divide the delivery points into grids based on their geographical locations in the order data, and determine the local search neighborhood based on the grids;

[0008] Performing split clustering on the delivery points within the local search neighborhood to obtain a starting cluster;

[0009] The delivery points in the local search neighborhood are iteratively searched with the starting cluster as the search starting point, and a delivery route including the delivery points is generated according to preset constraints.

[0010] According to a second aspect of the present application, a logistics distribution route generation device is provided, the device comprising:

[0011] A neighborhood determination module is used to divide the delivery points into grids based on their geographic locations in the order data and determine the local search neighborhood based on the grid;

[0012] A clustering module, performing split clustering on the delivery points in the local search neighborhood to obtain a starting cluster;

[0013] The route generation module is used to iteratively search for delivery points within the local search neighborhood with the starting cluster as the search starting point, and generate a delivery route including the delivery points according to preset constraints.

[0014] According to a third aspect of the present application, an electronic device is provided, comprising: a processor, and a memory storing a computer program that can be run on the processor; wherein the processor is configured to perform the steps of the method described in one aspect of the present application when executing the computer program in the memory.

[0015] According to a fourth aspect of the present application, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in one aspect of the present application are implemented.

[0016] Beneficial effects: The logistics distribution route generation scheme of the embodiment of the present application is applied to grid-dividing the distribution points according to their geographical locations in the order data, determining the local search neighborhood based on the grid, performing split clustering on the distribution points in the local search neighborhood to obtain a starting cluster, iteratively searching for distribution points with the starting cluster as the search starting point, and generating distribution routes according to preset constraints, thereby using the grid to divide the input set and reducing the dimensionality of the distribution points, greatly reducing the scale of the routing problem and speeding up the calculation speed. Compared with other heuristic algorithms, it can avoid computational explosion. Moreover, the present application divides the distribution points into grids according to their geographical locations in the order data, that is, it uses a fixed grid, thereby supporting functions such as expanding fixed areas and vehicle model profiling, and meeting the needs of large-scale input set route generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a flow chart of a method for generating a logistics distribution route according to an embodiment of the present application;

[0018] Figure 2 This is a flow chart of determining a merchant density value according to one embodiment of the present application;

[0019] Figure 3 This is a flow chart of a method for generating a logistics distribution route according to an embodiment of the present application;

[0020] Figure 4 This is a block diagram of a logistics distribution route generation device according to an embodiment of the present application;

[0021] Figure 5 This is a schematic structural diagram of an electronic device according to an embodiment of the present application;

[0022] Figure 6 It is a structural diagram of a non-transitory computer-readable storage medium according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below with reference to the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the embodiments of the present application.

[0024] This embodiment proposes a method for generating a logistics distribution route. Figure 1 The logistics distribution route generation method of this embodiment includes the following steps:

[0025] Step S101, dividing the delivery points into grids according to their geographical locations in the order data, and determining a local search neighborhood based on the grids;

[0026] Step S102, performing split clustering on the delivery points in the local search neighborhood to obtain a starting cluster;

[0027] Step S103 , iteratively searching for delivery points within the local search neighborhood with the starting cluster as the search starting point, and generating a delivery route including the delivery points according to preset constraints.

[0028] Depend on Figure 1 As shown, the logistics distribution route generation method of this embodiment divides the distribution points into grids based on their geographic locations, determines a local search neighborhood based on the grid, performs split clustering on the distribution points within the local search neighborhood to obtain a starting cluster, and iteratively searches for distribution points using the starting cluster as the search starting point to generate distribution routes. Thus, using the grid for dimensionality reduction greatly reduces the problem size, speeds up the calculation, avoids computational explosion, and can find the global optimal solution in a relatively short time. Furthermore, in the embodiment of the present application, the distribution points are gridded based on their geographic locations, i.e., a fixed grid is used to segment the order area, thereby supporting functions such as expanding fixed areas and vehicle model profiling.

[0029] To address the problems in logistics route generation algorithms in the prior art, the present application proposes a large-scale neighborhood search algorithm based on grid division. This algorithm discretizes high-dimensional spatial data through grids, overcomes the curse of dimensionality, and effectively reduces the scale of the problem. This large-scale neighborhood search algorithm based on grid division divides the merchant points into grids. Within the local search area determined by density, it uses a split-first, then merge method to allocate vehicles, taking into account factors such as the full load rate of each vehicle, the number of merchants it carries, and the sparseness / density of the vehicle's driving area. Finally, it performs outlier processing to ensure that the line (i.e., logistics distribution route) is generated in a relatively short time, ensuring distribution efficiency and reducing logistics costs.

[0030] In general, the logistics distribution route generation method of this embodiment mainly includes the steps of (1) grid division based on density adaptive matching search neighborhood, and (2) cluster division and point search under given constraints.

[0031] See also Figure 2 , the aforementioned grid division based on density adaptive matching search neighborhood specifically includes:

[0032] The process starts with the step of mesh cutting the order.

[0033] Here, a fixed grid is used for order cutting, and grids are assigned according to points to generate initial clusters based on grids.

[0034] Next, edge detection is performed on the grid.

[0035] Perform edge operator detection on all grids to determine the boundary grids.

[0036] Second, the grid farthest from the centroid is selected as the search starting point.

[0037] In this embodiment, the centroid of the area formed by all orders (one order corresponds to one delivery point) is determined as the center, and the search starting point grid (ie, the starting grid) is determined in order from the outside to the inside.

[0038] Again, expand outward one layer with the starting grid as the center to build a local search neighborhood;

[0039] In this embodiment, the grid is expanded outward layer by layer. Specifically, the first layer obtained by the first outward expansion includes one starting grid at the center and eight adjacent grids. Continuing to expand outward, the second layer includes one starting grid at the center and sixteen adjacent grids, and so on.

[0040] During the outward expansion process, it is determined whether the number of points in the grid has reached the merchant number limit, that is, the exit condition for outward expansion is that the number of points in the current grid has reached a given merchant number threshold.

[0041] Finally, the merchant density value is calculated based on the number of merchant points in the local search neighborhood and the number of expansion layers (for example, 3 layers). The density level is determined based on the density value and the maximum number of merchants in the line generation process is set.

[0042] The number of grids included in the local search neighborhood can be determined by the number of expansion layers. The density of the local search neighborhood is calculated based on the number of grids and the total number of points in the local search neighborhood.

[0043] The process ends.

[0044] See also Figure 3,The partition search of clusters under the given constraint conditions specifically includes the following steps: at the beginning of the process, step S301 is executed to continuously split the clusters in the local search neighborhood into secondary splits until all the obtained clusters satisfy the given constraint conditions;

[0045] S302, adding points to the starting cluster;

[0046] Randomly select a cluster (denoted as A) as the search starting point, select the cluster (denoted as B) closest to the search starting point (i.e., starting cluster A), and continuously add points to the starting cluster until the current cluster (i.e., cluster B) is searched. Then, select the next cluster (denoted as C) closest to the current line (the line with A as the search starting point) and continuously add points to the starting cluster until the number of points in the starting cluster meets the three preset constraints of maximum number of merchants, maximum load rate, and mileage.

[0047] S303, whether the constraint conditions are met;

[0048] Determine whether the points in the starting cluster meet the constraints. During the search process, if the number of points on the current line (i.e., the line corresponding to the starting cluster) meets the maximum number of merchants, maximum load rate, and mileage requirements, execute step S304.

[0049] Step S304: Generate a dispatch route, that is, select a vehicle type and generate a route, which includes all points in the starting cluster. In other words, the route of this embodiment is generated during the local neighborhood search process.

[0050] S305, exceeding constraints;

[0051] In this embodiment, if the number of points in the current line (i.e., the line corresponding to the starting cluster A) exceeds the given constraint, the current point is determined to be part of the starting grid. If so, it is discarded as an outlier; otherwise, it is returned to the original cluster. This is to ensure algorithm convergence and to filter out a grid during a global search.

[0052] Step S306: whether the end of the local search neighborhood has been searched;

[0053] If the search has reached the end of the local search neighborhood, then step S307 is executed; otherwise, step S302 is executed.

[0054] Step S307: output the optimal solution and delete the searched grids;

[0055] Specifically, when the search reaches the end of the current local search neighborhood, it determines whether the point at the end meets the minimum load factor requirement. If so, a line is generated. Otherwise, it determines whether the current point belongs to the current grid. If so, it is discarded as an outlier; otherwise, it is returned to the original cluster. The objective function values within the current local search neighborhood are compared, and the optimal solution (the optimal solution is the one with the smallest sum of the total delivery mileage and the outlier statistics) is retained. The iteration continues back to step 301.

[0056] Step S308 determines whether all grids in the local search neighborhood have been searched. If so, step S309 is executed to redefine the local search neighborhood. If all grids in a local search neighborhood have been searched, the current local search neighborhood is exited and the next local search neighborhood is redetermined for search. Otherwise, the remaining grids in the current local search neighborhood are searched.

[0057] The following describes the implementation steps of the method for generating a logistics distribution route in this embodiment in conjunction with a specific application scenario.

[0058] For input order data (for example, 1,000 orders), this embodiment first performs point aggregation on the order data, and then uses a grid to perform dimensionality reduction analysis. After dimensionality reduction, a local search area is determined, and a line is generated based on each local search neighborhood.

[0059] By defining a local search neighborhood as the route generation and determining the search direction (from outside to inside), we ensure that the optimal solution can be found in a short time. Furthermore, the local search neighborhood can also determine the density of merchants in each area, and based on this density, the maximum number of delivery users on the route is determined to improve transportation efficiency.

[0060] This embodiment first divides the delivery points into grids based on their geographic locations in the order data. Specifically, the process includes: obtaining the grid codes corresponding to the delivery points, and grouping the delivery points with the same grid code into the same grid; the grid code is determined by the geographic location of the delivery point in the order data; in one embodiment, based on the latitude and longitude coordinates of each delivery point, Google S2 is used to implement gridding of the order data, with the goal of controlling spatial uncertainty within a certain range, forming a regular polygon, each of which is a grid unit, thereby achieving data discretization and assigning corresponding Google S2 grid codes. Delivery points with the same grid code in the input data are grouped into the same grid. For example, for 1,000 input data, one grid contains 30 delivery points with the same grid code, another grid contains 50 delivery points with the same grid code, and so on.

[0061] After the delivery points corresponding to the input data are divided into grids on an electronic map, a local search neighborhood is determined based on the grids, specifically including: performing edge detection on the grids to determine boundary grids in the grids, and determining the boundary grid farthest from a first centroid as a starting grid; the first centroid is determined based on the center points of each of the grids; with the starting grid as the center, neighboring grids are searched outward in units of grids; if the total number of delivery points in the starting grid and the neighboring grids reaches a preset point threshold, the search is stopped and a local search neighborhood determined by the starting grid and the neighboring grids is obtained.

[0062] Edge detection can be implemented using existing technology. Edge detection is actually a kind of filtering, and different operators have different extraction effects. The more commonly used ones are the Sobel operator, the Laplacian operator, and the Canny operator. This embodiment does not limit this, as long as the various boundary grids located at the edge of the grid can be detected. The purpose of determining the boundary grid here is to determine the search starting point. The reason why the boundary grid with the farthest distance (Euclidean distance) from the first centroid is determined as the starting grid is that in the embodiment of the present application, the point search and line generation are performed according to the search direction from the outside to the inside. The distance (Euclidean distance) from the first centroid is the farthest, indicating that the boundary grid is the outermost grid of the distribution point to be generated for the line, so that the search can be completed quickly and the delivery point can be avoided from being missed.

[0063] The first centroid is the point corresponding to the average value of the coordinates of the center points of all grids. For example, if the number of grids corresponding to one input is 300, then these 300 grids correspond to 300 center points. The arithmetic mean of these 300 center points can be calculated to obtain the coordinates of a point, which is the first centroid.

[0064] After determining the starting grid, this embodiment searches for neighboring grids outward from the starting grid. If the total number of delivery points in the starting grid and the neighboring grids reaches a preset point threshold, the search stops and a local search neighborhood determined by the starting grid and the neighboring grids is obtained.

[0065] When searching outward for neighboring grids, this embodiment expands outward layer by layer. The first layer is to expand the adjacent 8 grids with the starting grid as the center (the number of points in the grids varies, and empty grids are allowed to exist). The sum of the points in the starting grid and the points in the adjacent 8 grids is calculated. If the sum reaches a preset point count threshold, the search is stopped and the area determined by the starting grid and the adjacent grids is used as the local search neighborhood.

[0066] For example, if the starting grid has 10 points and the eight adjacent grids have 30 points, the total is 10 + 30 = 40, and the preset point threshold is 35. If the total of 40 exceeds the preset threshold, the search stops and the area defined by the starting grid and the adjacent grids becomes the local search neighborhood. If the total of the points in the starting grid and the eight adjacent grids does not reach the preset threshold, the search continues outward layer by layer, expanding to the second layer, i.e., to the 16 adjacent grids centered on the starting grid. The total of the points in the starting grid and the surrounding 16 adjacent grids is calculated and compared with the preset threshold. If the total reaches the preset threshold, the search stops and the area defined by the starting grid and the adjacent grids becomes the local search neighborhood. Otherwise, the search continues outward layer by layer, and so on.

[0067] After determining the local search neighborhood based on the grid, the logistics distribution route generation method of this embodiment also includes: obtaining a density value corresponding to the local search neighborhood based on the total number of grids and the total number of distribution points in the local search neighborhood; determining a density level from the density value, and determining the maximum number of distribution users corresponding to the local search neighborhood based on the density level; the preset constraints include a user number constraint, a mileage constraint, and a full load rate constraint. The user number constraint means that the number of distribution points does not exceed the maximum number of distribution users, the mileage constraint means that the distance between the distribution points does not exceed the preset maximum distribution mileage, and the full load rate constraint means that the order product attributes corresponding to the distribution point match the preset full load rate.

[0068] That is, in this embodiment, the maximum number of delivery users in the preset constraints is not fixed but rather dynamic and closely related to the density value of the local search neighborhood. In this embodiment, a grid cell represents a one-kilometer range, and the density value represents the number of businesses per square kilometer. The density value is calculated based on the total number of grid cells and the total number of delivery points in the local search neighborhood.

[0069] For example, the total number of grids in the local search neighborhood is 17, and the total number of delivery points in these 17 grids is 50. The density value is equal to 50 / 17=2.94, that is, there are about 3 delivery points per kilometer. After calculating the density value, the density level of the current local search neighborhood is determined based on the correspondence between the preset density value and the density level. The density levels here are, for example, dense, sparse, and general, and the density level corresponding to the density value of 2.94 is, for example, dense. The maximum number of delivery users corresponding to the current local search neighborhood is further determined based on the density level of dense; or, the floating value of the number of merchants is determined based on the density level of dense, such as a floating value of 30%, and then the maximum number of delivery users corresponding to the current local search neighborhood is determined based on the initial number of merchants (for example, 21) and the floating value of 30%.

[0070] It can be seen from this that in this embodiment, by calculating the density value corresponding to the local search neighborhood, the maximum number of delivery users corresponding to the local search neighborhood is determined by the density value, that is, a density adaptive matching strategy is adopted to dynamically adjust the number of merchants on the line, complete the identification of sparse areas and dense areas, improve the loading efficiency of a single vehicle, and significantly reduce vehicle costs.

[0071] The local search neighborhood and the maximum number of delivery users are determined above. Next, the cluster partitioning search step is performed under given constraints.

[0072] In one embodiment, divisive clustering is performed on the delivery points within the local search neighborhood to obtain a starting cluster, including: treating all delivery points within the local search neighborhood as a cluster, splitting the cluster into two clusters, selecting one of the two clusters and continuing to split until all resulting clusters meet the preset constraints; and determining the cluster including the delivery points in the starting grid as the starting cluster.

[0073] For example, there are 100 (for example only) delivery points in the current local search neighborhood. 50 delivery points are grouped as a cluster (i.e., a set) and recorded as cluster A. Cluster A is binary split to obtain two clusters, such as cluster A1 and cluster A2. Cluster A1 includes 10 delivery points and cluster A2 includes 40 delivery points. Then cluster A1 and cluster A2 are compared with the preset constraints to determine whether they meet the preset constraints. For example, cluster A1 and cluster A2 are compared with the user number constraint, mileage constraint and full load rate constraint to determine whether the number of delivery points in cluster A1 does not exceed the maximum number of delivery users, whether the distance between the delivery points does not exceed the preset maximum delivery mileage, and whether the order product attributes corresponding to the delivery points match the preset full load rate. If all three conditions are met, stop splitting clusters A1 and A2. If not, continue splitting.

[0074] If cluster A2 here does not meet the three preset constraints, then continue the binary split to obtain two clusters, such as cluster A21 and cluster A22. Cluster A21 includes 15 delivery points, and cluster A22 includes 25 delivery points. And so on, until all the clusters obtained meet the preset constraints. Note: The splitting algorithm can be implemented using existing technologies, such as the K-means clustering algorithm. When using it, the K-means clustering algorithm is simply modified to set the K value to 2, and the initial cluster center set by the maximum and minimum distance method is used instead of the random initial center of the K-means clustering algorithm. When the splitting stops, search the points in each cluster to determine whether there are points in each cluster that belong to the starting grid. If so, the cluster is determined as the starting cluster.

[0075] After determining the starting cluster, this embodiment iteratively searches for delivery points within the local search neighborhood using the starting cluster as the search starting point, and generates delivery routes that include the delivery points based on preset constraints. Specifically, the process includes: Step 51, selecting a starting cluster as the search starting point and determining the current cluster closest to the search starting point within the local search neighborhood; Step 52, sequentially adding target delivery points to the starting cluster corresponding to the search starting point; wherein the target delivery point is the delivery point in the current cluster with the smallest distance from the second centroid, which is determined by the delivery points in the starting cluster corresponding to the search starting point; Step 53, if the starting cluster corresponding to the search starting point satisfies the preset constraints, generating alternative delivery routes that include the delivery points in the starting cluster corresponding to the search starting point, and returning to Step 51 to continue execution until no starting clusters are available for selection.

[0076] For example, there are four clusters in the local search neighborhood: cluster a, cluster b, cluster c, and cluster d. All four clusters contain points within the starting grid, meaning they can all serve as starting clusters. In this embodiment, a search is performed on the local search neighborhood using cluster a, cluster b, cluster c, and cluster d as starting points, generating corresponding lines.

[0077] The search process of a round (searching all 100 delivery points in the local search neighborhood is called a round) is as follows: take cluster a as the search starting point, determine the current cluster closest to the search starting point, for example, the current cluster closest to the search starting point is cluster c;

[0078] Next, add the target delivery points in the current cluster to the starting cluster corresponding to the search starting point. Here, the delivery points are added in order from closest to farthest based on their distance from the centroid of the starting cluster. Select the point closest to the centroid of the starting cluster a from the current cluster c (denoted as point P), add point P to the starting cluster a, and obtain the new starting cluster a'.

[0079] Determine whether the starting cluster a' corresponding to the search starting point meets the preset constraints. If the starting cluster a' meets the constraints, generate an alternative delivery route including the delivery points in the starting cluster a', and then return to re-determine the search starting point and search until there is no starting cluster to choose from.

[0080] If the starting cluster corresponding to the search starting point is lower than the preset constraint condition, the process returns to step 52 and continues to add target delivery points to the starting cluster corresponding to the search starting point. Since the starting cluster corresponding to the search starting point is lower than the preset constraint condition, it is necessary to continue adding points so that the delivery points in the starting cluster can meet the constraint condition, thereby generating a line.

[0081] If the starting cluster corresponding to the search starting point exceeds the preset constraint condition, it is further determined whether the target delivery point belongs to the starting grid; if so, the target delivery point is filtered out as an outlier and the outlier statistical value is increased by 1; if not, the target delivery point is returned to the current cluster and step 52 is executed.

[0082] Here, during the search process, if a critical point, such as point P, is added, the starting cluster (such as cluster a) will exceed the preset constraint conditions, then this embodiment judges the critical point to determine whether the critical point belongs to the starting grid. If the critical point is a point within the starting grid, the critical point P is filtered out as an outlier and the outlier statistical value is increased by 1. If it does not belong, the critical point P is returned to the current cluster (such as cluster c).

[0083] In one embodiment, the aforementioned step 53 also includes: if the number of searched points indicates that the end of the local search area has been searched, then determining whether the unsearched delivery points in the local search area meet the full load rate constraint in the preset constraint; wherein the number of searched points is determined by the number of delivery points included in the alternative delivery route and the statistical value of the abnormal points; if the unsearched delivery point meets the full load rate constraint, then generating an alternative delivery route based on the unsearched delivery point; if the unsearched delivery point does not meet the full load rate constraint, then further determining whether the unsearched delivery point belongs to the starting grid, if so, filtering out the unsearched delivery point as an abnormal point, otherwise returning the unsearched delivery point to the current cluster and executing step 52.

[0084] Continuing with the previous example, in each round of search, six alternative delivery routes are generated after searching the four starting clusters. The number of points on each alternative delivery route is known. A first value is obtained based on the number of routes and the number of delivery points included in the alternative delivery route. A second value is obtained from the statistics of abnormal points obtained during the search process. According to the sum of the first and second values, the number of searched points is determined to be 95. Since the number of delivery points in the local search neighborhood is 100, it can be seen that the end of the local search area has been searched. At this time, it is determined whether the unsearched delivery points in the local search area (i.e., the remaining 5 delivery points) meet the full load rate constraint in the preset constraint conditions. If so, alternative delivery routes are generated based on the unsearched delivery points (i.e., the remaining 5 delivery points). That is, a total of 7 alternative delivery routes are generated during one round of search. If not, it is determined whether the unsearched delivery point belongs to the starting grid. If so, all the unsearched delivery points are filtered out as abnormal points. Otherwise, the unsearched delivery points are returned to the original cluster. After returning the unsearched delivery points to the original cluster, they are searched again. In the embodiment of the present application, the reason for returning the unsearched delivery points to the original cluster is to reduce the number of discarded points, that is, to avoid discarding the unsearched delivery points as abnormal points.

[0085] For the delivery points at the end of the local search neighborhood, this embodiment determines whether these points meet the conditions for generating a line. If so, a line is generated. If not, it is determined whether these points are points in the starting grid. If so, they are filtered out. If not, the original cluster is returned.

[0086] Following the above steps, multiple alternative delivery routes are obtained during each round of search. In this embodiment, an objective function is constructed, and the route arrangement corresponding to the minimum objective function value is determined as the optimal route. Specifically, after step 53, the method further includes: obtaining the total delivery mileage based on the alternative delivery routes generated during the search; obtaining the objective function value based on the total delivery mileage and the outlier statistics; and comparing the objective function values, outputting the alternative delivery route corresponding to the minimum objective function value as the optimal delivery route.

[0087] Continuing with the previous example, there are four clusters in the local search neighborhood, namely cluster a, cluster b, cluster c and cluster d. After searching the local search neighborhood with cluster a, cluster b, cluster c and cluster d respectively, four objective function values are obtained. The sizes of these four objective function values are compared, and the alternative distribution route corresponding to the minimum objective function value is output as the optimal distribution route result. The objective function here is equal to the sum of the total distribution mileage and the outlier statistics. That is, if in one round of search, the generated route minimizes the total distribution mileage and the outlier statistics, then such a route is a route result that meets the target and is a local feasible solution.

[0088] It should be noted that the above description is based on the generation of lines within a local search neighborhood. The generation process of lines within other local search neighborhoods can be found in the above description and will not be repeated here.

[0089] As can be seen from the above, the line generation in this embodiment uses grid division for dimensionality reduction, which greatly reduces the scale of the problem, speeds up the calculation speed, and avoids the situation of computational explosion. The use of a fixed grid has a larger optimization space and supports functions such as expanding fixed areas and vehicle model profiling. In addition, density adaptation is used in this embodiment to support the dynamic determination of density values within the local search neighborhood, thereby completing the identification of sparse and dense areas, improving the loading efficiency of a single vehicle, and significantly reducing vehicle costs. Finally, this embodiment uses cluster splitting and merging for line generation, which greatly improves the aggregation effect of the line and optimizes the line morphology under the condition of meeting the given constraints.

[0090] The present invention also provides a logistics distribution route generation device, which is based on the same technical concept as the aforementioned logistics distribution route generation method. Figure 4 This is a block diagram of a logistics distribution route generation device according to an embodiment of the present application. Figure 4 The logistics distribution route generation device 400 of this embodiment includes:

[0091] Neighborhood determination module 401, for dividing the delivery points into grids based on their geographical locations in the order data, and determining a local search neighborhood based on the grids;

[0092] Clustering module 402, performing split clustering on the delivery points in the local search neighborhood to obtain a starting cluster;

[0093] The route generation module 403 is configured to iteratively search for delivery points within the local search neighborhood using the starting cluster as a search starting point, and generate a delivery route including the delivery points according to preset constraints.

[0094] In one embodiment of the present application, the neighborhood determination module 401 is specifically used to perform edge detection on the grid, determine the boundary grids in the grid, and determine the boundary grid farthest from the first centroid as the starting grid; the first centroid is determined based on the center point of each of the grids; with the starting grid as the center and the grid as the unit, the neighboring grids are searched outward; if the total number of delivery points in the starting grid and the neighboring grids reaches a preset point threshold, the search is stopped and a local search neighborhood determined by the starting grid and the neighboring grids is obtained.

[0095] In one embodiment of the present application, the clustering module 402 is specifically used to treat all the delivery points in the local search neighborhood as a cluster, split the cluster into two clusters, select one of the two clusters to continue splitting until all the resulting clusters meet the preset constraints; and determine the cluster including the delivery points in the starting grid as the starting cluster.

[0096] In one embodiment of the present application, after determining the local search neighborhood based on the grid, the device also includes: a constraint determination module, which is used to obtain a density value corresponding to the local search neighborhood based on the total number of grids and the total number of delivery points in the local search neighborhood; determine the density level from the density value, and determine the maximum number of delivery users corresponding to the local search neighborhood based on the density level; the preset constraints include user number constraints, mileage constraints and full load rate constraints. The user number constraint means that the number of delivery points does not exceed the maximum number of delivery users, the mileage constraint means that the distance of the delivery point does not exceed the preset maximum delivery mileage, and the full load rate constraint means that the order product attributes corresponding to the delivery point match the preset full load rate.

[0097] In one embodiment of the present application, the route generation module 403 is specifically used to select a starting cluster as the search starting point, determine the current cluster closest to the search starting point in the local search neighborhood; add target delivery points to the starting cluster corresponding to the search starting point in sequence; wherein, the target delivery point is the delivery point in the current cluster with the smallest distance from the second centroid, and the second centroid is determined by the delivery points in the starting cluster corresponding to the search starting point; if the starting cluster corresponding to the search starting point satisfies the preset constraint conditions, then generate an alternative delivery route including the delivery points in the starting cluster corresponding to the search starting point and return to continue executing the step of determining the current cluster until there is no starting cluster to choose from.

[0098] In one embodiment of the present application, the route generation module 403 is also used to return to continue adding the target delivery point to the starting cluster corresponding to the search starting point if the starting cluster corresponding to the search starting point is lower than the preset constraint condition; if the starting cluster corresponding to the search starting point exceeds the preset constraint condition, further determine whether the target delivery point belongs to the starting grid; if it does, filter out the target delivery point as an abnormal point, and add 1 to the abnormal point statistics; if it does not belong, return the target delivery point to the current cluster.

[0099] In one embodiment of the present application, the route generation module 403 is used to determine whether the unsearched delivery points in the local search area meet the full load rate constraint in the preset constraint if the number of searched points indicates that the end of the local search area has been searched; wherein the number of searched points is determined by the number of delivery points included in the alternative delivery route and the statistical value of the abnormal points; if the unsearched delivery point meets the full load rate constraint, the alternative delivery route is generated based on the unsearched delivery point; if the unsearched delivery point does not meet the full load rate constraint, it is further determined whether the unsearched delivery point belongs to the starting grid. If so, the unsearched delivery point is filtered out as an abnormal point, otherwise the unsearched delivery point is returned to the current cluster.

[0100] In one embodiment of the present application, the route generation module 403 is used to obtain the total delivery mileage based on the alternative delivery routes generated during the search process; obtain the objective function value based on the total delivery mileage and the abnormal point statistics; compare the sizes of the objective function values, and output the alternative delivery route corresponding to the minimum objective function value as the optimal result of the delivery route.

[0101] It should be noted that Figure 4 The examples and explanations of the functions performed by the units in the illustrated device are consistent with the examples and explanations in the aforementioned method embodiment, and are not repeated here.

[0102] Note: The algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other apparatus. Various general-purpose apparatuses may also be used in conjunction with the teachings herein. Based on the above description, the structures required to construct such apparatuses are readily apparent. Furthermore, the embodiments of the present application are not directed to any particular programming language. It should be understood that the contents of the embodiments of the present application described herein may be implemented using various programming languages, and the above description of specific languages is intended to disclose the best implementation methods of the embodiments of the present application.

[0103] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0104] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0105] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features that are included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.

[0106] The various component embodiments of the present application embodiment can be implemented in hardware, or implemented in a software module running on one or more processors, or implemented in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the page performance test device according to the present application embodiment. The application can also be implemented as a part or all of the equipment or device program (for example, computer program and computer program product) for performing the method described herein. Such a program realizing the present application embodiment can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0107] For example, Figure 5 : is a structural diagram of an electronic device of an embodiment of the present application. The electronic device 500 includes: a processor 501, and a memory 502 storing a computer program that can be run on the processor 501. The processor 501 is used to execute the steps of the method in the embodiment of the present application when executing the computer program in the memory 502. The memory 502 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 502 has a storage space 503 for storing a computer program 504 for executing any method step in the above method. The computer program 504 can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such computer program products are typically, for example Figure 6 The non-transitory computer-readable storage medium shown.

[0108] Figure 6 6 is a schematic diagram of the structure of a non-transitory computer-readable storage medium according to one embodiment of the present application. This computer-readable storage medium 600 stores a computer program 504 for executing the method steps according to an embodiment of the present application. This computer-readable storage medium 500 can be read by a processor 501 of an electronic device 500. When computer program 504 is executed by electronic device 500, it causes electronic device 500 to execute the various steps of the method described above. Specifically, computer program 504 stored in this computer-readable storage medium can execute the method described in any of the above embodiments. Computer program 504 can be compressed in a suitable format.

[0109] It should be noted that the above embodiments illustrate rather than limit the embodiments of the present application, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The embodiments of the present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words, second, and third, etc. does not indicate any order and these words may be interpreted as names.

Claims

1. A method for generating a logistics distribution route, characterized in that: include: Divide the delivery points into grids based on their geographical locations in the order data, and determine the local search neighborhood based on the grids; Performing split clustering on the delivery points within the local search neighborhood to obtain a starting cluster; Iteratively searching for delivery points within the local search neighborhood with the starting cluster as the search starting point, and generating a delivery route including the delivery points according to preset constraints; The iterative search for the delivery points within the local search neighborhood using the starting cluster as the search starting point and generating a delivery route including the delivery points according to preset constraints comprises: Step 51, selecting a starting cluster as a search starting point, and determining the current cluster closest to the search starting point in the local search neighborhood; Step 52, sequentially adding target delivery points to the starting cluster corresponding to the search starting point; wherein the target delivery point is the delivery point in the current cluster that has the smallest distance to the second centroid, and the second centroid is determined by the delivery points in the starting cluster corresponding to the search starting point; Step 53: If the starting cluster corresponding to the search starting point satisfies the preset constraint condition, an alternative delivery route including the delivery points in the starting cluster corresponding to the search starting point is generated and the process returns to step 51 and continues until there is no starting cluster to be selected.

2. The method according to claim 1, wherein Determining the local search neighborhood based on the grid includes: Performing edge detection on the grids to determine boundary grids in the grids, and determining the boundary grid farthest from a first centroid as a starting grid; the first centroid is determined based on the center points of each of the grids; Taking the starting grid as the center and taking grids as units, searching for neighboring grids outwards; If the total number of delivery points in the starting grid and the adjacent grids reaches the preset point threshold, the search is stopped and the local search neighborhood determined by the starting grid and the adjacent grids is obtained.

3. The method according to claim 1 or 2, wherein: The splitting clustering of the delivery points in the local search neighborhood to obtain the starting cluster includes: All the delivery points in the local search neighborhood are regarded as a cluster, the cluster is split into two clusters, and one of the two clusters is selected to continue splitting until all the resulting clusters meet the preset constraint conditions; The cluster including the delivery points in the starting grid is determined as the starting cluster.

4. The method according to claim 1, wherein After determining the local search neighborhood based on the grid, the method further includes: Obtaining a density value corresponding to the local search neighborhood according to the total number of grids and the total number of delivery points in the local search neighborhood; The density level is determined by the density value, and the maximum number of delivery users corresponding to the local search neighborhood is determined based on the density level; The preset constraints include user number constraints, mileage constraints and full load rate constraints. The user number constraint means that the number of delivery points does not exceed the maximum number of delivery users. The mileage constraint means that the distance between the delivery points does not exceed the preset maximum delivery mileage. The full load rate constraint means that the order product attributes corresponding to the delivery point match the preset full load rate.

5. The method according to claim 1, wherein The step 53 further includes: If the starting cluster corresponding to the search starting point is lower than the preset constraint condition, then return to step 52 and continue to add the target delivery point to the starting cluster corresponding to the search starting point; If the starting cluster corresponding to the search starting point exceeds the preset constraint condition, further determining whether the target delivery point belongs to the starting grid; If it does, the target delivery point will be filtered out as an outlier and the outlier statistical value will be increased by 1; If not, the target delivery point is returned to the current cluster and step 52 is executed.

6. The method according to claim 5, wherein The step 53 further includes: If the number of searched points indicates that the end of the local search area has been searched, determining whether the unsearched delivery points in the local search area satisfy the full load rate constraint in the preset constraint; wherein the number of searched points is determined by the number of delivery points included in the alternative delivery route and the statistical value of the abnormal points; If the unsearched delivery point satisfies the full load rate constraint, generating an alternative delivery route based on the unsearched delivery point; If the unsearched delivery point does not satisfy the full load rate constraint, it is further determined whether the unsearched delivery point belongs to the starting grid. If so, the unsearched delivery point is filtered out as an abnormal point. Otherwise, the unsearched delivery point is returned to the current cluster and step 52 is executed.

7. The method according to claim 5, wherein After step 53, the method further comprises: Obtaining the total delivery mileage based on the alternative delivery routes generated during the search process; Obtaining an objective function value based on the total delivery mileage and the abnormal point statistics; The sizes of the objective function values are compared, and the alternative delivery route corresponding to the minimum objective function value is output as the optimal delivery route result.

8. A logistics distribution route generation device, characterized in that: The device includes: A neighborhood determination module is used to divide the delivery points into grids based on their geographic locations in the order data and determine the local search neighborhood based on the grid; A clustering module, performing split clustering on the delivery points in the local search neighborhood to obtain a starting cluster; a route generation module, configured to iteratively search for delivery points within the local search neighborhood with the starting cluster as a search starting point, and generate a delivery route including the delivery points according to preset constraints; The iterative search for the delivery points within the local search neighborhood using the starting cluster as the search starting point and generating a delivery route including the delivery points according to preset constraints comprises: Step 51, selecting a starting cluster as a search starting point, and determining the current cluster closest to the search starting point in the local search neighborhood; Step 52, sequentially adding target delivery points to the starting cluster corresponding to the search starting point; wherein the target delivery point is the delivery point in the current cluster that has the smallest distance to the second centroid, and the second centroid is determined by the delivery points in the starting cluster corresponding to the search starting point; Step 53: If the starting cluster corresponding to the search starting point satisfies the preset constraint condition, an alternative delivery route including the delivery points in the starting cluster corresponding to the search starting point is generated and the process returns to step 51 and continues until there is no starting cluster to be selected.

9. An electronic device, characterized in that: The electronic device includes: a processor, and a memory storing a computer program that can be run on the processor; The processor is configured to perform the steps of the method according to any one of claims 1 to 7 when executing the computer program in the memory.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Logistics distribution route planning method and device

    CN109978447A