Method and device for predicting dynamic diffusion time of takeout orders
Through the pre-trained dynamic diffusion time survival model, the risk tolerance value is extended based on the multi-dimensional characteristics and time of takeaway orders, and the diffusion time is dynamically predicted, which solves the problem of untimely matching of delivery resources caused by the fixed time of takeaway orders, and improves the system's response Capability and efficiency.
Patent Information
- Application Number
- CN202411091110.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-09
AI Technical Summary
The diffusion time of existing takeaway orders is fixed, and they cannot effectively respond to changes in real-time supply and demand, resulting in untimely matching of distribution resources and wasted scheduling time.
By obtaining the multi-dimensional characteristics and time-extended risk tolerance value of takeaway orders, enter a pre-trained dynamic diffusion survival model to predict the dynamic diffusion time, realize the dynamic diffusion time, and make full use of the system's scheduling time.
Dynamically adjust the duration of order diffusion, improve the system's response to real-time supply and demand changes, realize the effective diffusion of orders and the rapid matching of distribution resources, and reduce the wasted scheduling time.
Smart Images

Figure CN118643944B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent logistics technology, and in particular to a method and device for predicting the dynamic diffusion time of a takeout order. Background Art
[0002] In the current instant delivery field, especially in the food delivery industry, fast and on-time order fulfillment is a key indicator of service quality. In order to meet this service requirement, the entire delivery process involves the meticulous management and scheduling of multiple time nodes, including the order retention time, diffusion time, scheduling time, and the delivery time of delivery resources (such as riders, unmanned delivery vehicles, etc.).
[0003] The order holding time refers to the time corresponding to the number of order holding rounds after the order is created; the diffusion time refers to the time after the order is created to start spreading to the delivery resources, that is, the time after the order is created and enters the order pool. Before this, the order will not be perceived by the surrounding delivery resources; the scheduling time refers to the time from the creation of the order to the successful allocation to the delivery resource; the delivery time of the delivery resource refers to the time from the delivery resource accepting the order to the order being delivered to the user. The reasonable arrangement of these time nodes is crucial to improving delivery efficiency and user satisfaction.
[0004] At present, the diffusion time of orders is uniformly set to a fixed value based on historical experience; however, the fixed diffusion time limits the system's ability to respond to real-time changes in supply and demand, making it impossible to achieve effective diffusion of orders and rapid matching of distribution resources, resulting in a waste of scheduling time. Therefore, this technical problem needs to be solved urgently. Summary of the invention
[0005] In view of the above problems, the present application is proposed to provide a method and device for predicting the dynamic diffusion time of takeout orders that overcomes the above problems or at least partially solves the above problems. The technical solution is as follows:
[0006] In the first aspect, a method for predicting the dynamic diffusion time of a takeaway order is provided, comprising:
[0007] Obtain order information of the target takeout order to be included in the order pool;
[0008] Acquire, according to the order information of the target takeout order, a feature value of a multidimensional feature related to the time extension risk of the target takeout order and a time extension risk tolerance value of the target takeout order;
[0009] The characteristic values of the multidimensional features related to the time extension risk of the target takeout order and the time extension risk tolerance value of the target takeout order are input into a pre-trained dynamic diffusion duration survival model to predict the dynamic diffusion duration of the target takeout order.
[0010] In a second aspect, a device for predicting the dynamic diffusion time of a takeaway order is provided, comprising:
[0011] A first acquisition unit is used to acquire order information of a target takeaway order to be included in the order pool;
[0012] A second acquisition unit is used to acquire, according to the order information of the target takeaway order, a feature value of a multidimensional feature related to the time extension risk of the target takeaway order and a time extension risk tolerance value of the target takeaway order;
[0013] The prediction unit is used to input the characteristic values of the multidimensional characteristics related to the time extension risk of the target takeout order and the time extension risk tolerance value of the target takeout order into a pre-trained dynamic diffusion duration survival model to predict the dynamic diffusion duration of the target takeout order.
[0014] According to a third aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the above-mentioned methods for predicting the dynamic diffusion duration of a takeaway order.
[0015] In a fourth aspect, a storage medium is provided, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above-mentioned methods for predicting the dynamic diffusion duration of a takeaway order when running.
[0016] In a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program is configured to execute any of the above-mentioned methods for predicting the dynamic diffusion duration of a takeaway order when running.
[0017] By means of the above technical scheme, the prediction method and device, electronic device, storage medium and computer program product for the dynamic diffusion time of takeout orders provided in the embodiment of the present application can obtain the order information of the target takeout order to be entered into the order pool; according to the order information of the target takeout order, obtain the characteristic value of the multidimensional feature related to the time extension risk of the target takeout order and the time extension risk tolerance value of the target takeout order; input the characteristic value of the multidimensional feature related to the time extension risk of the target takeout order and the time extension risk tolerance value of the target takeout order into the pre-trained dynamic diffusion time survival model, and predict the dynamic diffusion time of the target takeout order. It can be seen that this embodiment predicts the dynamic diffusion time of the target takeout order through the pre-trained dynamic diffusion time survival model, which can change the current situation of fixed diffusion time of the order, realize the construction of dynamic diffusion capability of the order within the tolerable time extension risk, and make full use of the system schedulable time. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0019] Figure 1 A flow chart showing a method for predicting the dynamic diffusion duration of a takeaway order provided in an embodiment of the present application is shown;
[0020] Figure 2 A structural diagram of a device for predicting the dynamic diffusion duration of a takeaway order provided in an embodiment of the present application is shown;
[0021] Figure 3 A structural diagram of a device for predicting the dynamic diffusion duration of a takeaway order provided by another embodiment of the present application is shown;
[0022] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such use is interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to".
[0025] As mentioned earlier, the current order diffusion time is uniformly set to a fixed value based on historical experience; however, the fixed nature of the diffusion time limits the system's ability to respond to real-time changes in supply and demand, making it impossible to achieve effective order diffusion and rapid matching of distribution resources, resulting in a waste of scheduling time.
[0026] In order to solve the above technical problems, the present application embodiment provides a method for predicting the dynamic diffusion time of a takeaway order, such as Figure 1 As shown, the method for predicting the dynamic diffusion duration of a takeaway order may include the following steps S101 to S103:
[0027] Step S101, obtaining order information of a target takeout order to be included in an order pool.
[0028] In this step, after the target takeout order is created, it waits for the diffusion time to enter the order pool. Before this, the target takeout order will not be perceived by the surrounding delivery resources.
[0029] The order pool here is a function in the online food delivery platform or application. The online food delivery platform or application will send the order information of the orders in the order pool to the nearby delivery resources. These delivery resources can receive the assigned orders or actively select orders.
[0030] The order information may be order-related information, such as the order user, delivery content information, order distance, delivery time of delivery resources, whether it crosses business districts, whether it is located within a set time period, the number of orders issued in the first time period in the past of the current grid where the order is located, merchant information, the proportion of orders issued by the merchant in the current time period in the second time period and the merchant's order time extended to the third time period, the average time extension of the merchant's current time period in the second time period, the average connection time of the merchant in the fourth time period in the past, etc., and this embodiment does not limit this. The set time period, the first time period, the second time period, the third time period and the fourth time period here can be, for example, the 8:00-21:00 time period, 5 minutes, 7 days, 8 minutes and 3 days, respectively, and can be set according to actual needs, and this embodiment does not limit this.
[0031] Step S102, according to the order information of the target takeout order, acquiring the characteristic value of the multidimensional characteristic related to the time extension risk of the target takeout order and the time extension risk tolerance value of the target takeout order.
[0032] Step S103, inputting the characteristic values of the multidimensional characteristics related to the time extension risk of the target takeout order and the time extension risk tolerance value of the target takeout order into a pre-trained dynamic diffusion duration survival model to predict the dynamic diffusion duration of the target takeout order.
[0033] This embodiment predicts the dynamic diffusion time of the target takeout order through a pre-trained dynamic diffusion time survival model, which can change the current situation of fixed diffusion time of the order, realize the construction of dynamic diffusion capability of the order within the tolerable risk of time extension, and make full use of the system's schedulable time.
[0034] The present application provides a possible implementation method, and the dynamic diffusion duration survival model involved in the above step S103 can be obtained by training through the following steps A1 to A6:
[0035] Step A1, constructing initial characteristic variables related to the risk of extended time for takeout orders;
[0036] Step A2, based on the initial characteristic variables, establishing an initial model for representing the relationship between the diffusion time of takeout orders and the risk of time extension;
[0037] Step A3, obtaining the risk tolerance value of time extension, diffusion duration and initial characteristic variable value of the takeaway order as sample training data, training the initial model and obtaining the training result;
[0038] Step A4, selecting multiple feature variables from the initial feature variables according to the training results as multi-dimensional features;
[0039] Step A5, based on the multidimensional features and the initial model, constructing a preliminary dynamic diffusion time survival model for representing the relationship between the diffusion time of takeout orders and the risk of time extension;
[0040] Step A6: Based on the time extension risk tolerance value, diffusion duration, and characteristic values of the multidimensional features of the takeaway order, a preliminary dynamic diffusion duration survival model is trained to obtain a trained dynamic diffusion duration survival model.
[0041] This embodiment first trains the initial model to obtain a training result, and then selects multiple feature variables from the initial feature variables as multidimensional features according to the training results; then, based on the multidimensional features and the initial model, a preliminary dynamic diffusion time survival model is constructed to represent the relationship between the diffusion time of takeout orders and the risk of time extension; based on the time extension risk tolerance value of the takeout orders, the diffusion time and the characteristic values of the multidimensional features, the preliminary dynamic diffusion time survival model is trained to obtain a trained dynamic diffusion time survival model, so that the trained dynamic diffusion time survival model can more reasonably, accurately and efficiently represent the relationship between the diffusion time of takeout orders and the risk of time extension, and can more accurately predict the dynamic diffusion time of the target takeout orders.
[0042] A possible implementation method is provided in the embodiment of the present application. The initial model mentioned in step A2 above may include:
[0043]
[0044]
[0045]
[0046] in, is the risk tolerance value for the extended time of takeout orders, is the diffusion time, is the set of initial feature variables, is the initial feature variable, is a positive integer; It represents the baseline survival probability under different diffusion durations, that is, it represents the corresponding relationship between diffusion duration and baseline survival probability; is the time extension risk prediction value, is the weight coefficient of the initial characteristic variable; exp is an exponential function with a base of e.
[0047] In the above embodiment, is the initial characteristic variable related to the risk of extended time for takeout orders, is the weight coefficient of the initial characteristic variable. The initial model represents the relationship between the diffusion time of takeaway orders and the risk of time extension.
[0048] is the time extension risk prediction value, which is used to characterize the time extension risk of an order; Indicates that with As the time increases, the risk of prolonged exposure will gradually increase; Indicates that with As the risk increases, the risk will gradually decrease as time goes by.
[0049] It represents the baseline survival probability under different diffusion time, that is, it represents the corresponding relationship between diffusion time and baseline survival probability. Specifically, the baseline survival probability will gradually decay from 1 to 0 as the diffusion time increases.
[0050] In the embodiment of the present application, a possible implementation method is provided. In the above step A3, the time extension risk tolerance value, diffusion duration and initial characteristic variable value of the takeaway order are obtained as sample training data, and the initial model is trained to obtain the training result, which may specifically include the following steps A31:
[0051] Step A31, obtaining the time extension risk tolerance value, diffusion duration and initial characteristic variable value of the takeaway order as sample training data, training the initial model, determining the weight coefficient of the initial characteristic variable, and obtaining the training result.
[0052] Based on the initial model established by the above formula, the time extension risk tolerance value, diffusion time and initial characteristic variable value of the takeaway order are obtained as sample training data, the initial model is trained, the weight coefficient of the initial characteristic variable is determined, and the training result is obtained. As analyzed above, when Indicates that with As the time increases, the risk of prolonged exposure will gradually increase; Indicates that with As the risk increases, the risk will gradually decrease as time goes by.
[0053] A possible implementation method is provided in the embodiment of the present application. is equal to 0, or The difference between 0 and 0 is less than the preset threshold, which can be set according to actual needs. Corresponding The impact on the risk of time extension is small and can be ignored. Specifically, the above step A4 selects multiple feature variables from the initial feature variables according to the training results as multi-dimensional features, which can include the following steps A41:
[0054] Step A41, based on the weight coefficients of the initial feature variables, multiple feature variables are screened out from the initial feature variables as multi-dimensional features.
[0055] Right now, is the weight coefficient of the initial feature variable, if is equal to 0, or If the difference between the value and 0 is less than the preset threshold, it is considered Corresponding The impact on the risk of time extension is small and can be ignored.
[0056] In an optional embodiment, the multidimensional features may include order distance, delivery time of delivery resources, whether it crosses business districts, whether it is located within a set time period, the number of orders issued in the first time period in the past for the current grid where the order is located, the proportion of orders issued by the merchant in the current time period close to the second time period and the merchant's order issuance time is extended to the third time period, the average extension time of the merchant's current time period close to the second time period and the average pick-up time of the merchant in the current time period close to the fourth time period in the past. This embodiment does not impose any restrictions on this.
[0057] The process of selecting multiple feature variables from the initial feature variables to form multi-dimensional features in this embodiment can also be called Feature Selection, which can reduce the dimension of data, improve the generalization ability of the model, reduce the computing cost, and retain the prediction target variable. Most useful information.
[0058] The present application provides a possible implementation method. In step A5 above, based on the multidimensional features and the initial model, a preliminary dynamic diffusion time survival model is constructed to represent the relationship between the diffusion time of takeout orders and the risk of time extension. The preliminary dynamic diffusion time survival model may include:
[0059]
[0060]
[0061]
[0062] in, is the risk tolerance value for the extended time of takeout orders, is the diffusion time, is the set of multidimensional features, is the multidimensional feature, is a positive integer; It represents the baseline survival probability under different diffusion durations, that is, it represents the corresponding relationship between diffusion duration and baseline survival probability; is the time extension risk prediction value, is the weight coefficient of the multidimensional feature; exp is an exponential function with a base of e.
[0063] In the above embodiment, is a multidimensional feature related to the risk of extended delivery time for takeout orders. It is the weight coefficient of the multidimensional feature. The preliminary dynamic diffusion time survival model represents the relationship between the diffusion time of takeaway orders and the risk of time extension.
[0064] is the time extension risk prediction value, which is used to characterize the time extension risk of an order; Indicates that with As the time increases, the risk of prolonged exposure will gradually increase; Indicates that with As the risk increases, the risk will gradually decrease as time goes by.
[0065] It represents the baseline survival probability under different diffusion time, that is, it represents the corresponding relationship between diffusion time and baseline survival probability. Specifically, the baseline survival probability will gradually decay from 1 to 0 as the diffusion time increases.
[0066] In an embodiment of the present application, a possible implementation method is provided. In the above step A6, a preliminary dynamic diffusion duration survival model is trained based on the time extension risk tolerance value, diffusion duration, and characteristic values of multidimensional features of the takeaway order to obtain a trained dynamic diffusion duration survival model, which may specifically include the following steps A61:
[0067] Step A61, based on the time extension risk tolerance value of the takeaway order, the diffusion time and the characteristic values of the multidimensional features, the preliminary dynamic diffusion time survival model is trained to determine the baseline survival probability under different diffusion times and the weight coefficients of the multidimensional features, and obtain the trained dynamic diffusion time survival model.
[0068] The preliminary dynamic diffusion time survival model established according to the above formula is trained based on the risk tolerance value of time extension of takeout orders, the diffusion time and the characteristic values of multidimensional features. The baseline survival probability under different diffusion times and the weight coefficients of multidimensional features are determined to obtain the trained dynamic diffusion time survival model.
[0069] It represents the baseline survival probability under different diffusion time, that is, it represents the corresponding relationship between diffusion time and baseline survival probability. Specifically, the baseline survival probability will gradually decay from 1 to 0 as the diffusion time increases.
[0070] The above introduces Figure 1 There are multiple implementation methods for each link of the illustrated embodiment. The following will further illustrate the method for predicting the dynamic diffusion time of the takeaway order in the embodiment of the present application through specific embodiments.
[0071] In a specific embodiment, an order, also known as a waybill, refers to a written contract between a user and an instant logistics platform regarding the transportation of goods. The diffusion time refers to the time after an order is created to start diffusing to distribution resources, that is, the time after an order is created and enters the order pool. Before this time, the order will not be perceived by the surrounding distribution resources.
[0072] First, a preliminary dynamic diffusion duration survival model is constructed through the previous steps A1 to A5 to represent the relationship between the diffusion duration of takeout orders and the risk of time extension.
[0073] This embodiment constructs initial characteristic variables related to the time extension risk of takeout orders from the order dimension, the market dimension and the merchant dimension; based on the initial characteristic variables, an initial model for representing the relationship between the diffusion time of takeout orders and the time extension risk is established; the time extension risk tolerance value, the diffusion time and the initial characteristic variable value of the takeout order are obtained as sample training data, the initial model is trained to obtain training results; and according to the training results, multiple characteristic variables are screened out from the initial characteristic variables as multidimensional features.
[0074] The multi-dimensional features here may include order distance, delivery time of delivery resources, whether it crosses business districts, whether it is located within a set time period, the number of orders issued in the first time period in the past for the current grid where the order is located, the proportion of orders issued by the merchant in the second time period of the current time period and the merchant's order issuance time is extended by the third time period, the average extension time of the merchant's current time period and the average pick-up time of the merchant in the fourth time period in the past for the current time period of the merchant. This embodiment does not impose any restrictions on this.
[0075] Specifically, multi-dimensional features may include order distance, delivery time of delivery resources, whether it crosses business districts, whether it is located in the time period of 8:00-21:00, the number of orders issued in the past 5 minutes of the current grid where the order is located, the proportion of orders in the current period of the merchant with an order time extended by 8 minutes in the past 7 days, the average extension time of orders in the current period of the merchant in the past 7 days, and the average pick-up time of the current period of the merchant in the past 3 days.
[0076] Based on the multidimensional features and the initial model, a preliminary dynamic diffusion time survival model is constructed to represent the relationship between the diffusion time of takeout orders and the risk of time extension. The preliminary dynamic diffusion time survival model may include:
[0077]
[0078]
[0079]
[0080] in, is the risk tolerance value for the extended time of takeout orders, is the diffusion time, is the set of multidimensional features, is the multidimensional feature, is a positive integer; It represents the baseline survival probability under different diffusion durations, that is, it represents the corresponding relationship between diffusion duration and baseline survival probability; is the time extension risk prediction value, is the weight coefficient of the multidimensional feature; exp is an exponential function with a base of e.
[0081] is a multidimensional feature related to the risk of extended delivery time for takeout orders. It is the weight coefficient of the multidimensional feature. The preliminary dynamic diffusion time survival model represents the relationship between the diffusion time of takeaway orders and the risk of time extension.
[0082] is the time extension risk prediction value, which is used to characterize the time extension risk of an order; Indicates that with As the time increases, the risk of prolonged exposure will gradually increase; Indicates that with As the risk increases, the risk will gradually decrease as time goes by.
[0083] It represents the baseline survival probability under different diffusion time, that is, it represents the corresponding relationship between diffusion time and baseline survival probability. Specifically, the baseline survival probability will gradually decay from 1 to 0 as the diffusion time increases.
[0084] Then, the dynamic diffusion duration survival model is obtained through training in the previous step A61.
[0085] After constructing the preliminary dynamic diffusion time survival model, the preliminary dynamic diffusion time survival model can be trained based on the time extension risk tolerance value of the takeaway order, the diffusion time and the characteristic values of the multidimensional characteristics, and the baseline survival probability under different diffusion times and the weight coefficients of the multidimensional characteristics can be determined to obtain the trained dynamic diffusion time survival model.
[0086] The preliminary dynamic diffusion duration survival model is trained, and the baseline survival probability under different diffusion durations can be discretized into the following Table 1, which can also be called the basic survival table.
[0087]
[0088] Table 1
[0089] It should be noted that the baseline survival probabilities under different diffusion durations listed in Table 1 above are merely illustrative and do not limit this embodiment.
[0090] The weight coefficients of multi-dimensional features, i.e., order distance, delivery time of delivery resources, whether it crosses business districts, whether it is located in the 8:00-21:00 time period, the number of orders issued in the past 5 minutes in the current grid where the order is located, the proportion of orders with an 8-minute extension in the merchant's current time period in the past 7 days, the average extension time of the merchant's time extension order in the current time period in the past 7 days, and the average connection time of the merchant's current time period in the past 3 days are 1.17, 0.97, 1.09, 1.3, 1.01, 1.49, 1.01, and 0.86, respectively. It should be noted that the weight coefficients of the multi-dimensional features listed here are only illustrative and do not limit this embodiment.
[0091] Through the weight coefficients of the multi-dimensional features obtained through training, we can see that when the weight coefficient is greater than 1, the risk of time extension will gradually increase as the feature value increases; when the weight coefficient is less than 1, the risk of time extension will gradually decrease as the feature value increases. This is basically consistent with actual cognition. The longer the order distance, the shorter the delivery time, the cross-business district, the peak period, the higher the order volume, and the higher the proportion of merchant historical time extension, the higher the risk of time extension.
[0092] Next, the trained dynamic diffusion time survival model can be used to predict the dynamic diffusion time of the target takeout order.
[0093] The dynamic diffusion duration survival model trained determines the baseline survival probability and weight coefficients of multidimensional features under different diffusion durations , suppose that the dynamic diffusion duration of the target takeaway order A needs to be determined.
[0094] According to the previous steps S101 and S102, the multidimensional features related to the time extension risk of the target takeaway order A can be obtained. The characteristic value of and the risk tolerance value of the time extension of the target takeaway order A is 0.75.
[0095] according to Model, get the time extension risk prediction value of target takeaway order A .
[0096] according to Model, get , and then calculate the baseline survival probability is 0.8.
[0097] The baseline survival probability under different diffusion durations is queried in Table 1, and the dynamic diffusion duration corresponding to the baseline survival probability of 0.8 is 300 seconds, which is the predicted dynamic diffusion duration of the target takeaway order A.
[0098] It is understandable that under the benchmark of Table 1, the time extension risk tolerance value of target takeaway order A is 0.75, and the latest tolerable diffusion time is 330 seconds; but for target takeaway order A, since its time extension risk prediction value is greater than 1, the diffusion time of target takeaway order A must be earlier to maintain the same time extension risk as the benchmark order 330 seconds. It is calculated that according to the basic survival table 1 shown in the example, the dynamic diffusion time corresponding to the baseline survival probability of 0.8 is 300 seconds, that is, the target takeaway order A needs 300 seconds to diffuse, and the risk tolerance value will not be less than 0.75 if the time is extended.
[0099] In the above embodiment, the time extension risk tolerance value of the target takeaway order A is When it is 0.75, the trained dynamic diffusion duration survival model is used to predict that the dynamic diffusion duration of the target takeaway order A is 300 seconds.
[0100] Furthermore, when the time of the target takeaway order A is extended to the risk tolerance value When it is set to 0.77, the trained dynamic diffusion duration survival model is used to predict the dynamic diffusion duration of the target takeaway order A to be 271.1 seconds.
[0101] Furthermore, when the time of the target takeaway order A is extended to the risk tolerance value When it is set to 0.73, the trained dynamic diffusion duration survival model is used to predict the dynamic diffusion duration of the target takeaway order A to be 320.4 seconds.
[0102] It can be seen that the dynamic diffusion time output by the dynamic diffusion time survival model is adjusted according to the different time extension risk tolerance values, that is, the smaller the time extension risk tolerance value is set, the lower the baseline survival probability is, and the dynamic diffusion time of the target takeaway order A will be correspondingly longer. In the above example, when the time extension risk tolerance value is 0.77, the dynamic diffusion time of the target takeaway order A is 271.1 seconds, which is about 50 seconds earlier than the 320.4 seconds of the time extension risk tolerance value of 0.73, and diffuses into the order pool.
[0103] Generally speaking, if you want to reduce the risk of delayed delivery of orders, you need to start diffusion in advance so that more delivery resources can see the orders, increase the exposure and delivery rate of the orders, but a lower tolerance for delayed delivery risk will also reduce delivery efficiency. If the order stays in the scheduling system for too short a time and the order retention time is reduced, the system will have fewer opportunities to find the best delivery resource from a global perspective, resulting in increased costs. Therefore, it is necessary to select an appropriate risk tolerance threshold based on the specific goals of the delivery operation to balance delayed delivery and efficiency.
[0104] It should be noted that the size of the sequence number of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. In practical applications, all the above possible implementation methods can be combined in any way to form possible embodiments of the present application, which will not be described one by one here.
[0105] Based on the methods for predicting the dynamic diffusion duration of takeout orders provided in the above embodiments, and based on the same inventive concept, an embodiment of the present application also provides a device for predicting the dynamic diffusion duration of a takeout order.
[0106] Figure 2 is a structural diagram of a device for predicting the dynamic diffusion time of a takeaway order provided in an embodiment of the present application. Figure 2 As shown, the prediction device for the dynamic diffusion duration of a takeaway order may specifically include a first acquisition unit 210 , a second acquisition unit 220 and a prediction unit 230 .
[0107] The first acquisition unit 210 is used to acquire order information of a target takeaway order to be included in the order pool;
[0108] A second acquisition unit 220 is used to acquire, according to the order information of the target takeaway order, a feature value of a multidimensional feature related to the time extension risk of the target takeaway order and a time extension risk tolerance value of the target takeaway order;
[0109] The prediction unit 230 is used to input the characteristic values of the multidimensional characteristics related to the time extension risk of the target takeout order and the time extension risk tolerance value of the target takeout order into a pre-trained dynamic diffusion duration survival model to predict the dynamic diffusion duration of the target takeout order.
[0110] A possible implementation method is provided in the embodiment of the present application, such as Figure 3 As shown above Figure 2 The device may further include a training unit 310, which is used to train the dynamic diffusion duration survival model through the following steps:
[0111] Constructing initial characteristic variables related to the risk of extended time for takeout orders;
[0112] Based on the initial characteristic variables, an initial model is established to represent the relationship between the diffusion time of the takeaway order and the risk of time extension;
[0113] Obtaining a time extension risk tolerance value, a diffusion duration, and an initial characteristic variable value of a takeout order as sample training data, training the initial model, and obtaining a training result;
[0114] Screening out a plurality of feature variables from the initial feature variables according to the training results as multi-dimensional features;
[0115] Based on the multidimensional features and the initial model, a preliminary dynamic diffusion duration survival model is constructed to represent the relationship between the diffusion duration of takeout orders and the risk of time extension;
[0116] Based on the time extension risk tolerance value of the takeaway order, the diffusion duration and the characteristic value of the multidimensional feature, the preliminary dynamic diffusion duration survival model is trained to obtain a trained dynamic diffusion duration survival model.
[0117] A possible implementation method is provided in an embodiment of the present application, wherein the initial model includes:
[0118]
[0119]
[0120]
[0121] in, is the risk tolerance value for the extended time of takeout orders, is the diffusion time, is the set of initial feature variables, is the initial feature variable, is a positive integer; It represents the baseline survival probability under different diffusion durations, that is, it represents the corresponding relationship between diffusion duration and baseline survival probability; is the time extension risk prediction value, is the weight coefficient of the initial characteristic variable; exp is an exponential function with a base of e.
[0122] A possible implementation method is provided in an embodiment of the present application, wherein the training unit 310 is further configured to:
[0123] The time extension risk tolerance value, diffusion duration and initial characteristic variable value of the takeaway order are obtained as sample training data, the initial model is trained, the weight coefficient of the initial characteristic variable is determined, and the training result is obtained.
[0124] A possible implementation method is provided in an embodiment of the present application, wherein the training unit 310 is further configured to:
[0125] According to the weight coefficients of the initial feature variables, a plurality of feature variables are screened out from the initial feature variables as multi-dimensional features.
[0126] A possible implementation method is provided in an embodiment of the present application, wherein the preliminary dynamic diffusion duration survival model includes:
[0127]
[0128]
[0129]
[0130] in, is the risk tolerance value for the extended time of takeout orders, is the diffusion time, is the set of multidimensional features, is the multidimensional feature, is a positive integer; It represents the baseline survival probability under different diffusion durations, that is, it represents the corresponding relationship between diffusion duration and baseline survival probability; is the time extension risk prediction value, is the weight coefficient of the multidimensional feature; exp is an exponential function with a base of e.
[0131] A possible implementation method is provided in an embodiment of the present application, wherein the training unit 310 is further configured to:
[0132] Based on the time extension risk tolerance value of the takeaway order, the diffusion time and the characteristic value of the multidimensional feature, the preliminary dynamic diffusion time survival model is trained to determine the baseline survival probability under different diffusion times and the weight coefficient of the multidimensional feature, so as to obtain the trained dynamic diffusion time survival model.
[0133] A possible implementation method is provided in an embodiment of the present application, and the multidimensional features include order distance, delivery time of delivery resources, whether it crosses business circles, whether it is located within a set time period, the number of orders issued in the first time period in the past for the current grid where the order is located, the proportion of orders issued by the merchant in the current time period close to the second time period and the merchant's order issuance time is extended by the third time period, the average extension time of the merchant's current time period close to the second time period and the average pick-up time of the merchant in the current time period close to the fourth time period in the past.
[0134] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for predicting the dynamic diffusion duration of a takeaway order of any one of the above embodiments.
[0135] In an exemplary embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4 The electronic device 400 shown includes: a processor 401 and a memory 403. The processor 401 and the memory 403 are connected, such as through a bus 402. Optionally, the electronic device 400 may also include a transceiver 404. It should be noted that in actual applications, the transceiver 404 is not limited to one, and the structure of the electronic device 400 does not constitute a limitation on the embodiments of the present application.
[0136] Processor 401 may be a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0137] The bus 402 may include a path to transmit information between the above components. The bus 402 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0138] The memory 403 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0139] The memory 403 is used to store the computer program code for executing the solution of the present application, and the execution is controlled by the processor 401. The processor 401 is used to execute the computer program code stored in the memory 403 to implement the contents shown in the above method embodiment.
[0140] Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0141] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute a method for predicting the dynamic diffusion duration of a takeaway order of any of the above embodiments when running.
[0142] Based on the same inventive concept, an embodiment of the present application also provides a computer program product, including a computer program, wherein the computer program is configured to execute the method for predicting the dynamic diffusion duration of a takeaway order of any one of the above embodiments during runtime.
[0143] Those skilled in the art can clearly understand that the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they are not further described here.
[0144] Those skilled in the art can understand that the technical solution of the present application can be essentially or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, which includes a number of program instructions, so that an electronic device (such as a personal computer, a server, or a network device, etc.) executes all or part of the steps of the method described in each embodiment of the present application when running the program instructions. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0145] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with program instructions (such as electronic devices such as personal computers, servers, or network devices), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of an electronic device, the electronic device executes all or part of the steps of the methods described in the embodiments of the present application.
[0146] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that within the spirit and principles of the present application, they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate from the protection scope of the present application.
Claims
1. A method for predicting the dynamic diffusion time of takeout orders, characterized in that: include: Obtain order information of the target takeout order to be included in the order pool; Acquire, according to the order information of the target takeout order, a feature value of a multidimensional feature related to the time extension risk of the target takeout order and a time extension risk tolerance value of the target takeout order; Inputting the characteristic values of the multidimensional characteristics related to the time extension risk of the target takeout order and the time extension risk tolerance value of the target takeout order into a pre-trained dynamic diffusion duration survival model to predict the dynamic diffusion duration of the target takeout order; The dynamic diffusion duration survival model is trained by the following steps: Constructing initial characteristic variables related to the risk of extended time for takeout orders; Based on the initial characteristic variables, an initial model is established to represent the relationship between the diffusion time of the takeaway order and the risk of time extension; wherein the diffusion time refers to the time from when the order is created to when it begins to diffuse to the delivery resources, that is, the time when the order enters the order pool after it is created; Obtaining a time extension risk tolerance value, a diffusion duration, and an initial characteristic variable value of a takeout order as sample training data, training the initial model, and obtaining a training result; Screening out a plurality of feature variables from the initial feature variables according to the training results as multi-dimensional features; Based on the multidimensional features and the initial model, a preliminary dynamic diffusion duration survival model is constructed to represent the relationship between the diffusion duration of takeout orders and the risk of time extension; Based on the time extension risk tolerance value of the takeaway order, the diffusion duration and the characteristic value of the multidimensional feature, the preliminary dynamic diffusion duration survival model is trained to obtain a trained dynamic diffusion duration survival model.
2. The method according to claim 1, characterized in that The initial model includes: in, is the risk tolerance value for the extended time of takeout orders, is the diffusion time, is the set of initial feature variables, is the initial feature variable, is a positive integer; It represents the baseline survival probability under different diffusion durations, that is, it represents the corresponding relationship between diffusion duration and baseline survival probability; is the time extension risk prediction value, is the weight coefficient of the initial characteristic variable; exp is an exponential function with a base of e.
3. The method according to claim 2, characterized in that The time extension risk tolerance value, diffusion duration and initial characteristic variable value of the takeaway order are obtained as sample training data, and the initial model is trained to obtain training results, including: The time extension risk tolerance value, diffusion duration and initial characteristic variable value of the takeaway order are obtained as sample training data, the initial model is trained, the weight coefficient of the initial characteristic variable is determined, and the training result is obtained.
4. The method according to claim 3, characterized in that According to the training results, a plurality of feature variables are screened out from the initial feature variables as multi-dimensional features, including: According to the weight coefficients of the initial feature variables, a plurality of feature variables are screened out from the initial feature variables as multi-dimensional features.
5. The method according to claim 2, characterized in that: The preliminary dynamic diffusion duration survival model includes: in, is the risk tolerance value for the extended time of takeout orders, is the diffusion time, is the set of multidimensional features, is the multidimensional feature, is a positive integer; It represents the baseline survival probability under different diffusion durations, that is, it represents the corresponding relationship between diffusion duration and baseline survival probability; is the time extension risk prediction value, is the weight coefficient of the multidimensional feature; exp is an exponential function with a base of e.
6. A device for predicting the dynamic diffusion time of a takeaway order, characterized in that: include: A first acquisition unit is used to acquire order information of a target takeaway order to be included in the order pool; A second acquisition unit is used to acquire, according to the order information of the target takeaway order, a feature value of a multidimensional feature related to the time extension risk of the target takeaway order and a time extension risk tolerance value of the target takeaway order; A prediction unit, used for inputting the characteristic values of the multidimensional characteristics related to the time extension risk of the target takeout order and the time extension risk tolerance value of the target takeout order into a pre-trained dynamic diffusion duration survival model to predict the dynamic diffusion duration of the target takeout order; The device further comprises a training unit, which is used to train the dynamic diffusion duration survival model through the following steps: Constructing initial characteristic variables related to the risk of extended time for takeout orders; Based on the initial characteristic variables, an initial model is established to represent the relationship between the diffusion time of the takeaway order and the risk of time extension; wherein the diffusion time refers to the time from when the order is created to when it begins to diffuse to the delivery resources, that is, the time when the order enters the order pool after it is created; Obtaining a time extension risk tolerance value, a diffusion duration, and an initial characteristic variable value of a takeout order as sample training data, training the initial model, and obtaining a training result; Screening out a plurality of feature variables from the initial feature variables according to the training results as multi-dimensional features; Based on the multidimensional features and the initial model, a preliminary dynamic diffusion duration survival model is constructed to represent the relationship between the diffusion duration of takeout orders and the risk of time extension; Based on the time extension risk tolerance value of the takeaway order, the diffusion duration and the characteristic value of the multidimensional feature, the preliminary dynamic diffusion duration survival model is trained to obtain a trained dynamic diffusion duration survival model.
7. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method for predicting the dynamic diffusion duration of a takeaway order as described in any one of claims 1 to 5.
8. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method for predicting the dynamic diffusion duration of a takeaway order according to any one of claims 1 to 5 when running.
9. A computer program product, comprising a computer program, characterized in that The computer program is configured to execute the method for predicting the dynamic diffusion duration of a takeaway order according to any one of claims 1 to 5 when running.
