Order fulfillment duration prediction method and prediction device
By using feature learning in a multi-task prediction model and feature fusion in a task learning layer, the problem of large differences in fulfillment time between the merchant browsing interface and the order submission interface is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202511651741.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-11-11
AI Technical Summary
In instant delivery orders, there is a significant difference between the fulfillment time displayed on the merchant's browsing interface and the fulfillment time displayed on the order submission interface, resulting in a poor user experience.
A multi-task prediction model is adopted, which extracts features from the merchant browsing interface and the order submission interface through the feature learning layer and the task learning layer. By using the inter-task attention mechanism and the feature fusion of the scene learning layer, a consistent fulfillment time is predicted.
This reduces the difference in fulfillment time between the merchant browsing interface and the order submission interface, thus improving the user experience.
Smart Images

Figure CN121119303B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronics, in particular to a method and device for predicting order fulfillment time. BACKGROUND
[0002] With the development of the e-commerce industry, the frequency and demand of users shopping online is increasing. Users can browse different stores and different types of goods on e-commerce platforms or food delivery platforms, and purchase the goods they need according to their own needs.
[0003] In instant delivery orders for online shopping, the order fulfillment time usually includes the fulfillment time in the merchant browsing interface and the fulfillment time in the order submission interface. The fulfillment time in the merchant browsing interface is the estimated delivery time of the merchant displayed when the user browses the merchant list. The fulfillment time in the order submission interface is the estimated delivery time displayed when the user completes the selection of goods in the order submission interface. At present, there is a large difference between the above two fulfillment times in the application program of instant delivery orders, resulting in poor user experience.
[0004] Therefore, how to reduce the difference between the fulfillment time in the merchant browsing interface and the fulfillment time in the order submission interface and improve user experience has become a problem to be solved. SUMMARY
[0005] The present application provides a method and device for predicting order fulfillment time. The method for predicting order fulfillment time can reduce the difference between the fulfillment time in the merchant browsing interface and the fulfillment time in the order submission interface, achieve consistency of the two fulfillment times displayed in instant delivery orders, and improve user experience.
[0006] In a first aspect, a method for predicting order fulfillment time is provided, which is applied to a multi-task prediction model. The multi-task prediction model includes at least one feature learning layer, and the feature learning layer includes a task learning layer, which includes a first feature extraction module and a task inter-attention mechanism module. The method includes:
[0007] In response to a merchant browsing operation of a user, original data is obtained, which includes user data, merchant data, and data of a target delivery scenario;
[0008] Based on the original data and the first feature extraction module, a first feature of a first task and a second feature of a second task are obtained. The first feature is used to represent the feature extracted for the first task, and the second feature is used to represent the feature extracted for the second task. The first task is used to predict the estimated delivery time in the merchant browsing interface, and the second task is used to predict the estimated delivery time in the order submission interface.
[0009] Based on the original data and the inter-task attention mechanism module, task association features are obtained, which are used to represent the association between the first task and the second task.
[0010] Based on the first feature, the second feature, and the task-related feature, the target fusion feature is obtained;
[0011] Based on the target fusion features, a first estimated delivery time and a second estimated delivery time are obtained; wherein, the first estimated delivery time is the duration corresponding to the first task, and the second estimated delivery time is the duration corresponding to the second task.
[0012] In the embodiments of this application, the multi-task prediction model includes a task learning layer, which comprises a first feature extraction module for extracting the unique features of each task in the multi-task system and an inter-task attention mechanism module. The first feature extraction module can extract features from the original data separately for different tasks within the multi-task system. Since different tasks have their own unique needs and data characteristics, the first feature extraction module can extract features according to the needs of different tasks. The inter-task attention mechanism module is used to calculate the association weights between the current task and other tasks based on the original data. It determines which tasks' features and knowledge are more important for the prediction of the current task; and then dynamically adjusts the degree of influence of different tasks on the current task. The target fusion feature is obtained based on the output of the first feature extraction module and the output of the inter-task attention mechanism module; this target fusion feature includes the unique features of each task and the task association features between tasks. The unique features ensure that the features meet the needs of a single task, while the task association features enable mutual constraints between tasks. Therefore, this target fusion feature satisfies the task requirements of each individual task while also fulfilling the constraints between tasks. Predicting the estimated delivery time of the first and second tasks based on this target fusion feature enables synchronization between them. That is, the predicted results for the first and second tasks increase or decrease simultaneously, thereby reducing the difference between their estimated delivery times. This reduces the discrepancy between the fulfillment time displayed on the merchant's browsing interface and the fulfillment time displayed on the order submission interface, achieving consistency between the two fulfillment times displayed in instant delivery orders and thus improving user experience.
[0013] In conjunction with the first aspect, in some implementations of the first aspect, the task learning layer also includes a second feature extraction module, which further includes:
[0014] Based on the original data and the second feature extraction module, task-shared features are obtained. The task-shared features are used to represent the features obtained after feature extraction for multiple tasks, including the first task and the second task.
[0015] The target fusion feature is obtained based on the first feature, the second feature, the task association feature, and the task sharing feature.
[0016] The target fusion feature is obtained based on the first feature, the second feature, the task association feature, and the task sharing feature.
[0017] In the embodiments of the present application, the second feature extraction module is configured to extract common features of the plurality of tasks (i.e., the task sharing feature) according to the plurality of tasks; that is, the task sharing feature can reflect the common features associated with the plurality of tasks. Since the first feature is a unique feature of the first task, and the second feature is a unique feature of the second task; based on the task sharing feature and the unique features of each task, both the unique information of a single task and the global information of multiple tasks can be taken into account, thereby improving the accuracy of single task prediction. Further, the task association feature can realize the constraint between tasks. Therefore, based on the first feature, the second feature, the task association feature, and the task sharing feature, the target fusion feature is obtained; the target fusion feature can realize the constraint between tasks while improving the prediction accuracy of each single task. That is, while improving the accuracy of predicting the commitment duration in the merchant browsing interface and the commitment duration in the order submission interface, the difference between the two commitment durations is reduced, thereby improving the user experience.
[0018] In combination with the first aspect, in some implementations of the first aspect, the feature learning layer further includes a scene learning layer, and the scene learning layer includes a third feature extraction module;
[0019] Based on the original data and the first feature extraction module, the first feature of the first task and the second feature of the second task are obtained, including:
[0020] Based on the original data and the third feature extraction module, the third feature of the target delivery scene is obtained, and the third feature is used to represent the feature obtained by feature extraction for the target delivery scene;
[0021] The first fusion feature is obtained based on the third feature;
[0022] The first feature of the first task and the second feature of the second task are obtained by performing feature extraction on the first fusion feature through the first feature extraction module.
[0023] In the embodiments of the present application, the feature learning layer includes a task learning layer and a scene learning layer, and the scene learning layer includes a third feature extraction module; the third feature extraction module is configured to perform feature extraction for the target delivery scene. That is, the third feature extraction module is configured to extract the unique features of the target delivery scene. In this solution, the unique feature extraction is performed for the target delivery scene first, and then the unique feature and shared feature extraction is performed for the first task and the second task. Because the predicted delivery time of the same task in different delivery scenes has a large difference. Therefore, extracting the scene-specific features first and then performing feature extraction for the task can better use the information of the target delivery scene, and thus the features extracted by the task learning layer are more suitable for the current target delivery scene, so that the multi-task prediction model can more accurately capture the characteristics of the multi-task in different delivery scenes.
[0024] In combination with the first aspect, in some implementations of the first aspect, the scene learning layer further includes a fourth feature extraction module; and the prediction method further includes:
[0025] Based on the original data and the fourth feature extraction module, a scene shared feature is obtained, and the scene shared feature is configured to represent the shared features of the multiple delivery scenes;
[0026] Based on the third feature, a first fused feature is obtained, including:
[0027] The first fused feature is obtained based on the third feature and the scene shared feature.
[0028] In the embodiments of the present application, the fourth feature extraction module is configured to extract the general features of the multiple delivery scenes (i.e., the scene shared feature); that is, the scene shared feature can reflect the common features in different scenes. Because the third feature is the unique feature of the target delivery scene, and the scene shared feature is the general feature of the multiple scenes; based on the scene shared feature and the unique feature of the target delivery scene, the unique information of the current target delivery scene and the common rule information of the multiple delivery scenes can be considered, thereby improving the generalization ability of the multi-scene learning layer in the multi-task prediction model.
[0029] In combination with the first aspect, in some implementations of the first aspect, the scene learning layer further includes an inter-scene attention mechanism module; and the prediction method further includes:
[0030] Based on the original data and the inter-scene attention mechanism module, a scene correlation feature is obtained; and the scene correlation feature is configured to represent the correlation between the target delivery scene and other delivery scenes;
[0031] Based on the third feature and the scene shared feature, a first fused feature is obtained, including:
[0032] The first fused feature is obtained based on the third feature, the scene shared feature, and the scene correlation feature.
[0033] In the embodiments of this application, the inter-scene attention mechanism module is used to extract the correlation between other delivery scenarios and the current delivery scenario (i.e., the target delivery scenario). Different delivery scenarios may differ, but they also possess certain correlations. The inter-scene attention mechanism module in the scene learning layer helps the multi-task prediction model better extract features from different delivery scenarios and uncover potential relationships between them, thereby improving the generalization ability of the multi-task prediction model across multiple scenarios. This addresses the problem of imbalanced data sample sizes across various delivery scenarios, improving the accuracy of the multi-task prediction model in predicting the first estimated delivery time of the first task and the second estimated delivery time of the second task in delivery scenarios with sparse sample data.
[0034] In conjunction with the first aspect, in some implementations of the first aspect, the multi-task prediction model includes an output layer, which includes a first prediction module and a second prediction module;
[0035] Based on the target fusion features, a first estimated delivery time and a second estimated delivery time are obtained, including:
[0036] The target fusion features are input into the first prediction module to obtain the first estimated delivery time;
[0037] The target fusion features are input into the second prediction module to obtain the second estimated delivery time.
[0038] In the embodiments of this application, the output layer includes a prediction module for a first task (i.e., the first prediction module) and a prediction module for a second task (i.e., the second prediction module); by inputting the target fusion feature into the first prediction module, the first estimated delivery time of the merchant browsing interface is obtained; by inputting the target fusion feature into the second prediction module, the second estimated delivery time of the order submission interface is obtained.
[0039] In conjunction with the first aspect, in some implementations of the first aspect, the first feature extraction module is a hybrid expert model, which includes a gating network and N expert sub-models;
[0040] The first expert submodel out of N expert submodels is used to extract features for the first task, and the second expert submodel out of N expert submodels is used to extract features for the second task.
[0041] In one implementation, the first expert submodel and the second expert submodel are partially identical.
[0042] In another implementation, the first expert submodel differs from the second expert submodel.
[0043] Optionally, the mixed expert model is used for task-specific feature extraction in the multi-task, and the expert sub-model in the mixed expert model includes an MLP or a DNN.
[0044] In an embodiment of the present application, the first feature extraction module can be a mixed expert model. The mixed expert model is composed of multiple expert sub-models (also referred to as expert sub-modules), and each expert sub-model focuses on learning and processing features of a specific type or field. By using the mixed expert model for task-specific feature extraction in the multi-task, the accuracy and efficiency of feature extraction can be achieved.
[0045] In combination with the first aspect, in some implementations of the first aspect, the second feature extraction module is a mixed expert model, and the second feature extraction module is used for learning shared features of multiple tasks.
[0046] In an implementation, the second feature extraction module is a mixed expert model, and the mixed expert model is used for shared feature extraction in the multi-task, and the expert sub-model in the mixed expert model includes an MLP or a DNN.
[0047] In combination with the first aspect, in some implementations of the first aspect, the third feature extraction module is a mixed expert model, and the third feature extraction module is used for feature extraction for the target delivery scenario; and / or,
[0048] The fourth feature extraction module is a mixed expert model, and the fourth feature extraction module is used for learning shared features of multiple delivery scenarios, and the multiple delivery scenarios include the target delivery scenario.
[0049] In an implementation, the third feature extraction module is a scenario-specific MoE model, and the fourth feature extraction module is a scenario-shared MoE model.
[0050] In an embodiment of the present application, the third feature extraction module and / or the fourth feature extraction module can be a mixed expert model. The mixed expert model is composed of multiple expert sub-models (also referred to as expert sub-modules), and each expert sub-model focuses on learning and processing features of a specific type or field. By using the mixed expert model for feature extraction in multiple scenarios, the accuracy and efficiency of feature extraction in each scenario can be achieved.
[0051] In combination with the first aspect, in some implementations of the first aspect, the expert sub-model in the mixed expert model includes an MLP.
[0052] In the embodiments of the present application, the expert sub-model in the mixed expert model comprises an MLP. Since the MLP is stacked by full connection layers, the structure is simple, and the parameter scale is usually smaller than that of a complex deep learning model (e.g., a CNN, an RNN). In the instant delivery scenario, the predicted delivery time length in the merchant browsing interface and the predicted delivery time length in the order submission interface have a high requirement on the prediction response speed (e.g., millisecond-level response). Using the MLP as the expert sub-model can greatly reduce the computational overhead and avoid the delay caused by the complexity of the model, thereby ensuring the real-time performance. That is, the expert mixed model composed of the MLP can improve the prediction response speed when predicting the first predicted delivery time length of the first task and the second predicted delivery time length of the second task.
[0053] With reference to the first aspect, in some implementations of the first aspect, the data of the target delivery scenario comprises one or more of weather data, order type, and order mode.
[0054] The order mode is a post-order calling mode or a simultaneous calling mode. The post-order calling mode is used to indicate a mode of calling a rider after taking out or picking up an order. The simultaneous calling mode is used to indicate a mode of calling a rider while taking out or picking up an order. The order type is a retail type or a catering type.
[0055] In an implementation, the weather data comprises normal weather and adverse weather. The adverse weather refers to weather that has an impact on the delivery efficiency of a rider. For example, the adverse weather comprises rainy weather, snowy weather, and the like.
[0056] In a second aspect, a prediction device for an order fulfillment time length is provided. The prediction device is provided with a multi-task prediction model. The multi-task prediction model comprises at least one feature learning layer. The feature learning layer comprises a task learning layer. The task learning layer comprises a first feature extraction module and a task inter-attention mechanism module. The prediction device comprises:
[0057] The acquisition module is configured to acquire original data in response to a merchant browsing operation of a user. The original data comprises user data, merchant data, and data of a target delivery scenario.
[0058] The processing module is configured to obtain first features of the first task and second features of the second task based on the original data and the first feature extraction module; the first features are used to represent features obtained by performing feature extraction on the first task; the second features are used to represent features obtained by performing feature extraction on the second task; the first task is used to predict the predicted delivery time in the merchant browsing interface, and the second task is used to predict the predicted delivery time in the order submission interface; the processing module is further configured to obtain task association features based on the original data and the attention mechanism module, the task association features being used to represent the association between the first task and the second task; the processing module is further configured to obtain target fusion features based on the first features, the second features, and the task association features; and the processing module is further configured to obtain the first predicted delivery time and the second predicted delivery time based on the target fusion features; the first predicted delivery time is a time corresponding to the first task, and the second predicted delivery time is a time corresponding to the second task.
[0059] With reference to the second aspect, in some implementations of the second aspect, the task learning layer further includes a second feature extraction module, and the processing module is further configured to:
[0060] obtain task shared features based on the original data and the second feature extraction module, the task shared features being used to represent features obtained by performing feature extraction on a plurality of tasks, the plurality of tasks including the first task and the second task;
[0061] obtain the target fusion features based on the first features, the second features, the task association features, and the task shared features.
[0062] With reference to the second aspect, in some implementations of the second aspect, the feature learning layer further includes a scene learning layer, and the scene learning layer includes a third feature extraction module.
[0063] obtain third features of a target delivery scene based on the original data and the third feature extraction module, the third features being used to represent features obtained by performing feature extraction on the target delivery scene;
[0064] obtain the first fusion features based on the third features.
[0065] perform feature extraction on the first fusion features by the first feature extraction module to obtain the first features of the first task and the second features of the second task.
[0066] With reference to the second aspect, in some implementations of the second aspect, the scene learning layer further includes a fourth feature extraction module, and the processing module is further configured to:
[0067] obtain scene shared features based on the original data and the fourth feature extraction module, the scene shared features being used to represent shared features of a plurality of delivery scenes;
[0068] obtain the first fusion features based on the third features and the scene shared features.
[0069] With reference to the second aspect, in some implementations of the second aspect, the scene learning layer further includes an inter-scene attention mechanism module; and the processing module is further configured to:
[0070] obtain a scene correlation feature based on the original data and the inter-scene attention mechanism module, the scene correlation feature being used to represent a correlation between the target delivery scene and other delivery scenes;
[0071] obtain a first fusion feature based on the third feature and the scene shared feature, the first fusion feature including:
[0072] obtain the first fusion feature based on the third feature, the scene shared feature and the scene correlation feature.
[0073] With reference to the second aspect, in some implementations of the second aspect, the multi-task prediction model includes an output layer, the output layer including a first prediction module and a second prediction module; and the processing module is specifically configured to:
[0074] input the target fusion feature into the first prediction module to obtain a first predicted delivery time;
[0075] input the target fusion feature into the second prediction module to obtain a second predicted delivery time.
[0076] With reference to the second aspect, in some implementations of the second aspect, the first feature extraction module is a hybrid expert model, the hybrid expert model including a gating network and N expert sub-models.
[0077] a first expert sub-model in the N expert sub-models is configured to extract a feature of a first task, and a second expert sub-model in the N expert sub-models is configured to extract a feature of a second task.
[0078] With reference to the second aspect, in some implementations of the second aspect, the second feature extraction module is a hybrid expert model, the second feature extraction module being configured to learn shared features of multiple tasks.
[0079] With reference to the second aspect, in some implementations of the second aspect, the third feature extraction module is a hybrid expert model, the third feature extraction module being configured to extract features for the target delivery scene; and / or,
[0080] the fourth feature extraction module is a hybrid expert model, the fourth feature extraction module being configured to learn shared features of multiple delivery scenes, the multiple delivery scenes including the target delivery scene.
[0081] With reference to the second aspect, in some implementations of the second aspect, the hybrid expert model includes an MLP model.
[0082] In a possible implementation of the second aspect, the data of the target delivery scenario includes one or more of weather data, a call sheet mode, and an order type.
[0083] The call sheet mode is a post-order call sheet mode or a simultaneous call sheet mode, the post-order call sheet mode is used to represent a mode of calling a rider after an order is delivered or picked up, and the simultaneous call sheet mode is used to represent a mode of calling a rider at the same time when an order is delivered or picked up.
[0084] In a third aspect, an electronic device is provided, including a memory and a processor. The memory is configured to store executable program code, and the processor is configured to invoke and run the executable program code from the memory, so that the electronic device performs the prediction method in the first aspect or any possible implementation manner of the first aspect.
[0085] In an implementation manner, the electronic device is a server.
[0086] In a fourth aspect, a computer program product is provided, which includes computer program code. When the computer program code is run on a computer, the computer program code causes the computer to perform the prediction method in the first aspect or any possible implementation manner of the first aspect.
[0087] In a fifth aspect, a computer readable storage medium is provided, which stores computer program code. When the computer program code is run on a computer, the computer program code causes the computer to perform the prediction method in the first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0088] Figure 1 is a schematic diagram of a graphical user interface running an application A;
[0089] Figure 2 is a schematic diagram of another graphical user interface running an application A;
[0090] Figure 3 is a schematic flowchart of an order fulfillment duration prediction method provided by an embodiment of the application;
[0091] Figure 4 is a model structure schematic diagram of a multi-task prediction model provided by an embodiment of the application;
[0092] Figure 5 is a model structure schematic diagram of another multi-task prediction model provided by an embodiment of the application;
[0093] Figure 6 is a model structure schematic diagram of another multi-task prediction model provided by an embodiment of the application;
[0094] Figure 7 This is a schematic diagram of the model structure of another multi-task prediction model provided in an embodiment of this application;
[0095] Figure 8 This application provides a schematic diagram of a system architecture.
[0096] Figure 9 This is a schematic diagram of the structure of an order fulfillment time prediction device provided in an embodiment of this application;
[0097] Figure 10 A schematic diagram of the structure of an electronic device provided in this application is shown. Detailed Implementation
[0098] In the embodiments of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "multiple" means two or more.
[0099] It should be noted that, in the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0100] To facilitate understanding, the following description will take the first application installed on the mobile phone (for example, application A) as an example, and describe the scenario of displaying the running interface of application A to the user in the first application installed on the mobile phone, with the accompanying drawings.
[0101] Figure 1 This is a schematic diagram of a user running application A's graphical user interface (GUI).
[0102] For example, Figure 1 Image (a) shows an interface 101 displayed on the mobile phone in unlocked mode. This interface 101 displays a weather clock component and multiple applications (Apps). These applications may include phone, messaging, settings, and application A, etc. It should be understood that this interface 101 may also include other applications, and this embodiment of the application does not limit this.
[0103] As shown in (a) of FIG. 1A, a user clicks an icon of an application A, and in response to the click operation of the user, the phone displays a main interface 102 of the application A as shown in (b) of FIG. 1A. The main interface 102 of the application A can also be referred to as a “home page of the application A”. The main interface 102 of the application A can display a plurality of classified menus, operable controls or buttons, pictures, and other interface contents for the user to meet the user’s usage requirements. Figure 1 Figure 1 As shown in (a) of FIG. 1A, a user clicks an icon of an application A, and in response to the click operation of the user, the phone displays a main interface 102 of the application A as shown in (b) of FIG. 1A. The main interface 102 of the application A can also be referred to as a “home page of the application A”. The main interface 102 of the application A can display a plurality of classified menus, operable controls or buttons, pictures, and other interface contents for the user to meet the user’s usage requirements.
[0104] As shown in (b) of FIG. 1A, on the main interface 102 of the application A, a current delivery address (for example, “A District B Street”), a search box, and different classified menus such as food delivery, supermarket, fruit, medicine, dessert, hamburger, lobster, and barbecue, and a merchant list are displayed. The present application does not limit the display contents on the main interface 102 of the application A, the size of the display area, and the like. Figure 1 At present, on the main interface 102 of the application A, one or more merchants can be displayed in the merchant list for the user, and the user can view more merchant information through up and down sliding operations. Optionally, one or more contents such as a user rating, a monthly sales volume, a delivery time, a delivery distance, a starting price, a delivery fee, and promotion information of the merchant can be displayed in each merchant display area.
[0105] As shown in (b) of FIG. 1A, the display area 10 of the hamburger store includes a display area 1021, and the display area 1021 displays an estimated delivery time of 20 minutes. In addition, the display area 10 also displays merchant information such as 4.9 points, monthly sales of 100, delivery distance of 1.2 km, starting price of 20, and free delivery fee. When the user clicks any position of the display area 10 of the hamburger store, in response to the click operation of the user, the phone displays an interface 103 as shown in (c) of FIG. 1A. The interface 103 can display merchant information of the hamburger store and display a goods list for the user. The goods list can classify and display one or more goods sold by the hamburger store.
[0106] Figure 1 As shown in (c) of FIG. 1A, the interface 103 displays different categories such as “Signature Set Meal”, “Snack and Dessert”, “Hamburger”, “Single Set Meal”, “Children Set Meal”, “Coffee and Beverage”, and “Coupon Redemption”. The user can view more goods through up and down sliding operations. For the sake of simplicity, details are not described herein. Figure 1 When the user clicks the add control in the goods display area of the B hamburger, in response to the click operation of the user, the phone displays an interface 104 as shown in (d) of FIG. 1A.
[0107] Figure 1
[0108] When the user clicks the add control in the goods display area of the B hamburger, in response to the click operation of the user, the phone displays an interface 104 as shown in (d) of FIG. 1A. Figure 1 interface 104 in (d) of FIG. 10B; when the user clicks the "go to checkout" control in the interface 104, the mobile phone displays the order submission interface 105 shown in (c) of FIG. 10B in response to the user's click operation; the interface 105 displays the delivery modes of "immediate delivery" and "scheduled delivery"; the display area of the "immediate delivery" mode displays the estimated delivery time; for example, the display area 1051 in (d) of FIG. 10B shows the estimated delivery time of "10:35-10:45". Figure 2 Figure 2
[0109] Based on the above description, when the user browses the goods, the estimated delivery time of the hamburger store displayed in the main interface 102 in (b) of FIG. 10A is 20 minutes; after the user completes the selection of goods in the hamburger store, the estimated delivery time displayed in the interface 105 shown in (c) of FIG. 10B is "estimated delivery time of 10:35-10:45". Combined with the current time (for example, 10:00), it can be known that the estimated delivery time displayed in the interface 105 is 35-45 minutes, which is quite different from the estimated delivery time of 20 minutes displayed in the main interface 102 when the user browses the goods; because the time difference between the estimated delivery time displayed in the application A before the user selects the goods and the estimated delivery time displayed in the application A after the user selects the goods is large, the user experience is poor. Figure 1 Figure 2
[0110] Therefore, the present application provides an order fulfillment time prediction method and device. Through the order fulfillment time prediction method provided by the present application, the difference between the fulfillment time in the merchant browsing interface and the fulfillment time in the order submission interface is reduced, the consistency of the two fulfillment times displayed in the instant delivery order is realized, and the user experience is improved.
[0111] To facilitate understanding of the embodiments of the present application, the professional terms involved in the embodiments of the present application are explained as follows:
[0112] 1. Mixture of Experts (MoE)
[0113] The structure of the mixture of experts usually includes two key parts: experts and gating network. The expert network is a model that processes specific tasks or subsets of data; the gating network is responsible for dynamically selecting the activated experts according to the input data. The core idea of the mixture of experts is to decompose a complex problem into multiple sub-problems, and each sub-problem is handled by a specialized expert model.
[0114] 2. Multi-Layer Perceptron (MLP) model
[0115] MLP model is a basic and widely used neural network model, which belongs to a kind of feedforward neural network. It is composed of input layer, hidden layer and output layer, and each layer is connected by full connection. Each neuron transmits and processes information through weight and bias.
[0116] The core idea of MLP model is to learn the complex mapping relationship between input data and output through multi-layer nonlinear transformation, so as to realize the modeling and prediction of complex patterns. The working principle of MLP is based on forward propagation and back propagation algorithm. In the training process, the model calculates the output through forward propagation, calculates the prediction error through loss function, and then adjusts the weight and bias between layers through back propagation algorithm to minimize the loss function. The training of MLP usually uses gradient descent method for optimization, and the model parameters are updated through continuous iteration to improve the prediction ability of the model.
[0117] 3. Deep neural network (DNN)
[0118] DNN is a machine learning model widely used in the field of artificial intelligence, which simulates the structure and working principle of human brain neural network to realize the processing and decision of complex data. DNN is a neural network model with multiple hidden layers; its core lies in its depth, that is, it contains multiple hidden layers, which can capture the complex relationship and pattern in data through nonlinear transformation.
[0119] For example, the basic structure of DNN usually includes input layer, multiple hidden layers and output layer. Each layer contains multiple neurons, and the neurons are connected through weight and bias. The input data is transmitted from the input layer to the output layer through multiple hidden layers, and is processed through the forward propagation process. In the training process, the model calculates the gradient of the loss function with respect to the model parameters through the back propagation algorithm, and updates the parameters according to the gradient to minimize the loss function.
[0120] 4. Fulfillment duration
[0121] Fulfillment duration refers to the time spent in the entire process from the consumer placing an order to the goods reaching the consumer's hands. The definition of fulfillment duration not only includes the delivery time, but also the total time of order processing, merchant preparation, delivery personnel picking up, etc. For example, the fulfillment duration is usually expressed in minutes or hours.
[0122] For example, in the embodiments of the present application, the fulfillment duration includes two types of fulfillment duration; one is the fulfillment duration in the merchant browsing interface, such as the expected delivery time (for example, 20 minutes) displayed in the display area 1021 in (b) of Figure 1 ; the other is the fulfillment duration in the order submission interface, such as the expected delivery time (for example, 20 minutes) displayed in the display area 1021 in (b) ofFigure 2 The predicted delivery time length (e.g., predicted to be delivered at 10:35-10:45) displayed in the display area 1051 is shown.
[0123] The following describes the method for predicting the order fulfillment time length provided by the embodiments of the present application in detail. Figures 3 to 8 The method for predicting the order fulfillment time length provided by the embodiments of the present application is described in detail.
[0124] Figure 3 The method for predicting the order fulfillment time length provided by the embodiments of the present application is described in detail.
[0125] It should be understood that the method 200 can be applied to an electronic device configured to configure a multi-task prediction model, or a cloud server configured to configure a multi-task prediction model; or can be applied to a chip of the electronic device or a chip of the cloud server, which is not limited in the present application. Figure 3 The method 200 shown includes S210 to S250, which are described in detail below.
[0126] The multi-task prediction model includes at least one feature learning layer, and the at least one feature learning layer includes a task learning layer, and the task learning layer includes a first feature extraction module and a task inter-attention mechanism module.
[0127] It should be noted that the at least one feature learning layer is used for feature extraction and feature fusion. The task learning layer is used for feature extraction and feature fusion based on the task.
[0128] S210. In response to the merchant browsing operation of the user, the original data is acquired.
[0129] The original data includes user data, merchant data, and data of a target delivery scenario.
[0130] For example, the user data includes location information of the user. The merchant data includes location of the merchant, order-out ability of the merchant, and the like.
[0131] Optionally, the data of the target delivery scenario includes one or more of weather data, order calling mode, and order type.
[0132] The order calling mode is a post-order calling mode or a simultaneous order calling mode. The post-order calling mode is used to indicate a mode of calling a rider after order-out or after picking. The simultaneous order calling mode is used to indicate a mode of calling a rider at the same time of order-out or picking. The order type is a retail type or a catering type.
[0133] In one example, the delivery scenarios can be divided into 8 major scenarios based on at least one of weather data, order type and order mode. For example, the 8 major scenarios include: Scenario 1: Normal weather - same order mode - catering type; Scenario 2: Bad weather - same order mode - catering type; Scenario 3: Normal weather - same order mode - retail type; Scenario 4: Bad weather - same order mode - retail type; Scenario 5: Normal weather - after order mode - catering type; Scenario 6: Bad weather - after order mode - catering type; Scenario 7: Normal weather - after order mode - retail type; Scenario 8: Bad weather - after order mode - retail type.
[0134] In one implementation, the delivery scenarios can be divided into 5 major scenarios in combination with the sample data collection of each scenario in the actual application scenario.
[0135] In another example, the delivery scenarios can be divided into 5 major scenarios based on at least one of weather data, order type and order mode.
[0136] For example, the 5 major scenarios include: Scenario 1: Normal weather - same order mode - catering type; Scenario 2: Bad weather - same order mode - catering type; Scenario 3: After order mode - catering type; Scenario 4: Same order mode - retail type; Scenario 5: After order mode - retail type.
[0137] S220. Based on the original data and the first feature extraction module, a first feature of a first task and a second feature of a second task are obtained.
[0138] The first feature is used to represent the feature extracted for the first task, and the second feature is used to represent the feature extracted for the second task. The first task is used to predict the estimated delivery time in the merchant browsing interface, and the second task is used to predict the estimated delivery time in the order submission interface.
[0139] It should be understood that, since the first feature is used to represent the feature extracted for the first task, the first feature is a unique feature of the first task. Since the second feature is used to represent the feature extracted for the second task, the second feature is a unique feature of the second task.
[0140] For example, the first task is a task of predicting the estimated delivery time in the merchant browsing interface. For example, the estimated delivery time in the merchant browsing interface is shown as the estimated delivery time (e.g., 20 minutes) displayed in the display area 1021 in (b) of FIG. 1C. The second task is a task of predicting the estimated delivery time in the order submission interface. For example, the estimated delivery time in the order submission interface is shown as the estimated delivery time (e.g., 20 minutes) displayed in the display area 1021 in (b) of FIG. 1C. Figure 1 Figure 2 The predicted delivery time length (e.g., predicted to be delivered from 10:35 to 10:45) displayed in the display area 1051 shown.
[0141] Optionally, the first feature extraction module includes two sub-modules, and the two sub-modules are respectively configured to extract features for the first task and extract features for the second task.
[0142] It should be understood that in the embodiments of the present application, the first feature extraction module can extract features for different tasks in the plurality of tasks respectively. Since different tasks have their own unique requirements and data characteristics, the first feature extraction module can extract features according to the requirements of different tasks. It can be understood that the first feature extraction module can extract features for each task of the multi-task, which fits the characteristics of different tasks and accurately excavates the exclusive feature information of each task.
[0143] Optionally, the first feature extraction module is a hybrid expert model, and the hybrid expert model includes a gating network and N expert sub-models; a first expert sub-model in the N expert sub-models is configured to extract features for the first task, and a second expert sub-model in the N expert sub-models is configured to extract features for the second task.
[0144] In an implementation manner, the first expert sub-model and the second expert sub-model are partially the same; or the first expert sub-model and the second expert sub-model are different.
[0145] It should be noted that the hybrid expert model is composed of a plurality of expert sub-models (also referred to as expert sub-modules), and each expert sub-model focuses on learning and processing features of a specific type or field. Through the hybrid expert model, more accurate and efficient feature extraction of task features can be achieved.
[0146] For example, the hybrid expert model includes a gating network and an expert sub-model. The gating network is configured to dynamically calculate the weights of different expert sub-models according to the input task features (determine whether it is a merchant browsing interface or an order submission interface) and the data type, and determine the "participation degree" of each expert sub-model. Assuming that the hybrid expert model includes 3 types of expert sub-models; serving different feature dimensions respectively. Expert sub-model 1: task A (merchant browsing interface) dedicated expert; expert sub-model 2: task B (order submission interface) dedicated expert; expert sub-model 3: basic logistics feature expert. When the hybrid expert model extracts features for task A, the gating network allocates weights to the expert sub-models: expert sub-model 1 (70%), expert sub-model 3 (30%), and expert sub-model 2 (0). When the hybrid expert model extracts features for task B, the gating network allocates weights to the expert sub-models: expert sub-model 2 (80%), expert sub-model 3 (20%), and expert sub-model 1 (0).
[0147] In an implementation, the hybrid expert model comprises N expert sub-models, and the N expert sub-models comprise a DNN.
[0148] It should be understood that in the instant delivery order, the factors affecting the predicted delivery time are complex. For example, delivery scenarios, delivery distances, delivery times, and rider supply and demand levels. The DNN has a multi-layer structure and can automatically learn and extract features of different levels and different degrees of abstraction from raw data.
[0149] In an implementation, the hybrid expert model comprises N expert sub-models, and the N expert sub-models comprise a MLP.
[0150] In the embodiments of the present application, the N expert sub-modules can be N MLPs. Since the MLP is stacked by fully connected layers, the structure is simple, and the parameter size is usually smaller than that of a complex deep learning model (for example, CNN, RNN). In the instant delivery scenario, the predicted delivery time in the merchant browsing interface and the predicted delivery time in the order submission interface have higher requirements for prediction response speed (for example, millisecond-level response). Using MLP as an expert sub-model can greatly reduce the computational overhead and avoid delays caused by model complexity, ensuring real-time performance. It can be understood that the expert hybrid model composed of N LPs can improve the response speed of prediction when predicting the first task and the second task.
[0151] S230. Obtain task association features based on the original data and the inter-task attention mechanism module.
[0152] It should be understood that the inter-task attention mechanism module is used to calculate the association weight of the current task and other tasks. It is used to determine which task features and knowledge are more important for the prediction of the current task; and then dynamically adjust the influence degree of different tasks on the current task.
[0153] For example, in the case of the first task (for example, the predicted delivery time in the merchant browsing interface) and the second task (for example, the predicted delivery time in the order submission interface) of the instant delivery scenario, the inter-task attention mechanism module is used to output task association features (for example, task association weights and enhanced features). For example, calculate the "association weight" of the first task and the second task and other tasks; for example, determine the reference value of "for example, the predicted delivery time in the order submission interface" for the predicted delivery time in the merchant browsing interface, and output the weight distribution (for example, [the association weight of the first task-second task: 0.5; the association weight of the first task-other tasks: 0.2; the association weight of the second task-other tasks: 0.3]). Based on the weight distribution, the features of multiple tasks are weighted and fused to obtain the task association features.
[0154] S240. Obtain the target fusion feature based on the first feature, the second feature, and the task association feature.
[0155] Optionally, the first feature, the second feature, and the task association feature are spliced to obtain the target fusion feature.
[0156] For example, the task learning layer includes a feature splicing module. The first feature, the second feature, and the task association feature are input into the feature splicing module for feature splicing to obtain feature splicing data. The feature splicing data is the target fusion feature.
[0157] S250. Obtain the first predicted delivery time and the second predicted delivery time based on the target fusion feature.
[0158] Optionally, the multi-task prediction model includes an output layer, and the output layer includes at least two prediction modules, including a first prediction module and a second prediction module. The first prediction module is used to predict the predicted delivery time of the first task, and the second prediction module is used to predict the predicted delivery time of the second task. The target fusion feature is input into the first prediction module to obtain the predicted delivery time of the first task, i.e., the first predicted delivery time. The target fusion feature is input into the second prediction module to obtain the predicted delivery time of the second task, i.e., the second predicted delivery time.
[0159] In an implementation manner, the multi-task prediction model includes at least one feature learning layer, and the feature learning layer includes a task learning layer. The task learning layer includes a first feature extraction module, an inter-task attention mechanism module, and a splicing module.
[0160] For example, the model structure of the multi-task prediction model is as shown in Figure 4 The task learning layer is the multi-task learning layer shown in Figure 4 The feature input layer is mainly responsible for receiving and preliminarily arranging the original data. The feature embedding layer is mainly responsible for converting and processing the original features output by the feature input layer, and mapping the original features to a vector space.
[0161] For example, the original data is input to the feature input layer, the feature input layer pre-processes the features, and divides the original input data into continuous features, discrete features and scenario features. The continuous features include: distance data between user location and merchant location; the discrete features include: time data, supply and demand pressure level data of the area where the user location is located, etc. The scenario features include: delivery scenario data; for example, weather data, order type and order type. The data processed by the feature input layer is input to the feature embedding layer, and the feature embedding layer converts the data into a feature vector through embedding operation. The feature vector output by the feature embedding layer is input to the task-specific feature extraction module (i.e. the first feature extraction module) and the inter-task attention mechanism module respectively; the task-specific feature extraction module is used for feature extraction for the first task and the second task respectively, to obtain the first feature of the first task and the second feature of the second task; the inter-task attention mechanism module is used for feature extraction for multiple tasks, to obtain the task-related feature; the first feature, the second feature and the task-related feature are input to the concatenation module for feature concatenation, to obtain the target fusion feature. The target fusion feature is input to the output layer, and the output layer includes the prediction module of the first task (i.e. the prediction module of the predicted delivery time in the merchant browsing interface) and the prediction module of the second task (i.e. the prediction module of the predicted delivery time in the order submission interface); the target fusion feature is input to the prediction module of the first task, to obtain the first predicted delivery time. The target fusion feature is input to the prediction module of the second task, to obtain the second predicted delivery time.
[0162] In the embodiments of the present application, the multi-task prediction model comprises a task learning layer, and the task learning layer comprises a first feature extraction module for extracting task-specific features of each task in the multi-task and a task inter-attention mechanism module. The first feature extraction module can extract features from the original data for different tasks in the multi-task. Since different tasks have their own unique requirements and data characteristics, the first feature extraction module can extract features according to the requirements of different tasks. The task inter-attention mechanism module is used to calculate the association weight of the current task and other tasks based on the original data. It is determined which task features and knowledge are more important for the current task prediction; then, the influence degree of different tasks on the current task is dynamically adjusted. The target fusion features are obtained based on the output of the first feature extraction module and the output of the task inter-attention mechanism module; the target fusion features include task-specific features of each task and task association features between tasks. The task-specific features can ensure that the features meet the requirements of a single task, and the task association features can realize the mutual constraint between tasks. Therefore, the target fusion features meet the task requirements of each single task and can realize the related constraint between tasks, and the predicted delivery time of the first task and the predicted delivery time of the second task based on the target fusion features can realize the synchronization of the first task and the second task. That is, the prediction results of the first task and the prediction results of the second task increase and decrease simultaneously, thereby reducing the difference between the predicted delivery time of the first task and the predicted delivery time of the second task; reducing the difference between the performance time in the merchant browsing interface and the performance time in the order submission interface, realizing the consistency of the two performance times displayed in the instant delivery order, and improving the user experience.
[0163] Optionally, the task learning layer further comprises a second feature extraction module, and the above prediction method further comprises:
[0164] Based on the original data and the second feature extraction module, a task-shared feature is obtained, the task-shared feature is used to represent the features obtained by performing feature extraction on the plurality of tasks, and the plurality of tasks comprise the first task and the second task;
[0165] Based on the first feature, the second feature, and the task association feature, a target fusion feature is obtained, comprising:
[0166] Based on the first feature, the second feature, the task association feature, and the task-shared feature, a target fusion feature is obtained.
[0167] It should be understood that the second feature extraction module is used to perform feature extraction on the plurality of tasks. The first feature extraction module is used to perform feature extraction on each task. That is, it can be understood that the features obtained by the first feature extraction module are task-specific features for each task, and the features obtained by the second feature extraction module are general features for the plurality of tasks.
[0168] In an implementation manner, the first feature, the second feature, the task association feature and the task sharing feature are spliced to obtain a target fusion feature.
[0169] In the embodiment of the present application, when the task learning layer performs feature extraction, the first feature extraction module can perform feature extraction for each task in the multiple tasks to obtain task-specific features. The second feature extraction module can perform feature extraction for the multiple tasks to obtain common features of the multiple tasks. The task association feature can obtain the association of the multiple tasks. The target fusion feature is obtained based on the task-specific features, the common features and the task association feature. The target fusion feature can reflect the commonality of the multiple tasks, the characteristics of each task and the association between tasks. Compared with the prior art, the multi-task prediction model usually only uses common features when performing feature extraction, resulting in missing task-specific characteristics. The target fusion feature obtained by the present solution can take into account both the task-specific characteristics of a single task and the commonality of multiple tasks. Through the target fusion feature, the synchronicity of the multi-task prediction result can be achieved, that is, the predicted delivery time of the first task and the predicted delivery time of the second task are increased or decreased simultaneously. Under the premise of improving the accuracy of each predicted delivery time, the difference between the two predicted delivery times is reduced.
[0170] In an implementation manner, the multi-task prediction model includes at least one feature learning layer, and the feature learning layer includes a task learning layer. The task learning layer includes a first feature extraction module, a second feature extraction module and a task attention mechanism module.
[0171] Optionally, the first feature extraction module and the second feature extraction module are both hybrid expert models.
[0172] For example, the model structure of the multi-task prediction model is as shown in Figure 5 The multi-task prediction model includes a feature input layer, a feature embedding layer, a multi-task learning layer and an output layer. Taking task A as the predicted delivery time of the merchant browsing interface and task B as the predicted delivery time of the order interface as an example.
[0173] The feature input layer includes continuous features, discrete features, and scenario features. Continuous features include distance data between the user's location and the merchant's location. For example, delivery distance is positively correlated with delivery time; the farther the delivery distance, the longer the delivery time. Discrete features include time data and supply and demand pressure levels in the user's location area. For example, supply and demand pressure levels are positively correlated with delivery time; higher supply and demand pressure levels indicate insufficient transportation resources, resulting in longer delivery times. Scenario features include delivery scenario data, such as weather data, order call patterns, and order types. Scenario features can be any one of the eight or five scenario categories in S210. The feature input layer is primarily responsible for receiving and initially processing the raw data. The feature embedding layer mainly transforms and processes the raw features from the feature input layer, mapping them to a vector space. The multi-task learning layer (i.e., the task learning layer) includes a task-specific MoE module (i.e., the first feature extraction module), a task-shared MoE module (i.e., the second feature extraction module), an inter-task attention mechanism module, and a concatenation module. The system comprises several modules: a task-specific MoE module, a gating network, and a task-specific MoE module. The task-specific MoE module extracts features from different expert sub-modules for task A, yielding the first feature (specifically, the first feature). It also extracts features from task B, yielding the second feature (specifically, the second feature). The task-shared MoE module extracts shared features across all tasks within the given scenario (task-shared features). The inter-task attention mechanism module extracts the correlation features between other tasks and the current task within the scenario (task-related features). The concatenation module concatenates the output features from the task-specific MoE module, the task-shared MoE module, and the inter-task attention mechanism module to obtain the target fusion feature. The output layer includes a prediction module for task A and a prediction module for task B. The prediction module for task A predicts the estimated delivery time displayed on the merchant browsing interface. The prediction module for task B predicts the estimated delivery time displayed on the order submission interface.
[0174] It should be noted that, in the embodiments of this application, the MoE module is a hybrid expert model.
[0175] The following is combined with Figure 5 The multi-task prediction model shown here is illustrated with an example of a delivery distance of 3.5 kilometers, time of 14:00, and scenario characteristics of normal weather, post-meal order calling mode, and food type. Task A is the estimated delivery time displayed on the merchant's browsing interface, and Task B is the estimated delivery time displayed on the order submission interface.
[0176] For example, the feature input layer receives the raw data (delivery distance 3.5 km, time 14:00, scene feature "normal weather - after-meal call mode - catering type"), outputs the original feature set {distance: 3.5 km, supply and demand pressure: general, weather: sunny, call mode: after meal, category: fast food}; the feature embedding layer inputs the original feature set, and outputs an encoding vector with a length of 10 [0.7 (distance normalization), 0 (low pressure), 1 (general pressure), 0 (high pressure), 0.8 (sunny), 0.2 (non-extreme weather), 0.6 (after-meal period), 0.1 (fast food category), 0.9 (catering type), 0.3 (call mode)]. The task-specific MoE module inputs the encoding vector, wherein the expert sub-model of task A (merchant browsing page) outputs lightweight features [0.7 (distance), 0.8 (sunny -> smooth delivery), 0.6 (after meal -> rider idle), 0.3 (call mode)], and the expert sub-model of task B (order submission page) outputs refined features [0.7 (distance), 0.8 (sunny -> smooth delivery), 0.6 (after meal -> rider idle), 0.1 (fast food -> need for heat preservation), 0.9 (catering type -> priority delivery)]. The task-shared MoE module inputs the encoding vector, and outputs cross-task shared features [0.7 (distance -> map to basic delivery time 7 minutes), 0.8 (sunny -> delivery efficiency + 10%), 1 (general pressure -> normal rider load), 0.6 (after meal -> orders concentrated but not congested)]. The inter-task attention mechanism module inputs the encoding vector obtained by the feature embedding layer, and outputs a task correlation weight matrix {task A -> task B: 0.7, task B -> task A: 0.5}. The splicing module inputs the outputs of the task-specific MoE module, the outputs of the task-shared MoE module, and the outputs of the inter-task attention mechanism module, and outputs the fusion features of task A [1.19, 1.36, 1.3, 0.72, 1.36] (obtained by fusing the task-specific features and the task-shared features according to the A->B weight) and the fusion features of task B [1.05, 1.2, 1.1, 0.4, 1.2] (obtained by fusing the task-specific features and the task-shared features according to the B->A weight). The task A prediction module of the output layer inputs the fusion features of task A, and outputs the predicted delivery time of 22 minutes. The task B prediction module inputs the fusion features of task B, and outputs the predicted delivery time of 24 minutes.
[0177] Optionally, the at least one feature learning layer further comprises a scene learning layer, and the scene learning layer comprises a third feature extraction module.
[0178] Based on the raw data and the first feature extraction module, the first feature of the first task and the second feature of the second task are obtained, comprising:
[0179] The third feature is obtained based on the original data and the third feature extraction module, and the third feature is used to represent a feature extracted for the target distribution scene.
[0180] It should be noted that the multi-task prediction model includes at least one feature learning layer, and the at least one feature learning layer includes a task learning layer and a scene learning layer. The task learning layer is used to extract features according to the characteristics and commonalities of the tasks. The scene learning layer is used to extract features according to the characteristics and commonalities of the scenes. The features output by the feature embedding layer in the multi-task prediction model can be first extracted by the scene learning layer and then extracted by the task learning layer.
[0181] It should be understood that the third feature extraction module is used to extract features for the target distribution scene. It can be understood that the third feature extraction module is used to extract features specific to the target distribution scene.
[0182] In the embodiments of the present application, the at least one feature learning layer further includes a scene learning layer, and the scene learning layer includes a third feature extraction module. The third feature extraction module is used to extract features for the target distribution scene. That is, the third feature extraction module is used to extract features specific to the target distribution scene. In this solution, the features specific to the target distribution scene are first extracted, and then the features specific to the first task and the second task and the shared features are extracted. Because the predicted delivery time of the same task in different distribution scenes has a large difference. Therefore, the scene-specific features are first extracted, and then the features are extracted for the tasks, which can better use the information of the target distribution scene, and thus the features extracted by the task learning layer are more suitable for the current target distribution scene, so that the multi-task prediction model can more accurately capture the characteristics of the multi-task in different distribution scenes.
[0183] In one implementation, the multi-task prediction model includes at least one feature learning layer, and the at least one feature learning layer includes a task learning layer and a scene learning layer. The task learning layer is used to extract features according to the characteristics and commonalities of the tasks. The scene learning layer is used to extract features according to the characteristics and commonalities of the scenes. The features output by the feature embedding layer in the multi-task prediction model can be first processed by the scene learning layer and then processed by the task learning layer.
[0184] In one implementation, the third feature extraction module is a hybrid expert model, and the hybrid expert model includes a gating network and N expert sub-models. The N expert sub-models include a third expert sub-model, and the third expert sub-model is an expert sub-model used to extract features of the target distribution scene.
[0185] Optionally, the scene learning layer further comprises a fourth feature extraction module; and the prediction method further comprises:
[0186] Based on the original data and the fourth feature extraction module, scene shared features are obtained, and the scene shared features are used to represent shared features of the multiple delivery scenes.
[0187] Based on the third features, first fusion features are obtained, including:
[0188] The first fusion features are obtained based on the third features and the scene shared features.
[0189] It should be understood that the fourth feature extraction module is used for feature extraction for the multiple delivery scenes. It can be understood that the fourth feature extraction module is used for extracting common features of different delivery scenes; that is, extracting common features of different delivery scenes.
[0190] In the embodiments of the present application, the fourth feature extraction module is used for extracting common features (i.e., scene shared features) of the multiple delivery scenes; through the scene shared features, common features in different scenes can be reflected. Since the third features are unique features of the target delivery scene, the scene shared features are common features of multiple scenes; based on the scene shared features and the unique features of the target delivery scene, both the unique information of the current target delivery scene and the common information of multiple different delivery scenes can be considered, so that the generalization ability of the multi-scene learning layer in the multi-task prediction model can be improved.
[0191] Optionally, the scene learning layer further comprises an inter-scene attention mechanism module; and the prediction method further comprises:
[0192] Based on the original data and the inter-scene attention mechanism module, scene correlation features are obtained; and the scene correlation features are used to represent the correlation between the target delivery scene and other delivery scenes.
[0193] Based on the third features and the scene shared features, first fusion features are obtained, including:
[0194] The first fusion features are obtained based on the third features, the scene shared features and the scene correlation features.
[0195] In one implementation, the third features, the scene shared features and the scene correlation features are feature spliced to obtain the first fusion features; the first fusion features are feature extracted by the first feature extraction module to obtain the first features of the first task and the second features of the second task.
[0196] In the embodiments of the present application, the feature learning layer further comprises a scene learning layer, and the scene learning layer comprises a third feature extraction module; the third feature extraction module is configured to perform feature extraction on the target delivery scene. That is, the third feature extraction module is configured to extract the unique features of the target delivery scene. In the present scheme, the unique feature extraction is performed on the target delivery scene first, and then the unique feature extraction and the shared feature extraction are performed on the first task and the second task. Since the predicted delivery time of the same task in different delivery scenes has a large difference. Therefore, extracting the scene-specific features first and then extracting the features for the task can better use the information of the target delivery scene, and thus the features extracted by the task learning layer are more suitable for the current target delivery scene, so that the multi-task prediction model can more accurately capture the characteristics of the multi-task in different delivery scenes.
[0197] For example, the model structure of the multi-task prediction model is as shown in Figure 6 The model structure as shown in Figure 6 includes: a feature input layer, a feature embedding layer, a multi-scene learning layer (i.e., a scene learning layer), a multi-task learning layer (i.e., a task learning layer), and an output layer. The feature input layer is mainly responsible for receiving and preliminary arrangement of the original data. The feature embedding layer mainly converts and processes the original features transmitted from the feature input layer, and maps them to a vector space.
[0198] For example, the original data is input into the feature input layer, the feature input layer pre-processes the features, and divides the original input data into continuous features, discrete features and scene features. The continuous features include: distance data between user location and merchant location; the discrete features include: time data, supply and demand pressure level data of the area where the user location is located, etc. The scene features include: delivery scene data; for example, weather data, order type and order type. The data processed by the feature input layer is input into the feature embedding layer, and the feature embedding layer converts the data into a feature vector through embedding operation. The feature vector output by the feature embedding layer is input into the scene feature extraction module (i.e. the third feature extraction module) and the scene shared feature extraction module (i.e. the fourth feature extraction module) respectively. The scene feature extraction module is used to extract the unique features in the current delivery scene. The scene shared feature extraction module is used to extract the general features in multiple delivery scenes. The unique features of the current scene (i.e. the third feature) output by the scene feature extraction module and the scene shared features output by the scene shared feature extraction module are input into the splicing module for feature splicing, and the scene fusion features (i.e. the first fusion features) are obtained. The scene fusion features are input into the multi-task learning layer again for feature extraction again. The scene fusion features are input into the scene unique MoE module (i.e. the first feature extraction module), and the unique features of task A in the current scene and the unique features of task B in the current scene are output. The scene fusion features are input into the task shared MoE module, and the general features of task A and task B in the current scene, i.e. the task shared features of task A and task B, are output. The scene fusion features are input into the inter-task attention mechanism module, and the task association features between task A and task B in the current scene are output. The unique features of task A in the current scene, the unique features of task B in the current scene, the task shared features of task A and task B in the current scene, and the task association features are input into the splicing module for feature splicing, and the task fusion features in the current scene (i.e. the target fusion features) are obtained. The task fusion features in the current scene are input into the prediction module of task A of the output layer, and the predicted delivery time of task A (i.e. the predicted delivery time of the merchant browsing interface) is obtained. The task fusion features in the current scene are input into the prediction module of task B of the output layer, and the predicted delivery time of task B (i.e. the predicted delivery time of the order submission interface) is obtained.
[0199] For example, the model structure of the multi-task prediction model is as shown in Figure 7 Figure 7 For example, the delivery distance is 3.5 kilometers; the time is 14:00; the scene features are: normal weather-after-meal order mode-food type; task A is: to predict the predicted delivery time of the merchant browsing interface; and task B is: to predict the predicted delivery time of the order submission interface.
[0200] For example, the original data (e.g., a delivery distance of 3.5 kilometers, a time of 14:00, and scene features of normal weather-after-meal order mode-catering type) is input to the feature input layer, and the original set of three types of features of continuous features, discrete features, and scene features is output; the continuous features include a delivery distance of 3.5 kilometers, the discrete features include a time of 14:00, and the scene features include normal weather-after-meal order mode-catering type (text / structured scene description). The original set of three types of features output by the feature output layer is input to the feature embedding layer, and the feature embedding layer converts the original set of three types of features into a feature vector through embedding operation; for example, the continuous feature "3.5 kilometers" is mapped to the vector [0.2, 0.15] (e.g., numerical normalization and embedding coding); the time "14:00" is mapped to the vector [0.3, 0.22] (e.g., periodic feature coding, reflecting the periodical regularity); and the scene feature "normal weather-after-meal order mode-catering type" is mapped to the vector [0.1, 0.4, 0.3] (e.g., embedding representation of text semantics / structured label), and a set of multi-dimensional feature embedding vectors is output. The multi-dimensional feature embedding vectors are input to the scene-specific MoE module, and the scene-specific MoE module selects the expert sub-module corresponding to the scene according to the scene information in the multi-dimensional feature embedding vectors to perform feature extraction, and outputs the specific feature of the current delivery scene (i.e., the third feature). The multi-dimensional feature embedding vectors are input to the scene-shared MoE module, and the scene-shared MoE module outputs the scene general feature (i.e., the scene-shared feature). The multi-dimensional feature embedding vectors are input to the inter-scene attention mechanism module, and the weighted fused scene features (i.e., the scene-related feature) are output. For example, it is determined that the scene-specific rule (e.g., order concentration leading to slow delivery) is more important than the general rule under the "after-meal order mode", and the scene-specific vector is given a weight of 0.6 and the shared vector is given a weight of 0.4, and the fusion output is [0.26, 0.19] (dynamically allocating the influence weight of intra-scene / cross-scene features). The specific feature of the current delivery scene, the scene general feature, and the scene-related feature are input to the concatenation module of the multi-scene learning layer for feature concatenation, and the concatenation module of the multi-scene learning layer outputs the multi-scene fusion feature (i.e., the first fusion feature).
[0201] Further, the multi-scene fusion features are input to the multi-task learning layer for further feature extraction. For example, the multi-scene fusion features and the identification information of task A are input to the task-specific MoE module, and the task-specific MoE module extracts features of the multi-scene fusion features through the expert submodule corresponding to task A to obtain the specific features of task A in the current delivery scene (i.e., the first features). The multi-scene fusion features and the identification information of task B are input to the task-specific MoE module, and the task-specific MoE module extracts features of the multi-scene fusion features through the expert submodule corresponding to task B to obtain the specific features of task B in the current delivery scene (i.e., the second features). The multi-scene fusion features are input to the task-shared MoE module for feature extraction, and the task general features (i.e., task-shared features) are output. The multi-scene fusion features, the identification information of task A, and the identification information of task B are input to the inter-task attention mechanism module, and the weighted fused task features (i.e., task association features) are output. For example, it is determined that task A (merchant browsing interface) needs to focus more on "scene friendliness when the user browses" (such as simplifying complex calculations), and the task-specific vector weight is 0.5, the shared vector weight is 0.5, and the fusion output is [0.3, 0.195] (such as dynamically balancing the exclusive rule and the general rule). The specific features of task A in the current delivery scene, the specific features of task B in the current delivery scene, the task general features, and the task association features are input to the concatenation module of the multi-task learning layer for feature concatenation, and the multi-task fusion features in the current delivery scene (i.e., the target fusion features) are output. The multi-task fusion features in the current delivery scene are input to the prediction module of task A (i.e., the first prediction module) of the output layer, and the predicted delivery time of task A (for example, 24 minutes) is output; and the multi-task fusion features in the current delivery scene are input to the prediction module of task B (i.e., the second prediction model) of the output layer, and the predicted delivery time of task B (for example, 26 minutes) is output.
[0202] In the multi-task prediction model in the embodiments of the present application, a multi-scene learning layer and a multi-task learning layer are included, and the same model is used to predict the two types of performance time T (i.e., the predicted delivery time in the merchant browsing interface) and user T (i.e., the predicted delivery time in the order submission interface) in multiple types of scenes. The multi-scene learning layer not only effectively learns the representation of a single specific scene, but also learns the shared representation between multiple types of scenes and the importance of the contribution between scenes. The multi-task learning layer effectively learns the representation of a single specific task, and also learns the shared representation between multiple types of tasks and the importance of the contribution between tasks.
[0203] By the multi-task prediction model of the embodiment of the present application, the problem of unbalanced data sample quantity of various scenes and various tasks is solved, the accuracy of the time length estimation task in the sparse scene is improved, and the estimation accuracy of a single scene and a single task in the actual application of the order is improved by about 4.89%. At the same time, since the model can complete the learning of multiple tasks at the same time in the training and learning process, the synchronism of the task prediction result (i.e., the prediction values of the list T and the user T remain synchronous increase or decrease) can be ensured. Compared with the prior art, the estimation of the list T and the user T is two independent different tasks, and there is a problem of too large difference between the time lengths of the list T and the user T. Through the multi-task prediction model in the above solution, the problem of too large time difference is alleviated in the actual application of the order test, and the test shows that the proportion of the order in which the list T is much smaller than the user T is reduced by about 10.22%, effectively improving the user experience.
[0204] Figure 8 The system architecture 300 includes a local device 320, a local device 330, and an execution device 310 and a data storage system 350; wherein the local device 320 and the local device 330 are connected with the execution device 310 through a communication network.
[0205] The execution device 310 can be implemented by one or more servers. Optionally, the execution device 310 can be used in cooperation with other computing devices, such as data storage, routers, load balancers, and the like. The execution device 310 can be arranged on one physical site, or distributed on multiple physical sites. The execution device 310 can use the data in the data storage system 750, or call the program code in the data storage system 350 to implement the order fulfillment time length prediction method of the embodiment of the present application.
[0206] It should be noted that the above execution device 310 can also be referred to as a cloud device, and at this time the execution device 310 can be deployed in the cloud.
[0207] For example, a multi-task prediction model is configured in the execution device 310; the model structure of the multi-task prediction model is as shown in Figures 4 to 7The execution device 310 can perform the following process by using the multi-task prediction model, for example. In response to a merchant browsing operation of a user, the execution device 310 can obtain original data, the original data including: user data, merchant data, and data of a target delivery scenario; based on the original data and a first feature extraction module, first features of a first task and second features of a second task are obtained; the first features are used to represent features obtained by performing feature extraction on the first task; the second features are used to represent features obtained by performing feature extraction on the second task; the first task is used to predict an estimated delivery time in a merchant browsing interface, and the second task is used to predict an estimated delivery time in an order submission interface; based on the original data and an inter-task attention mechanism module, a task association feature is obtained, the task association feature being used to represent an association between the first task and the second task; based on the first features, the second features, and the task association feature, a target fusion feature is obtained; based on the target fusion feature, a first estimated delivery time and a second estimated delivery time are obtained; the first estimated delivery time is a time corresponding to the first task, and the second estimated delivery time is a time corresponding to the second task.
[0208] In a possible implementation, the execution device 310 can perform the order fulfillment time prediction method by using the multi-task prediction model.
[0209] A user can operate a respective user device (for example, the local device 320 and the local device 330) to interact with the execution device 310. Each local device can represent any computing device, for example, a personal computer, a computer workstation, a smartphone, a tablet computer, a smart camera, a smart car, or other types of cellular phones, a media consumption device, a wearable device, a set-top box, a game console, and the like.
[0210] Each local device of a user can interact with the execution device 310 through a communication network of any communication mechanism / communication standard, which can be a wide area network, a local area network, a point-to-point connection, or the like, or any combination thereof.
[0211] In an implementation, the local device 320 and the local device 330 can obtain parameters of the multi-task prediction model from the execution device 310, deploy the multi-task prediction model on the local device 320 and the local device 330, and perform the order fulfillment time prediction method by using the multi-task prediction model.
[0212] In another implementation, the execution device 310 can directly deploy the multi-task prediction model, and the execution device 310 can obtain original data from the local device 320 and the local device 330, perform feature extraction on the original data according to the multi-task prediction model, and obtain a first estimated delivery time of a first task and a second estimated delivery time of a second task based on the features obtained by the feature extraction.
[0213] It should be understood that the above description is intended to help those skilled in the art understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to the specific values or specific scenarios exemplified. Those skilled in the art can obviously make various equivalent modifications or changes according to the above description, and such modifications or changes also fall within the scope of the embodiments of the present application.
[0214] The above describes the method for predicting the order fulfillment duration provided by the embodiments of the present application in detail; the following will combine the method for predicting the order fulfillment duration provided by the embodiments of the present application with the device for predicting the order fulfillment duration provided by the embodiments of the present application to describe the device for predicting the order fulfillment duration provided by the embodiments of the present application. Figures 1 to 8 The above describes the method for predicting the order fulfillment duration provided by the embodiments of the present application in detail; the following will combine the method for predicting the order fulfillment duration provided by the embodiments of the present application with the device for predicting the order fulfillment duration provided by the embodiments of the present application to describe the device for predicting the order fulfillment duration provided by the embodiments of the present application. Figures 9 to 10 The above describes the method for predicting the order fulfillment duration provided by the embodiments of the present application in detail; the following will combine the method for predicting the order fulfillment duration provided by the embodiments of the present application with the device for predicting the order fulfillment duration provided by the embodiments of the present application to describe the device for predicting the order fulfillment duration provided by the embodiments of the present application.
[0215] Figure 9 FIG. 4 is a structural schematic diagram of a device for predicting an order fulfillment duration provided by the embodiments of the present application. The prediction device 400 includes an acquisition module 410 and a processing module 420.
[0216] The prediction device 400 described above is configured with a multi-task prediction model. The multi-task prediction model includes at least one feature learning layer, the feature learning layer includes a task learning layer, and the task learning layer includes a first feature extraction module and an inter-task attention mechanism module.
[0217] The acquisition module 410 is configured to: in response to a merchant browsing operation of a user, acquire original data, the original data including: user data, merchant data, and data of a target delivery scenario; and the processing module 420 is configured to: based on the original data and the first feature extraction module, obtain first features of a first task and second features of a second task; wherein the first features are used to represent features obtained by performing feature extraction on the first task; the second features are used to represent features obtained by performing feature extraction on the second task; the first task is used to predict an estimated delivery duration in a merchant browsing interface, and the second task is used to predict an estimated delivery duration in an order submission interface; based on the original data and the inter-task attention mechanism module, obtain task association features, the task association features being used to represent the association between the first task and the second task; based on the first features, the second features, and the task association features, obtain target fusion features; and based on the target fusion features, obtain a first estimated delivery duration and a second estimated delivery duration; wherein the first estimated delivery duration is a duration corresponding to the first task, and the second estimated delivery duration is a duration corresponding to the second task.
[0218] Optionally, as one embodiment, the task learning layer further includes a second feature extraction module, and the processing module 420 is further configured to:
[0219] obtaining a task-shared feature based on the original data and the second feature extraction module, the task-shared feature being used to represent a feature obtained after feature extraction for multiple tasks, the multiple tasks including the first task and the second task;
[0220] obtaining the target fusion feature based on the first feature, the second feature, the task correlation feature and the task-shared feature.
[0221] Optionally, as an embodiment, the feature learning layer further includes a scene learning layer, and the scene learning layer includes a third feature extraction module; the processing module 420 is specifically configured to:
[0222] obtaining a third feature of the target delivery scene based on the original data and the third feature extraction module, the third feature being used to represent a feature obtained after feature extraction for the target delivery scene;
[0223] obtaining a first fusion feature based on the third feature;
[0224] obtaining a first feature of the first task and a second feature of the second task by performing feature extraction on the first fusion feature through the first feature extraction module.
[0225] Optionally, as an embodiment, the scene learning layer further includes a fourth feature extraction module; the processing module 420 is further configured to:
[0226] obtaining a scene-shared feature based on the original data and the fourth feature extraction module, the scene-shared feature being used to represent a shared feature of multiple delivery scenes;
[0227] obtaining the first fusion feature based on the third feature and the scene-shared feature.
[0228] Optionally, as an embodiment, the scene learning layer further includes an inter-scene attention mechanism module; the processing module 420 is further configured to:
[0229] obtaining a scene correlation feature based on the original data and the inter-scene attention mechanism module; the scene correlation feature being used to represent a correlation between the target delivery scene and other delivery scenes;
[0230] The obtaining of the first fusion feature based on the third feature and the scene-shared feature includes:
[0231] obtaining the first fusion feature based on the third feature, the scene-shared feature and the scene correlation feature.
[0232] Optionally, as an embodiment, the multi-task prediction model comprises an output layer, the output layer comprises a first prediction module and a second prediction module; the processing module 420 is specifically configured to:
[0233] input the target fusion feature into the first prediction module to obtain the first predicted delivery time length;
[0234] input the target fusion feature into the second prediction module to obtain the second predicted delivery time length.
[0235] Optionally, as an embodiment, the first feature extraction module is a hybrid expert model, the hybrid expert model comprises a gating network and N expert sub-models;
[0236] a first expert sub-model in the N expert sub-models is configured to extract features of the first task, and a second expert sub-model in the N expert sub-models is configured to extract features of the second task.
[0237] Optionally, as an embodiment, the second feature extraction module is a hybrid expert model, the second feature extraction module is configured to learn shared features of the multiple tasks.
[0238] Optionally, as an embodiment, the third feature extraction module is a hybrid expert model, the third feature extraction module is configured to extract features for the target delivery scenario; and / or,
[0239] the fourth feature extraction module is a hybrid expert model, the fourth feature extraction module is configured to learn shared features of multiple delivery scenarios, the multiple delivery scenarios comprising the target delivery scenario.
[0240] Optionally, as an embodiment, the hybrid expert model comprises an MLP model.
[0241] Optionally, as an embodiment, the data of the target delivery scenario comprises one or more of weather data, order type, and order mode.
[0242] The order mode is a post-order mode or a simultaneous order mode, the post-order mode is configured to represent a mode of calling a rider after taking out or picking up, and the simultaneous order mode is configured to represent a mode of calling a rider at the same time of taking out or picking up; the order type is a retail type or a catering type.
[0243] It should be noted that the above prediction device 400 is embodied in the form of a functional module. The term "module" herein can be implemented in the form of software and / or hardware, and no specific limitation is made thereto.
[0244] For example, the "module" can be a software program, a hardware circuit, or a combination of both, which implements the above functions. The hardware circuit can include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combination logic circuit, and / or other suitable components that support the described functions.
[0245] Therefore, the units of each example described in the embodiments of the present application can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0246] Figure 10 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. For example, as shown in Figure 10 The electronic device 500 includes a memory 501 and a processor 502. The memory 501 stores executable program code 503. The processor 502 is configured to invoke and execute the executable program code 503 to perform an order fulfillment duration prediction method.
[0247] For example, the memory 501 can be used to store the related programs of the order fulfillment duration prediction method provided in the embodiments of the present application. The processor 502 can invoke the related programs of the order fulfillment duration prediction method stored in the memory 501 to execute the order fulfillment duration prediction method of the embodiments of the present application. For example, in response to a user's merchant browsing operation, original data is obtained, the original data including: user data, merchant data, and data of a target delivery scenario; based on the original data and a first feature extraction module, first features of a first task and second features of a second task are obtained; the first features are used to represent features obtained by feature extraction for the first task; the second features are used to represent features obtained by feature extraction for the second task; the first task is used to predict the estimated delivery duration in the merchant browsing interface, and the second task is used to predict the estimated delivery duration in the order submission interface; based on the original data and a task inter-attention mechanism module, task association features are obtained, the task association features being used to represent the association between the first task and the second task; based on the first features, the second features, and the task association features, target fusion features are obtained; based on the target fusion features, a first estimated delivery duration and a second estimated delivery duration are obtained; the first estimated delivery duration is the duration corresponding to the first task, and the second estimated delivery duration is the duration corresponding to the second task.
[0248] The embodiment can divide the function modules according to the method examples described above. For example, each function module can be used, or two or more functions can be integrated into one processing module. The integrated module can be implemented in the form of hardware. It should be noted that the division of the modules in the embodiment is illustrative, and is only a logical function division. In actual implementation, another division mode can be used.
[0249] The application further provides a computer program product, which, when executed by a processor, implements the prediction method described in any of the method embodiments of the application.
[0250] The computer program product can be stored in a memory, for example, a program, which is finally converted into an executable target file capable of being executed by the processor through preprocessing, compiling, assembling, linking and other processing processes.
[0251] The application further provides a computer readable storage medium, which stores a computer program. The computer program, when executed by a computer, implements the prediction method described in any of the method embodiments of the application. The computer program can be a high-level language program or an executable target program.
[0252] The computer readable storage medium is, for example, a memory. The memory can be a volatile memory or a non-volatile memory, or the memory can include both volatile and non-volatile memory. The non-volatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synch link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0253] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and apparatuses and the generated technical effects can refer to the corresponding processes and technical effects in the foregoing method embodiments, and will not be described here.
[0254] In several embodiments provided in the present application, the disclosed system, device and method can be implemented in other ways. For example, some features of the above-described method embodiments can be omitted or not performed. The above-described device embodiments are merely illustrative, and the division of units is merely a logical function division. In actual implementation, another division manner can be used, and multiple units or components can be combined or integrated into another system. In addition, the coupling between units or the coupling between components can be direct coupling or indirect coupling, and the above-mentioned coupling includes electrical, mechanical or other forms of connection.
[0255] It should be understood that, in various embodiments of the present application, the size of the serial number of each process does not mean the execution order, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0256] In addition, the terms "system" and "network" are often used interchangeably herein. The term "and / or", herein merely describes an associated relationship, which means that there can be three relationships, for example, A and / or B, which can represent three cases: A exists alone, A and B exist together, and B exists alone. In addition, the character " / " generally represents an "or" relationship between the front and back associated objects.
[0257] In summary, the above only describes the preferred embodiments of the technical scheme of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for predicting order fulfillment time, characterized in that, The prediction method is applied to a multi-task prediction model, which includes at least one feature learning layer, wherein the feature learning layer includes a task learning layer, and the task learning layer includes a first feature extraction module and an inter-task attention mechanism module. The prediction method includes: In response to a user's merchant browsing action, raw data is obtained, including: user data, merchant data, and data related to the target delivery scenario; Based on the original data and the first feature extraction module, a first feature for the first task and a second feature for the second task are obtained; wherein, the first feature is used to represent the feature obtained by feature extraction for the first task; the second feature is used to represent the feature obtained by feature extraction for the second task; the first task is used to predict the estimated delivery time in the merchant browsing interface, and the second task is used to predict the estimated delivery time in the order submission interface. Based on the original data and the inter-task attention mechanism module, the association weights between the first task and the second task are obtained; based on the association weights and the original data, task association features are obtained, which are used to represent the association between the first task and the second task. Based on the first feature, the second feature, and the task-related feature, the target fusion feature is obtained; Based on the target fusion features, a first estimated delivery time and a second estimated delivery time are obtained; wherein, the first estimated delivery time is the duration corresponding to the first task, and the second estimated delivery time is the duration corresponding to the second task.
2. The prediction method according to claim 1, characterized in that, The task learning layer further includes a second feature extraction module, and the prediction method further includes: Based on the original data and the second feature extraction module, a task-shared feature is obtained. The task-shared feature is used to represent the feature obtained after feature extraction for multiple tasks, including the first task and the second task. The process of obtaining target fusion features based on the first feature, the second feature, and the task-related features includes: The target fusion feature is obtained based on the first feature, the second feature, the task association feature, and the task sharing feature.
3. The prediction method according to claim 1, characterized in that, The feature learning layer further includes a scene learning layer, which includes a third feature extraction module. The step of obtaining the first feature of the first task and the second feature of the second task based on the original data and the first feature extraction module includes: Based on the original data and the third feature extraction module, a third feature of the target delivery scenario is obtained, which represents the feature obtained by feature extraction for the target delivery scenario. Based on the third feature, the first fusion feature is obtained; The first feature extraction module extracts features from the first fused features to obtain the first feature of the first task and the second feature of the second task.
4. The prediction method according to claim 3, characterized in that, The scene learning layer further includes a fourth feature extraction module; the prediction method further includes: Based on the original data and the fourth feature extraction module, scene-sharing features are obtained, which are used to characterize the shared features of multiple delivery scenarios; The first fusion feature obtained based on the third feature includes: The first fused feature is obtained based on the third feature and the scene-shared feature.
5. The prediction method according to claim 4, characterized in that, The scene learning layer further includes an inter-scene attention mechanism module; the prediction method further includes: Based on the original data and the scene attention mechanism module, scene association features are obtained; the scene association features are used to represent the association between the target delivery scene and other delivery scenes; The process of obtaining the first fused feature based on the third feature and the scene-shared feature includes: The first fusion feature is obtained based on the third feature, the scene sharing feature, and the scene association feature.
6. The prediction method according to claim 1, characterized in that, The multi-task prediction model includes an output layer, which includes a first prediction module and a second prediction module. The step of obtaining the first estimated delivery time and the second estimated delivery time based on the target fusion features includes: The target fusion features are input into the first prediction module to obtain the first estimated delivery time; The target fusion features are input into the second prediction module to obtain the second estimated delivery time.
7. The prediction method according to claim 1, characterized in that, The first feature extraction module is a hybrid expert model, which includes a gating network and N expert sub-models; The first expert sub-model among the N expert sub-models is used to extract features of the first task, and the second expert sub-model among the N expert sub-models is used to extract features of the second task.
8. The prediction method according to claim 2, characterized in that, The second feature extraction module is a hybrid expert model, which is used to learn the shared features of the multiple tasks.
9. The prediction method according to claim 4, characterized in that, The third feature extraction module is a hybrid expert model, used for feature extraction specific to the target delivery scenario; and / or, The fourth feature extraction module is a hybrid expert model, which is used to learn shared features of multiple delivery scenarios, including the target delivery scenario.
10. The prediction method according to any one of claims 7 to 9, characterized in that, The hybrid expert model includes an MLP model.
11. The prediction method according to any one of claims 1 to 9, characterized in that, The data for the target delivery scenario includes one or more of the following: weather data, call order mode, and order type. The order calling mode is either a post-order calling mode or a simultaneous order calling mode. The post-order calling mode indicates that a rider is called after the food is prepared or the goods are picked, while the simultaneous order calling mode indicates that a rider is called while the food is prepared or the goods are picked. The order type is either retail or catering.
12. A device for predicting order fulfillment time, characterized in that, The prediction device includes a multi-task prediction model, which comprises at least one feature learning layer, a task learning layer, and a first feature extraction module and an inter-task attention mechanism module. The prediction device includes: The acquisition module is used to acquire raw data in response to the user's merchant browsing operation. The raw data includes: user data, merchant data, and data of the target delivery scenario. The processing module is configured to obtain a first feature for a first task and a second feature for a second task based on the original data and the first feature extraction module; wherein the first feature represents the feature obtained by feature extraction for the first task; the second feature represents the feature obtained by feature extraction for the second task; the first task is used to predict the estimated delivery time in the merchant browsing interface, and the second task is used to predict the estimated delivery time in the order submission interface; based on the original data and the attention mechanism module, the module obtains the association weight between the first task and the second task; based on the association weight and the original data, the module obtains a task association feature, which represents the association between the first task and the second task; based on the first feature, the second feature, and the task association feature, the module obtains a target fusion feature; based on the target fusion feature, the module obtains a first estimated delivery time and a second estimated delivery time; wherein the first estimated delivery time is the duration corresponding to the first task, and the second estimated delivery time is the duration corresponding to the second task.
13. An electronic device, characterized in that, include: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the electronic device to perform the prediction method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the prediction method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Data processing method and equipment
CN114463103A
Cloud computing task execution time prediction method based on big data
CN116647562A
Task processing duration determination method and device and electronic equipment
CN118981380A