Goods delivery path determination method and device, equipment and storage medium
By filtering effective task clusters based on temporal and spatial clustering conditions, the lowest-cost delivery route is determined, solving the problem of high cost and low efficiency in existing cargo delivery technologies and achieving more economical and efficient cargo delivery.
Patent Information
- Application Number
- CN202511002805.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-10-31
AI Technical Summary
Existing technologies suffer from high costs and low efficiency in cargo delivery routes, making it impossible to effectively optimize cargo delivery routes.
By constructing temporal and spatial clustering conditions, the target delivery tasks are clustered, effective task clusters are selected using a clustering evaluation function, and the delivery path with the lowest cost is determined based on the delivery location.
It reduced the cost of goods delivery routes, improved delivery efficiency, reduced delivery delays, and optimized vehicle load utilization.
Smart Images

Figure CN120875733A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cargo transportation technology, specifically to a method, apparatus, equipment, and storage medium for determining cargo delivery routes. Background Technology
[0002] Delivery route refers to the planning of the transportation route for goods from the origin (such as a warehouse or distribution center) to the final recipient during the logistics or distribution process. Its core objective is to deliver goods efficiently, accurately, and at low cost.
[0003] In related technologies, the delivery route of goods is constrained by a variety of factors, such as the distance between each recipient and the delivery time. These factors result in different costs and delivery efficiencies for different delivery routes. With the increasing business demand, it is necessary to optimize the delivery route of goods to reduce costs and improve delivery efficiency. Summary of the Invention
[0004] This invention provides a method, apparatus, equipment, and storage medium for determining cargo delivery routes, in order to solve the technical problems of high cost and low delivery efficiency in the prior art.
[0005] To address the aforementioned technical problems, in a first aspect, the present invention provides a method for determining a goods delivery route, the method comprising:
[0006] Obtain task information for several target delivery tasks, including goods arrival time, goods weight, delivery timeliness, and delivery location. Based on temporal clustering conditions constructed from goods arrival time and goods weight, and spatial clustering conditions constructed from goods weight, delivery location, and number of tasks, perform temporal and spatial clustering on the target delivery tasks to obtain candidate task clusters. Evaluate the candidate task clusters based on a preset clustering evaluation function to obtain valid task clusters; wherein, the evaluation value of the valid task cluster is greater than a preset evaluation threshold. Based on the delivery location of each target delivery task in the valid task cluster, determine at least one delivery path, and select the delivery path with the lowest cost as the target delivery path.
[0007] In conjunction with the first aspect, in one possible implementation of the first aspect, the step of performing time clustering and spatial clustering on the target delivery tasks based on the time clustering conditions constructed from the arrival time and weight of the goods, and the spatial clustering conditions constructed from the weight of the goods, the delivery location, and the number of tasks, to obtain candidate task clusters, includes: first clustering the target delivery tasks according to the time clustering conditions to obtain time task clusters, and then clustering the target delivery tasks within the time task clusters according to the spatial clustering conditions to obtain the candidate task clusters; wherein, the time clustering conditions include that the arrival time of the goods for each target delivery task in the cluster is within a preset time interval, and the total weight of the goods for all target delivery tasks in the cluster is greater than a first weight threshold; the spatial clustering conditions include that the distance difference between the delivery locations of each pair of target delivery tasks in the cluster is not greater than a preset distance threshold, the number of tasks is not less than a preset number, and the total weight of the goods for all target delivery tasks in the cluster is greater than a first weight threshold.
[0008] In conjunction with the first aspect, in one possible implementation of the first aspect, the evaluation of the candidate task clusters based on a preset clustering evaluation function to obtain valid task clusters includes: evaluating the candidate task clusters based on the preset clustering evaluation function, determining the candidate task clusters with evaluation values greater than a preset evaluation threshold as valid task clusters, and determining the remaining candidate task clusters as pending task clusters; adjusting and amplifying the preset time interval and / or increasing the preset distance threshold, and re-clustering the pending task clusters in terms of time and space until the evaluation value of the pending task clusters is greater than the preset evaluation threshold, or reaches the maximum adjustment limit.
[0009] In conjunction with the first aspect, in one possible implementation of the first aspect, the clustering evaluation function includes: the clustering evaluation function formula is:
[0010] S=α·(1-T span / T max )+β·(1-D avg / D max )
[0011] Where S is the evaluation value, α is the first weighting factor, β is the second weighting factor, and α + β = 1; T span T is the time difference between the arrival times of the target delivery task with the earliest arrival time and the target delivery task with the latest arrival time in the candidate task cluster. max D is the maximum allowed time window. avg D is the average distance difference between the delivery locations of the target delivery tasks in the candidate task cluster. max This is the maximum allowable distance difference between the delivery locations of any two target delivery tasks within the candidate task cluster.
[0012] In conjunction with the first aspect, in one possible implementation of the first aspect, determining at least one delivery path based on the delivery location of each target delivery task in the effective task cluster, and selecting the delivery path with the lowest cost as the target delivery path, includes: selecting delivery nodes according to the delivery order of the delivery locations of each target delivery task in the effective task cluster, combining delivery nodes to determine at least one delivery path; calculating the fixed transportation cost of each delivery path, and the penalty cost resulting from the light load penalty caused by the total transportation weight of the delivery path being lower than the economic load, and the delay penalty caused by the expected delivery time of the target delivery task in the delivery path exceeding its delivery timeliness, and selecting the delivery path with the lowest sum of the two costs as the target delivery path.
[0013] In conjunction with the first aspect, in one possible implementation of the first aspect, before selecting the delivery route with the lowest cost as the target delivery route, the method includes: deleting the delivery route if it meets any of the preset hard constraints; the preset hard constraints include: the total transport weight of the delivery route is greater than the upper limit of cargo weight; the estimated delivery time of any target delivery task in the delivery route is later than its delivery timeliness and exceeds the maximum allowable delay time.
[0014] In conjunction with the first aspect, in one possible implementation of the first aspect, obtaining the task information of the target delivery task includes: collecting the task information of delivery tasks arriving at the current warehouse within a preset time period in real time based on the logistics routing information of the delivery task, and selecting delivery tasks with a cargo weight not less than a second weight threshold as the target delivery task.
[0015] Secondly, the present invention provides a device for determining a goods delivery route, comprising: an acquisition module for acquiring a plurality of target delivery tasks and their task information, wherein the task information includes goods arrival time, goods weight, delivery timeliness, and delivery location; a task clustering module for performing time clustering and spatial clustering on the target delivery tasks based on time clustering conditions constructed from goods arrival time and goods weight, and spatial clustering conditions constructed from goods weight, delivery location, and number of tasks, to obtain candidate task clusters; an evaluation module for evaluating the candidate task clusters based on a preset clustering evaluation function to obtain effective task clusters; wherein the evaluation value of the effective task clusters is greater than a preset evaluation threshold; and a route determination module for determining at least one delivery route based on the delivery location of each target delivery task in the effective task clusters, and selecting the delivery route with the lowest cost as the target delivery route.
[0016] Thirdly, the present invention provides a device for determining a cargo delivery route, comprising a memory and a processor, wherein:
[0017] The memory is used to store computer programs;
[0018] The processor is used to read the computer program in the memory and execute the steps of determining the goods delivery route in the first aspect described above.
[0019] Fourthly, the present invention provides a computer-readable storage medium having a readable computer program stored thereon, which, when executed by a processor, implements the steps of determining the goods delivery path described in the first aspect.
[0020] Compared with the prior art, the method, apparatus, equipment and storage medium for determining the delivery route of goods provided by the present invention have the following beneficial effects:
[0021] The system acquires task information for several target delivery tasks, including goods arrival time, goods weight, delivery timeliness, and delivery location. Based on temporal clustering conditions constructed from goods arrival time and weight, and spatial clustering conditions constructed from goods weight, delivery location, and number of tasks, the target delivery tasks are clustered temporally and spatially to obtain candidate task clusters. These candidate task clusters are then evaluated using a preset clustering evaluation function to obtain valid task clusters. Valid task clusters are those whose evaluation value exceeds a preset evaluation threshold. Based on the delivery locations of each target delivery task within the valid task clusters, at least one delivery path is determined. The delivery path with the lowest cost is selected as the target delivery path, thereby reducing the cost of the delivery path and improving delivery efficiency. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and not all embodiments. For those skilled in the art, other drawings obtained from these drawings without creative effort are all within the scope of protection of this application.
[0023] Figure 1 This is a flowchart illustrating the method for determining the delivery route of goods provided in an embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram illustrating how target delivery tasks are clustered into effective task clusters and delivery paths are determined according to an embodiment of the present invention.
[0025] Figure 3 This is a schematic diagram of the structure of the cargo delivery path determination device provided in an embodiment of the present invention;
[0026] Figure 4This is a schematic diagram of the structure of the cargo delivery path determination device provided in an embodiment of the present invention;
[0027] Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0029] To make the description of this disclosure more detailed and complete, illustrative descriptions of embodiments and specific examples of the present invention are provided below; however, these are not the only forms of implementing or utilizing the specific embodiments of the present invention. The embodiments cover features of multiple specific embodiments and the methods, steps, and their order for constructing and operating these specific embodiments. However, other specific embodiments may also be used to achieve the same or equivalent functions and step sequences. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0031] In the description of the embodiments of the present invention, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The word "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more. Other quantifiers should be understood similarly. The preferred embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0032] In the logistics and distribution field, vehicle routing is a core challenge. Traditional routing methods typically assume that all goods arrive at the warehouse simultaneously, and then perform static route planning based on fixed customer locations and time windows. However, in real-world logistics scenarios, the arrival time of goods at the warehouse is dynamic, and this dynamic arrival time significantly impacts vehicle scheduling and route planning effectiveness.
[0033] To address this issue, embodiments of this application provide a method, apparatus, equipment, and storage medium for determining cargo delivery routes, which can reduce the cost of cargo delivery routes, improve delivery efficiency, and reduce delivery delays.
[0034] Example 1
[0035] Figure 1 This is a flowchart of a method for determining a cargo delivery route provided in an embodiment of the present invention.
[0036] See Figure 1 A method for determining a cargo delivery route includes the following steps:
[0037] Step S110: Obtain task information for several target delivery tasks. The task information includes the arrival time of goods in the warehouse, the weight of goods, the delivery time and the delivery location.
[0038] For example, each target delivery task has its own task information, which may include at least the goods arrival time at the warehouse, the goods weight, the delivery timeframe, and the delivery location. The goods arrival time is the time when the target delivery task arrives at the warehouse; the goods weight is the total weight of the goods in the target delivery task; the delivery timeframe is the time the target delivery task is required to deliver to the customer; and the delivery location is the delivery destination of the target delivery task. The task information of a target delivery task may also include the type of goods, customer information, etc., without limitation. A target delivery task refers to goods that will arrive at the warehouse at a future time and require delivery. Based on the task information of the target delivery task, a delivery route is planned for it. The warehouse is a logistics site node in the delivery of goods to the customer.
[0039] As one possible implementation method, obtaining task information for the target delivery task includes:
[0040] Based on the logistics routing information of the delivery tasks, the task information of the delivery tasks that arrive at the current warehouse within a preset time period is collected in real time, and the delivery tasks with a cargo weight of not less than the second weight threshold are selected as the target delivery tasks.
[0041] For example, the logistics routing information for a delivery task refers to the transportation path information formed after the goods are picked up. This can include basic information about the delivery task, such as the sender, recipient, sender address, recipient address, goods weight, logistics nodes along the transportation path, estimated arrival time at each logistics node, and delivery timeliness. Task information can be extracted from the basic goods information, where the recipient address is the delivery location. Based on the estimated arrival time of the delivery task at each logistics node, the arrival time of the goods at the warehouse requiring delivery path planning can be obtained. Based on the logistics routing information of the delivery task, task information for delivery tasks arriving at the current warehouse within a preset time period is collected in real time. The preset time period can be set according to actual needs, for example, 12 hours. For delivery tasks arriving at the current warehouse within the preset time period, not all are centrally planned for delivery paths. Instead, delivery tasks with a goods weight not less than a second weight threshold are selected as target delivery tasks for centralized delivery path planning. The second weight threshold refers to the minimum cargo weight standard for distinguishing between large and small cargo tasks, for example, set to 1000 kg. Cargo weight exceeding 1000 kg is considered large cargo, while weight less than 1000 kg is considered small cargo. When the weight of a cargo task reaches or exceeds the second weight threshold, it is designated as a target delivery task. By screening large cargo tasks for direct dispatch route planning, the utilization of transport vehicles' load capacity can be improved, and transportation costs can be reduced.
[0042] Step S120: Based on the temporal clustering conditions constructed from the arrival time and weight of the goods, and the spatial clustering conditions constructed from the weight of the goods, the delivery location, and the number of tasks, the target delivery tasks are clustered temporally and spatially to obtain candidate task clusters.
[0043] For example, the target delivery tasks arriving at the current warehouse are first subjected to temporal clustering and spatial clustering, and delivery routes are planned for the target delivery tasks that are successfully clustered. Specifically, when performing temporal clustering on the target delivery tasks, time clustering can be performed based on the arrival time and weight of the goods in the target delivery tasks; when performing spatial clustering on the target delivery tasks, spatial clustering can be performed based on the weight, delivery location, and number of tasks in the target delivery tasks; after temporal and spatial clustering, a candidate task cluster is finally obtained, which may include at least one target delivery task.
[0044] As one possible implementation, based on the temporal clustering conditions constructed from the arrival time and weight of the goods, and the spatial clustering conditions constructed from the weight of the goods, the dispatch location, and the number of tasks, the target dispatch tasks are subjected to temporal and spatial clustering respectively, resulting in candidate task clusters, including:
[0045] The target delivery tasks are first clustered according to temporal clustering conditions to obtain temporal task clusters. Then, the target delivery tasks within the temporal task clusters are clustered according to spatial clustering conditions to obtain candidate task clusters.
[0046] The time clustering conditions include that the arrival time of goods for each target delivery task in the cluster is within a preset time interval, and the total weight of goods for all target delivery tasks in the cluster is greater than a first weight threshold.
[0047] The spatial clustering conditions include that the distance difference between the delivery locations of each target delivery task in the cluster is not greater than a preset distance threshold, the number of tasks is not less than a preset number, and the total weight of all target delivery tasks in the cluster is greater than a first weight threshold.
[0048] For example, when clustering target delivery tasks, clustering is first performed based on temporal clustering conditions. Then, for each time task cluster within the clustered task clusters, spatial clustering is performed based on spatial clustering conditions, resulting in several candidate task clusters. Performing temporal clustering followed by spatial clustering for target delivery tasks helps ensure that target delivery tasks arriving at the warehouse first are delivered first.
[0049] When clustering target delivery tasks by time, the time clustering conditions are constrained by the arrival time and weight of the goods. Regarding weight, the total weight of the goods in the clustered target delivery tasks must be greater than a first weight threshold. This first weight threshold can be set as needed; in one specific embodiment, it is set to 1000 kg. Regarding arrival time, the arrival time of the goods in the clustered target delivery tasks must be within a preset time interval. Multiple preset time intervals can be set and can overlap. A time interval can be set starting from the arrival time of one of the target delivery tasks. The range values of each preset time interval, i.e., the time window, are the same. Target delivery tasks whose arrival times fall within the same preset time interval reflect that their arrival times are similar. In one specific embodiment, a preset time interval is 10:00-10:30. Within this 30-minute time window, target delivery tasks whose arrival times are within the 10:00-10:30 range can attempt time clustering. For example, consider three target delivery tasks: A (goods arrive at warehouse at 10:00, weight 300kg), B (goods arrive at warehouse at 10:08, weight 500kg), and C (goods arrive at warehouse at 10:15, weight 700kg). The first weight threshold is 1000kg, and the preset time interval is 10:00-10:30. The arrival times of these three target delivery tasks all fall within the preset time interval, the time interval is within 30 minutes, and the total weight reaches 1500kg, satisfying the clustering conditions for time clustering. Therefore, these three target delivery tasks form a time task cluster.
[0050] The target delivery tasks within each time task cluster are then spatially clustered. Spatial clustering conditions are constrained by delivery location, task quantity, and cargo weight. Regarding delivery location, the distance difference between any two delivery locations within a cluster must not exceed a preset distance threshold, reflecting the concentration of delivery locations within the cluster. Regarding task quantity, the number of tasks in a cluster must not be less than a preset number. Regarding cargo weight, the total cargo weight of all target delivery tasks in the cluster must exceed a first weight threshold, the same constraint as in time clustering. The distance threshold and preset number of tasks can be set as needed. For example, a time task cluster may contain target delivery task A (delivery location A1, cargo weight 300kg), target delivery task B (delivery location B1, cargo weight 500kg), and target delivery task C (delivery location C1, cargo weight 700kg), with a preset distance threshold of 1 kilometer, a preset number of tasks of 3, and a first weight threshold of 1000kg. Assuming that the distance difference between each pair of delivery locations of target delivery tasks A, B, and C is less than 1 kilometer, and since the total weight of the three exceeds 1000 kg, the three target delivery tasks within this time task cluster can form a candidate task cluster.
[0051] In this embodiment of the invention, by setting time and space constraints, target delivery tasks are clustered and classified according to the concentration of goods arrival time and delivery location, which can improve the efficiency of subsequent delivery route planning and reduce delivery route costs.
[0052] Step S130: Evaluate the candidate task clusters based on the preset clustering evaluation function to obtain the effective task clusters; wherein, the evaluation value of the effective task clusters is greater than the preset evaluation threshold.
[0053] For example, the candidate task clusters obtained by time clustering and spatial clustering need to be evaluated by the cluster evaluation function. Candidate task clusters with evaluation values greater than the preset evaluation threshold will be regarded as valid task clusters, and the target delivery tasks within the valid task clusters will participate in the subsequent delivery path planning.
[0054] As one possible implementation, the clustering evaluation function includes:
[0055] The cluster evaluation function formula is:
[0056] S=α·(1-T span / T max )+β·(1-D avg / D max )
[0057] Where S is the evaluation value, α is the first weighting factor, β is the second weighting factor, and α + β = 1; T spanLet T be the time difference between the arrival times of the target delivery task with the earliest arrival time and the target delivery task with the latest arrival time in the candidate task cluster. max D is the maximum allowed time window. avg D represents the average distance difference between the delivery locations of target delivery tasks within the candidate task cluster. max This represents the maximum allowable distance difference between the delivery locations of two target delivery tasks within a candidate task cluster.
[0058] In the formula, S takes the value [0,1], and the weights of α and β are set according to the emphasis on time concentration and spatial concentration. D avg During calculation, the distance difference between the delivery locations of each pair of target delivery tasks can be calculated first, and then the sum of each distance difference can be taken as the average. The smaller the difference in arrival time between the target delivery tasks within the cluster, the shorter the 1-T time will be. span / T max The larger the value of 1-D, the smaller the difference in delivery locations among the target delivery tasks within the cluster. avg / D max The larger the value, the better.
[0059] The candidate task clusters are evaluated using a clustering evaluation function, yielding an evaluation value for each cluster. The closer the arrival times of the target delivery tasks within a cluster are to the warehouse, and the denser the spatial distribution of their delivery locations, the closer the evaluation value S will be to 1. Evaluating the clustering results using clustering evaluation parameters can improve the rationality of clustering target delivery tasks and the economy of route planning. Furthermore, adjusting the evaluation strategy through weighting factors—for example, increasing the weight of the time dimension in time-sensitive scenarios and emphasizing spatial dimension optimization in distance-sensitive scenarios—can better identify effective task clusters, improve delivery efficiency, and reduce the delivery cost of each effective task cluster.
[0060] As one possible implementation, candidate task clusters are evaluated based on a preset clustering evaluation function to obtain effective task clusters, including:
[0061] The candidate task clusters are evaluated based on the preset cluster evaluation function. The candidate task clusters with evaluation values greater than the preset evaluation threshold are determined as valid task clusters, and the remaining candidate task clusters are determined as undetermined task clusters.
[0062] Adjust and enlarge the preset time interval and / or increase the preset distance threshold, and re-cluster the task clusters in time and space until the evaluation value of the task clusters in question is greater than the preset evaluation threshold or reaches the maximum adjustment limit.
[0063] For example, by evaluating candidate task clusters using a preset clustering evaluation function, an evaluation value can be obtained for each candidate task cluster. This evaluation value assesses the aggregation quality of the candidate task clusters in both the time and spatial dimensions. The preset evaluation threshold is a critical value for determining whether a task cluster is valid; in some specific implementations, this value can be set to a fixed value within the range of 0.4 to 0.6. Candidate task clusters with evaluation values greater than the preset evaluation threshold are considered valid and participate in subsequent dispatch path planning; candidate task clusters with evaluation values not greater than the preset evaluation threshold are identified as pending task clusters.
[0064] For clusters of undetermined tasks, temporal and spatial clustering is re-performed by adjusting and expanding the preset time interval and / or increasing the preset distance threshold. The resulting candidate task clusters are then evaluated again using the clustering evaluation function. Expanding the preset time interval refers to increasing the range of the time interval, i.e., the window value of the time window, to increase the probability of target delivery tasks clustering in the time dimension. Correspondingly, the T value in the clustering evaluation function... max The value is also increased accordingly. For example, the interval value of the preset time interval, i.e., the time window, is adjusted from 30 minutes to 45 minutes, and the corresponding T... max The value was adjusted from 30 minutes to 45 minutes; the preset distance threshold was increased, which means amplifying the difference in delivery locations of target delivery tasks to increase the likelihood of target delivery tasks clustering in the spatial dimension. The corresponding clustering evaluation function's D... max The value is also increased simultaneously; for example, if the preset distance threshold is increased from 1 kilometer to 2 kilometers, the corresponding D... max The value is adjusted from 1 km to 2 km. The preset time interval can be enlarged or the preset distance threshold increased; one can be adjusted at a time, or both can be adjusted simultaneously, until the rating value of the pending task cluster is greater than the preset evaluation value (i.e., there are no pending task clusters), or the maximum adjustment limit is reached. This maximum adjustment limit can be a preset limit for the time window and distance threshold, or it can be an upper limit for the number of adjustments. If either of these two conditions is met, cluster calculation will not be performed again.
[0065] This invention improves the overall economic efficiency of subsequent route planning by optimizing candidate task clusters whose evaluation values do not meet the standards. It can cluster target delivery tasks that are relatively scattered in time or space but still have clustering value.
[0066] Step S140: Based on the delivery location of each target delivery task in the effective task cluster, determine at least one delivery path, and select the delivery path with the lowest cost as the target delivery path.
[0067] For example, an effective task cluster may include at least one target delivery task. When there are multiple target delivery tasks, and since each target delivery task has a different delivery location, each effective task cluster may have multiple delivery paths based on the order of delivery locations. The delivery cost of each delivery path can be calculated according to the cost calculation method, and the delivery path with the lowest cost can be used as the target delivery path. The target delivery tasks within the effective task cluster will be delivered one by one according to the delivery path.
[0068] In one possible implementation, based on the delivery location of each target delivery task in the effective task cluster, at least one delivery path is determined, and the delivery path with the lowest cost is selected as the target delivery path, including:
[0069] Based on the delivery order of the delivery locations of each target delivery task in the effective task cluster, the delivery nodes are combined to determine at least one delivery path.
[0070] Calculate the fixed transportation cost of each delivery route, as well as the penalty cost based on the light load penalty caused by the total transportation weight of the delivery route being lower than the economic load, and the delay penalty caused by the estimated delivery time of the target delivery task in the delivery route exceeding its delivery timeliness. Select the delivery route with the lowest sum of the two costs as the target delivery route.
[0071] For example, for a valid task cluster, the delivery locations are arranged and combined according to the delivery order of the target delivery tasks in the cluster. Delivery paths are generated by traversing possible path combinations. For instance, if a valid task cluster includes three target delivery tasks A, B, and C, with delivery locations a, b, and c respectively, and warehouse location W, then the delivery paths determined by the arrangement and combination can be W→a→b→c→W, W→a→c→b→W, W→c→b→a→W, W→c→a→b→W, W→b→c→a→W, and W→b→a→c→W. After obtaining all delivery paths, the cost of each delivery path is calculated.
[0072] The costs of each delivery route include fixed transportation costs and penalty costs.
[0073] Fixed transportation costs refer to the fixed expenses incurred by vehicles during the delivery process. In a specific embodiment, fixed transportation costs include mileage costs, calculated as cost per kilometer multiplied by the number of kilometers, and the basic costs of labor and fuel incurred for each trip, which are fixed values.
[0074] Penalty costs include light load penalties and delay penalties. Light load penalties refer to the additional costs incurred when the actual load of a vehicle is lower than the economic load. They can be calculated by multiplying the difference between the economic load threshold and the total weight of the transported goods by a unit penalty coefficient. The formula is: Light load penalty cost = (Economic load - Total transport weight) * Unit penalty coefficient, where the unit penalty coefficient can be set according to actual needs. Delay penalties refer to the penalty costs incurred when delivery time exceeds the delivery time limit. They can be calculated by multiplying the delay duration beyond the required arrival time by a unit time penalty coefficient. The formula is: Delay penalty = Delay duration * Unit time penalty coefficient, where the unit time penalty coefficient can be set according to actual needs.
[0075] This invention calculates the fixed transportation cost, light load penalty cost, and delay penalty cost for each delivery route, and adds all costs together to obtain the total cost of each delivery route. The delivery route with the lowest cost is then selected as the target delivery route. By comprehensively calculating fixed costs and the costs caused by hidden losses due to light loads and time delays, the selected delivery route with the lowest cost is more in line with the economy and practicality of logistics scheduling.
[0076] As one possible implementation, before selecting the delivery route with the lowest cost as the target delivery route, the following steps are included:
[0077] If a delivery route meets any of the preset hard constraints, then the delivery route is deleted.
[0078] The preset hard constraints include: the total transport weight of the delivery route exceeds the maximum weight limit; the estimated delivery time of any target delivery task in the delivery route is later than its delivery time limit and exceeds the maximum allowable delay time.
[0079] For example, after generating a delivery route by combining delivery nodes, the system first determines whether the delivery route meets the hard constraints. Routes that meet the constraints are deleted, while those that do not are retained. The retained delivery routes then undergo cost calculation and selection. The hard constraints are based on two aspects: maximum weight limit and delay duration. The maximum weight limit constraint means that the total transport weight of the delivery route exceeds the maximum weight limit, which is the maximum load capacity of the assigned vehicles. In a specific embodiment, the maximum weight limit is 8000 kg. If the total transport weight of all target delivery tasks in the delivery route is 8200 kg, then the delivery route is directly excluded. The delay duration constraint means that if the estimated delivery time of any target delivery task in the delivery route is later than its delivery time and exceeds the maximum allowed delay duration, the delivery route will be excluded. The order of the target delivery tasks in the path is different. The later the order, the more likely it is that the estimated delivery time of the task will be later than its delivery time. When the timeout exceeds the maximum allowed delay time, the delivery path is deleted. The maximum delay time can be determined according to the customer requirements of the target delivery task, or a fixed time can be specified. In a specific embodiment, the maximum delay time is a fixed time, set to 10 minutes. If the estimated delivery time of a target delivery task in the delivery path is 11 minutes later than its delivery time, the delivery path is excluded.
[0080] In this embodiment of the invention, by imposing hard constraints, delivery routes that do not meet the upper limit of cargo weight and delivery time are deleted, and the remaining delivery routes enter the subsequent cost calculation and selection stage. This not only avoids invalid routes from participating in cost calculation, reducing the amount of calculation and improving efficiency, but also ensures the delivery time of the delivery task and the objective feasibility of transportation.
[0081] In one specific embodiment, such as Figure 2The diagram illustrates how target delivery tasks are clustered to form effective task clusters and determine delivery paths. After obtaining task information for target delivery tasks that will arrive at the current warehouse in the future, they are first clustered. In the time clustering stage, a set of target delivery tasks whose arrival time falls within a preset time interval and whose total weight exceeds a first weight threshold is selected to form a preliminary time task cluster. For example, if the preset time interval (i.e., the time window) is set to 30 minutes and the first weight threshold is set to 1000 kg, the seven target delivery tasks a1, a2, a3, b1, b2, b3, and b4 in the figure, whose arrival time is within this time window and whose total weight is 1500 kg, will be grouped into the same time task cluster. In the spatial clustering stage, for the target delivery tasks within the time task cluster, target delivery tasks whose distance between each pair of delivery locations does not exceed a preset distance threshold, whose number of tasks reaches a preset number, and whose total weight is greater than the first weight threshold are selected to form candidate task clusters. For example, if the preset distance threshold is set to 1 kilometer and the preset number is set to 3, the target delivery tasks a1, a2, a3, b1, b2, b3, and b4 in the figure all meet the above conditions, and are thus grouped into candidate task clusters.
[0082] The candidate task clusters are evaluated according to a preset clustering evaluation function. If all evaluation values exceed a preset evaluation threshold, effective task clusters a and b are formed. The delivery locations of the target delivery tasks in effective task cluster a are a1, a2, and a3, respectively, while the delivery locations of the target delivery tasks in effective task cluster b are b1, b2, b3, and b4, respectively. Effective task clusters a and b are combined according to the order of delivery locations to form multiple delivery paths. Based on hard constraints and the calculation of fixed and penalty costs, the target delivery path in effective task cluster a is determined as follows: the assigned truck A departs from the warehouse location, passes through a1, a2, and a3, and finally returns to the warehouse location; the target delivery path in effective task cluster b is determined as follows: the assigned truck B departs from the warehouse location, passes through b4, b3, b2, and b1, and finally returns to the warehouse location.
[0083] An embodiment of the present invention discloses a method for determining a goods delivery route. This method involves acquiring several target delivery tasks and their task information, including goods arrival time, goods weight, delivery timeliness, and delivery location. Based on temporal clustering conditions constructed from goods arrival time and goods weight, and spatial clustering conditions constructed from goods weight, delivery location, and number of tasks, the target delivery tasks are clustered temporally and spatially to obtain candidate task clusters. These candidate task clusters are then evaluated based on a preset clustering evaluation function to obtain valid task clusters. The evaluation value of a valid task cluster is greater than a preset evaluation threshold. Based on the delivery location of each target delivery task in the valid task cluster, at least one delivery route is determined, and the route with the lowest cost is selected as the target delivery route. This reduces the cost of the goods delivery route and improves delivery efficiency.
[0084] The present invention discloses a method for determining a cargo delivery route, which can dynamically handle delivery tasks with uncertain cargo arrival times. By using a dual clustering mechanism and reducing the computational load of invalid route planning, and by using a cost model to optimize vehicle load utilization and timeliness compliance, the method ensures transportation timeliness, reduces overall transportation costs, and improves the transportation efficiency of cargo delivery.
[0085] Example 2
[0086] Based on the above-described method for determining cargo delivery routes, embodiments of the present invention provide a device for determining cargo delivery routes, such as... Figure 3 As shown, the cargo delivery route determination device 300 includes an acquisition module 301, a task clustering module 302, an evaluation module 303, and a route determination module 304.
[0087] The acquisition module 301 is used to acquire several target delivery tasks and their task information, including the arrival time of goods in the warehouse, the weight of goods, the delivery time and the delivery location.
[0088] The task clustering module 302 is used to perform time clustering and spatial clustering on the target delivery tasks based on the time clustering conditions constructed by the arrival time and weight of the goods, and the spatial clustering conditions constructed by the weight of the goods, the delivery location, and the number of tasks, to obtain candidate task clusters.
[0089] Evaluation module 303 is used to evaluate candidate task clusters based on a preset clustering evaluation function to obtain effective task clusters; wherein, the evaluation value of the effective task cluster is greater than the preset evaluation threshold.
[0090] The path determination module 304 is used to determine at least one delivery path based on the delivery location of each target delivery task in the effective task cluster, and select the delivery path with the lowest cost as the target delivery path.
[0091] For further details regarding the implementation of the above technical solution by each module in the above-mentioned cargo delivery path determination device, please refer to the description in the cargo delivery path determination method provided in the above-mentioned embodiments of the invention, which will not be repeated here.
[0092] Example 3
[0093] Based on the above method for determining the cargo delivery route, such as Figure 4 As shown, this embodiment of the invention also provides a device for determining a goods delivery route. The identification device 400 includes a processor 401 and a memory 402 coupled to the processor 401. The memory 402 stores a computer program, which, when executed by the processor 401, causes the processor 401 to perform the steps of the goods delivery route determination method described in the above embodiment.
[0094] For further details regarding the implementation of the above technical solution by the processor 401 in the above-mentioned cargo delivery path determination device, please refer to the description in the cargo delivery path determination method provided in the above-mentioned embodiments of the invention, which will not be repeated here.
[0095] The processor 401 can also be called a CPU (Central Processing Unit), and the processor 301 may be an integrated circuit chip with signal processing capabilities. The processor 301 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or the processor 401 can be any conventional processor.
[0096] Example 4
[0097] like Figure 5As shown, this embodiment of the invention also provides a computer-readable storage medium 500, on which a readable computer program 501 is stored. The computer program 501 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks or optical disks, ROM (Read-Only Memory), RAM (Random Access Memory), or terminal devices such as computers, servers, mobile phones, and tablets.
[0098] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or modules, and may be electrical, mechanical, or other forms.
[0099] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0100] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0101] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0102] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0103] The technical solutions provided in this application have been described in detail above. Specific examples have been used in this application to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
[0104] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0105] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0106] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0107] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0108] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for determining a cargo delivery route, characterized in that, include: Obtain task information for several target delivery tasks, including goods arrival time, goods weight, delivery timeliness, and delivery location; Based on the temporal clustering conditions constructed from the arrival time and weight of the goods, and the spatial clustering conditions constructed from the weight of the goods, the delivery location, and the number of tasks, the target delivery tasks are clustered temporally and spatially to obtain candidate task clusters. The candidate task clusters are evaluated based on a preset clustering evaluation function to obtain effective task clusters; wherein the evaluation value of the effective task clusters is greater than a preset evaluation threshold. Based on the delivery location of each target delivery task in the effective task cluster, at least one delivery path is determined, and the delivery path with the lowest cost is selected as the target delivery path.
2. The method according to claim 1, characterized in that, The candidate task clusters are obtained by performing temporal clustering and spatial clustering on the target delivery task based on the temporal clustering conditions constructed from the arrival time and weight of the goods, and the spatial clustering conditions constructed from the weight of the goods, the delivery location, and the number of tasks, respectively. These clusters include: The target delivery tasks are first clustered according to the time clustering conditions to obtain time task clusters. Then, the target delivery tasks within the time task clusters are clustered according to the spatial clustering conditions to obtain the candidate task clusters. The time clustering conditions include that the arrival time of goods for each target delivery task in the cluster is within a preset time interval, and the total weight of goods for all target delivery tasks in the cluster is greater than a first weight threshold. The spatial clustering conditions include that the distance difference between the delivery locations of each pair of target delivery tasks in the cluster is not greater than a preset distance threshold, the number of tasks is not less than a preset number, and the total weight of all target delivery tasks in the cluster is greater than a first weight threshold.
3. The method according to claim 2, characterized in that, The evaluation of the candidate task clusters based on a preset clustering evaluation function to obtain effective task clusters includes: The candidate task clusters are evaluated based on a preset clustering evaluation function. Candidate task clusters with evaluation values greater than a preset evaluation threshold are determined as valid task clusters, and the remaining candidate task clusters are determined as undetermined task clusters. Adjust and enlarge the preset time interval and / or increase the preset distance threshold to re-cluster the pending task clusters in terms of time and space until the evaluation value of the pending task clusters is greater than the preset evaluation threshold or reaches the maximum adjustment limit.
4. The method according to claim 1, characterized in that, The clustering evaluation function includes: The cluster evaluation function formula is as follows: S=α·(1-T span / T max )+β·(1-D avg / D max ) Where S is the evaluation value, α is the first weighting factor, β is the second weighting factor, and α + β = 1; T span T is the time difference between the arrival times of the target delivery task with the earliest arrival time and the target delivery task with the latest arrival time in the candidate task cluster. max D is the maximum allowed time window. avg D is the average distance difference between the delivery locations of the target delivery tasks in the candidate task cluster. max This is the maximum allowable distance difference between the delivery locations of any two target delivery tasks within the candidate task cluster.
5. The method according to claim 1, characterized in that, The step of determining at least one delivery path based on the delivery location of each target delivery task in the effective task cluster, and selecting the delivery path with the lowest cost from among them as the target delivery path, includes: Based on the delivery order of the delivery locations of each target delivery task in the effective task cluster, the delivery nodes are combined to determine at least one delivery path. Calculate the fixed transportation cost of each of the aforementioned delivery routes, as well as the penalty cost resulting from the light load penalty caused by the total transportation weight of the delivery route being lower than the economic load, and the delay penalty caused by the estimated delivery time of the target delivery task in the delivery route exceeding its delivery timeliness. Select the delivery route with the lowest sum of the two costs as the target delivery route.
6. The method according to claim 1, characterized in that, Before selecting the delivery route with the lowest cost as the target delivery route, the following steps are included: If the delivery route meets any of the preset hard constraints, then the delivery route is deleted; the preset hard constraints include, The total transport weight of the delivery route exceeds the maximum weight limit for the goods; The estimated delivery time of any target delivery task in the delivery route is later than its delivery time and exceeds the maximum allowable delay.
7. The method according to claim 1, characterized in that, The task information for obtaining the target delivery task includes: Based on the logistics routing information of the delivery tasks, the task information of the delivery tasks that arrive at the current warehouse within a preset time period is collected in real time, and the delivery tasks with a cargo weight of not less than a second weight threshold are selected as the target delivery tasks.
8. A device for determining a cargo delivery route, characterized in that, include: The acquisition module is used to acquire task information for several target delivery tasks, including the arrival time of goods in the warehouse, the weight of goods, the delivery time and the delivery location. The task clustering module is used to perform time clustering and spatial clustering on the target delivery task based on the time clustering conditions constructed by the arrival time and weight of the goods, and the spatial clustering conditions constructed by the weight of the goods, the delivery location, and the number of tasks, to obtain candidate task clusters. An evaluation module is used to evaluate the candidate task clusters based on a preset clustering evaluation function to obtain effective task clusters; wherein the evaluation value of the effective task clusters is greater than a preset evaluation threshold. The path determination module is used to determine at least one delivery path based on the delivery location of each target delivery task in the effective task cluster, and select the delivery path with the lowest cost as the target delivery path.
9. An electronic device, characterized in that, include: processor; as well as A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores executable code that, when executed by a processor of an electronic device, causes the processor to perform the method as described in any one of claims 1-7.