Order method and device thereof, computer storable medium
By dividing orders into different sets and performing route planning, the problem of low order delivery efficiency in existing technologies is solved, and efficient order delivery is achieved.
Patent Information
- Application Number
- CN201910906157.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-24
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2039-09-24
AI Technical Summary
Existing order delivery technologies use a single delivery method, resulting in low delivery efficiency.
Orders are divided into different sets based on their attributes, and routes are planned based on the location relationships between the orders and the location relationships of the delivery origin, with different delivery methods used for order delivery.
This improves the efficiency of order delivery, ensuring that orders are delivered in a timely and efficient manner.
Smart Images

Figure CN112633786B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, in particular to an order delivery method and device thereof, and a computer storage medium. BACKGROUND
[0002] Related order delivery technology determines orders in the same area on an electronic map as a set of to-be-delivered orders, and sends each set of to-be-delivered orders to each delivery person, so that each delivery person delivers the orders. SUMMARY
[0003] The inventor believes that related order delivery technology uses a single order delivery method for delivery, which is low in delivery efficiency.
[0004] To solve the above technical problems, the present disclosure provides a solution that uses different order delivery methods for different orders to improve delivery efficiency.
[0005] According to a first aspect of the present disclosure, an order delivery method is provided, comprising: dividing a plurality of orders into a first order set and a second order set according to attributes; determining a first set of to-be-delivered orders according to the areas where the orders in the first order set are located, and delivering the orders according to the first set of to-be-delivered orders; performing path planning according to the positional relationships between the positions of the orders in the second order set, and the positional relationships between the positions of the orders in the second order set and the position of a delivery starting point, determining a second set of to-be-delivered orders and their to-be-delivered paths, and delivering the orders according to the to-be-delivered paths.
[0006] In some embodiments, the path planning comprises: selecting each to-be-delivered order in the second set of to-be-delivered orders according to the positional relationships between the positions of the orders in the second order set, and the positional relationships between the positions of the orders in the second order set and the position of the delivery starting point, so that in the case that the number of to-be-delivered orders is less than or equal to a first threshold, the total length of to-be-delivered paths is less than or equal to a second threshold, and the expected delivery time of each to-be-delivered order is not later than a third threshold of each to-be-delivered order, the absolute value of the difference between the number of to-be-delivered orders and the first threshold is minimized and the total length of to-be-delivered paths is shortest.
[0007] In some embodiments, the positional relationships between the positions of the orders in the second order set comprise distances, and the positional relationships between the positions of the orders in the second order set and the position of the delivery starting point comprise distances or angles between lines determined by the positions of different orders and the position of the delivery starting point.
[0008] In some embodiments, each region comprises a plurality of sub-regions, the distance between the positions of different orders in the second order set comprises the Manhattan distance of the positions of the different orders in the second order set in the case that the different orders in the second order set are in the same sub-region, the distance between the positions of different orders in the second order set comprises the Manhattan distance between the center points of the sub-regions where the different orders in the second order set are located in the case that the different orders in the second order set are in different sub-regions, the distance between the position of each order in the second order set and the position of the delivery starting point comprises the Manhattan distance between the position of the order and the position of the delivery starting point in the case that any one of the orders in the second order set and the delivery starting point are in the same sub-region, and the distance between the position of each order in the second order set and the position of the delivery starting point comprises the Manhattan distance between the center point of the sub-region where the order is located and the center point of the sub-region where the delivery starting point is located in the case that any one of the orders in the second order set and the delivery starting point are in different sub-regions.
[0009] In some embodiments, the i-th to-be-delivered order on the to-be-delivered path is selected by using a vehicle routing problem with time windows (VRPTW) model, where i is an integer greater than or equal to 1, and the selection comprises: when i = 1, selecting the first to-be-delivered order from the order in the second order set whose position is closest to the position of the delivery starting point. When i > 1, selecting the i-th to-be-delivered order from the order in the other orders in the second order set whose position is closest to the position of the (i-1)-th to-be-delivered order, in the case that there is at least one order in the other orders whose position and the position of the (i-1)-th to-be-delivered order and the position of the delivery starting point determine an angle less than a fourth threshold.
[0010] In some embodiments, in the case that there is no order in the other orders whose position and the position of the (i-1)-th to-be-delivered order and the position of the delivery starting point determine an angle less than a fourth threshold, the i-th to-be-delivered order is selected from the order in the other orders whose position is less than a fifth threshold from the position of the (i-1)-th to-be-delivered order.
[0011] In some embodiments, in the case that there are multiple orders in the other orders whose position is closest to the position of the (i-1)-th to-be-delivered order, or there are multiple orders in the other orders whose position is less than a fifth threshold from the position of the (i-1)-th to-be-delivered order, the i-th to-be-delivered order is selected from the order with the smallest angle.
[0012] In some embodiments, in the case where multiple orders exist with the smallest included angle, the order with the smallest absolute value of the difference between the predicted delivery time and the third threshold value is selected as the i-th order to be delivered.
[0013] In some embodiments, dividing the multiple orders into the first order set and the second order set according to the attribute comprises: dividing the orders whose attribute satisfies a specific condition into the first order set; and dividing the other orders except the first order set into the second order set.
[0014] In some embodiments, the attribute comprises at least one of the latest delivery time, the number of items, and the weight of items.
[0015] In some embodiments, the specific condition comprises at least one of the latest delivery time being earlier than the current time, the number of items being greater than a threshold value of the number of items, and the weight of items being greater than a threshold value of the weight of items.
[0016] In some embodiments, determining the first order set to be delivered according to the region where each order in the first order set is located comprises: selecting N orders belonging to the same region from the first order set, N being a positive integer; and determining the N orders as the first order set to be delivered corresponding to the region.
[0017] According to a second aspect of the present disclosure, an order delivery device is provided, comprising: a division module configured to divide multiple orders into a first order set and a second order set according to an attribute; a first order delivery module configured to determine a first order set to be delivered according to the region where each order in the first order set is located, and perform order delivery according to the first order set to be delivered; and a second order delivery module configured to perform path planning according to the positional relationship between the positions of each order in the second order set and the positional relationship between the position of each order and the position of a delivery starting point, determine a second order set to be delivered and a delivery path to be delivered, and perform order delivery according to the delivery path to be delivered.
[0018] According to a third aspect of the present disclosure, an order delivery device is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute an order delivery method according to any of the above embodiments based on instructions stored in the memory.
[0019] According to a fourth aspect of the present disclosure, a computer storage medium is provided, having computer program instructions stored thereon, the instructions being executed by a processor to implement an order delivery method according to any of the above embodiments.
[0020] In the above embodiments, different order delivery methods are used for different orders, which improves the delivery efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0022] The present disclosure can be more clearly understood with reference to the following detailed description together with the appended drawings, in which:
[0023] Figure 1A A flowchart illustrating an order delivery method according to some embodiments of the present disclosure is shown;
[0024] Figure 1B A flowchart illustrating path planning according to some embodiments of the present disclosure is shown;
[0025] Figure 1C A schematic diagram illustrating path planning according to some embodiments of the present disclosure is shown;
[0026] Figure 2 A block diagram illustrating an order delivery apparatus according to some embodiments of the present disclosure is shown;
[0027] Figure 3 A block diagram illustrating an order delivery apparatus according to some embodiments of the present disclosure is shown;
[0028] Figure 4 A block diagram illustrating a computer system for implementing some embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0029] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of the components and steps set forth in the embodiments, numerical expressions, and numerical values are not limiting to the scope of the present disclosure unless specifically stated otherwise.
[0030] It should be understood, however, that the sizes of the components shown in the drawings are chosen for convenience only, and do not bear any relationship to actual sizes.
[0031] The following description of at least one example embodiment is merely illustrative in nature and is in no way limiting to the scope of the present disclosure and its applications or uses.
[0032] Techniques, methods, and devices known to those of ordinary skill in the relevant art can not be discussed in detail herein, but should be considered as part of the specification, where appropriate.
[0033] In all of the examples shown and discussed herein, any specific values should be interpreted as merely illustrative and not as a limitation. Thus, other examples of the exemplary embodiments can have different values.
[0034] It should be noted that like numerals and letters refer to like items throughout the several views, as such, once an item is defined in one view, it should not need to be further discussed in subsequent views.
[0035] Figure 1A A flowchart of an order delivery method according to some embodiments of the present disclosure is shown.
[0036] As shown in Figure 1A the order delivery method includes a step S110 of dividing a plurality of orders into a first order set and a second order set according to an attribute; a step S120 of determining a first to-be-delivered order set according to a region where each order of the first order set is located, and performing order delivery according to the first to-be-delivered order set; and a step S130 of performing path planning according to a positional relationship between positions of each order of the second order set, a positional relationship between the positions of each order and a position of a delivery starting point, determining a second to-be-delivered order set and a to-be-delivered path thereof, and performing order delivery according to the to-be-delivered path.
[0037] In some embodiments, the order delivery method is performed by an order delivery device or an order delivery system. The order delivery device or the order delivery system performs the step S120 and the step S130 at a regular time to process the first order set and the second order set.
[0038] In the step S110, the plurality of orders are divided into the first order set and the second order set according to the attribute. In some embodiments, the attribute includes at least one of a latest delivery time, an item quantity, and an item weight. For example, the latest delivery time is a difference between an actual receipt time and a preparation time. The preparation time is, for example, a time from when the order delivery system or the order delivery device receives an order from an upstream system to when packaging is completed. It should be understood that the latest delivery time can be reasonably configured according to actual conditions.
[0039] The plurality of orders are divided into the first order set and the second order set according to the attribute, for example, by the following manner.
[0040] First, orders whose attribute satisfies a specific condition are divided into the first order set. In some embodiments, the specific condition includes at least one of the latest delivery time being earlier than a current time, the item quantity being greater than an item quantity threshold, and the item weight being greater than an item weight threshold. The current time is, for example, a time when the order delivery system or the order delivery device receives the plurality of orders.
[0041] In some embodiments, the orders whose attributes satisfy the certain condition are some special orders. For example, the orders whose latest delivery time is earlier than the current time are emergency orders. Since complex calculation will cause time delay, the emergency orders cannot be delivered in time. The way of delivering the orders according to the areas can ensure that the emergency orders are delivered in time as much as possible. The orders whose quantity of items is greater than the quantity threshold of items or whose weight of items is greater than the weight threshold of items are large orders. Such orders need to be delivered separately or in a small range. The way of delivering the orders according to the areas can meet the delivery demand of such orders as much as possible. In some embodiments, the certain condition further includes the orders containing valuable items or the orders not within the delivery range of the location of the delivery starting point. For example, the orders on the edge of the delivery range can be determined as not within the delivery range.
[0042] Then, the other orders except the first order set are divided into the second order set. For example, the other orders except the first order set are non-special orders.
[0043] In step S120, the first order set is divided into a plurality of first order subsets according to the areas where the orders of the first order set are located. In some embodiments, one area is composed of a certain number of cells near a certain landmark or a certain location in the electronic map. For example, 10 cells near a park on the electronic map form an area. It should be noted that the cell here is the actual residential cell in the electronic map.
[0044] For example, the first order set is divided into a plurality of first order subsets according to the areas where the orders of the first order set are located in the following way.
[0045] Firstly, N orders belonging to the same area are selected from the first order set, N being a positive integer. In some embodiments, the area in the electronic map has an area identifier. In the case that the area identifiers of the areas where any two orders are located are the same, the two orders belong to the same area. In some embodiments, the upstream system establishes an association relationship between each order and the area identifier. The order delivery system or the order delivery device determines whether each order belongs to the same area according to the association relationship between the order and the area identifier. For example, N is the maximum order number.
[0046] Then, the N orders are determined as the first order subset corresponding to the area. It should be understood that one area can correspond to a plurality of first order subsets. For example, the maximum order number N is 10, and there are 20 orders belonging to an area in the first order set. Then, the area corresponds to two first order subsets, and each first order subset contains 10 orders.
[0047] According to the order delivery method, the order delivery system or the order delivery device can send the set of orders to be delivered to the delivery personnel, and the delivery personnel can deliver the orders according to the set of orders to be delivered. According to the order delivery method, the order delivery system or the order delivery device can also plan a path for the set of orders to be delivered by using the order delivery method described in step S130, and send the planned path to the corresponding delivery personnel, and the delivery personnel can deliver the orders according to the planned path.
[0048] In step S130, the path is planned according to the positional relationship between the positions of the orders in the second set of orders and the positional relationship between the position of each order and the position of the delivery starting point, the second set of orders to be delivered and the paths of the orders to be delivered are determined, and the orders are delivered according to the paths of the orders to be delivered. The order delivery according to the paths of the orders to be delivered includes sending the paths of the orders to be delivered to the corresponding delivery personnel, and the delivery personnel can deliver the orders according to the paths of the orders to be delivered. For example, the positions of the orders and the position of the delivery starting point are represented by the latitude and longitude on the electronic map. The delivery starting point is, for example, a delivery store.
[0049] In some embodiments, the positional relationship respectively includes a distance.
[0050] For example, in the case that different orders in the second set of orders are in the same sub-region, the distance between the positions of the orders in the second set of orders includes the Manhattan distance between the positions of the different orders in the second set of orders.
[0051] In the case that different orders in the second set of orders are in different sub-regions, the distance between the positions of the orders in the second set of orders includes the Manhattan distance between the center points of the sub-regions where the different orders in the second set of orders are located.
[0052] In the case that any one of the orders in the second set of orders and the delivery starting point are in the same sub-region, the distance between the position of the order and the position of the delivery starting point includes the Manhattan distance between the position of the order and the position of the delivery starting point.
[0053] In the case that any one of the orders in the second set of orders and the delivery starting point are in different sub-regions, the distance between the position of the order and the position of the delivery starting point includes the Manhattan distance between the center point of the sub-region where the order is located and the center point of the sub-region where the delivery starting point is located.
[0054] In some embodiments, each region in the electronic map includes a plurality of sub-regions. For example, each region is subdivided to obtain a plurality of sub-regions. For example, a region includes 10 small areas, and the region is subdivided, and the adjacent 5 small areas in the region are taken as one sub-region of the region, and the remaining 5 small areas are taken as another sub-region of the region.
[0055] By dividing the region into multiple sub-regions and calculating the distance in different cases, the performance of the calculation is improved, and the order delivery efficiency is improved. The above distance can also be calculated in advance and stored in memory, and directly read from memory when used, which improves the order delivery efficiency. For example, the above distances are stored in the memory in the form of a distance matrix.
[0056] In some embodiments, the positional relationship between the position of each order and the position of the delivery starting point also includes the included angle between the line determined by the position of any two orders and the position of the delivery starting point. For example, the smaller the included angle, the more convenient the delivery of the two orders.
[0057] In some embodiments, the path planning is performed as follows.
[0058] According to the positional relationship between the positions of the orders in the second order set and the positional relationship between the position of each order and the position of the delivery starting point, each to-be-delivered order in the second to-be-delivered order set is selected, so that in the case that the number of to-be-delivered orders is less than or equal to a first threshold value, the total length of the to-be-delivered path is less than or equal to a second threshold value, and the expected delivery time of each to-be-delivered order is not later than a third threshold value of each to-be-delivered order, the absolute value of the difference between the number of to-be-delivered orders and the order quantity threshold value is minimized and the total length of the to-be-delivered path is minimized.
[0059] The first threshold value is, for example, the maximum number of orders that can be delivered by a delivery person. In some embodiments, the first threshold value is variable. For example, the first threshold value is set to 10 according to experience. In special cases, such as the presence of special routes on the delivery path or special weather on the delivery day, a penalty coefficient is multiplied on the basis of the first threshold value, and the maximum number of orders is appropriately reduced. The greater the impact of the special case on delivery, the smaller the penalty coefficient. The first threshold value can also be fine-tuned according to experience, and there can be some error with experience.
[0060] The total length of the to-be-delivered path is the total length from the delivery starting point to each to-be-delivered order and then back to the delivery starting point. The second threshold value is, for example, 15 kilometers. The second threshold value can also be fine-tuned, and there can be some error with experience. In some embodiments, the total length of the to-be-delivered path is the total length from the delivery starting point to each to-be-delivered order in turn.
[0061] The estimated time of arrival of each to-be-delivered order is, for example, a calculated time. In some embodiments, the to-be-delivered orders include an ith to-be-delivered order, i being an integer greater than or equal to 2, and the estimated time of arrival is obtained by summing a current time and a sum of a delivery time length of the 1st to-be-delivered order to the (i-1)th to-be-delivered order and a sum of a service time length of the 1st to-be-delivered order to the (i-1)th to-be-delivered order. When i = 1, the delivery time length of the 1st to-be-delivered order is a distance between a location of a delivery starting point and a location of the 1st to-be-delivered order divided by a riding speed. When i > 1, the delivery time length of the ith to-be-delivered order is a distance between a location of the (i-1)th to-be-delivered order and a location of the ith to-be-delivered order divided by a speed. The speed is, for example, a riding speed or a walking speed. The third threshold of each to-be-delivered order is an actual time of arrival of the order, i.e., a time of arrival specified by a user when placing an order or a time of arrival automatically generated by an upstream system. The third threshold may, for example, also be set as a value having a certain error from the actual time of arrival. For example, five minutes earlier or five minutes later than the actual time of arrival.
[0062] In other embodiments, the to-be-delivered orders include an ith to-be-delivered order, i being an integer greater than or equal to 1, on the to-be-delivered path. Each to-be-delivered order is selected by using a VRPTW (vehicle routing problems with time windows) model.
[0063] The selection of each to-be-delivered order by using the VRPTW model is, for example, achieved in the following manner.
[0064] When i = 1, the 1st to-be-delivered order is selected from the orders in the second order set whose locations are closest to a location of a delivery starting point.
[0065] When there are multiple orders whose locations are closest to the location of the delivery starting point, one of the multiple orders is randomly selected as the 1st to-be-delivered order. In some embodiments, the order whose absolute value of a difference between the estimated time of arrival and the third threshold is the smallest is selected as the 1st to-be-delivered order from the multiple orders.
[0066] When i > 1, the ith to-be-delivered order is selected from the orders in the second order set other than the 1st to-be-delivered order to the (i-1)th to-be-delivered order, in a case where there is at least one order whose location and a location of the (i-1)th to-be-delivered order determine an angle with a line between the location of the delivery starting point and the location of the (i-1)th to-be-delivered order that is less than a fourth threshold.
[0067] For example, the fourth threshold value is 45 degrees. The smaller the angle between the line connecting the positions of the two orders and the position of the delivery starting point, the more convenient the delivery of the two orders. This order delivery method considering the angle further improves the order delivery efficiency.
[0068] In some embodiments, in the case where there is no order in the other orders whose angle between the position of the order and the position of the i-1th order to be delivered and the position of the delivery starting point is less than the fourth threshold value, the i-th order to be delivered is selected from the orders in the other orders whose distance between the position of each order and the position of the i-1th order to be delivered is less than the fifth threshold value.
[0069] For example, the fifth threshold value is 1.5 kilometers. This order delivery method takes into account orders that are not convenient but close in distance, and further improves the order delivery efficiency in a more flexible manner.
[0070] In some embodiments, in the case where there are multiple orders in the other orders whose distance between the position of the order and the position of the i-1th order to be delivered is the shortest, or there are multiple orders in the other orders whose distance between the position of the order and the position of the i-1th order to be delivered is less than the fifth threshold value, the order with the smallest angle is selected as the i-th order to be delivered. That is, in the case where there are multiple orders with the shortest distance or multiple orders with a distance less than the fifth threshold value, the order with the smallest angle is selected as the i-th order to be delivered, so that the order delivery is more convenient, and the order delivery efficiency is further improved. In some embodiments, in the case where there are multiple orders with a distance less than the fifth threshold value and the smallest angle, the order with the shortest distance is selected as the i-th order to be delivered.
[0071] Figure 1B A flowchart of path planning according to some embodiments of the present disclosure is shown.
[0072] As shown in Figure 1B , the path planning includes steps S1301-S1321. The initial value of i is 1, and i is a positive integer.
[0073] In step S1301, the order in the second order set whose distance between the position and the position of the delivery starting point is the shortest is selected. Generally, the first threshold value is greater than 1, and the 1st order to be delivered is a mandatory order.
[0074] In step S1302, it is judged whether a distance from the distribution starting point to any one of the orders with the shortest distance and back to the distribution starting point, i.e. twice the shortest distance, is less than or equal to the second threshold value. In the case where twice the shortest distance is greater than the second threshold value, step S1319 is executed. In step S1319, the path planning is ended. In this case, the path planning ended is the order for which the path planning fails, and the order for which the path planning fails can be divided into the first order set. This case is an extreme case, and in general, there will always be an order for which twice the shortest distance is less than or equal to the second threshold value. In the case where twice the shortest distance is less than or equal to the second threshold value, step S1303 is executed.
[0075] In step S1303, it is judged whether there is an order with a predicted receipt time not later than the third threshold value. In the case where there is no order with a predicted receipt time not later than the third threshold value, step S1319 is executed. In the case where there is an order with a predicted receipt time not later than the third threshold value, step S1304 is executed.
[0076] In step S1304, it is judged whether there are multiple orders with a predicted receipt time not later than the third threshold value. In the case where there are multiple orders with a predicted receipt time not later than the third threshold value, step S1305 is executed.
[0077] In step S1305, one of the orders with a predicted receipt time not later than the third threshold value is randomly selected as the first to-be-distributed order. At the same time, step S1308 is executed after i+1. In the case where there is no order with a predicted receipt time not later than the third threshold value, step S1319 is executed. This case is an extreme case, and in general, when the first to-be-distributed order is selected, there will not be a case where the predicted receipt time of all orders is later than the third threshold value.
[0078] In the case where there is only one order with a predicted receipt time not later than the third threshold value, step S1307 is executed.
[0079] In step S1307, the order is selected as the first to-be-distributed order. At the same time, step S1308 is executed after i+1.
[0080] In step S1308, it is judged whether i is less than or equal to the first threshold value. In the case where i is greater than the first threshold value, step S1319 is executed. In this case, the path planning ended can be an order to be distributed or multiple to-be-distributed orders equal to the first threshold value. In actual application scenarios, the case where one to-be-distributed order is obtained is an extreme case and rarely occurs. In the case where i is less than or equal to the first threshold value, step S1310 is executed.
[0081] In step S1310, it is judged whether there is an order in the second order set other than the 1st to-be-delivered order, whose position and the position of the i-1th to-be-delivered order determine an included angle with a position of the delivery starting point less than the fourth threshold value.
[0082] In the case where there is an order whose included angle is less than the fourth threshold value, step S1311 is executed. In step S1311, it is judged whether there is one order whose distance to the position of the i-1th to-be-delivered order is the shortest among the orders whose included angle is less than the fourth threshold value.
[0083] In the case where there is only one order whose distance to the position of the i-1th to-be-delivered order is the shortest among the orders whose included angle is less than the fourth threshold value, step S1318 is executed. In step S1318, it is judged whether the selected order as the i-th to-be-delivered order satisfies that the total length of the to-be-delivered path is less than or equal to the second threshold value and the time of receiving the goods is not later than the third threshold value.
[0084] In the case where it is satisfied, step S1317 is executed. In step S1317, the order is selected as the i-th to-be-delivered order. Meanwhile, step S1308 is executed after i+1. In the case where it is not satisfied, step S1314 is executed.
[0085] In the case where there are multiple orders whose distance to the position of the i-1th to-be-delivered order is the shortest among the orders whose included angle is less than the fourth threshold value, step S1312 is executed. In step S1312, it is judged whether there are multiple orders whose included angle is the smallest among the orders whose distance is the shortest.
[0086] In the case where there are multiple orders whose included angle is the smallest among the orders whose distance is the shortest, step S1313 is executed. In step S1313, it is judged whether there is an order which satisfies that the total length of the to-be-delivered path is less than or equal to the second threshold value and the time of receiving the goods is not later than the third threshold value among the multiple orders whose included angle is the smallest.
[0087] In the case where there is no order which satisfies that the total length of the to-be-delivered path is less than or equal to the second threshold value and the time of receiving the goods is not later than the third threshold value, step S1319 is executed.
[0088] In the case where there is an order which satisfies that the total length of the to-be-delivered path is less than or equal to the second threshold value and the time of receiving the goods is not later than the third threshold value, step S1320 is executed. In step S1320, it is judged whether there are multiple orders which satisfy that the total length of the to-be-delivered path is less than or equal to the second threshold value and the time of receiving the goods is not later than the third threshold value.
[0089] In the case where there are multiple orders that satisfy the total length of the to-be-delivered path being less than or equal to the second threshold value and the time of receiving the goods being not later than the third threshold value, step S1321 is performed. In step S1321, one of the multiple orders that satisfy the total length of the to-be-delivered path being less than or equal to the second threshold value and the time of receiving the goods being not later than the third threshold value is randomly selected as the ith to-be-delivered order. Meanwhile, step S1308 is performed after i+1. In some embodiments, the order with the minimum absolute value of the difference between the time of receiving the goods and the third threshold value can also be selected as the ith to-be-delivered order.
[0090] In the case where there is only one order that satisfies the total length of the to-be-delivered path being less than or equal to the second threshold value and the time of receiving the goods being not later than the third threshold value, step S1317 is performed.
[0091] In the case where there is only one order with the minimum included angle in the order with the shortest distance, step S1318 is performed.
[0092] In the case where there is no order with the included angle being less than the fourth threshold value, step S1314 is performed. In step S1314, it is determined whether there is an order with the included angle being greater than or equal to the fourth threshold value and the distance from the (i-1)th to-be-delivered order being less than the fifth threshold value in the other orders. Here, the included angle refers to the included angle between the line determined by the position of the order and the position of the (i-1)th to-be-delivered order and the delivery starting point.
[0093] In the case where there is no order with the included angle being greater than or equal to the fourth threshold value and the distance from the (i-1)th to-be-delivered order being less than the fifth threshold value, step S1319 is performed. In this case, there are two situations for ending the path planning. One is that after the first to-be-delivered order is selected, no suitable order can be selected as the second to-be-delivered order, in which case, the order can be sent to the delivery personnel as a to-be-delivered path, or the order can be divided into the first order set. The other is that the number of selected to-be-delivered orders is greater than 2, the path planning is completed, and the second to-be-delivered order set and the to-be-delivered path thereof are obtained.
[0094] In the case where there is an order with the included angle being greater than or equal to the fourth threshold value and the distance from the (i-1)th to-be-delivered order being less than the fifth threshold value, step S1315 is performed. In step S1315, it is determined whether there are multiple orders with the included angle being greater than or equal to the fourth threshold value and the distance from the (i-1)th to-be-delivered order being less than the fifth threshold value.
[0095] In the case where there is only one order with the included angle being greater than or equal to the fourth threshold value and the distance from the (i-1)th to-be-delivered order being less than the fifth threshold value, step S1317 is performed.
[0096] In a case where multiple orders exist that have an included angle greater than or equal to the fourth threshold value and a distance from the i-1th to-be-delivered order that is less than the fifth threshold value, step S1316 is performed. In step S1316, it is determined whether multiple orders exist that have the smallest included angle among the orders that have an included angle greater than or equal to the fourth threshold value and a distance from the i-1th to-be-delivered order that is less than the fifth threshold value. In a case where multiple orders exist, step S1313 is performed. In a case where multiple orders do not exist, step S1317 is performed.
[0097] Figure 1C A schematic diagram of path planning according to some embodiments of the present disclosure is shown.
[0098] As shown in Figure 1C Table 1, the second order set includes A, B, C, D, E, F, G, and H, a total of 8 orders. It is assumed that the service time of each order is 3 minutes, i is a positive integer, and the initial value is 1, which is incremented by 1 each time a to-be-delivered order is selected.
[0099] The order delivery method according to some embodiments of the present disclosure is described below with the current time being 10:00, the riding speed being 200 meters / minute, the first threshold value being 6, the second threshold value being 13 kilometers, the fourth threshold value being 45 degrees, and the fifth threshold value being 1.5 kilometers as examples. Table 1 shows the third threshold value of each order, i.e., the latest delivery time. Table 2 shows the distance between the positions of each order and the distance between the position of each order and the position of the delivery starting point. Table 3 shows the included angle between the line determined by the position of each order and the position of the delivery starting point.
[0100] Table 1: Third threshold value of each order
[0101] Order A B C D E F G H Latest delivery time 10:10 10:23 10:37 10:48 11:01 11:11 10:28 11:30
[0102] Table 2: Distance between positions of each order and distance between position of each order and position of delivery starting point
[0103] Distance (km) O A B C D E F G H O 0 1 3.2 4.4 3 1.4 1.3 2.8 1 A 1 0 2 3 3.3 1.8 2.2 2 2 B 3.2 2 0 1.5 2.1 2.6 4 0.4 3.9 C 4.4 3 1.5 0 1.5 3.6 4.7 1.3 4.5 D 3 3.3 2.1 1.5 0 2 3.2 1.3 3.1 E 1.4 1.8 2.6 3.6 2 0 1.3 2.5 1.4 F 1.3 2.2 4 4.7 3.2 1.3 0 3.7 0.5 G 2.8 2 0.4 1.3 1.3 2.5 3.7 0 3.6 H 1 2 3.9 4.5 3.1 1.4 0.5 3.6 0
[0104] Table 3: Included angle between line determined by position of each order and position of delivery starting point
[0105] Angle (deg) OA OB OC OD OE OF OG OH OA 0 15 34 54 84 134 29 148 OB 15 0 19 44 74 124 14 138 OC 34 19 0 25 55 105 5 119 OD 54 44 25 0 30 80 30 94 OE 84 74 55 30 0 50 60 64 OF 134 124 105 80 50 0 110 14 OG 29 14 5 30 60 110 0 124 OH 148 138 119 94 64 14 124 0
[0106] First, the initial value of i is 1, which is obviously less than 7. The first to-be-delivered order is selected from the second order set.
[0107] The order with the shortest distance between the position and the position of the delivery starting point in the second order set is selected. As can be seen from Table 2, the orders with the shortest distance between the position and the position of the delivery starting point O are order A and order H.
[0108] Determine if twice the shortest distance is less than or equal to the second threshold. Referring to Table 2, the distance from the delivery origin O, through the location of order A or H, and back to the delivery origin O, which is twice the shortest distance, is 2 kilometers, less than 13 kilometers.
[0109] Determine if there are any orders with an estimated delivery time no later than the third threshold. The estimated delivery time for orders A and H is calculated to be 10:08. As shown in Table 1, orders A and H both meet the requirement that their estimated delivery times are earlier than the third threshold corresponding to orders A and H.
[0110] Clearly, multiple orders meet the condition that their estimated delivery time is earlier than the third threshold. One order is randomly selected from orders A and H as the first order to be delivered. Order A is selected as the first order to be delivered. In some embodiments, order A, which has the smallest difference between its estimated delivery time and the third threshold, is selected as the first order to be delivered. The estimated delivery time of order A is obtained by summing the current time, the delivery time of order A, and the service time of order A. The delivery time of order A is the distance between the delivery starting point O and the location of order A divided by the riding speed.
[0111] Secondly, after i+1, the value of i is 2, which is obviously less than 7. The second order to be delivered is selected from all orders except order A in the second order set.
[0112] Determine if any of the other orders have an angle less than the fifth threshold. Table 3 shows that the angles between the lines connecting the positions of orders B, G, and C, and the position of order A, and the delivery starting point O, are all less than 45 degrees.
[0113] Determine if there are multiple orders with the shortest distance. Table 2 shows that among orders B, G, and C, order B has the shortest distance to the position of order A.
[0114] Order B is selected as the second order to be delivered because the total length of the delivery route is less than or equal to the second threshold and the delivery time is no later than the third threshold. Table 1 shows that the total length of the delivery route, from the delivery origin O, through the location of order A to the location of order B, and back to the delivery origin O, is 6.2 kilometers, which is less than 13 kilometers. Furthermore, the estimated delivery time for order B is 10:21. Table 1 shows that order B meets the requirement that its estimated delivery time is earlier than the third threshold.
[0115] Therefore, order B is selected as the second order to be delivered.
[0116] Similarly, order G is selected as the 3rd order to be delivered.
[0117] Then, at this time, the value of i is 4, which is obviously less than 7. The 4th to-be-delivered order is selected from the other orders in the second order set except for orders A, B, and G.
[0118] It is determined whether there is an order in the other orders whose included angle is less than the fifth threshold value. As can be seen from Table 3, the included angles between the positions of orders C and D and the position of order G and the position of the delivery starting point O are all less than 45 degrees.
[0119] It is determined whether there is more than one order with the shortest distance. As can be seen from Table 2, the distance between the positions of orders C and D and the position of order G is the same, i.e., the distance is the shortest.
[0120] It is determined whether there is more than one order with the smallest included angle. As can be seen from Table 3, the included angle a between the position of order C and the position of order G and the position of the delivery starting point O is less than the included angle b between the position of order D and the position of order G and the position of the delivery starting point O.
[0121] It is determined whether there is an order that satisfies the total length of the to-be-delivered path being less than or equal to the second threshold value and the expected receipt time being no later than the third threshold value. As can be seen from Table 2, the distance from the position of the delivery starting point O to the positions of orders A, B, G, and C in turn and then back to the position of the delivery starting point O, i.e., the total length of the to-be-delivered path, is 7.5 kilometers, which is less than 13 kilometers. Similarly, it is calculated that the expected receipt time of order C is 10:26, and order C satisfies the expected receipt time being earlier than the third threshold value corresponding to order C.
[0122] Therefore, order C is selected as the 4th to-be-delivered order.
[0123] Similarly, orders D and E are selected as the 5th and 6th to-be-delivered orders, respectively.
[0124] Finally, at this time, the value of i is 7, which is obviously equal to 7. The 7th to-be-delivered order is selected from the other orders in the second order set except for orders A, B, G, C, D, and E.
[0125] As can be seen from Table 3, there is no order in the other orders whose included angle is less than the fourth threshold value. It is determined whether there is an order in the other orders whose included angle is greater than or equal to the fourth threshold value and whose distance from the (i-1)th to-be-delivered order is less than the fifth threshold value. In combination with Table 3, the included angles between the positions of orders F and H and the position of order G and the position of the delivery starting point O are all greater than 45 degrees. As can be seen from Table 2, the distances between the positions of orders F and H and the position of order E are both less than 1.5 kilometers.
[0126] Obviously, there are multiple orders whose included angle is greater than or equal to the fourth threshold value and the distance from the i-1th to-be-delivered order is less than the fifth threshold value. It is determined whether there are multiple orders with the smallest included angle. As can be seen from Table 3, the included angle γ between the line determined by the position of order F and the position of order E and the position of the delivery starting point O is smaller than the included angle θ between the line determined by the position of order H and the position of order E and the position of the delivery starting point O.
[0127] It is determined whether there is an order that satisfies the total length of the to-be-delivered path being less than or equal to the second threshold value and the time of receiving the order being not later than the third threshold value. As can be seen from Table 2, the distance from the position of the delivery starting point O to the positions of orders A, B, G, C, D, E, F in turn and then back to the position of the delivery starting point O is 10.8 kilometers, which is less than 13 kilometers. In addition, the estimated time of receiving order F is about 11:09, and as can be seen from Table 1, order F satisfies the estimated time of receiving the order being earlier than the third threshold value corresponding to order F.
[0128] Therefore, order F is selected as the 7th to-be-delivered order.
[0129] At this point, the value of i becomes 8, that is, if the to-be-delivered order is continued to be selected, the number of to-be-delivered orders will be greater than 7, and the selection of to-be-delivered orders is stopped, and the path planning is ended.
[0130] In summary, the second to-be-delivered order set includes orders A, B, G, C, D, E, and F. The to-be-delivered path is delivery starting point→1st to-be-delivered order (A)→2nd to-be-delivered order (B)→3rd to-be-delivered order (G)→4th to-be-delivered order (C)→5th to-be-delivered order (D)→6th to-be-delivered order (E)→7th to-be-delivered order (F). The second to-be-delivered order set and its to-be-delivered path obtained by the order delivery method according to some embodiments of the present disclosure satisfy the smallest difference between the first threshold value and the number of to-be-delivered orders and the shortest total to-be-delivered path in the case that the number of to-be-delivered orders is less than or equal to the first threshold value, the total length of the to-be-delivered path is less than or equal to the second threshold value, and the estimated time of receiving each to-be-delivered order is less than or equal to the third threshold value.
[0131] Figure 2 A block diagram of an order delivery device according to some embodiments of the present disclosure is shown.
[0132] As Figure 2As shown, the order delivery device 2 includes a division module 21 configured to divide a plurality of orders into a first order set and a second order set according to an attribute, for example, performing step S110 as shown in FIG. 1; a first order delivery module 22 configured to determine a first to-be-delivered order set according to the area where each order of the first order set is located, and perform order delivery according to the first to-be-delivered order set, for example, performing step S120 as shown in FIG. 1; and a second order delivery module 23 configured to perform path planning according to the positional relationship between the positions of each order of the second order set and the positional relationship between the position of each order and the position of a delivery starting point, determine a second to-be-delivered order set and a to-be-delivered path thereof, and perform order delivery according to the to-be-delivered path, for example, performing step S130 as shown in FIG. 1.
[0133] Figure 3 A block diagram of an order delivery device of some embodiments of the present disclosure is shown.
[0134] As Figure 3 shown, the data transmission device 3 includes a memory 31 and a processor 32 coupled to the memory 31. The memory 31 is configured to store instructions corresponding to embodiments of the order delivery method. The processor 32 is configured to execute the order delivery method in any of some embodiments of the present disclosure based on the instructions stored in the memory 31.
[0135] Figure 4 A block diagram of a computer system for implementing some embodiments of the present disclosure is shown.
[0136] As Figure 4 shown, the computer system 40 can be in the form of a general-purpose computing device. The computer system 40 includes a memory 410, a processor 420, and a bus 400 connecting different system components.
[0137] The memory 410 may, for example, include system memory, non-volatile storage media, and the like. The system memory, for example, stores an operating system, application programs, a Boot Loader, and other programs, and the like. The system memory can include volatile storage media, such as random access memory (RAM) and / or cache memory. The non-volatile storage media, for example, stores instructions corresponding to embodiments of the order delivery method. The non-volatile storage media includes, but is not limited to, magnetic disk storage, optical storage, flash memory, and the like.
[0138] The processor 420 can be implemented with a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, etc. discrete hardware component. Accordingly, each module such as the determination module and the determination module can be implemented by a central processing unit (CPU) running instructions in the memory to perform corresponding steps, or by a special circuit performing corresponding steps.
[0139] The bus 400 can use any of a variety of bus structures. For example, the bus structure includes but is not limited to an industry standard architecture (ISA) bus, a micro channel architecture (MCA) bus, a peripheral component interconnect (PCI) bus.
[0140] The computer system 40 can also include an input / output interface 430, a network interface 440, a storage interface 450, etc. These interfaces 430, 440, 450 and the memory 410 and the processor 420 can be connected through the bus 400. The input / output interface 830 can provide a connection interface for display, mouse, keyboard, etc. Input / output device. The network interface 840 provides a connection interface for various networking devices. The storage interface 450 provides a connection interface for external storage devices such as floppy disks, U disks, SD cards, etc.
[0141] Here, various aspects of the disclosure are described with reference to flowcharts and / or block diagrams of methods, apparatuses and computer program products according to embodiments of the disclosure. It should be understood that each block of the flowchart and / or block diagram can be implemented by computer readable program instructions.
[0142] These computer readable program instructions can be provided to the processor of a general purpose computer, a special purpose computer, or other programmable device to generate a machine, so that the instructions executed by the processor generate an apparatus that implements the functions specified in one or more blocks of the flowchart and / or block diagram.
[0143] These computer readable program instructions can also be stored in a computer readable storage, which makes the computer work in a specific way, so as to generate a product, including instructions that implement the functions specified in one or more blocks of the flowchart and / or block diagram.
[0144] The present disclosure can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects.
[0145] Through the order delivery method and its device, computer storage medium in the above embodiment, different order delivery methods are used for different orders, which improves the delivery efficiency.
[0146] Thus far, the order delivery method according to the present disclosure and the apparatus thereof, the computer-storable medium have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details well-known in the art are not described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein according to the above description.
Claims
1. An order delivery method, comprising: dividing a plurality of orders into a first order set and a second order set according to an attribute, including: dividing orders whose attribute satisfies a certain condition into the first order set, and dividing other orders outside the first order set into the second order set, wherein the attribute includes at least one of a latest delivery time, an item quantity, and an item weight; determining a first to-be-delivered order set according to areas in which respective orders of the first order set are located, and performing order delivery according to the first to-be-delivered order set, including: selecting N orders belonging to a same area from the first order set, N being a positive integer; and determining the N orders as a first to-be-delivered order set corresponding to the area; performing path planning according to position relationships between positions of respective orders of the second order set and position relationships between the positions of the respective orders and a delivery starting point, determining a second to-be-delivered order set and a to-be-delivered path thereof, and performing order delivery according to the to-be-delivered path, including: selecting respective to-be-delivered orders in the second to-be-delivered order set according to the position relationships between the positions of the respective orders of the second order set and the position relationships between the positions of the respective orders and the delivery starting point, so that, in a case where a number of to-be-delivered orders is less than or equal to a first threshold value, a total length of to-be-delivered paths is less than or equal to a second threshold value, and an estimated receipt time of each to-be-delivered order is not later than a third threshold value of each to-be-delivered order, an absolute value of a difference between the number of to-be-delivered orders and the first threshold value is minimized and the total length of the to-be-delivered paths is shortest, wherein the first threshold value is a maximum number of orders that can be delivered by a delivery person.
2. The order delivery method according to claim 1, wherein, The position relationships between the positions of the respective orders of the second order set include distances, and the position relationships between the positions of the respective orders and the delivery starting point include distances or angles between lines determined by positions of different orders and the delivery starting point.
3. The order delivery method of claim 2, wherein, Each area includes a plurality of sub-areas, In a case where different orders of the second order set are in a same sub-area, distances between the positions of the respective orders of the second order set include Manhattan distances of the positions of the different orders of the second order set; In a case where different orders of the second order set are in different sub-areas, distances between the positions of the respective orders of the second order set include Manhattan distances between center points of the sub-areas in which the different orders of the second order set are located; In a case where any one order of the second order set and the delivery starting point are in a same sub-area, a distance between the position of the any one order and the position of the delivery starting point includes a Manhattan distance between the position of the any one order and the position of the delivery starting point; In a case where any one order of the second order set and the delivery starting point are in different sub-areas, a distance between the position of the any one order and the position of the delivery starting point includes a Manhattan distance between a center point of a sub-area in which the any one order is located and a center point of a sub-area in which the delivery starting point is located.
4. The order delivery method of claim 2, wherein, The to-be-delivered path includes an ith to-be-delivered order, i is an integer greater than or equal to 1, each to-be-delivered order is selected by using a vehicle routing problem with time windows VRPTW model, including: When i = 1, the first to-be-delivered order is selected from the order in the second order set whose position is closest to the position of the delivery starting point. When i > 1, in the other orders of the second order set except the first to-be-delivered order to the (i-1)th to-be-delivered order, if there is at least one order whose position and the position of the (i-1)th to-be-delivered order and the position of the delivery starting point determine an angle less than a fourth threshold, the ith to-be-delivered order is selected from the order in the other orders whose position is closest to the position of the (i-1)th to-be-delivered order.
5. The order delivery method of claim 4, wherein, When there is no order in the other orders whose position and the position of the (i-1)th to-be-delivered order and the position of the delivery starting point determine an angle less than the fourth threshold, the ith to-be-delivered order is selected from the order in the other orders whose distance to the position of the (i-1)th to-be-delivered order is less than a fifth threshold.
6. The order delivery method of claim 5, wherein, When there are multiple orders in the other orders whose distance to the position of the (i-1)th to-be-delivered order is less than the fifth threshold, or there are multiple orders in the other orders whose position and the position of the (i-1)th to-be-delivered order determine the smallest angle, the ith to-be-delivered order is selected from the order with the smallest angle.
7. The order delivery method of claim 6, wherein, When there are multiple orders with the smallest angle, the order with the smallest absolute value of the difference between the expected delivery time and a third threshold is selected as the ith to-be-delivered order.
8. The order delivery method of claim 1, wherein, The specific condition includes at least one of the following: the latest delivery time is earlier than the current time, the number of items is greater than a number of items threshold, and the weight of the items is greater than a weight of items threshold.
9. An order delivery device, comprising: a division module configured to divide a plurality of orders into a first order set and a second order set according to an attribute, including: dividing an order whose attribute satisfies a specific condition into the first order set, and dividing other orders except the first order set into the second order set, wherein the attribute includes at least one of the following: a latest delivery time, a number of items, and a weight of items; a first order delivery module configured to determine a first to-be-delivered order set according to an area where each order of the first order set is located, and perform order delivery according to the first to-be-delivered order set, including: selecting N orders belonging to the same area from the first order set, N being a positive integer; and determining the N orders as the first to-be-delivered order set corresponding to the area; and The second order delivery module is configured to determine a second set of to-be-delivered orders and a to-be-delivered path of each to-be-delivered order according to the positional relationship between the positions of each order in the second set of orders and the positional relationship between the position of each order and the position of the delivery starting point, and perform order delivery according to the to-be-delivered path, comprising: selecting each to-be-delivered order in the second set of to-be-delivered orders according to the positional relationship between the positions of each order in the second set of orders and the positional relationship between the position of each order and the position of the delivery starting point, so that in the case that the number of to-be-delivered orders is less than or equal to a first threshold value, the total length of the to-be-delivered path is less than or equal to a second threshold value, and the expected delivery time of each to-be-delivered order is not later than a third threshold value of each to-be-delivered order, the absolute value of the difference between the number of to-be-delivered orders and the first threshold value is minimized and the total length of the to-be-delivered path is shortest, wherein the first threshold value is the maximum number of orders that a delivery personnel can deliver.
10. An order delivery device, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute an order delivery method according to any one of claims 1 to 8 based on instructions stored in the memory.
11. A computer storage medium having computer program instructions stored thereon, the instructions being executed by a processor to implement an order delivery method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Order scheduling method and device
CN107392412A