Order distribution method, device, computer-readable storage medium and electronic device

By using the predictive model to weight processing factors in the order allocation system, the problem of delivery overtime caused by small probability factors in the existing technology is solved, and the accuracy of order allocation and delivery efficiency are improved.

CN112561112BActive Publication Date: 2024-08-27BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910851434.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-10
Publication Date
2024-08-27
Estimated Expiration
2039-09-10

AI Technical Summary

Technical Problem

When predicting order delivery time, the existing technology is difficult to accurately handle delivery timeouts caused by small probability factors, resulting in inaccurate order distribution and affecting user experience and delivery efficiency.

Method used

By obtaining the data of orders to be distributed and inputting the pre-trained prediction model, the normal delivery time and abnormal delivery time and delay time caused by factors are determined, weighted according to the weight of the factors, and the comprehensive promised delivery time is calculated to allocate orders.

Benefits of technology

It improves the processing ability of small probability factors, enhances the accuracy of order allocation and delivery efficiency, and reduces inaccuracies caused by errors in promised delivery time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112561112B
    Figure CN112561112B
Patent Text Reader

Abstract

This specification discloses a method, device, computer-readable storage medium and electronic device for order allocation. According to the data corresponding to the order to be allocated, the normal promised delivery time of the order and the abnormal promised delivery time and its delay time corresponding to at least one factor causing the delivery timeout are predicted in the prediction model. Then, for at least one factor, according to the delay time corresponding to the factor, the weight of the factor is determined through the weight determination model. Finally, according to the determined weight, abnormal promised delivery time and normal promised delivery time, the comprehensive promised delivery time of the order to be allocated can be determined to allocate the order. The prediction model is equivalent to quantifying the order delivery time delay caused by each factor alone. When the order is related to a low-probability factor, the comprehensive promised delivery time of the order under the action of the low-probability factor can be given, which improves the accuracy of the determined promised delivery time and thus improves the delivery efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a method, device, computer-readable storage medium, and electronic device for order distribution. Background Art

[0002] At present, in order to improve user experience and delivery efficiency, after receiving an order initiated by a user, the food delivery platform usually first predicts the time when the rider will deliver the order to the user based on the content of the order through a pre-trained prediction model, and uses this as the promised delivery time. This allows the platform to subsequently determine the rider who will deliver the order based on the promised delivery time, and to return the promised delivery time to the user, thereby improving user experience.

[0003] In the prior art, training samples are usually determined based on historical data corresponding to orders that have been delivered in the past, and the prediction model is trained based on the actual delivery time of the order. Generally speaking, as long as the prediction model is trained sufficiently, the prediction results it outputs are sufficiently accurate.

[0004] However, in actual order delivery scenarios, if order delivery is difficult, it may result in no one accepting the order for a long time, causing the actual order delivery time to exceed the promised delivery time. Alternatively, when the supplier fails to provide the delivery items to the rider on time, it will also cause delivery timeouts. This kind of delivery timeout caused by different factors is usually due to the influence of these factors, which causes a delay in a certain link of the delivery, which can be called the delay time corresponding to the factor.

[0005] Usually, delivery timeout is a low-probability event, that is, the probability of each factor occurring is small. Therefore, the distribution of orders related to each factor in the actual order delivery scenario is often as follows: Figure 1 The distribution shown. Figure 1 This is a schematic diagram of the distribution of the number of orders in different scenarios in actual scenarios. The horizontal axis is various delivery situations, such as different scenarios, and the vertical axis is the number of orders. In statistics, the part with concentrated probability distribution is called the "head", and the part with lower probability distribution is called the "tail". Figure 1 These are orders related to various factors.

[0006] However, due to the long tail effect, although the factors of order delivery timeout are usually low-probability events, the total number of orders related to each factor is not small enough to be ignored. Figure 1 The total number of "tail" orders shown in the figure is still quite large compared to the total number of "head" orders.

[0007] In the prior art, since the proportion of orders related to various factors in the total number of orders is relatively small, the accuracy of the promised delivery time obtained by the prior art can still be guaranteed from the prediction results based on a large number of orders. Similarly, the proportion of training samples related to various factors in the training samples is also relatively small, otherwise it may lead to a decrease in the overall accuracy of the trained prediction model in the actual application process. Since the optimization of the global output results is usually considered during model training, the parameters with low optimization difficulty, high proportion in the training samples, and the most obvious improvement in training effect are generally optimized, while the training samples related to various factors that account for a relatively small proportion of the total number of orders have little impact on the training process. Therefore, when the prior art actually applies the prediction model, it is inevitable that the promised delivery time of orders related to various factors cannot be accurately given, so that there is still a non-negligible part of the orders in absolute terms, and it is difficult to give an accurate promised delivery time prediction through the prior art, which affects the accuracy of order allocation, user experience and order delivery efficiency. Summary of the invention

[0008] The embodiments of this specification provide a method and device for order allocation, which are used to partially solve the problems existing in the prior art.

[0009] The embodiments of this specification adopt the following technical solutions:

[0010] This specification provides an order allocation method, including:

[0011] Get the data corresponding to the order to be allocated;

[0012] Inputting the data into a pre-trained prediction model to obtain a normal promised delivery time of the order to be allocated, and an abnormal promised delivery time corresponding to at least one factor causing a delivery timeout of the order to be allocated, and a delay time corresponding to the at least one factor;

[0013] For at least one factor, according to the delay time corresponding to the factor, a weight of the factor is determined by a pre-trained weight determination model, wherein the weight of the factor is positively correlated with the probability of occurrence of the factor;

[0014] According to the determined weights of each factor, the abnormal promised delivery time corresponding to each factor and the normal promised delivery time, the comprehensive promised delivery time of the order to be allocated is determined, so as to allocate the order to be allocated according to the comprehensive promised delivery time.

[0015] Optionally, the factors leading to the delivery timeout of the order to be allocated include at least one of the following factors: the delivery party's order acceptance time exceeds a first preset value and the supplier's delivery time exceeds a second preset value.

[0016] Optionally, determining the comprehensive promised delivery time of the order to be allocated according to the determined weights of the factors, the abnormal promised delivery time corresponding to the factors, and the normal promised delivery time includes:

[0017] For at least one factor, according to the weight of the factor, weight the difference between the abnormal promised delivery time of the factor and the normal promised delivery time to obtain a weighted result corresponding to the factor;

[0018] The comprehensive promised delivery time of the order to be allocated is determined according to the sum of the normal promised delivery time and the weighted result of at least one factor.

[0019] Optionally, the pre-trained prediction model includes:

[0020] Obtain historical data corresponding to several completed orders in history, and determine the following loss functions based on the completed orders obtained:

[0021] Determine a loss function for calculating a normal promised delivery time based on the acquired historical data corresponding to the completed orders;

[0022] For each factor, the completed orders in which the factor occurs are determined from the acquired completed orders, and a loss function for calculating the abnormal promised delivery time corresponding to the factor is determined based on the determined completed orders;

[0023] For each factor, determine the actual delay time corresponding to the factor based on the completed orders obtained, and determine the loss function used to calculate the delay time corresponding to the factor;

[0024] The prediction model is iteratively trained according to the completed orders and the loss functions.

[0025] Optionally, the iteratively training the prediction model according to the completed orders and the loss functions includes:

[0026] For each iterative training process, historical data corresponding to completed orders are input into the prediction model to obtain output results;

[0027] Select a loss function from the determined loss functions as the loss function used in the current iterative training process;

[0028] Calculate the loss value corresponding to the current iterative training process according to the output result and the loss function;

[0029] The model parameters in the prediction model are adjusted by minimizing the loss value corresponding to the current iterative training process as the optimization goal.

[0030] Optionally, the pre-trained weight determination model includes:

[0031] Obtain historical data corresponding to historically completed orders and determine the actual delivery time of the completed orders;

[0032] According to the completed order and the trained prediction model, a normal promised delivery time of the completed order, and an abnormal promised delivery time corresponding to at least one factor causing a timeout in delivery of the completed order and a delay time corresponding to the at least one factor are obtained;

[0033] For the at least one factor, determine the weight of the factor according to the delay time corresponding to the factor and the weight determination model to be trained;

[0034] Determine the comprehensive promised delivery time of the completed order according to the determined weights of the factors, the abnormal promised delivery time corresponding to the factors, and the normal promised delivery time;

[0035] The weight determination model to be trained is trained by minimizing the absolute value of the difference between the comprehensive promised delivery time of the completed order and the actual delivery time of the completed order as an optimization goal.

[0036] Optionally, different factors correspond to different weight determination models.

[0037] This specification provides an order distribution device, including:

[0038] An acquisition module configured to acquire data corresponding to the order to be allocated;

[0039] A first determination module is configured to input the data into a pre-trained prediction model to obtain a normal promised delivery time of the order to be allocated, an abnormal promised delivery time corresponding to at least one factor causing a delivery timeout of the order to be allocated, and a delay time corresponding to the at least one factor;

[0040] A second determination module is configured to determine the weight of at least one factor according to the delay time corresponding to the factor through a pre-trained weight determination model, wherein the weight of the factor is positively correlated with the probability of occurrence of the factor;

[0041] The order allocation module is configured to determine the comprehensive promised delivery time of the order to be allocated based on the determined weights of each factor, the abnormal promised delivery time corresponding to each factor, and the normal promised delivery time, so as to allocate the order to be allocated based on the comprehensive promised delivery time.

[0042] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned order allocation method is implemented.

[0043] The present specification provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned order allocation method when executing the program.

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

[0045] First, the data corresponding to the order to be allocated is obtained, and then the obtained data is input into the pre-trained prediction model to obtain the normal promised delivery time of the order to be allocated, the abnormal promised delivery time corresponding to at least one factor that causes the delivery timeout of the order to be allocated, and the delay time corresponding to the at least one factor. Then, for at least one factor, according to the delay time corresponding to the factor, the weight of the factor is determined by the pre-trained weight determination model. Moreover, the weight determined by the pre-trained model is positively correlated with the probability of occurrence of the factor. Therefore, finally, according to the weights of each factor, the abnormal promised delivery time corresponding to each factor, and the normal promised delivery time, the comprehensive promised delivery time of the order to be allocated can be determined, and the order to be allocated can be allocated according to the comprehensive promised delivery time. Through the prediction algorithm, for the factors that may cause delivery timeout, the abnormal delivery time caused by the factor and the delay time corresponding to the factor are calculated respectively, which is equivalent to quantifying the time delay caused by each factor alone. And because the prediction results are determined for each factor separately, it is also easier to optimize each factor during the training process. Subsequently, the weight determination model is used to determine the weight that is positively correlated with the probability of occurrence of each factor, so that even factors with a low probability of occurrence contribute to the final determination of the comprehensive promised delivery time of the order to be assigned. When an order is related to a low-probability factor, the method provided in this specification can give the comprehensive promised delivery time of the order under the influence of the low-probability factor, thereby improving the accuracy of the determined promised delivery time. Reducing the inaccuracy of order allocation caused by errors in the promised delivery time can improve the delivery efficiency of orders. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings described herein are used to provide a further understanding of the present application and constitute 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 on the present application. In the drawings:

[0047] Figure 1 This is a schematic diagram of the long tail effect;

[0048] Figure 2A schematic diagram of the order allocation process provided in the embodiments of this specification;

[0049] Figure 3 A schematic diagram of a prediction model provided in an embodiment of this specification;

[0050] Figure 4 A schematic diagram of a weight determination model provided in an embodiment of this specification;

[0051] Figure 5 A schematic diagram of an order distribution device provided in an embodiment of this specification;

[0052] Figure 6 A schematic diagram of an electronic device for implementing the order allocation method provided in an embodiment of this specification. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this application will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0055] Figure 2 The order allocation process provided in the embodiment of this specification may specifically include the following steps:

[0056] S202: Acquire data corresponding to the order to be allocated.

[0057] In this specification, the order allocation process can be executed by the server of the distribution platform. Before determining how to assign the order to be allocated, the server needs to first determine the promised delivery time of the order to be allocated. So that the matching degree between the order to be allocated and several delivery parties can be determined based on the promised delivery time, and finally the delivery party with the highest matching degree is determined according to the determined matching degrees, and the order to be allocated is allocated to the delivery party. It can be seen that the predicted promised delivery time of the order to be allocated affects the accuracy of subsequent order allocation. Among them, the delivery party is the unit that performs the delivery task, such as a rider, an unmanned delivery vehicle, an unmanned delivery aircraft, etc. For the convenience of description, the delivery party is used as the rider in the following description in this specification.

[0058] Specifically, first of all, since it has not been determined which rider will deliver the order to be assigned, the promised delivery time of the order to be assigned can only be determined based on the data corresponding to the order to be assigned. The data corresponding to the order to be assigned may at least include: the price of the order to be assigned (including the price of the delivery item and the delivery price, etc.), the delivery distance of the order to be assigned (i.e., the distance from the pickup location to the delivery location), the region to which the order to be assigned belongs, the order volume in the region to which the order to be assigned belongs, the identification of the supplier of the order to be assigned, the order quantity of the delivery items that the supplier of the order to be assigned needs to provide but has not yet provided, and so on.

[0059] Among them, the delivery platform usually divides the delivery area of ​​the riders for the convenience of management and statistics. Usually, a rider only performs delivery tasks in one area. On the one hand, it can improve delivery efficiency and reduce long-distance delivery. On the other hand, it can reduce the learning cost required for the rider to become familiar with the road, which can also increase delivery efficiency. Similarly, the area where the supplier is located also belongs to a pre-divided area. The server can determine the area to which the supplier corresponding to the order to be assigned belongs as the area to which the order to be assigned belongs.

[0060] Furthermore, by determining the order volume in the area of ​​the order to be assigned, the transportation pressure in the area can be determined. When the transportation pressure increases due to a large order volume, the possibility of unexpected situations causing delivery timeouts will increase. For example, when the weather is hot, more users choose to order food on the food delivery platform, then the order volume in the area will increase, and the transportation capacity in the area will be tight, which will increase the possibility of human errors.

[0061] Furthermore, the server determines the number of orders for which the supplier of the orders to be assigned needs to provide but has not yet provided the delivery items, that is, determines the supply pressure of the supplier, as the data corresponding to the orders to be assigned. When the number of deliveries that the supplier needs to provide but has not yet provided is large, it means that the supplier needs to prepare a large number of deliveries and the pressure is high. Therefore, the probability of the rider arriving at the supplier but the supplier being unable to provide the deliveries in time increases. It can be seen that when the server determines the data corresponding to the orders to be assigned, it has already included the potential reasons for the order timeout. This allows the server to subsequently determine the delay time of the order due to various factors based on the data corresponding to the orders to be assigned, and determine the comprehensive promised delivery time of the order.

[0062] S204: Input the data into a pre-trained prediction model to obtain the normal promised delivery time of the order to be allocated, the abnormal promised delivery time corresponding to at least one factor causing the delivery timeout of the order to be allocated, and the delay time corresponding to the at least one factor.

[0063] There are usually multiple factors that cause order timeouts, and the probability of each factor occurring is not exactly the same, and the delay in delivery time caused by the factor is also not exactly the same. In this specification, since the data corresponding to the order to be assigned obtained in step S202 includes potential reasons for order timeouts, the server can input the obtained data into a pre-trained prediction model to obtain the normal promised delivery time output by the prediction model, and for at least one factor, the abnormal promised delivery time corresponding to the factor, and the delay time corresponding to the factor.

[0064] Specifically, since the data corresponding to the order to be allocated determined by the server may include data of several dimensions, the prediction model is a model that can receive multi-dimensional data input, and the server can input the data corresponding to the order to be allocated into the prediction model respectively. And in this specification, the prediction model needs to output multiple results, including: the normal promised delivery time of the order to be allocated in the absence of any factors. The abnormal promised delivery time of the order to be allocated under the influence of different factors. And, the length of time that the order to be allocated is delayed under the influence of different factors. That is, the prediction model can output the length of delay caused by different factors, as well as the abnormal promised delivery time under the influence of different factors after the delay.

[0065] Among them, since the prediction model inputs multi-dimensional data and outputs multiple results, the prediction model can be trained based on a multi-layer perceptron (Multi-Layer Perception, MLP) or a DeepFM model. Of course, as long as the multi-dimensional data input is satisfied and the regression model that outputs multiple results can be used in step S204 of this specification after training, this specification does not limit which specific model is used.

[0066] In addition, the factors that lead to the timeout of delivery of the to-be-assigned order include at least one of the following factors: the time it takes for the rider to accept the order exceeds the first preset value (i.e., the rider accepts the order late), and the time it takes for the supplier to deliver the goods exceeds the second preset value (i.e., the delivery is late). The rider accepts the order late, that is, after the server receives the order initiated by the user, there is no rider to accept the order for a long time, resulting in the actual delivery time of the last order exceeding the promised delivery time. Late delivery, that is, because the supplier fails to provide the delivery items in a timely manner, the rider needs to spend extra time waiting at the supplier, resulting in the actual delivery time of the order exceeding the promised delivery time.

[0067] Among them, the potential reason for the rider to accept the order late is that the order is not easy to deliver, resulting in no rider to accept the order. The potential reason for late delivery is that the supplier has great supply pressure, resulting in the inability to prepare the delivery items in time. The potential reasons corresponding to these factors that lead to delivery timeouts are all included in the data corresponding to the orders to be delivered. For example, the price of the order to be assigned and the delivery distance of the order to be assigned can be used to evaluate the rider's willingness to accept the order, and the order volume in the area to which the order to be assigned belongs and the number of orders for delivery items that the supplier of the order to be assigned needs to provide but has not yet provided, etc., can be used to evaluate the supplier's supply pressure, etc.

[0068] It should be noted that in this specification, since the prediction model outputs the delay time and abnormal promised delivery time corresponding to each factor, when training the prediction model, the model parameters of the output result corresponding to each factor can be fully trained through suitable training samples for each factor, so as to ensure the accuracy of the results output by the prediction model for each factor.

[0069] S206: For at least one factor, determine the weight of the factor according to the delay time corresponding to the factor through a pre-trained weight determination model, wherein the weight of the factor is positively correlated with the probability of occurrence of the factor.

[0070] In this specification, the output results of the prediction model for at least one factor in step S204 are all unrelated to each other, so it is also necessary to determine the degree of influence of each factor on the order to be assigned, that is, to determine the weight value of each factor, so as to subsequently determine the comprehensive promised delivery time of the order to be assigned. In this specification, the server can input the delay time corresponding to at least one factor into a pre-trained weight determination model, determine the weight output by the weight determination model, and use it as the weight of the factor. In addition, since the higher the probability of occurrence of a factor, the higher the impact that the factor may have, the weight of the factor determined in this specification is positively correlated with the probability of occurrence of the factor.

[0071] Specifically, in this specification, different factors correspond to different weight determination models. First, for each factor, the server takes the delay time that at least includes the factor as input, and uses the pre-trained weight determination model corresponding to the factor to determine the output result of the weight determination model. Then, the output result is mapped to the numerical range of 0 to 1 through the Sigmoid function to obtain the weight of the factor.

[0072] In addition, in this specification, since there is a possibility of interference between different factors, in order to more accurately determine the weight of each factor, in this specification, the input of the weight determination model corresponding to each factor can be the delay time of multiple factors, and the output result is mapped through the Sigmoid function as the weight of the factor.

[0073] For example, when only two factors are considered, namely, the rider’s late order acceptance and the supplier’s late delivery, the input of the weight determination model corresponding to each factor can be the delay time of the two factors. α (pred 接单晚 , pred 供货晚 )] and the formula β=1 / 1+exp[-FM β (pred 接单晚 , pred 供货晚 )], respectively determine the weight of the factor of late order acceptance and the weight of the factor of late delivery. Among them, α represents the weight of the factor of late order acceptance, β represents the weight of the factor of late delivery, and FM α (pred 接单晚 , pred 供货晚 ) represents the output result of the weight determination model corresponding to the late order factor, FM α (pred 接单晚 , pred 供货晚 ) represents the output result of the weight determination model corresponding to the late delivery factor, pred 接单晚 Indicates the delay time corresponding to the late order factor, pred 供货晚 Indicates the delay time corresponding to the late delivery factor. It can be seen that for these two factors, the input of the weight determination model of this factor is the same, including the delay time of the factor itself and the delay time of other factors. Of course, since each weight determination model is trained separately, the model parameters in the weight determination model of different factors are not completely consistent, that is, the weight determination models of different factors are different.

[0074] S208: Determine the comprehensive promised delivery time of the order to be allocated based on the determined weights of each factor, the abnormal promised delivery time corresponding to each factor, and the normal promised delivery time, so as to allocate the order to be allocated based on the comprehensive promised delivery time.

[0075] In this specification, after determining the weight of each factor, the server can determine the impact of each factor on the normal promised delivery time, so that the server can determine the comprehensive promised delivery time of the order to be allocated based on the normal promised delivery time and the impact of each factor on the normal promised delivery time. Finally, the order to be allocated is allocated according to the comprehensive promised delivery time.

[0076] Specifically, the server may weight the difference between the abnormal promised delivery time of the factor determined in step S204 and the normal promised delivery time of the order to be allocated according to the weight of the factor determined in step S206 for at least one factor, and obtain a weighted result corresponding to the factor. Then, the server determines the comprehensive promised delivery time of the order to be allocated according to the sum of the normal promised delivery time and the weighted result of at least one factor.

[0077] Continuing with the previous example, the server's comprehensive promised delivery time for orders to be assigned can be calculated using the formula pred final =pred normal +α(pred 接单晚 -pred normal )+β(pred 供货晚 -pred normal ) is determined. Among them, pred final is the comprehensive promised delivery time of the orders to be assigned, pred normal is the normal promised delivery time determined in step S204, pred 接单晚 and pred 供货晚 are the abnormal promised delivery time corresponding to the late order acceptance factor and the late supply factor, α(pred 接单晚 -pred normal ) is the weighted result corresponding to the late order factor, β(pred 供货晚 -pred normal ) is the weighted result corresponding to the late delivery factor. Of course, the server can also determine the comprehensive promised delivery time based on the weighted result of any one of the two factors, such as pred final =pred normal +α(pred 接单晚 -pred normal ) is to determine the comprehensive promised delivery time of the orders to be allocated based on the weighted result corresponding to the late order acceptance factor and the normal promised delivery time.

[0078] based on Figure 2The method of order allocation shown in the figure uses a prediction algorithm to calculate the abnormal delivery time caused by the factor and the delay time corresponding to the factor for possible factors that may cause delivery timeouts, which is equivalent to quantifying the time delay caused by each factor alone. And because the prediction result is determined for each factor separately, it is also easier to optimize each factor during the training process. Subsequently, the weight determination model is used to determine the weight that is positively correlated with the probability of occurrence of each factor, so that even factors with a low probability of occurrence contribute to the final determination of the comprehensive promised delivery time of the order to be allocated. When an order is related to a low-probability factor, the method provided in this specification can give the comprehensive promised delivery time of the order under the action of the low-probability factor, thereby improving the accuracy of the determined promised delivery time. Reducing the inaccuracy of order allocation caused by errors in the promised delivery time can improve the delivery efficiency of orders.

[0079] In addition, in this specification, when training the prediction model, the historical data corresponding to several completed orders in history can be obtained first, and then the loss functions can be determined according to the completed orders obtained, and finally the prediction model can be trained according to the completed orders and the loss functions. Taking the factors that cause order delivery timeout as late order acceptance and late delivery as an example, the structural diagram of DeepFM can be as follows: Figure 3 shown.

[0080] Specifically, obtaining the historical data corresponding to the completed order is similar to the process of step S202 in this specification, and the historical data obtained is used as the data included in the training sample to input the prediction model. This specification will not go into details about what kind of data the historical data specifically includes, and reference can be made to the description in step S202.

[0081] In addition, it should be noted that in this specification, completed orders include: orders that are completed normally, that is, orders that are not affected by factors that cause timeouts, and orders that are affected by at least one factor and completed. Since they are all historically completed orders, whether they are affected by factors that cause timeouts can be determined based on the historical data corresponding to the order.

[0082] Afterwards, the historical data corresponding to the completed orders are input into the prediction model to be trained (the prediction model is DeepFM as an example for explanation below) to obtain the predicted times output by the DeepFM. Since the results output by DeepFM can be multi-dimensional, the number of prediction results output by the model can be set as needed when designing the DeepFM. Among them, the prediction results output by the DeepFM include at least: the predicted normal promised delivery time of the completed orders. In addition, in order to determine the weight of the factor for each factor later, for each factor, the DeepFM can also output the predicted abnormal promised delivery time of the completed order corresponding to the factor, as well as the delay time of the completed order.

[0083] The server can determine each loss function based on the prediction results output by DeepFM and the actual delivery time of the completed orders. For the loss function of the normal promised delivery time, the loss function can be determined based on the absolute value of the difference between the normal promised delivery time output by the prediction model and the actual delivery time of the completed orders. The formula can be used Determine the loss. Among them, avg all Represents the average of the differences of all completed orders as the loss. normal represents the normal delivery time predicted by DeepFM, real normal The actual delivery time.

[0084] Taking the factors that cause order delivery timeouts as late order acceptance factors and late supply factors as examples, for each factor, the completed orders in which the factor occurs can be determined from the acquired completed orders, and based on the determined completed orders, the loss function used to calculate the abnormal promised delivery time corresponding to the factor is determined as: the absolute value of the difference between the abnormal promised delivery time corresponding to the factor output by the prediction model and the actual delivery time of the determined completed orders.

[0085] For example, using the formula Determine the loss. avg 出餐时间≥25min的运单 This means that completed orders with a delivery time of more than 25 minutes are considered orders with late delivery factors, and the average difference value is determined only for such orders. 供货晚 Indicates the actual delivery time of completed orders with a delivery time exceeding 25 minutes, pred 供货晚 Indicates the abnormal promised delivery time of completed orders whose delivery time output by DeepFM exceeds 25 minutes.

[0086] Using the formula Determine the loss. avg 接单时间≥5min的运单This means that completed orders that took more than 5 minutes to be accepted are considered orders with late acceptance factors, and the average difference is determined only for such orders. 接单晚 Indicates the actual delivery time of completed orders that took more than 5 minutes to receive, pred 接单晚 Indicates the abnormal promised delivery time of completed orders whose order acceptance time exceeds 5 minutes as output by DeepFM.

[0087] Furthermore, for each factor, the actual delay time corresponding to the factor is determined according to the completed orders obtained, and the loss function used to calculate the delay time corresponding to the factor is determined as: the absolute value of the difference between the delay time corresponding to the factor output by the prediction model and the actual delay time corresponding to the factor determined.

[0088] For example, using the formula Determine the loss. 供货时间 represents the predicted delivery time output by DeepFM, real 供货时间 is the actual delivery time of the completed order, and the difference is the delay time caused by late delivery. Determine the loss. 接单时间 Indicates the predicted order acceptance time output by DeepFM, real l接单时间 is the actual order acceptance time of the completed order, and the difference is the delay time caused by late order acceptance.

[0089] Furthermore, in the present specification, since the server can determine multiple loss functions, during training, one loss function can be selected from the loss functions as the loss function used in the current iterative training process, and the loss value of the current iterative training process can be calculated based on the output results of DeepFM and the selected loss function, so as to minimize the loss value as the optimization goal and adjust the model parameters in DeepFM.

[0090] Furthermore, in this specification, the server may use stochastic gradient descent method, small batch gradient descent method, etc. to adjust the model parameters, and this specification does not limit the specific method.

[0091] In addition, in this specification, the training of the weight determination model can be performed after the prediction model training is completed, and the results output by the prediction model can be used as the input of the weight determination model.

[0092] Specifically, first, the server may obtain historical data corresponding to several completed orders in history, and determine the actual delivery time of each completed order.

[0093] Secondly, based on the trained prediction model and the historical data corresponding to the completed order, determine the normal promised delivery time of the completed order, the abnormal promised delivery time corresponding to at least one factor that caused the completed order to be delivered overtime, and the delay time corresponding to the at least one factor.

[0094] Afterwards, for at least one factor, a model is determined according to the delay time corresponding to the factor and the weight to be trained to determine the weight of the factor.

[0095] Among them, the server can discretize the delay time corresponding to the factor, and then input it into the weight determination model to be trained to unify the corresponding inputs of different time lengths. For example, when an order is accepted within five minutes, the impact on the actual order delay is negligible, so there is no need to distinguish between 1 minute and 5 minutes. Or, when the delivery time exceeds 25 minutes, the impact on the order delay is large enough and there is no need to distinguish between 26 minutes and 36 minutes. The model calculation amount can be simplified and the variable range of the input data can be reduced.

[0096] In addition, the weight determination model can specifically be a FM model + sigmoid function, such as Figure 4 As shown in the formula and formula As shown in the figure, it can be seen that the weight determination model is trained for different factors separately. The input is pred 接单时间 and pred 供货时间 , but the output weights correspond to different factors.

[0097] Then, the comprehensive promised delivery time of the completed order is determined based on the determined weights of the factors, the abnormal promised delivery times corresponding to the factors, and the normal promised delivery times.

[0098] Finally, the weight determination model to be trained is trained by minimizing the absolute value of the difference between the comprehensive promised delivery time of the completed order and the actual delivery time of the completed order as the optimization goal.

[0099] Specifically, taking the factors that lead to order delivery timeout as late order acceptance and late delivery as an example, the loss function can be:

[0100]

[0101] Among them, each coefficient can be set as needed. And the specific pred final -pred mian The calculation process can be seen in the description of step S208, and this specification will not go into details.

[0102] In addition, in this specification, when the delivery party is an unmanned delivery vehicle or an unmanned delivery aircraft, the potential reason for the late order may not be exactly the same as the reason why the rider accepts the order late. It may be that there is no suitable unmanned delivery vehicle or unmanned delivery aircraft to deliver the pending orders, resulting in a long period of no orders. Of course, the prediction model outputs the delay time and abnormal promised delivery time corresponding to each factor. Therefore, no matter what the potential reason is for each factor, it will not affect the prediction of the delay time caused by the factor.

[0103] based on Figure 2 The order distribution method shown in the embodiment of the present specification also provides a structural schematic diagram of an order distribution device, such as Figure 5 shown.

[0104] Figure 5 A schematic diagram of a structure of an order distribution device provided in an embodiment of this specification, the device comprising:

[0105] An acquisition module 300 is configured to acquire data corresponding to the order to be allocated;

[0106] A first determination module 302 is configured to input the data into a pre-trained prediction model to obtain a normal promised delivery time of the order to be allocated, and an abnormal promised delivery time corresponding to at least one factor causing a delivery timeout of the order to be allocated and a delay time corresponding to the at least one factor;

[0107] A second determination module 304 is configured to determine, for at least one factor, a weight of the factor according to a delay time corresponding to the factor by using a pre-trained weight determination model, wherein the weight of the factor is positively correlated with a probability of occurrence of the factor;

[0108] The order allocation module 306 is configured to determine the comprehensive promised delivery time of the order to be allocated based on the determined weights of each factor, the abnormal promised delivery time corresponding to each factor, and the normal promised delivery time, so as to allocate the order to be allocated based on the comprehensive promised delivery time.

[0109] Optionally, the factors leading to the delivery timeout of the order to be allocated include at least one of the following factors: the delivery party's order acceptance time exceeds a first preset value and the supplier's delivery time exceeds a second preset value.

[0110] Optionally, the order allocation module 306 is configured to weight the difference between the abnormal promised delivery time and the normal promised delivery time of at least one factor according to the weight of the factor to obtain a weighted result corresponding to the factor;

[0111] The comprehensive promised delivery time of the order to be allocated is determined according to the sum of the normal promised delivery time and the weighted result of at least one factor.

[0112] Optionally, the device also includes: a training module 308, which is configured to pre-train the prediction model, including: obtaining historical data corresponding to several completed orders in history, and determining the following loss functions based on the acquired completed orders: determining a loss function for calculating the normal promised delivery time based on the historical data corresponding to the acquired completed orders, for each factor, determining the completed orders in which the factor appears in the acquired completed orders, and determining a loss function for calculating the abnormal promised delivery time corresponding to the factor based on the determined completed orders, for each factor, determining the actual delay time corresponding to the factor based on the acquired completed orders, determining a loss function for calculating the delay time corresponding to the factor, and iteratively training the prediction model based on the completed orders and the loss functions.

[0113] Optionally, the training module 308 inputs historical data corresponding to completed orders into the prediction model for each iterative training process to obtain an output result, selects a loss function from the determined loss functions as the loss function used in the current iterative training process, calculates the loss value corresponding to the current iterative training process based on the output result and the loss function, and takes minimizing the loss value corresponding to the current iterative training process as the optimization goal to adjust the model parameters in the prediction model.

[0114] Optionally, the training module 308 obtains historical data corresponding to completed orders in history, and determines the actual delivery time of the completed orders, and obtains the normal promised delivery time of the completed orders and the abnormal promised delivery time corresponding to at least one factor causing the timeout of the completed order delivery and the delay time corresponding to the at least one factor according to the delay time corresponding to the factor and the weight determination model to be trained. For the at least one factor, the weight of the factor is determined according to the determined weights of each factor, the abnormal promised delivery time corresponding to each factor, and the normal promised delivery time, and the comprehensive promised delivery time of the completed order is determined. The weight determination model to be trained is trained with minimizing the absolute value of the difference between the comprehensive promised delivery time of the completed order and the actual delivery time of the completed order as the optimization goal.

[0115] Optionally, different factors correspond to different weight determination models.

[0116] based on Figure 5The device for order allocation shown, through a prediction algorithm, for possible factors that may cause delivery timeouts, calculates the abnormal delivery time caused by the factor and the delay time corresponding to the factor, which is equivalent to quantifying the time delay caused by each factor alone. And because the prediction result is determined for each factor separately, it is also easier to optimize each factor during the training process. Subsequently, the weight determination model is used to determine the weight that is positively correlated with the probability of occurrence of each factor, so that even factors with a low probability of occurrence contribute to the final determination of the comprehensive promised delivery time of the order to be allocated. When an order is related to a low-probability factor, the method provided in this specification can give the comprehensive promised delivery time of the order under the action of the low-probability factor, thereby improving the accuracy of the determined promised delivery time. Reducing the inaccuracy of order allocation caused by errors in the promised delivery time can improve the delivery efficiency of orders.

[0117] The embodiments of this specification also provide a computer-readable storage medium, which stores a computer program. The computer program can be used to execute any of the order allocation methods provided above.

[0118] based on Figure 2 The order allocation method shown in the specification also proposes Figure 6 The schematic structure diagram of the electronic device shown in FIG. 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, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement any of the above-mentioned order allocation methods.

[0119] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0120] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. 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 in 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 such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one 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. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0121] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers 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 a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0122] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may 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 a combination of any of these devices.

[0123] For the convenience of description, the above device is described in 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.

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

[0125] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0126] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0128] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

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

[0130] 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.

[0131] 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.

[0132] 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.

[0133] 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.

[0134] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and 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 the relevant parts can be referred to the partial description of the method embodiment.

[0135] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A method for order allocation, characterized in that: include: Get the data corresponding to the order to be allocated; Inputting the data into a pre-trained prediction model to obtain a normal promised delivery time of the order to be allocated, and an abnormal promised delivery time corresponding to at least one factor causing a delivery timeout of the order to be allocated, and a delay time corresponding to the at least one factor; For at least one factor, according to the delay time corresponding to the factor, a weight of the factor is determined by a pre-trained weight determination model, wherein the weight of the factor is positively correlated with the probability of occurrence of the factor; Determine the comprehensive promised delivery time of the order to be allocated according to the determined weights of the factors, the abnormal promised delivery time corresponding to the factors, and the normal promised delivery time, so as to allocate the order to be allocated according to the comprehensive promised delivery time; The step of determining the comprehensive promised delivery time of the order to be allocated according to the determined weights of the factors, the abnormal promised delivery time corresponding to the factors, and the normal promised delivery time includes: For at least one factor, according to the weight of the factor, weight the difference between the abnormal promised delivery time of the factor and the normal promised delivery time to obtain a weighted result corresponding to the factor; Determine the comprehensive promised delivery time of the order to be allocated according to the sum of the normal promised delivery time and the weighted result of at least one factor; Among them, the pre-trained weight determination model includes: Obtain historical data corresponding to historically completed orders and determine the actual delivery time of the completed orders; According to the completed order and the trained prediction model, a normal promised delivery time of the completed order, and an abnormal promised delivery time corresponding to at least one factor causing a timeout in delivery of the completed order and a delay time corresponding to the at least one factor are obtained; For the at least one factor, determine the weight of the factor according to the delay time corresponding to the factor and the weight determination model to be trained; Determine the comprehensive promised delivery time of the completed order according to the determined weights of the factors, the abnormal promised delivery time corresponding to the factors, and the normal promised delivery time; The weight determination model to be trained is trained by minimizing the absolute value of the difference between the comprehensive promised delivery time of the completed order and the actual delivery time of the completed order as an optimization goal.

2. The method according to claim 1, characterized in that in, The factors leading to the delivery timeout of the to-be-allocated order include at least one of the following factors: the delivery party's order acceptance time exceeds a first preset value and the supplier's delivery time exceeds a second preset value.

3. The method according to claim 1, characterized in that Pre-trained prediction models, including: Obtain historical data corresponding to several completed orders in history, and determine the following loss functions based on the completed orders obtained: Determine a loss function for calculating a normal promised delivery time based on the acquired historical data corresponding to the completed orders; For each factor, the completed orders in which the factor occurs are determined from the acquired completed orders, and a loss function for calculating the abnormal promised delivery time corresponding to the factor is determined based on the determined completed orders; For each factor, determine the actual delay time corresponding to the factor based on the completed orders obtained, and determine the loss function used to calculate the delay time corresponding to the factor; The prediction model is iteratively trained according to the completed orders and the loss functions.

4. The method according to claim 3, characterized in that The iteratively training the prediction model according to the completed orders and the loss functions comprises: For each iterative training process, historical data corresponding to completed orders are input into the prediction model to obtain output results; Select a loss function from the determined loss functions as the loss function used in the current iterative training process; Calculate the loss value corresponding to the current iterative training process according to the output result and the loss function; The model parameters in the prediction model are adjusted by minimizing the loss value corresponding to the current iterative training process as the optimization goal.

5. The method according to claim 1, characterized in that Different factors correspond to different weight determination models.

6. 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 described in any one of claims 1 to 5 is implemented.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the methods described in claims 1 to 5 are implemented.