Method, apparatus, computer-readable storage medium, and electronic device for order allocation
The pre-trained model determines whether the order is affected by merchant sorting, and distinguishes the affected and unaffected orders, which solves the problem of inefficient order delivery caused by merchant sorting, and improves the overall efficiency of order allocation.
Patent Information
- Application Number
- CN202010260970.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-03
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2040-04-03
AI Technical Summary
The existing order allocation methods are inefficient and have poor results, especially during the merchant sorting process, which can easily lead to the inability to deliver orders in time.
The pre-trained model determines whether the order is affected by merchant sorting. The affected orders wait for the sorting to be completed before being allocated to the distribution capacity, and the unaffected orders will be directly allocated.
It effectively avoids the negative impact of merchant sorting time prediction error on order allocation, improves the allocation efficiency and effectiveness of affected and unaffected orders, and improves the overall execution efficiency.
Smart Images

Figure CN113496372B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technologies, and in particular, to a method, an apparatus, a computer-readable storage medium, and an electronic device for order allocation. Background Art
[0002] Currently, in social production and life, logistics distribution controls the purposeful flow of physical materials within a preset spatial range. The scope involved in logistics distribution extends to the upstream and downstream departments of the supply chain and plays a leading role in supply chain management.
[0003] For example, in a supermarket scenario, a merchant must sort multiple orders simultaneously. After the sorting of these multiple orders is completed, the orders are centrally distributed by the distribution capacity. If some of the goods (or some raw materials for making goods) in a certain order are missing, resulting in the failure to complete the sorting of this order in a timely manner, other orders in the same batch as this unsorted order cannot be distributed even if their sorting is completed.
[0004] It can be seen that the existing order allocation method has problems of low efficiency and poor effect. Summary of the Invention
[0005] The method, apparatus, computer-readable storage medium, and electronic device for order allocation provided in the embodiments of this specification are used to partially solve the above problems existing in the prior art.
[0006] The embodiments of this specification adopt the following technical solutions:
[0007] The method and apparatus for order allocation provided in this specification, the method includes:
[0008] Obtain unallocated orders;
[0009] For each unallocated order, input the information of this order into a pre-trained model;
[0010] According to the output result of the model, determine whether the delivery time of this order is affected by the sorting of this order by the merchant;
[0011] If so, wait until the sorting of this order is completed, and then allocate this order to the distribution capacity for distribution;
[0012] Otherwise, directly allocate this order to the distribution capacity for distribution.
[0013] Optionally, the model is trained in the following manner:
[0014] Use at least some of the historical orders as sample orders;
[0015] For each sample order, determine the type of the sample order according to the information of the sample order;
[0016] Determine the annotation of the sample order according to the type of the sample order and the information of the sample order;
[0017] Train the model according to each sample order and its annotation.
[0018] Optionally, the types of the sample orders include: ordinary orders;
[0019] Determine the annotation of the sample order according to the type of the sample order and the information of the sample order, specifically including:
[0020] For each ordinary order, take the time when the merchant actually finishes sorting the ordinary order as the time when the delivery capacity obtains the goods of the ordinary order;
[0021] According to the time when the delivery capacity obtains the goods of the ordinary order determined and the actual promised delivery time of the ordinary order, under the condition that the delivery capacity only delivers the ordinary order, determine whether the ordinary order is overdue;
[0022] If so, the annotation of the ordinary order is that the delivery time is affected by the merchant's sorting of the order;
[0023] If not, the annotation of the ordinary order is that the delivery time is not affected by the merchant's sorting of the order.
[0024] Optionally, the types of the sample orders include: pre-orders;
[0025] Determine the annotation of the sample order according to the type of the sample order and the information of the sample order, specifically including:
[0026] For each pre-order, determine the duration between the actual order placement time of the user of the pre-order and the promised delivery time of the pre-order as the duration of the pre-order; and determine the duration between the time when the delivery capacity actually obtains the goods of the pre-order and the actual delivery time of the pre-order as the actual delivery duration of the pre-order;
[0027] Take the difference between the duration of the pre-order and the actual delivery duration of the pre-order as the maximum available duration for the merchant to sort the pre-order;
[0028] Among all the orders sorted by the merchant historically, determine the orders whose similarity to the pre-order meets the set conditions as the reference orders of the pre-order;
[0029] Determine the reference sorting duration of the pre-order according to the actual duration required for the merchant to sort each reference order historically;
[0030] Determine whether the maximum available duration determined for the merchant to sort the pre-order is greater than the reference sorting duration;
[0031] If so, the marked delivery time of the pre-order will not be affected by the merchant's sorting of the order;
[0032] If not, the marked delivery time of the pre-order is affected by the merchant's sorting of the order.
[0033] Optionally, waiting until the sorting of the order is completed specifically includes:
[0034] Wait until the confirmation information that the merchant has completed sorting the order is obtained, and then determine that the sorting of the order is completed.
[0035] Optionally, waiting until the sorting of the order is completed specifically includes:
[0036] Determine that the sorting of the order is completed when waiting for the first set duration.
[0037] Optionally, after waiting for a set duration and allocating the order to a delivery capacity for delivery, the method further includes:
[0038] If the waiting time of the delivery capacity for picking up the goods reaches the second set duration, reassign the order according to the current status information of the delivery capacity and the current status information of other delivery capacities.
[0039] The order allocation device provided in this specification includes:
[0040] An acquisition module configured to acquire unallocated orders;
[0041] A processing module configured to input the information of each unallocated order into a pre-trained model;
[0042] A judgment module configured to judge whether the delivery time of the order is affected by the merchant's sorting of the order according to the output result of the model;
[0043] A first allocation module configured to, when the delivery time of the order is affected by the merchant's sorting of the order, wait until the sorting of the order is completed and then allocate the order to a delivery capacity for delivery;
[0044] A second allocation module configured to, when the delivery time of the order is not affected by the merchant's sorting of the order, directly allocate the order to a delivery capacity for delivery.
[0045] The computer-readable storage medium provided in this specification stores a computer program, and when the computer program is executed by a processor, the above-mentioned order allocation method is implemented.
[0046] The electronic device provided in this specification includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above-mentioned order allocation method is implemented.
[0047] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0048] In the order allocation method and device in the embodiments of this specification, through a pre-trained model, among the unallocated orders, the orders that will be affected by merchant sorting are determined. In this process, it is not necessary to predict the time required for merchants to sort orders. Instead, the impact of merchant sorting on orders is directly used as the basis for order allocation, effectively avoiding the negative impact of the error in predicting the time required for merchant sorting on order allocation. After determining the orders that will be affected by merchant sorting, these affected orders are distinguished from other orders, and a scheduling strategy different from other orders is formulated for the affected orders. Furthermore, through the method in this specification, it is possible to avoid the scheduling of orders affected by merchant sorting from affecting other orders not affected by merchant sorting, and simultaneously improve the allocation efficiency and allocation effect of orders affected by merchant sorting and orders not affected by merchant sorting, thereby improving the execution efficiency of all orders. Description of the Drawings
[0049] The drawings described herein are used to provide a further understanding of this specification, and constitute a part of this specification. The illustrative embodiments of this specification and their descriptions are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:
[0050] Figure 1 is the order allocation process provided by the embodiments of this specification;
[0051] Figure 2 is an exemplary network architecture of the order allocation process provided by the embodiments of this specification, and a schematic diagram of the execution order of each link of order allocation;
[0052] Figure 3 is the process of training the model provided by the embodiments of this specification;
[0053] Figure 4 is the process of determining the annotation of ordinary orders in the sample orders provided by the embodiments of this specification;
[0054] Figure 5The process for determining the annotation of the pre-order in the sample order provided in the embodiments of this specification;
[0055] Figure 6 Partial structural schematic diagram of the order allocation device provided in the embodiments of this specification;
[0056] Figure 7 Corresponding to the embodiments of this specification Figure 1 Partial structural schematic diagram of the electronic device. Specific embodiments
[0057] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification 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 this specification, rather than all 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 scope of protection of this specification.
[0058] The following details the technical solutions provided in each embodiment of this specification in conjunction with the drawings.
[0059] Figure 1 The order allocation process provided in the embodiments of this specification may specifically include one or more of the following steps:
[0060] S100: Obtain unallocated orders.
[0061] In an exemplary implementation scenario of the process in this specification, as Figure 2 shown, first, an order is generated by the user's order placement operation. During the process of generating the order, the promised delivery time of the order can be generated. Then, the merchant corresponding to the order confirms acceptance of the order. After the merchant accepts the order, the goods in the order are sorted according to the information of the order. Optionally, after the merchant finishes sorting, the merchant generates a confirmation message indicating that the sorting of the order is completed. After the merchant finishes sorting (the time when the merchant finishes sorting can be generated by the merchant or generated by estimation), the order is allocated to the delivery capacity, and the delivery capacity delivers the goods in the order to the user. Among them, the process of information transmission and decision-making can be implemented by the order allocation device in this specification.
[0062] Then, the unallocated orders in this step can be orders that the merchant has accepted but has not started sorting; orders that the merchant is sorting but has not completed sorting; or orders that the merchant has completed sorting but has not been allocated to the delivery capacity.
[0063] The term "sorting" in this specification can have multiple meanings. For example, the sorting can mean the process of selecting the goods in the order from the various goods stored by the merchant. For another example, the sorting can also mean the process by which the merchant manufactures and processes the goods (such as dishes) in the order according to the information of the order. That is, the process of the merchant performing "sorting" in this specification can be equivalent to the process of the merchant preparing the goods.
[0064] Optionally, the order allocation process in this specification can be used in a supermarket scenario. In the supermarket scenario, the merchant receives orders in real time and sorts multiple orders simultaneously. After the sorting is completed, the goods of the multiple sorted orders are obtained from the merchant through the delivery capacity, and then the goods of the multiple orders are centrally delivered. To improve the timeliness of delivery, the delivery capacity can be stationed at the merchant.
[0065] S102: For each unallocated order, input the information of the order into a pre-trained model.
[0066] The information of the order can include at least one of the following: information of the user of the order (such as the delivery address specified by the user, etc.), information of the goods of the order (such as the name and quantity of the goods, etc.), information of the merchant corresponding to the order (such as the address of the merchant, the name and quantity of the goods currently sold online by the merchant, etc.), information of the delivery capacity available for the order (such as the duration of the delivery capacity being in a waiting-to-pick-up state, etc.), the time information of the user placing the order, and the promised delivery time information.
[0067] Optionally, after obtaining the information of the order, the delivery distance of the order obtained according to the obtained information of the order (which can be obtained based on the address of the merchant and the delivery address required by the user), the total time available for the merchant and the delivery capacity to execute the order (which can be obtained based on the time when the user places the order and the promised delivery time), etc. can be added to the information of the order.
[0068] The pre-trained model adopted in this specification is optionally a model for solving classification and / or regression problems. The pre-trained model can determine the category of the order and / or determine the probability that the order is a certain category of order according to the input information of the order.
[0069] S104: According to the output result of the model, determine whether the delivery time of the order is affected by the merchant's sorting of the order.
[0070] As can be seen from the foregoing, after the user places an order, the execution of the order includes two relatively important links: the merchant's sorting of the order and the delivery of the order by the delivery capacity, as Figure 2As shown. These two processes jointly determine whether the order can be delivered to the user as promised. Moreover, since these two processes have a sequential relationship in time, the adverse effects caused by the merchant's sorting of the order will affect the subsequent delivery process, reducing the execution effect of the order delivery and exacerbating the damage to the order execution efficiency. It can be seen that the impact of the merchant's sorting on order execution is multi-level.
[0071] In order to be able to grasp the overall execution efficiency of the order at the stage of the merchant sorting the order, the process in this specification focuses on identifying the impact of the merchant sorting process on the execution efficiency of the order. Among them, the execution efficiency of the order can be characterized by the delivery time of the order (since the order has not been actually delivered to the user at the current moment, the delivery time is the predicted delivery time).
[0072] S106: When the delivery time of the order is affected by the merchant's sorting of the order, wait until the sorting of the order is completed, and then allocate the order to the delivery capacity for delivery.
[0073] After determining whether the delivery time of the order is affected by the merchant's sorting, for the order affected, a distribution method and / or delivery strategy different from that of the unaffected order can be adopted.
[0074] In the actual usage scenario, the factors affecting the process of the merchant sorting the order are diverse. These diverse factors interact with each other, further increasing the unpredictability of the time required for the merchant sorting process. Moreover, there are also non-negligible differences among the unallocated orders of the merchant. If the sorting time of all unallocated orders of the merchant is predicted without discrimination and the delivery capacity is allocated to each order according to the predicted result, the error generated in the prediction of the sorting time for any order will affect the delivery of all orders in the same batch.
[0075] The process in this specification, after determining the waybill affected by the merchant's sorting, waits until the sorting of the order is completed before allocating the order, so there is no need to predict the time required for sorting the order affected by the merchant's sorting, avoiding the further impact of the prediction error on the execution of the affected order.
[0076] Optionally, the method in this specification adopts a distribution method and / or delivery strategy different from other orders for the affected order (for example, a dedicated delivery capacity can be allocated to the affected order instead of delivering it together with other orders), which can greatly improve the execution efficiency of the affected order and also avoid the affected order from delaying the execution of other orders.
[0077] S108: When the delivery time of the order is not affected by the merchant's sorting of the order, directly assign the order to the delivery capacity for delivery.
[0078] For each order whose delivery time is not affected by the merchant's sorting, an existing method for determining the delivery capacity can be used to determine the delivery capacity for the order and perform the delivery. It can be seen that the allocation and delivery of each order whose delivery time is not affected by the merchant's sorting are independent of the orders affected by the merchant's sorting determined in the foregoing steps, so that the execution efficiency of each order not affected by the merchant's sorting can be ensured.
[0079] The process of order allocation described in this specification will be described in detail below.
[0080] The order allocation in this specification needs to implement the foregoing step S102 with the help of a pre-trained model. Now, the training process of this model will be introduced. The training process is as Figure 3 shown and specifically may include the following steps:
[0081] S300: Use at least some of the historical orders as sample orders.
[0082] The model in this specification is optionally a model capable of solving classification and / or regression problems. The type and structure of this model can be selected according to the actual usage scenario. For example, this model can be an Extreme Gradient Boosting (XGBoost) model.
[0083] This specification uses the actual historical orders as samples for training the model. Then, when the trained model is used in the actual scenario, it can judge the possible impact of the merchant's sorting on the order delivery time based on the merchant's historical sorting behavior and the actual execution situation of the historical orders, making the result of this judgment more in line with the actual situation and more instructive.
[0084] Optionally, in this step, according to the information of the historical orders used as samples, feature construction can be performed on the historical orders to highlight each piece of information that can be used for training reflected in the sample orders obtained from the historical orders. Then, in this step, feature construction can be performed on at least one of the information of the users of the historical orders, the information of the goods of the historical orders, the information of the merchants corresponding to the historical orders, the information of the available delivery capacity for the historical orders at the historical moments when the historical orders are located, the time information when the users place orders, and the promised delivery time information.
[0085] S302: For each sample order, determine the type of the sample order according to the information of the sample order.
[0086] In an alternative implementation scenario of this specification, the type of the sample order can be determined according to the duration used to execute the sample order. Specifically, the duration between the time when the user places the order for the sample order and the promised delivery time can be used as the duration for executing the sample order. Then, according to the duration of the sample order, the type of the sample order is determined. If the duration is greater than the set order type threshold, the order is a pre-order; otherwise, the order is a normal order.
[0087] In addition, the type of the sample order can also be determined by other means. For example, the type of the sample order can be determined based on the time period in which the promised delivery time of the sample order falls. If the time period in which the promised delivery time of the sample order falls is the traffic peak period, the sample order is a priority delivery order; otherwise, the order is a normal delivery order. Further, at least one type of order that has been divided can be further divided to obtain at least one subtype. For example, the aforementioned priority delivery order can be further divided into a priority delivery order during the morning peak period and a priority delivery order during the evening peak period.
[0088] S304: Determine the annotation of the sample order according to the type of the sample order and the information of the sample order.
[0089] In the process of training the model in this specification, different methods for determining annotations are used for different types of sample orders, so that the model can learn the method that is most suitable for each order type to determine whether the order delivery time is affected by the merchant's sorting of the order.
[0090] It can be seen that in the process of this specification, the differences between orders are used as one of the bases for model training during model training, which can improve the generalization ability and judgment accuracy of the trained model obtained.
[0091] S306: Train the model according to each sample order and its annotation.
[0092] In an alternative embodiment of this specification, when training the model, different models can be trained separately for different types of orders, so that any one of the models can be used to judge the orders of the type corresponding to the model.
[0093] In another alternative embodiment of this specification, a judgment module for judging the type of the order can be added to the input end of the model. Then, the sample order information input into the model can be further processed according to other parts of the model after the type is determined by this judgment module. To improve the training efficiency of the model, the judgment module can be a judgment module that has been pre-trained and already has the ability to judge the order type.
[0094] As can be seen from the foregoing, determining the annotation process for sample orders is crucial in the model training process and directly affects the effect of model training. Here, taking the types of the foregoing sample orders including regular orders and advance orders as an example, the process of determining the annotation of sample orders will be described.
[0095] In an optional embodiment of this specification, as Figure 4 shown, the process of determining the annotation of a regular order is as follows:
[0096] S400: For each regular order, take the time when the merchant actually completes sorting the regular order as the time when the distribution capacity obtains the goods of the regular order.
[0097] In the process of determining the annotation for regular orders in this specification, for the user order placement link and the merchant sorting link, actual information generated in history is used. And on this basis, taking the ideal order allocation state as a premise, it is judged whether the delivery is overdue.
[0098] The ideal allocation state can be: in the allocation process, assume that immediately after the merchant completes sorting the regular order (the duration of this sorting link is the actual information generated in history), the goods of the regular order are delivered to the distribution capacity, and immediately start delivering after the distribution capacity obtains the goods of the regular order.
[0099] It can be seen that compared with advance orders, the total duration available for merchants and distribution capacity to execute regular orders is shorter, and the execution of regular orders is also more urgent than that of advance orders. At this time, each piece of information about the merchant sorting the regular order in history can, to a large extent, represent the actual state that the merchant can reach when sorting the regular order and / or sorting an order similar to the regular order. This actual state of the merchant is one of the key objects for the model in this specification to learn, so the actual information generated in history is used as the standard.
[0100] S402: According to the determined time when the distribution capacity obtains the goods of the regular order and the actual promised delivery time of the regular order, under the condition that the distribution capacity only delivers the regular order, judge whether the regular order is overdue.
[0101] In the foregoing ideal allocation state, the execution pressure of regular orders mainly focuses on the execution of regular orders by the distribution capacity. Therefore, in this step, the distribution effect in the ideal allocation state (this distribution effect can be characterized by whether the delivery time of the order is overdue) can be used as the main evaluation object.
[0102] When determining the delivery effect of this ordinary order, this specification is premised on an ideal delivery state, assuming that after the delivery capacity obtains the goods of this ordinary order, it only delivers this ordinary order (at this time, the delivery distance for the delivery capacity to deliver this ordinary order is the shortest and the delivery efficiency is the highest), and further determines whether this ordinary order is overdue under this ideal delivery state.
[0103] It should be noted that the result of whether this ordinary order is overdue determined in this step has no necessary connection with whether this ordinary order was actually overdue in history.
[0104] S404: If this ordinary order is overdue, then the marked delivery time of this ordinary order is affected by the merchant's sorting of this order.
[0105] S406: If this ordinary order is not overdue, then the marked delivery time of this ordinary order is not affected by the merchant's sorting of this order.
[0106] In an optional embodiment of this specification, as Figure 5 shown, the process of determining the marking of a pre-order is as follows:
[0107] S500: For each pre-order, determine the duration between the actual order placement time of this pre-order and the promised delivery time of this pre-order as the duration of this pre-order.
[0108] It can be seen that the duration of this pre-order is obtained from the actual information generated in history. However, since this pre-order may not have been delivered to the customer at the promised delivery time in history, the determined duration of each pre-order may be different from the actual duration of this pre-order in history.
[0109] S502: Determine the duration between the time when the delivery capacity actually obtains the goods of this pre-order and the actual delivery time of this pre-order as the actual delivery duration of this pre-order.
[0110] In the process of determining the marking for a pre-order in this specification, the actual information generated in history is used for the user order placement link, that is, the order placement time and the promised delivery time are both actual information in history. For the delivery link of the delivery capacity, part of the actual information generated in history is used, that is, the duration between the time when the delivery capacity actually obtains the goods of this pre-order and the actual delivery time of this pre-order is obtained from the actual information. And on this basis, taking the aforementioned ideal order allocation state as the premise, it is judged whether the merchant sorting link between the order placement link and the delivery link can leave enough sorting time for the merchant.
[0111] Optionally, the execution order of step S500 and step S502 is not in a specific order.
[0112] S504: Use the difference between the duration of the pre-order and the actual delivery duration of the pre-order as the maximum available duration for the merchant to sort the pre-order.
[0113] The execution order of each link and the corresponding relationship between each link and the duration of the order are as Figure 2 shown. Subtract the actual delivery duration of the pre-order from the duration of the pre-order to obtain the maximum available duration for the merchant to sort the pre-order.
[0114] S506: Among the orders sorted by the merchant historically, determine the orders whose similarity to the pre-order meets the set conditions as the reference orders for the pre-order.
[0115] Optionally, when determining the reference orders, the similarity between each order and the pre-order can be determined through the features constructed for each sample order in step S300. When determining the similarity between orders, the dimensions of the features corresponding to the order placement link and / or the delivery link of each order can be ignored, and the similarity can be determined only based on the dimensions of the features corresponding to the sorting link.
[0116] Specifically, for at least some of the orders sorted by the merchant historically (optionally, all of the at least some orders are pre-orders), determine the similarity between the order and the pre-order. Compare the similarity between the order and the pre-order with a set similarity threshold. If the similarity is greater than the similarity threshold, the order is a reference order for the pre-order; otherwise, the order is not a reference order for the pre-order. Among them, the similarity threshold can be obtained through experience.
[0117] S508: Determine the reference sorting duration of the pre-order according to the actual duration required for the merchant to sort each reference order historically.
[0118] The process of the actual duration required for the merchant to sort each reference order historically can be as follows: For each reference order, determine the duration between the actual order placement time of the reference order and the actual delivery time of the reference order as the actual duration of the reference order. Determine the duration between the time when the delivery capacity actually obtains the goods of the reference order and the actual delivery time of the reference order as the actual delivery duration of the reference order. Then, use the difference between the actual duration of the reference order and the actual delivery duration of the reference order as the sorting duration for the merchant to sort the pre-order. After that, take the average of the sorting durations of each determined reference order as the reference sorting duration of the pre-order.
[0119] It can be seen that from a macroscopic perspective, the situations where merchants were in when sorting relatively similar orders in the past were also relatively similar. Therefore, the reference sorting duration determined based on the reference order with a relatively high similarity to this pre-order can objectively reflect the actual situation of the merchant sorting this pre-order.
[0120] S510: Determine whether the maximum available duration for the merchant to sort this pre-order is greater than the reference sorting duration.
[0121] The purpose of this step is to determine whether the duration left for the merchant corresponding to this pre-order to sort is sufficient. Since the duration of the pre-order is relatively long, usually, the time left for the delivery capacity to execute the delivery during the execution of the pre-order can represent the actual state of the delivery capacity delivering this pre-order in the actual scenario, and this actual state of the delivery capacity is one of the key objects for the model in this specification to learn.
[0122] Correspondingly, since the maximum available duration left for the merchant to sort the pre-order varies greatly in the actual scenario, the execution pressure of the pre-order is mainly concentrated on the merchant's execution of the pre-order. By judging whether this pre-order leaves enough sorting time for the merchant in the process of this specification, it can be determined whether the delivery time of this pre-order is affected by the merchant's sorting of this order.
[0123] S512: If so, mark that the delivery time of this pre-order will not be affected by the merchant's sorting of this order.
[0124] S514: If not, mark that the delivery time of this pre-order is affected by the merchant's sorting of this order.
[0125] After obtaining the trained model through the above steps, the trained model can be used to allocate orders.
[0126] Optionally, when setting different models for ordinary orders and pre-orders respectively, the model trained with ordinary orders as sample orders can be used for the allocation of ordinary orders in the actual scenario; the model trained with pre-orders as sample orders can be used for the allocation of pre-orders in the actual scenario.
[0127] When using the trained model to allocate orders, if the order is judged to be affected by the merchant's sorting of this order in terms of the delivery time, the process in step S106 can be adopted, waiting until the sorting of this order is completed, and then allocating this order to the delivery capacity for delivery.
[0128] The timing of "the order sorting is completed" can be obtained from the merchant. For example, in Figure 2In the shown scenario, after the merchant finishes sorting, the merchant can send a sorting completion confirmation message to the order allocation device to inform the timing of the completion of the sorting of the order, so that the order allocation device can determine the delivery capacity for the order according to the sorting completion confirmation message sent by the merchant.
[0129] However, in actual use, it is often difficult to ensure the authenticity of the sorting completion confirmation message sent by the merchant. To avoid the interference of false sorting completion confirmation messages sent by the merchant on the order allocation, it is possible to determine whether the sorting completion confirmation message generated by the merchant is a false message according to the information of the merchant corresponding to the order (such as the historical behavior information of the merchant). If the information of the merchant indicates that the phenomenon of the delivery capacity waiting at the store for the merchant to place an order is relatively serious, it indicates that the sorting completion confirmation message sent by the merchant is likely to be a false message.
[0130] For the merchant with a relatively high possibility that the sent sorting completion confirmation message is false, the sorting completion confirmation message of this merchant can be ignored. When it is determined that the order is affected by the merchant's sorting, the end time of the first set duration can be directly used as the sorting completion time of the order. Then, according to the sorting completion time of the order, the delivery capacity for the order is determined.
[0131] Among them, the first set duration can be obtained through experience and is used to represent the time wasted by the delivery capacity waiting for pick-up caused by the group behavior of multiple merchants sending false sorting completion confirmation messages.
[0132] Furthermore, in the actual scenario, there will inevitably be a phenomenon that individual merchants sending false information delay sorting, resulting in too long waiting time for the delivery capacity to pick up the goods. To make the order allocation process in this specification well applicable to such merchants who send false information and have extreme behaviors, it is possible to determine the time for the delivery capacity to wait at the store for pick-up after waiting for the first set duration and allocating the order to the delivery capacity for delivery. If the time for the delivery capacity to wait at the store for pick-up reaches the second set duration, then according to the current status information of the delivery capacity and the current status information of other delivery capacities, the overall benefit obtained by reassigning the order is determined. If the overall benefit reaches the set benefit threshold, the order is reassigned to reduce the impact on the delivery capacity for delivering other orders. Among them, the second set duration and / or the set benefit threshold can be obtained through experience.
[0133] In addition, the first set duration in this specification can also be: a duration specifically set for this merchant according to the historical behavior of the merchant corresponding to the order. Then each merchant corresponds to a first set duration, which can reflect the individuality of the merchant's procrastinated sorting behavior to a large extent.
[0134] It should be noted that, in addition to measuring the impact of the merchant's sorting operation on the order as defined in this specification by whether the delivery time is affected as described above, it can also be measured by other means. For example, the impact of the merchant's sorting operation on the order can also be measured by whether the order can be allocated to the delivery capacity in a timely manner when the merchant's sorting is completed. If the order cannot be allocated to the delivery capacity in a timely manner when the sorting is completed, that is, the delivery capacity of the delivery capacity reaches saturation, the execution of the order is affected by the merchant's sorting operation; otherwise, it is not affected.
[0135] The output result of the pre-trained model in this specification can be used to determine whether the delivery time of the order is affected by the merchant's sorting of the order.
[0136] If the pre-trained model is a model for solving classification problems, the result output by the model is the judgment result. If the pre-trained model is a model for solving regression problems, the result output by the model (this result can be: the probability that the delivery time of the order is affected by the merchant's sorting) can be compared with a set threshold. When the output result is greater than the preset threshold, the delivery time of the order is affected by the merchant's sorting; otherwise, the delivery time of the order is not affected by the merchant's sorting.
[0137] Among them, the set threshold can be obtained based on experience. For example, it can be obtained by drawing an AUC (Area Under Curve) graph according to historical data, and the value of the AUC can optionally be 0.79.
[0138] Based on the same idea, the embodiments of this specification also provide an order allocation device corresponding to Figure 1 the process shown, and the order allocation device is as Figure 6 shown.
[0139] Figure 6 is a schematic structural diagram of the order allocation device provided by the embodiments of this specification, and the order allocation device may include:
[0140] An acquisition module 600, configured to acquire unallocated orders;
[0141] A processing module 602, configured to input the information of each unallocated order into a pre-trained model;
[0142] A judgment module 604, configured to judge whether the delivery time of the order is affected by the merchant's sorting of the order according to the output result of the model;
[0143] The first allocation module 606 is configured to wait until the sorting of the order is completed and then allocate the order to the distribution capacity for distribution when the delivery time of the order is affected by the merchant's sorting of the order.
[0144] The second allocation module 610 is configured to directly allocate the order to the distribution capacity for distribution when the delivery time of the order is not affected by the merchant's sorting of the order.
[0145] Among them, the acquisition module 600, the processing module 602, and the judgment module 604 are electrically connected in sequence, and the first allocation module 606 and the second allocation module 610 are respectively electrically connected to the judgment module 604.
[0146] The order allocation device in this specification determines, among unallocated orders, the orders that will be affected by merchant sorting. In this process, it is not necessary to predict the duration required for the merchant to sort the order. Instead, the impact of the merchant's sorting on the order is directly used as the basis for order allocation, effectively avoiding the negative impact of the error in predicting the duration required for the merchant to sort the order on order allocation. After that, these affected orders are distinguished from other orders, and a scheduling strategy different from that of other orders is formulated for the affected orders. Furthermore, through the method in this specification, it is possible to avoid the scheduling of orders affected by merchant sorting from affecting other orders not affected by merchant sorting, and improve the allocation efficiency and allocation effect of both orders affected by merchant sorting and orders not affected by merchant sorting, thereby improving the execution efficiency of all orders.
[0147] Optionally, the order allocation device may further include a training module 612, and the training module 612 is configured to train the model. The training module 612 is electrically connected to the processing module 602.
[0148] The training module 612 may include, in sequence and electrically connected: a sample order determination sub-module 6120, a type determination sub-module 6122, an annotation determination sub-module 6124, and a training sub-module 6126.
[0149] The sample order determination sub-module 6120 is configured to use at least some historical orders as sample orders.
[0150] The type determination sub-module 6122 is configured to, for each sample order, determine the type of the sample order according to the information of the sample order.
[0151] The annotation determination sub-module 6124 is configured to determine the annotation of the sample order according to the type of the sample order and the information of the sample order.
[0152] A training sub-module 6126, configured to train the model according to each sample order and annotation.
[0153] Optionally, the annotation determination sub-module 6124 may include: a first annotation determination unit 61240 and a second annotation determination unit 61242 connected in parallel.
[0154] The first annotation determination unit 61240 is configured to determine an annotation for a normal order as a sample order. The first annotation determination unit 61240 is specifically configured to: for each normal order, take the time when the merchant actually finishes sorting the normal order as the time when the delivery capacity obtains the goods of the normal order; according to the determined time when the delivery capacity obtains the goods of the normal order and the actual promised delivery time of the normal order, under the condition that the delivery capacity only delivers the normal order, determine whether the normal order is overdue; if so, the annotation of the normal order is that the delivery time is affected by the merchant's sorting of the order; if not, the annotation of the normal order is that the delivery time is not affected by the merchant's sorting of the order.
[0155] The second annotation determination unit 61242 is configured to determine an annotation for a pre-order as a sample order. The second annotation determination unit 61242 is specifically configured to: for each pre-order, determine the duration between the actual order placement time of the pre-order and the promised delivery time of the pre-order as the duration of the pre-order; and determine the duration between the time when the delivery capacity actually obtains the goods of the pre-order and the actual delivery time of the pre-order as the actual delivery duration of the pre-order; take the difference between the duration of the pre-order and the actual delivery duration of the pre-order as the maximum available duration for the merchant to sort the pre-order; among the orders sorted by the merchant historically, determine the orders whose similarity to the pre-order meets the set conditions as the reference orders of the pre-order; according to the actual duration required for the merchant to sort each reference order historically, determine the reference sorting duration of the pre-order; determine whether the determined maximum available duration for the merchant to sort the pre-order is greater than the reference sorting duration; if not, the annotation of the pre-order is that the delivery time is affected by the merchant's sorting of the order; if so, the annotation of the pre-order is that the delivery time is not affected by the merchant's sorting of the order.
[0156] Optionally, the first distribution module 606 includes a sorting completion determination sub-module 6060. The sorting completion determination sub-module 6060 is configured to wait until the confirmation information that the merchant has completed sorting the order is obtained, and then determine the completion of sorting of the order.
[0157] Optionally, the sorting completion determination sub-module 6060 may include a waiting unit 60600. The waiting unit 60600 is configured to determine the completion of sorting of the order when waiting for a first set duration.
[0158] Optionally, the order allocation device may further include a reallocation module 608. The reallocation module 608 is electrically connected to the first allocation module 606. The reallocation module 608 is configured to reallocate the order according to the current status information of the distribution transportation capacity and the current status information of other distribution transportation capacities if the time for the distribution transportation capacity to wait for pick-up reaches a second set duration.
[0159] The embodiments of the present specification also provide a computer-readable storage medium, which stores a computer program that can be used to execute any one of the above order allocation processes.
[0160] The embodiments of the present specification also propose Figure 7 a partial structural schematic diagram of the electronic device shown. As Figure 7 , 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 any one of the above order allocation processes. Of course, in addition to the software implementation method, the present specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. 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.
[0161] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many method flow improvements today can be regarded as direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented using a hardware entity module. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logical function is determined by the user programming the device. Designers can program themselves to "integrate" a digital system onto a single PLD, without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, today, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compilers used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called a Hardware Description Language (HDL), and there is not just one type of HDL, but many, 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. The most commonly used ones currently are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that by simply performing a little logical programming on the method flow using the above-mentioned several hardware description languages and programming it into an integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.
[0162] 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 functions. 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.
[0163] 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.
[0164] 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.
[0165] 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.
[0166] 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 of 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.
[0167] 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.
[0168] 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.
[0169] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0170] 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 (flash RAM). The memory is an example of computer-readable media.
[0171] A computer-readable medium includes both permanent and non-permanent, removable and non-removable media and can implement information storage by any method or technology. The 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media such as modulated data signals and carrier waves.
[0172] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element.
[0173] Those skilled in the art should understand that the embodiments of this specification can be provided as a method, system or computer program product. Therefore, this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this specification can 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.
[0174] This specification can 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 can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0175] 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, and for the relevant parts, reference can be made to the partial description of the method embodiment.
[0176] The above description is only for the embodiments 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 unassigned orders; For each unassigned order, input the information of the order into a pre-trained model; the model is trained in the following way: use at least some of the historical orders as sample orders; for each sample order, determine the type of the sample order according to the information of the sample order; according to the type of the sample order and the information of the sample order, determine the annotation of the sample order; train the model according to each sample order and annotation; According to the output result of the model, judge whether the delivery time of the order is affected by the merchant's sorting of the order; The types of the sample orders include: ordinary orders; determining the annotation of the sample order according to the type of the sample order and the information of the sample order specifically includes: for each ordinary order, take the time when the merchant actually finishes sorting the ordinary order as the time when the delivery capacity obtains the goods of the ordinary order; according to the time when the determined delivery capacity obtains the goods of the ordinary order and the actual promised delivery time of the ordinary order, under the condition that the delivery capacity only delivers the ordinary order, judge whether the ordinary order is overdue; if so, the annotation of the ordinary order is that the delivery time is affected by the merchant's sorting of the order; if not, the annotation of the ordinary order is that the delivery time will not be affected by the merchant's sorting of the order; If so, wait until the sorting of the order is completed, and then assign the order to the delivery capacity for delivery; Otherwise, directly assign the order to the delivery capacity for delivery.
2. The method according to claim 1, characterized in that, The types of the sample orders also include: pre-orders; Determining the annotation of the sample order according to the type of the sample order and the information of the sample order specifically includes: For each pre-order, determine the duration between the actual order placement time of the user of the pre-order and the promised delivery time of the pre-order as the duration of the pre-order; and determine the duration between the time when the delivery capacity actually obtains the goods of the pre-order and the actual delivery time of the pre-order as the actual delivery duration of the pre-order; Take the difference between the duration of the pre-order and the actual delivery duration of the pre-order as the maximum available duration for the merchant to sort the pre-order; Among the orders sorted by the merchant in history, determine the orders whose similarity to the pre-order meets the set conditions as the reference orders of the pre-order; According to the actual duration required for the merchant to sort each reference order in history, determine the reference sorting duration of the pre-order; Judge whether the determined maximum available duration for the merchant to sort the pre-order is greater than the reference sorting duration; If so, the annotation of the pre-order is that the delivery time will not be affected by the merchant's sorting of the order; If not, the annotation of the pre-order is that the delivery time is affected by the merchant's sorting of the order.
3. The method according to claim 1, wherein Waiting until the sorting of the order is completed specifically includes: Wait until the confirmation information that the merchant has completed sorting the order is obtained, and then determine that the sorting of the order is completed.
4. The method according to claim 1, characterized in that, Waiting until the sorting of the order is completed specifically includes: Wait for the first set duration, and then determine that the sorting of the order is completed.
5. The method according to claim 4, wherein After waiting for a set duration and allocating the order to a delivery capacity for delivery, the method further includes: If the waiting time of the delivery capacity for picking up the goods reaches a second set duration, the order is reassigned according to the current status information of the delivery capacity and the current status information of other delivery capacities.
6. An order allocation device, characterized in that, The device includes: An acquisition module configured to acquire unallocated orders; A processing module configured to input the information of each unallocated order into a pre-trained model for each unallocated order. The model is trained in the following manner: at least some of the historical orders are used as sample orders; for each sample order, the type of the sample order is determined according to the information of the sample order; according to the type of the sample order and the information of the sample order, the annotation of the sample order is determined; and the model is trained according to the sample orders and annotations. A judgment module configured to judge whether the delivery time of the order is affected by the merchant's sorting of the order according to the output result of the model. The types of the sample orders include: ordinary orders. Determining the annotation of the sample order according to the type of the sample order and the information of the sample order specifically includes: for each ordinary order, taking the time when the merchant actually finishes sorting the ordinary order as the time when the delivery capacity obtains the goods of the ordinary order; according to the determined time when the delivery capacity obtains the goods of the ordinary order and the actual promised delivery time of the ordinary order, judging whether the ordinary order is overdue under the condition that the delivery capacity only delivers the ordinary order; if so, the annotation of the ordinary order is that the delivery time is affected by the merchant's sorting of the order; if not, the annotation of the ordinary order is that the delivery time will not be affected by the merchant's sorting of the order. A first allocation module configured to wait until the sorting of the order is completed and then allocate the order to a delivery capacity for delivery when the delivery time of the order is affected by the merchant's sorting of the order. A second allocation module configured to directly allocate the order to a delivery capacity for delivery when the delivery time of the order is not affected by the merchant's sorting of the order.
7. 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-5 above is implemented.
8. An electronic device, comprising 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-5 above is implemented.
Citation Information
Patent Citations
Scheduling method and device for order to be delivered
CN110070325A
Unified monitoring method for overtime non-operation of order production nodes based on merchants
CN110599302A