A method and device for order allocation

By using a pre-trained classification model in the order allocation method, the problem of order timeout and efficiency reduction caused by inconsistent with the planning of the distribution capacity is solved, and more efficient order allocation and distribution are achieved.

CN112668816BActive Publication Date: 2025-05-27BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910976750.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-15
Publication Date
2025-05-27
Estimated Expiration
2039-10-15

AI Technical Summary

Technical Problem

When the actual execution sequence of the distribution capacity is not exactly consistent with the optimal execution sequence planned by the dispatching system, there may be a risk of order timeout and reduce the efficiency of the distribution capacity.

Method used

By obtaining the orders to be allocated and determining their corresponding distribution capacity, the sort of task points is determined based on the information of each order to be determined and the information of the distribution capacity to be distributed as the planning execution sequence. Use a pre-trained classification model to determine whether the distribution capacity will perform the distribution task according to the planned execution sequence. If so, the order will be allocated, otherwise the distribution capacity will be re-determined.

Benefits of technology

It effectively avoids the risk of order timeout, improves the efficiency of distribution capacity, and ensures that orders are completed as planned.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112668816B_ABST
    Figure CN112668816B_ABST
Patent Text Reader

Abstract

This specification discloses a method and apparatus for order allocation. Before officially allocating an order to a delivery capacity, it is possible to determine the delivery capacity corresponding to the order to be allocated, and make a planned execution sequence for the delivery capacity, and determine whether the delivery capacity will execute the delivery task according to the planned execution sequence. If so, allocate the order to be allocated to the delivery capacity. Otherwise, it means that the delivery capacity will not execute the delivery task according to the planned execution sequence, and there is a risk of timeout when allocating the order to be allocated to the delivery capacity, and the efficiency of the delivery capacity may be reduced. Then, re-determine the delivery capacity corresponding to the order to be allocated, so as to try to allocate the order to be allocated to the delivery capacity that will execute the delivery task according to the planned execution order, avoid the risk of order timeout, and improve the efficiency of the delivery capacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of intelligent allocation, and particularly to a method and device for order allocation. Background Art

[0002] Currently, with the continuous exploration of the application of "Internet +", the online-to-offline (O2O) model is widely used in daily life.

[0003] After a user selects a merchant and places an order, the dispatching system arranges delivery capacity to serve the user's order. Specifically, the dispatching system receives the order and, based on information such as the order information, delivery capacity information, and merchant information, allocates the order to the delivery capacity, and for the task points included in the order already allocated to the delivery capacity, plans the best execution sequence of the task points for the delivery capacity, so that the delivery capacity executes the delivery tasks corresponding to each order in sequence according to the sorting of the task points in the best execution sequence.

[0004] For example, taking the takeaway scenario as an example, after the user places an order, the dispatching system allocates the takeaway delivery order to the rider and plans the best execution sequence of task points such as the pick-up point and delivery point corresponding to each allocated takeaway delivery order for the rider, so that the rider executes the delivery tasks corresponding to each takeaway delivery order in sequence according to the sorting of the task points in the best execution sequence.

[0005] However, in practice, the delivery capacity does not necessarily serve the allocated orders completely according to the best execution sequence planned by the dispatching system. When the actual execution sequence of the delivery capacity is not completely consistent with the best execution sequence planned by the dispatching system, there may be a risk of order timeout, and at the same time, the efficiency of the delivery capacity may also be reduced. Summary of the Invention

[0006] Embodiments of this specification provide a method and device for order allocation to partially solve the above problems existing in the prior art.

[0007] Embodiments of this specification adopt the following technical solutions:

[0008] A method for order allocation provided in this specification, the method includes:

[0009] Obtain at least one order to be allocated and determine the delivery capacity corresponding to the order to be allocated;

[0010] For at least one delivery capacity, use the order to be allocated corresponding to the delivery capacity as a pending order, and based on the information of each pending order and the information of the delivery capacity, determine the sorting of the task points of each pending order as the planned execution sequence;

[0011] According to the pre-trained classification model, determine whether the delivery capacity will execute the delivery tasks corresponding to each pending order in the order of each task point in the described planned execution sequence;

[0012] If so, allocate each pending order to the delivery capacity;

[0013] Otherwise, re-determine the delivery capacity corresponding to each pending order.

[0014] Optionally, determining the delivery capacity corresponding to each order to be allocated includes:

[0015] For each of the orders to be allocated, respectively determine the matching degree between each delivery capacity and the order to be allocated according to the information of each delivery capacity;

[0016] According to the matching degree between each delivery capacity and the order to be allocated, determine the delivery capacity corresponding to the order to be allocated.

[0017] Optionally, determining that the delivery capacity will not execute the delivery tasks corresponding to each pending order in the order of each task point in the described planned execution sequence specifically includes:

[0018] Input the information of each pending order, the information of the delivery capacity, and the described planned execution sequence into the pre-trained classification model to obtain the path consistency rate of the delivery capacity for delivering each pending order output by the classification model;

[0019] If the path consistency rate is not greater than a preset path consistency rate threshold, determine that the delivery capacity will not execute the delivery tasks corresponding to each pending order in the order of each task point in the described planned execution sequence.

[0020] Optionally, pre-training the classification model includes:

[0021] Obtain historical orders as sample orders, and obtain the delivery capacity for delivering the sample orders historically as sample capacities;

[0022] For at least one sample capacity, use the sample orders delivered by the sample capacity among the obtained sample orders as training orders, and obtain the historical planned execution sequences determined for each of the training orders historically;

[0023] Input the information of each training order, the information of the sample capacity, and the historical planned execution sequence into the classification model to be trained to obtain the path consistency rate to be optimized output by the classification model to be trained;

[0024] Obtain the actual execution sequence corresponding to the sample capacity when delivering each of the training orders historically from the historical records;

[0025] Determine the actual path consistency rate according to the historical planned execution sequence and the actual execution sequence;

[0026] Use minimizing the difference between the path consistency rate to be optimized and the actual path consistency rate as the training objective to train the classification model to be trained.

[0027] Optionally, the determining the actual path consistency rate according to the historical planned execution sequence and the actual execution sequence includes:

[0028] Determine the sorting of each task point in the training order in the historical planned execution sequence as the first sorting; determine the sorting of each task point in the training order in the actual execution sequence as the second sorting;

[0029] For each serial number in the first sorting, determine whether the task point corresponding to this serial number in the first sorting is the same as the task point corresponding to this serial number in the second sorting; if so, determine the task point corresponding to this serial number in the first sorting as the consistent task point;

[0030] Determine the ratio of the number of consistent task points to the total number of all task points in the training order as the actual path consistency rate.

[0031] Optionally, the re-determining the delivery capacity corresponding to each undetermined order includes:

[0032] According to the pre-trained prediction model, determine the predicted execution sequence of this delivery capacity for executing the delivery tasks corresponding to each undetermined order;

[0033] According to the determined predicted execution sequence, determine the predicted path length of this delivery capacity;

[0034] According to the determined predicted path length, adjust the matching degree, where the predicted path length is negatively correlated with the adjusted matching degree;

[0035] According to the adjusted matching degree, re-determine the delivery capacity corresponding to each undetermined order.

[0036] Optionally, pre-training the prediction model includes:

[0037] Obtain historical orders as sample orders, and obtain the delivery capacity for delivering the sample orders historically as sample capacities;

[0038] For at least one sample capacity, use the sample orders delivered by this sample capacity in the obtained sample orders as training orders, and obtain the actual execution sequences corresponding to this sample capacity when delivering each training order historically from the historical records;

[0039] Input the task point information included in the training order and the information of the sample transport capacity into the prediction model to be trained, and determine the execution sequence to be optimized output by the prediction model to be trained.

[0040] Take minimizing the difference between the execution sequence to be optimized and the actual execution sequence as the training objective, and train the prediction model to be trained.

[0041] Optionally, the obtaining of at least one order to be allocated includes: obtaining at least one order to be allocated received within the current scheduling period.

[0042] The obtaining of historical orders as sample orders includes: obtaining at least one order received within the historical scheduling period as a sample order.

[0043] This specification provides an order allocation device, and the device includes:

[0044] An obtaining module, configured to obtain at least one order to be allocated and determine the corresponding delivery transport capacity for the order to be allocated.

[0045] A determining module, configured to, for at least one delivery transport capacity, use the order to be allocated corresponding to the transport capacity as a pending order, and determine the sorting of the task points of each pending order as the planned execution sequence according to the information of each pending order and the information of the transport capacity.

[0046] A classification module, configured to determine whether the delivery transport capacity will execute the delivery tasks corresponding to each pending order according to the sorting of the task points in the planned execution sequence by using a pre-trained classification model.

[0047] A first allocation module, configured to, when the judgment result of the classification module is yes, allocate each pending order to the transport capacity.

[0048] A second allocation module, configured to, when the judgment result of the classification module is no, re-determine the delivery transport capacity corresponding to each pending order.

[0049] A computer-readable storage medium provided in this specification, characterized in that the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned order allocation method is implemented.

[0050] An electronic device provided in this specification, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that when the processor executes the program, the above-mentioned order allocation method is implemented.

[0051] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0052] Before officially allocating an order to a delivery capacity, this specification can determine the delivery capacity corresponding to the order to be allocated, make a planning execution sequence for the delivery capacity, and determine whether the delivery capacity will execute the delivery task according to the planning execution sequence. If so, allocate the order to be allocated to the delivery capacity. Otherwise, it means that the delivery capacity will not execute the delivery task according to the planning execution sequence, there is a risk of timeout in allocating the order to be allocated to the delivery capacity, and the efficiency of the delivery capacity may be reduced. Then, re-determine the delivery capacity corresponding to the order to be allocated, so as to try to allocate the order to be allocated to the delivery capacity that will execute the delivery task according to the planned execution order, avoid the risk of order timeout, and improve the efficiency of the delivery capacity. Description of the Drawings

[0053] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:

[0054] Figure 1 It is a flowchart of a method for order allocation provided by an embodiment of this specification;

[0055] Figure 2 It is a schematic diagram of a planning execution sequence provided by an embodiment of this specification;

[0056] Figure 3 It is a flowchart of a method for pre-training a classification model provided by this specification;

[0057] Figure 4 It is a schematic diagram of each execution sequence corresponding to the sample capacity when pre-training the model provided by an embodiment of this specification;

[0058] Figure 5 It is a schematic structural diagram of an order allocation provided by an embodiment of this specification;

[0059] Figure 6 corresponding to an embodiment of this specification Figure 1 schematic diagram of the electronic device. Detailed Description of the Invention

[0060] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0061] In this specification, the delivery capacity may include, but is not limited to, at least one of delivery personnel, delivery robots, unmanned devices, etc.; after determining the delivery capacity corresponding to the order to be assigned, determine the planned execution sequence of each order to be assigned corresponding to the delivery capacity, that is, the planned execution paths of delivery personnel, delivery robots, unmanned devices, etc. can be determined. In the actual delivery scenario, when a delivery person executes a delivery task, it is possible that the delivery person does not execute the delivery task according to the sorting of the task points in the planned execution sequence, but selects the execution sequence of delivery according to personal preferences or personal experience. Therefore, this specification will not directly assign the order to be assigned to the delivery person, but estimate the delivery path of the delivery person and re-determine the matching degree between the order to be assigned and the delivery person according to the delivery path. For other types of delivery capacity, such as unmanned devices, delivery robots, etc., it is also possible that when executing a delivery task, according to the road information, weather information, etc. in the actual delivery scenario, they do not deliver according to the planned execution path, but choose to re-adjust the execution path and deliver according to the adjusted execution path. Therefore, this specification will not directly assign the order to be assigned to the unmanned device / delivery robot, but estimate the delivery path of the unmanned device / delivery robot and re-determine the matching degree between the order to be assigned and the unmanned device / delivery robot according to the delivery path.

[0062] The following will only take delivery personnel as an example for illustration.

[0063] The following will, in conjunction with the accompanying drawings, detail the technical solutions provided by each embodiment of the present application.

[0064] Figure 1 It is a flowchart of a method for order allocation provided by an embodiment of this specification, which specifically may include the following steps:

[0065] S100: Obtain at least one order to be assigned and determine the delivery capacity corresponding to each order to be assigned.

[0066] This specification obtains at least one order to be assigned, that is, multiple orders to be assigned can be obtained. This is because the O2O model is widely used and the number of user orders is increasing. Especially during peak hours, many users place orders at the same time, resulting in a large number of orders that need to be assigned. Therefore, when obtaining orders to be assigned, it is often necessary to obtain multiple orders to be assigned at the same time.

[0067] Of course, there is also a situation where when the scheduling system allocates orders, it generally obtains the orders generated within a scheduling period. For example, at the current scheduling moment, it obtains the newly generated orders after the previous scheduling moment and before the current scheduling moment.

[0068] In this specification, the delivery capacity corresponding to each order to be assigned is determined, that is, for each of the orders to be assigned and each delivery capacity, a delivery capacity is selected for the order to be assigned, so as to make a planned execution sequence for the delivery capacity in subsequent steps, determine whether the delivery capacity will deliver the order to be assigned according to the planned execution sequence, and assign the order to be assigned according to the judgment result.

[0069] Therefore, to determine the delivery capacity corresponding to each order to be assigned, first, for each of the orders to be assigned, according to the information of each delivery capacity, the matching degree between each delivery capacity and the order to be assigned is determined respectively. Specifically, for each of the orders to be assigned, information such as the location of the user who placed the order corresponding to the order to be assigned, the location of the merchant, and the expected delivery time of the user who placed the order can be determined. For each delivery capacity, information such as the current location of the delivery capacity, the average delivery speed, the on-time rate, and the number of completed orders can be determined. For each of the orders to be assigned, according to the determined information of the order to be assigned and the information of each delivery capacity, the matching degree between each delivery capacity and the order to be assigned is determined respectively. In addition, the matching degree can be represented in the form of a score. For example, the overtime score and / or the path score are calculated for each delivery capacity to deliver the order to be assigned, and according to the calculated scores, the matching degree between each delivery capacity and the order to be assigned is determined. Regarding the representation form of the matching degree, this specification will not elaborate one by one.

[0070] Then, according to the matching degree between each delivery capacity and the order to be assigned, the delivery capacity corresponding to the order to be assigned is determined. Specifically, according to the matching degree between each delivery capacity and the order to be assigned determined above, the delivery capacity with the highest matching degree can be selected as the delivery capacity corresponding to the order to be assigned, or a matching degree threshold can be preset, and among the delivery capacities with a matching degree greater than the preset matching degree threshold, a delivery capacity is randomly selected as the delivery capacity corresponding to the order to be assigned.

[0071] S102: For at least one delivery capacity, take the orders to be assigned corresponding to the delivery capacity as pending orders, and according to the information of each pending order and the information of the delivery capacity, determine the sorting of the task points of each pending order as the planned execution sequence.

[0072] In this specification, the delivery capacity performs the delivery task for the order. According to the order information, the delivery task may include tasks such as picking up goods from the merchant and delivering the goods to the user who placed the order. Therefore, the location of the merchant in the order information can be used as the pick-up point, and the location of the user who placed the order corresponding to the order information can be used as the delivery point. The task points in this specification include at least the pick-up point and the delivery point.

[0073] Through the above step S100, the delivery capacity corresponding to each order to be allocated is determined. That is, for each delivery capacity, the orders to be allocated corresponding to the delivery capacity are determined. Then, for each delivery capacity, the orders to be allocated corresponding to the delivery capacity can be used as pending orders. According to the pick-up points, delivery points and other information of each pending order determined by the above step S100, as well as information such as the average delivery speed and the current location of the delivery capacity, the time and / or distance for the delivery capacity to reach each task point of the pending order can be determined. According to the determined time and / or distance, the sorting of the task points of each pending order can be determined as the planned execution sequence.

[0074] Taking the food delivery scenario as an example, according to the merchant's meal preparation time for each pending food delivery order information, as well as information such as the rider's average delivery speed and the current location information, the time for the rider to reach each pick-up point can be determined. According to the expected delivery time of the ordering user in each pending food delivery order information, the time for the rider to reach each delivery point can be determined, so as to reasonably arrange the sorting of the rider to reach each task point as the planned execution sequence of the rider.

[0075] For example, for delivery capacity A, it is determined that order #2 to be allocated, order #4 to be allocated, and order #6 to be allocated are the pending orders for this delivery capacity A. The task points corresponding to the pending orders include #2 pick-up point, #2 delivery point, #4 pick-up point, #4 delivery point, #6 pick-up point, and #6 delivery point. Then, according to the information of the pending orders and the information of delivery capacity A, the sorting of the task points of each pending order can be determined as the planned execution sequence of delivery capacity A, as shown in Figure 2 shown Figure 2 is the schematic diagram of the planned execution sequence provided by the embodiments of this specification. In Figure 2 when delivery capacity A executes the delivery task according to the planned execution sequence, it needs to first go to the #2 pick-up point to pick up the goods corresponding to order #2, then go to the #4 pick-up point to pick up the goods corresponding to order #4, and then go to the #2 delivery point to deliver the goods corresponding to order #2 to the user corresponding to order #2, and sequentially execute the delivery task according to the planned sequence until the delivery tasks of all pending orders are completed.

[0076] When the delivery capacity executes the delivery task according to the planned execution sequence, it can simultaneously take into account reducing the overtime risk of the order, shortening the path length of the delivery capacity to execute the delivery task, improving the efficiency of the delivery capacity, and enhancing the experience of the ordering user and the delivery capacity.

[0077] S104: According to the pre-trained classification model, determine whether the delivery capacity will execute the delivery tasks corresponding to each pending order according to the sorting of each task point in the planned execution sequence. If so, execute step S106; otherwise, return to execute step S100.

[0078] S106: Allocate each pending order to the delivery capacity.

[0079] After determining the planned execution paths for the delivery capacity to deliver each pending order through the above-mentioned step S102, according to the pre-trained classification model, it can be judged whether the delivery capacity will execute the delivery task according to the planned execution path. Specifically, first, the information of each pending order, the information of the delivery capacity, and the planned execution sequence can be input into the pre-trained classification model to obtain the path consistency rate of the delivery capacity for delivering each pending order output by the classification model. Among them, the path consistency rate refers to the proportion of task points where the order of arriving at each task point is consistent with the order of task points in the planned execution path when the delivery capacity executes the delivery task, which represents the probability of the delivery capacity executing the delivery task according to the planned execution path.

[0080] Then, judge whether the path consistency rate is greater than the preset path consistency rate threshold. If it is greater, it is judged that the delivery capacity will execute the delivery tasks corresponding to each pending order according to the sorting of each task point in the planned execution sequence, indicating that if the pending order is assigned to the delivery capacity, the delivery capacity can deliver each order to the ordering user on time while improving the delivery efficiency. Therefore, execute step S106 to assign each pending order to the delivery capacity.

[0081] If it is not greater, it is judged that the delivery capacity will not execute the delivery tasks corresponding to each pending order according to the sorting of each task point in the planned execution sequence, indicating that if the pending order is assigned to the delivery capacity, there are very likely problems such as order timeout and reduced delivery efficiency of the delivery capacity during the execution of the delivery task. The pending order is not suitable to be assigned to the delivery capacity. Therefore, return to step S100 to re-determine the delivery capacity corresponding to each pending order.

[0082] In this specification, after judging that the delivery capacity will not execute the delivery tasks corresponding to each pending order according to the sorting of each task point in the planned execution sequence, before returning to step S100 to re-determine the delivery capacity corresponding to each pending order, the matching degree between the delivery capacity and the pending order can also be adjusted to re-determine the delivery capacity of each pending order.

[0083] First, according to the pre-trained estimation model, the estimated execution sequence of the delivery capacity for executing the delivery tasks corresponding to each pending order can be determined.

[0084] Specifically, since this step is after the pre-trained classification model judges that the delivery capacity will not execute the delivery task according to the planned execution sequence, it means that when the delivery capacity delivers the pending order, it is very likely to select the execution sequence of the delivery according to personal preferences or personal experience. Therefore, the information of the delivery capacity and the information of the pending order can be input into the pre-trained estimation model to determine the estimated execution sequence of the delivery capacity for delivering the pending order according to personal preferences or personal experience.

[0085] Secondly, according to the determined estimated execution sequence, determine the estimated path length of the distribution transportation capacity.

[0086] Since the estimated execution sequence is composed of the sorting of each task point of the pending order, therefore, according to the positions of each task point of the pending order and their sorting in the estimated execution sequence, simply use the distance between two adjacent task points in the estimated execution sequence as the path length between the two task points, and sequentially determine the sum value of the path lengths of all adjacent two task points in the estimated execution sequence, then the path length of the distribution transportation capacity for executing the estimated execution sequence can be determined as the estimated path length.

[0087] Thirdly, according to the determined estimated path length, adjust the matching degree, where the estimated path length is negatively correlated with the adjusted matching degree.

[0088] Finally, according to the adjusted matching degree, re-determine the distribution transportation capacity of each pending order.

[0089] Specifically, according to the determined estimated path length, the matching degree between the distribution transportation capacity and the pending order can be reduced. For example, an inverse proportional function can be set to make the estimated path length negatively correlated with the adjusted matching degree, that is, the longer the estimated path length, the smaller the adjusted matching degree.

[0090] As can be seen from step S104 above, the classification model is pre-trained. Therefore, in this specification, a method for pre-training the classification model is provided, as Figure 3 shown Figure 3 is the flowchart of the method for pre-training the classification model provided by the embodiments of this specification, which specifically may include the following steps:

[0091] S300: Obtain historical orders as sample orders, and obtain the distribution transportation capacity for delivering the sample orders historically as sample transportation capacities.

[0092] When pre-training the classification model, when obtaining historical orders as sample orders, it can be obtained according to different rules. For example, according to the order generation time of the historical orders, obtain the historical orders with the generation time on a certain day as sample orders, or according to the locations of the merchants in the historical orders, obtain the historical orders within a certain area as sample orders. In addition, the historical orders generated within a historical scheduling period can also be obtained as sample orders.

[0093] After obtaining the sample orders, the distribution transportation capacity for delivering the sample orders historically can be obtained according to the historical records as the sample transportation capacity, that is, the sample transportation capacity actually delivered the sample orders historically.

[0094] S302: For at least one sample transportation capacity, use the sample orders delivered by the sample transportation capacity in the obtained sample orders as training orders, and obtain the historical planned execution sequences determined for each of the training orders in history.

[0095] Specifically, for each sample transportation capacity, before the sample transportation capacity delivers each training order, the historical planned execution sequence has been determined for the sample transportation capacity according to the above step S102 in history. Therefore, the historical planned execution sequence can be directly obtained.

[0096] S304: Input the information of each training order, the information of the sample transportation capacity, and the historical planned execution sequence into the classification model to be trained, and obtain the consistency rate of the paths to be optimized output by the classification model to be trained.

[0097] S306: Obtain the actual execution sequence corresponding to the delivery of each of the training orders by the sample transportation capacity in history from the historical records.

[0098] S308: Determine the actual path consistency rate according to the historical planned execution sequence and the actual execution sequence.

[0099] Specifically, first, the sorting of each task point in the training order in the historical planned execution sequence can be determined as the first sorting; the sorting of each task point in the training order in the actual execution sequence can be determined as the second sorting; second, for each serial number in the first sorting, it can be determined whether the task point corresponding to the serial number in the first sorting is the same as the task point corresponding to the serial number in the second sorting; if so, the task point corresponding to the serial number in the first sorting is determined as the consistent task point; finally, the ratio of the number of consistent task points to the total number of all task points in the training order can be determined as the actual path consistency rate.

[0100] S310: Use minimizing the difference between the consistency rate of the paths to be optimized and the actual path consistency rate as the training objective to train the classification model to be trained.

[0101] In this specification, in addition to the need to pre-train the classification model to be trained, it is also necessary to pre-train the prediction model to be trained. The training of the prediction model to be trained can be carried out simultaneously with the training of the classification model to be trained, or the prediction model to be trained can be trained separately.

[0102] First, historical orders can be obtained as sample orders, and the delivery transportation capacities for delivering the sample orders in history can be obtained as sample transportation capacities.

[0103] Second, for at least one sample transportation capacity, use the sample orders delivered by the sample transportation capacity in the obtained sample orders as training orders, and obtain the actual execution sequence corresponding to the delivery of each training order by the sample transportation capacity in history from the historical records.

[0104] Since the sample orders used to train the to-be-trained prediction model can be the same as the sample orders used to train the to-be-trained classification model, and obtaining the actual execution sequence corresponding to each training order in the historical delivery of the sample transport capacity from the historical records is consistent with the content of step S306, and other content can be consistent with the content of steps S300 to S302, which will not be elaborated here one by one.

[0105] Again, input the task point information included in the training order and the information of the sample transport capacity into the to-be-trained prediction model to determine the to-be-optimized execution sequence output by the to-be-trained prediction model.

[0106] Finally, use minimizing the difference between the to-be-optimized execution sequence and the actual execution sequence as the training objective to train the to-be-trained prediction model.

[0107] Specifically, for the to-be-trained prediction model, the input information is the task point information included in the training order and the information of the sample transport capacity. Among them, the information of the sample transport capacity may include the personal preferences or personal experience of the sample transport capacity. Therefore, the content output by the to-be-trained prediction model is the to-be-optimized execution sequence based on the personal preferences or personal experience of the sample transport capacity.

[0108] Using minimizing the difference between the to-be-optimized execution sequence and the actual execution sequence as the training objective to train the to-be-trained prediction model can be as Figure 4 shown Figure 4 is a schematic diagram of each execution sequence corresponding to the sample transport capacity when pre-training the model provided by the embodiment of this specification. In Figure 4 , the sample orders corresponding to the sample transport capacity B are historical order #1, historical order #3, and historical order #5. The task points in the solid line box are the consistent task points corresponding to the first sorting and the second sorting. Then, the actual path consistency rate is the ratio of the number of task points in the solid line box in the historical planned execution sequence to the total number of all task points. For the to-be-trained prediction model, the sorting of each task point for the sample transport capacity B to execute the sample order delivery task is the Figure 4 to-be-optimized prediction execution sequence in. The task points in the dotted line box are the task points where the to-be-optimized prediction execution sequence is inconsistent with the actual execution sequence. Gradually reduce the number of task points in the dotted line box until there are no task points in the dotted line box, that is, the to-be-optimized execution sequence is consistent with the actual execution sequence, and the goal of minimizing the difference between the to-be-optimized execution sequence and the actual execution sequence can be completed, and the trained prediction model can be obtained.

[0109] The above order allocation method includes a classification model and an estimation model. According to the pre-trained classification model, the path consistency rate is output. According to the path consistency rate, it is judged whether the distribution capacity will execute the distribution task according to the planned execution sequence. According to the pre-trained estimation model, the estimated execution sequence is output, and the estimated path length is determined according to the estimated execution sequence, so as to adjust the matching degree between the distribution capacity and the pending order.

[0110] In this specification, in addition to the above method, a machine learning model can also be used to simultaneously implement the functions of the above classification model and estimation model. For example, only the above estimation model can be applied to the above order allocation method.

[0111] Specifically, according to the pre-trained estimation model, the information of each pending order and the information of the distribution capacity can be input into the pre-trained estimation model to obtain the estimated execution sequence of the distribution capacity for delivering the pending order according to personal preferences or personal experience output by the estimation model. According to the obtained estimated execution sequence and the planned execution sequence, the path consistency rate of the distribution capacity can be determined, and it is judged whether the path consistency rate is greater than the preset path consistency rate threshold. When the judgment result is not greater than, that is, the probability that the distribution capacity executes the distribution task according to the planned execution sequence is small, then according to the estimated execution sequence output by the estimation model in the above steps, the estimated path length of the distribution capacity is determined, and according to the determined estimated path length, the matching degree is adjusted.

[0112] The classification model and the estimation model in this specification can be an eXtreme Gradient Boosting (XGBoost) classification model and an XGBoost regression model. When pre-training the XGBoost classification model, the label can be set as the path consistency rate, and the XGBoost classification model can be trained. When pre-training the XGBoost regression model, the label can be set as the accuracy of the estimated execution sequence, and the XGBoost regression model can be trained. Of course, the classification model and the estimation model can also be other machine learning models, such as neural network models, random forest models, linear regression models, etc. The method of using other machine learning models to implement order allocation is the same as the above method, and this specification will not elaborate one by one.

[0113] Based on Figure 1 the order allocation method shown, the embodiments of this specification also correspondingly provide a structural schematic diagram of an order allocation device, as Figure 5 shown.

[0114] Figure 5 This is a structural schematic diagram of an order allocation provided by the embodiments of this specification. The device includes:

[0115] An acquisition module 501, configured to acquire at least one order to be assigned and determine the distribution capacity corresponding to the order to be assigned;

[0116] A determination module 502, configured to, for at least one distribution capacity, use the order to be assigned corresponding to the distribution capacity as a to-be-determined order, and determine the sorting of the task points of each to-be-determined order as a planned execution sequence according to the information of each to-be-determined order and the information of the distribution capacity;

[0117] A classification module 503, configured to determine, according to a pre-trained classification model, whether the distribution capacity will execute the distribution tasks corresponding to each to-be-determined order according to the sorting of the task points in the planned execution sequence;

[0118] A first allocation module 504, configured to, when the judgment result of the classification module 403 is yes, allocate each to-be-determined order to the distribution capacity;

[0119] A second allocation module 505, configured to, when the judgment result of the classification module 403 is no, re-determine the distribution capacity corresponding to each to-be-determined order.

[0120] Optionally, the acquisition module 501 is specifically configured to, for each of the orders to be assigned, respectively determine the matching degree between each distribution capacity and the order to be assigned according to the information of each distribution capacity; and determine the distribution capacity corresponding to the order to be assigned according to the matching degree between each distribution capacity and the order to be assigned.

[0121] Optionally, the classification module 503 is specifically configured to input the information of each to-be-determined order, the information of the distribution capacity, and the planned execution sequence into the pre-trained classification model to obtain the path consistency rate of the distribution capacity for distributing each to-be-determined order output by the classification model; if the path consistency rate is not greater than a preset path consistency rate threshold, it is determined that the distribution capacity will not execute the distribution tasks corresponding to each to-be-determined order according to the sorting of the task points in the planned execution sequence.

[0122] Optionally, the device further includes: a first training module 506 and a second training module 507;

[0123] The first training module 506 is configured to pre-obtain historical orders as sample orders, and obtain the distribution capacity for delivering the sample orders in history as sample capacity; for at least one sample capacity, use the sample orders delivered by the sample capacity in the obtained sample orders as training orders, and obtain the historical planning execution sequences determined for the respective training orders in history; input the information of each training order, the information of the sample capacity, and the historical planning execution sequence into the classification model to be trained, and obtain the consistency rate of the paths to be optimized output by the classification model to be trained; obtain the actual execution sequences corresponding to the respective training orders delivered by the sample capacity in history from the historical records; determine the actual path consistency rate according to the historical planning execution sequence and the actual execution sequence; and train the classification model to be trained with the goal of minimizing the difference between the consistency rate of the paths to be optimized and the actual path consistency rate.

[0124] Optionally, the first training module 506 is specifically configured to determine the sorting of each task point in the training order in the historical planning execution sequence as the first sorting; determine the sorting of each task point in the training order in the actual execution sequence as the second sorting; for each serial number in the first sorting, determine whether the task point corresponding to the serial number in the first sorting is the same as the task point corresponding to the serial number in the second sorting; if so, determine the task point corresponding to the serial number in the first sorting as the consistent task point; and determine the ratio of the number of consistent task points to the total number of all task points in the training order as the actual path consistency rate.

[0125] Optionally, the second allocation module 505 is specifically configured to determine the estimated execution sequence of the distribution capacity for executing the corresponding distribution tasks of each pending order according to a pre-trained estimation model; determine the estimated path length of the distribution capacity according to the determined estimated execution sequence; adjust the matching degree according to the determined estimated path length, where the estimated path length is negatively correlated with the adjusted matching degree; and re-determine the distribution capacity of each pending order according to the adjusted matching degree.

[0126] Optionally, the second training module 507 is configured to pre-obtain historical orders as sample orders, and obtain the distribution capacity for delivering the sample orders in history as sample capacity; for at least one sample capacity, use the sample orders delivered by the sample capacity in the obtained sample orders as training orders, and obtain the actual execution sequences corresponding to the respective training orders delivered by the sample capacity in history from the historical records; input the task point information included in the training order and the information of the sample capacity into the estimation model to be trained, and determine the execution sequence to be optimized output by the estimation model to be trained; and train the estimation model to be trained with the goal of minimizing the difference between the execution sequence to be optimized and the actual execution sequence.

[0127] Optionally, the obtaining of at least one order to be allocated includes: obtaining at least one order to be allocated received within the current scheduling period; the obtaining of a historical order as a sample order includes: obtaining at least one order received within a historical scheduling period as a sample order.

[0128] An embodiment of the present specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above Figure 1 provided method for order allocation.

[0129] Based on Figure 1 the method for order allocation shown, an embodiment of the present specification also proposes Figure 6 a schematic structural diagram of an electronic device shown. As Figure 6 , at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above Figure 1 described method for order allocation.

[0130] Of course, in addition to the software implementation, the present specification does not exclude other implementation manners, such as a logic device or a combination of software and hardware. That is to say, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.

[0131] In the 1990s, it was obvious to distinguish whether an improvement in a technology was an improvement in hardware (e.g., improvement in circuit structures such as diodes, transistors, switches, etc.) or an improvement in software (improvement in method flows). However, with the development of technology, many improvements in method flows today can be regarded as direct improvements in hardware circuit structures. Almost all designers obtain the corresponding hardware circuit structures by programming the improved method flows into the hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented with a hardware entity module. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logical function is determined by the user programming the device. The designer can program by himself to "integrate" a digital system on a piece of PLD without asking the chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called Hardware Description Language (HDL), and there is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that as long as the method flow is slightly logically programmed with the above-mentioned several hardware description languages and programmed into the integrated circuit, it is easy to obtain the hardware circuit implementing the logical method flow.

[0132] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that, in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to logically program the method steps to enable the controller to be implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. to achieve the same function. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or structures within the hardware component.

[0133] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0134] For the convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0135] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.

[0136] The present invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each flow and / or block in the flowchart illustrations and / or block diagrams, and combinations of flows and / or blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processors of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing device create means for implementing the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in one block or multiple blocks.

[0137] These computer program instructions may also be stored in a computer-readable memory 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 memory produce a manufacture including instruction means that implement the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in one block or multiple blocks.

[0138] These computer program instructions may also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in one block or multiple blocks.

[0139] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0140] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory. The memory is an example of computer-readable media.

[0141] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0142] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0143] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented 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.

[0144] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0145] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiment.

[0146] The above is only the embodiment of this specification and is not intended to limit this specification. For those skilled in the art, various modifications and changes can be made to this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included within the scope of the claims of this specification.

Claims

1. A method for order allocation, characterized in that, the method includes: Obtain at least one order to be allocated, and determine the delivery capacity corresponding to the order to be allocated; For at least one delivery capacity, take the orders to be allocated corresponding to this delivery capacity as pending orders, and determine the sorting of the task points of each pending order according to the information of each pending order and the information of this delivery capacity, as the planned execution sequence; According to a pre-trained classification model, judge whether this delivery capacity will execute the delivery tasks corresponding to each pending order according to the sorting of each task point in the planned execution sequence; If so, allocate each pending order to this delivery capacity; Otherwise, re-determine the delivery capacity corresponding to each pending order; Among them, judging that this delivery capacity will not execute the delivery tasks corresponding to each pending order according to the sorting of each task point in the planned execution sequence specifically includes: Input the information of each pending order, the information of this delivery capacity, and the planned execution sequence into the pre-trained classification model, and obtain the path consistency rate of this delivery capacity for delivering each pending order output by the classification model; If the path consistency rate is not greater than a preset path consistency rate threshold, judge that this delivery capacity will not execute the delivery tasks corresponding to each pending order according to the sorting of each task point in the planned execution sequence; Among them, pre-training the classification model includes: Obtain historical orders as sample orders, and obtain the delivery capacity for delivering the sample orders historically as sample capacity; For at least one sample capacity, take the sample orders delivered by this sample capacity among the obtained sample orders as training orders, and obtain the historical planned execution sequence determined for each training order historically; Input the information of each training order, the information of this sample capacity, and the historical planned execution sequence into the classification model to be trained, and obtain the path consistency rate to be optimized output by the classification model to be trained; Obtain the actual execution sequence corresponding to this sample capacity when delivering each training order historically from the historical record; According to the historical planned execution sequence and the actual execution sequence, determine the actual path consistency rate; Taking minimizing the difference between the path consistency rate to be optimized and the actual path consistency rate as the training objective, train the classification model to be trained.

2. The method according to claim 1, characterized in that, the determination of the delivery capacity corresponding to each order to be allocated includes: For each of the orders to be allocated, respectively determine the matching degree between each delivery capacity and this order to be allocated according to the information of each delivery capacity; According to the matching degree between each delivery capacity and this order to be allocated, determine the delivery capacity corresponding to this order to be allocated.

3. The method according to claim 1, characterized in that, the determination of the actual path consistency rate according to the historical planned execution sequence and the actual execution sequence includes: Determine the sorting of each task point in the historical planned execution sequence of the training order as the first sorting; determine the sorting of each task point in the actual execution sequence of the training order as the second sorting; For each serial number in the first sorting, determine whether the task point corresponding to this serial number in the first sorting is the same as the task point corresponding to this serial number in the second sorting; if so, determine the task point corresponding to this serial number in the first sorting as the consistent task point. Determine the ratio of the number of consistent task points to the total number of task points in the training order as the actual path consistency rate.

4. The method according to claim 2, characterized in that the re-determining the delivery capacity corresponding to each pending order includes: According to a pre-trained prediction model, determine the predicted execution sequence of the delivery capacity for performing the delivery tasks corresponding to each pending order; According to the determined predicted execution sequence, determine the predicted path length of the delivery capacity; According to the determined predicted path length, adjust the matching degree, wherein the predicted path length is negatively correlated with the adjusted matching degree; According to the adjusted matching degree, re-determine the delivery capacity of each pending order.

5. The method according to claim 4, characterized in that Pre-training the prediction model includes: Obtain historical orders as sample orders, and obtain the delivery capacity for delivering the sample orders historically as sample capacity; For at least one sample capacity, use the sample orders delivered by the sample capacity in the obtained sample orders as training orders, and obtain the actual execution sequence corresponding to each training order when the sample capacity delivered them historically from the historical records; Input the task point information included in the training order and the information of the sample capacity into the prediction model to be trained, and determine the to-be-optimized execution sequence output by the prediction model to be trained; Taking minimizing the difference between the to-be-optimized execution sequence and the actual execution sequence as the training objective, train the prediction model to be trained.

6. The method according to any one of claims 1-5, characterized in that the obtaining at least one order to be assigned includes: Obtain at least one order to be assigned received within the current scheduling period; The obtaining historical orders as sample orders includes: obtaining at least one order received within the historical scheduling period as sample orders.

7. An order allocation device, characterized in that the device includes: An obtaining module, configured to obtain at least one order to be assigned and determine the delivery capacity corresponding to the order to be assigned; A determining module, configured to, for at least one delivery capacity, use the order to be assigned corresponding to the delivery capacity as a pending order, and determine the sorting of the task points of each pending order according to the information of each pending order and the information of the delivery capacity as the planned execution sequence; A classification module, configured to determine whether the delivery capacity will perform the delivery tasks corresponding to each pending order according to the sorting of the task points in the planned execution sequence according to a pre-trained classification model; A first allocation module, configured to, when the judgment result of the classification module is yes, allocate each pending order to the delivery capacity; A second allocation module, configured to, when the judgment result of the classification module is no, re-determine the delivery capacity corresponding to each pending order; Among them, determining that the delivery capacity will not execute the delivery tasks corresponding to each pending order according to the sorting of each task point in the planned execution sequence specifically includes: Inputting the information of each pending order, the information of the delivery capacity, and the planned execution sequence into the pre-trained classification model to obtain the path consistency rate of the delivery capacity for delivering each pending order output by the classification model; If the path consistency rate is not greater than a preset path consistency rate threshold, it is determined that the delivery capacity will not execute the delivery tasks corresponding to each pending order according to the sorting of each task point in the planned execution sequence; Among them, pre-training the classification model includes: Obtaining historical orders as sample orders and obtaining the delivery capacity for delivering the sample orders in history as sample capacities; For at least one sample capacity, taking the sample orders delivered by the sample capacity among the obtained sample orders as training orders, and obtaining the historical planned execution sequences determined for each training order in history; Inputting the information of each training order, the information of the sample capacity, and the historical planned execution sequence into the classification model to be trained to obtain the to-be-optimized path consistency rate output by the classification model to be trained; Obtaining the actual execution sequence corresponding to the sample capacity when delivering each training order from the historical record; Determining the actual path consistency rate according to the historical planned execution sequence and the actual execution sequence; Taking minimizing the difference between the to-be-optimized path consistency rate and the actual path consistency rate as the training objective, training the classification model to be trained.

8. A computer-readable storage medium, characterized in that, the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1-6 above is implemented.

9. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, when the processor executes the program, the method according to any one of claims 1-6 above is implemented.

Citation Information

Patent Citations

  • A distribution scheduling method and apparatus

    CN109214551A