Model training method, task execution duration prediction method and device
Patent Information
- Application Number
- CN202610749887.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-09-22
AI Technical Summary
现有技术能够通过模型实现任务执行时长的预估,但任务执行时长不仅受到任务自身的因素影响,还会受到多种因素影响,因此在部分情况下,任务执行时长预测的准确性并不高
[0011]In this embodiment of the invention, after obtaining an initial model and training sample set including a self-attention module, a target attention module, and a multi-task learning module, the sample data sequences from each training sample are input into the self-attention module, and the enhanced feature vector output by the self-attention module is input into the target attention module. Then, the joint input vector determined based on the fused feature vector output by the target attention module and the corresponding sample task association information is input into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value. Based on the above prediction values, the task execution time of the predetermined task, and the object evaluation parameters of the task execution object, a multi-task joint loss is calculated. The initial model is then trained based on this loss to obtain a data prediction model. This improves the accuracy of task execution time prediction.
Smart Images

Figure CN122797648A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and specifically to a model training method, a method and apparatus for predicting task execution time. Background Technology
[0002] In daily life, the ability of an entity to fulfill a task, especially its ability to fulfill the task on time, has a significant impact on user satisfaction. Existing technologies can predict task execution time through models, but task execution time is affected not only by factors inherent to the task itself but also by a variety of other factors. Therefore, in some cases, the accuracy of task execution time prediction is not high. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a model training method, a method and apparatus for predicting task execution time, so as to improve the accuracy of task execution time prediction by learning the feature correlation between the same task and different tasks through a self-attention module and a target attention module.
[0004] In a first aspect, embodiments of the present invention provide a model training method, the method comprising: Obtain an initial model, wherein the initial model includes a self-attention module, a target attention module, and a multi-task learning module; Obtain a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of a predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The tasks already undertaken are those that the task execution object has accepted but not completed. The predetermined task is the task already undertaken that is ranked last in the allocation order. The sample data sequence is input into the self-attention module to obtain the enhanced feature vector; The enhanced feature vector is input into the target attention module to obtain the fused feature vector; The joint input vector is determined based on the fused feature vector and the sample task association information; The joint input vector is input into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value; The multi-task joint loss is determined based on the predicted execution time, the task execution time, the predicted evaluation parameters, and the object evaluation parameters. The initial model is trained based on the multi-task joint loss to obtain a data prediction model.
[0005] Secondly, embodiments of the present invention provide a method for predicting task execution time, the method comprising: Obtain a set of tasks for the predetermined task execution object, the set of tasks including tasks to be completed and target tasks; The task data sequence of the predetermined task execution object is determined according to the target task execution order of the predetermined task execution object, wherein the target task execution order is the task execution order of each task to be completed and the target task. Based on the task data sequence and the task association information of the target task, the estimated execution time of the target task is obtained based on a pre-trained data prediction model. The data prediction model is trained on a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of the predetermined task, task execution time, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The already undertaken tasks are those accepted but not completed by the task execution object, and the predetermined task is the already undertaken task that is ranked last in the allocation order.
[0006] Thirdly, embodiments of the present invention provide a model training apparatus, the apparatus comprising: An initial model acquisition unit is used to acquire an initial model, wherein the initial model includes a self-attention module, a target attention module, and a multi-task learning module; The sample acquisition unit is used to acquire a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of a predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The already undertaken tasks are tasks that the task execution object has accepted but not completed. The predetermined task is the already undertaken task that is ranked last in the allocation order. The first training unit is used to input the sample data sequence into the self-attention module to obtain the enhanced feature vector; The second training unit is used to input the enhanced feature vector into the target attention module to obtain the fused feature vector; A vector determination unit is used to determine a joint input vector based on the fused feature vector and the sample task association information; The third training unit is used to input the joint input vector into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value; The fourth training unit is used to determine the multi-task joint loss based on the predicted execution time, the task execution time, the predicted evaluation parameters, and the object evaluation parameters. The fifth training unit is used to train the initial model based on the multi-task joint loss to obtain a data prediction model.
[0007] Fourthly, embodiments of the present invention provide a device for predicting task execution time, the device comprising: A set acquisition unit is used to acquire a set of tasks for a predetermined task execution object, wherein the set of tasks includes tasks to be completed and target tasks; A sequence determination unit is used to determine the task data sequence of the predetermined task execution object according to the target task execution order of the predetermined task execution object, wherein the target task execution order is the task execution order of each task to be completed and the target task. The duration prediction unit is used to obtain the estimated execution duration of the target task based on the task data sequence and the task association information of the target task, and on a pre-trained data prediction model. The data prediction model is trained on a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of the predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The tasks already undertaken are those accepted but not completed by the task execution object, and the predetermined task is the task already undertaken that is ranked last in the allocation order.
[0008] Fifthly, embodiments of the present invention provide an electronic device, including a memory and a processor, the memory being used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of the first and second aspects.
[0009] In a sixth aspect, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in any one of the first and second aspects.
[0010] In a seventh aspect, embodiments of the present invention provide a computer program product comprising a computer program / instructions that, when executed by a processor, implement the method as described in any one of the first and second aspects.
[0011] In this embodiment of the invention, after obtaining an initial model and training sample set including a self-attention module, a target attention module, and a multi-task learning module, the sample data sequences from each training sample are input into the self-attention module, and the enhanced feature vector output by the self-attention module is input into the target attention module. Then, the joint input vector determined based on the fused feature vector output by the target attention module and the corresponding sample task association information is input into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value. Based on the above prediction values, the task execution time of the predetermined task, and the object evaluation parameters of the task execution object, a multi-task joint loss is calculated. The initial model is then trained based on this loss to obtain a data prediction model. This improves the accuracy of task execution time prediction. Attached Figure Description
[0012] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which: Figure 1 This is a system block diagram of the interactive system according to an embodiment of the present invention; Figure 2 This is a flowchart of the model training method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the initial model of an embodiment of the present invention; Figure 4 This is a data flow diagram in an embodiment of the present invention for determining the execution order of tasks that have been assigned tasks; Figure 5 This is a schematic diagram of the structure of the self-attention module according to an embodiment of the present invention; Figure 6 This is a flowchart of the model training method according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the target attention module according to an embodiment of the present invention; Figure 8 This is a flowchart of the model training method according to an embodiment of the present invention; Figure 9 This is a schematic diagram of the structure of the multi-task learning module according to an embodiment of the present invention; Figure 10 This is a flowchart of the model training method according to an embodiment of the present invention; Figure 11 This is a flowchart of the model training method according to an embodiment of the present invention; Figure 12 This is a method for predicting task execution time according to an embodiment of the present invention; Figure 13 This is a schematic diagram of the model training device according to an embodiment of the present invention; Figure 14 This is a schematic diagram of a task execution time prediction device according to an embodiment of the present invention; Figure 15 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0013] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.
[0014] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.
[0015] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0016] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0017] The technical solution of this invention can be applied to the transaction and delivery services of instant e-commerce platforms, such as Taobao Flash Sale, Taoxianda, Ele.me takeaway and retail.
[0018] The solutions described in this specification and embodiments, if involving the processing of personal information, will be processed only on the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be processed within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.
[0019] Existing technologies for predicting task execution time primarily rely on features such as task information and environmental data. When the number of tasks to be completed is small (e.g., less than 3), these methods generally ensure the accuracy of the predicted execution time. However, when the number of tasks to be completed is large, the different tasks can influence each other, thus affecting the accuracy of the predicted execution time.
[0020] To address the aforementioned problems, embodiments of the present invention propose a model training method, a method for predicting task execution time, and an apparatus. Figure 1This is a system block diagram of the interactive system according to an embodiment of the present invention. Figure 1 As shown, the interactive system in this embodiment includes a server 11 on the real-time e-commerce platform side, a user terminal 12, and a delivery terminal 13.
[0021] Server 11, user terminal 12, and transport terminal 13 are interconnected via a network to facilitate information and data exchange. It should be understood that, although... Figure 1 Only a certain number of servers 11, user terminals 12 and capacity terminals 13 are shown, but this does not mean that the number of each is limited. This system may contain multiple servers, multiple user terminals and multiple capacity terminals.
[0022] Server 11 should be understood as a device that provides data processing, database, and communication facilities. For example, server 11 may refer to a single physical server with associated communication, data storage, and database facilities, or it may refer to a networked or aggregated collection of processors, associated networks, and storage devices that operate software and one or more database systems and application software supporting the services provided by the server. Server 11 may be a monolithic server or a distributed server spanning multiple computers or computer data centers, or it may be various types of cloud servers. In some embodiments, each server may include hardware, software, or embedded logical components for performing suitable functions supported or implemented by the server, or a combination of two or more such components.
[0023] User terminal 12 and capacity terminal 13 are communication terminals capable of running computer programs. These communication terminals can be mobile phones, tablets, PDAs, wearable devices, vehicle-mounted terminals, etc. Both user terminal 12 and capacity terminal 13 have communication modules capable of wired or wireless communication. In some embodiments, both user terminal 12 and capacity terminal 13 include at least one remote communication module, such as a communication circuit for WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. User terminal 12 and capacity terminal 13 also have display devices and input devices. The display devices can be liquid crystal displays, LED displays, or projection devices. The input devices can include, for example, touch screens, buttons, pressure sensors, etc. User terminal 12 can receive user instructions through the input devices and interact with the user through the display devices; similarly, capacity terminal 13 can receive instructions from task execution objects through the input devices and interact with the task execution objects through the display devices.
[0024] A user client can run on user terminal 12. A capacity client can run on capacity terminal 13. Simultaneously, server 11 runs a server application. In some application scenarios, users can initiate task creation requests by operating the user client. Upon receiving a task creation request, server 11 can create an instant delivery task and, based on, for example, the location information reported by capacity terminal 13 and the task information of the delivery task, such as the acquisition and delivery locations of the instant delivery task, match a suitable capacity terminal 13 and send the instant delivery task to one or more matched capacity terminals 13. The task execution object can operate the capacity client to accept the instant delivery task, or automatically accept the instant delivery task through the capacity client.
[0025] In this embodiment of the invention, the server 11 can obtain a task set of a predetermined task execution object. The task set includes tasks to be completed and target tasks. Tasks to be completed are tasks that have been accepted but not completed by the predetermined task execution object. The server 11 determines the task data sequence of the predetermined task execution object according to the task execution order of each task to be completed and the target task corresponding to the predetermined task execution object (i.e., the target task execution order). Then, based on the task data sequence and the task association information of the target task, the server 11 obtains the expected execution time of the target task based on a pre-trained data prediction model.
[0026] The data prediction model can be trained as follows: An initial model and a training sample set are obtained. The initial model includes a self-attention module, a target attention module, and a multi-task learning module. The training sample set includes multiple training samples, each containing a sample data sequence, sample task association information for predetermined tasks, task execution duration, and object evaluation parameters for the task execution object. The sample data sequence is determined based on the task execution order of the task execution object's assigned tasks. Assigned tasks are those accepted but not yet completed by the task execution object, and predetermined tasks are the assigned tasks ranked last in the allocation order. The sample data sequence is input into the self-attention module to obtain an enhanced feature vector. This enhanced feature vector is then input into the target attention module to obtain a fused feature vector. A joint input vector is determined based on the fused feature vector and the sample task association information. This joint input vector is then input into the multi-task learning module to obtain predicted execution duration and evaluation parameters. The multi-task joint loss is determined based on the predicted execution duration, task execution duration, evaluation parameters, and object evaluation parameters. Finally, the initial model is trained based on the multi-task joint loss to obtain the data prediction model.
[0027] This invention improves the accuracy of task execution time prediction by learning the feature correlations between the same task and different tasks through self-attention modules and target attention modules.
[0028] In this embodiment of the invention, instant e-commerce is used as an example for illustration. However, those skilled in the art will readily understand that the method of this embodiment is equally applicable in other application scenarios.
[0029] The following describes the method through examples. Figure 2 This is a flowchart of the model training method according to an embodiment of the present invention. Figure 2 As shown, the method in this embodiment may include the following steps: Step S100: Obtain the initial model.
[0030] In this embodiment of the invention, the initial model includes three modules: a self-attention module, a target attention module, and a multi-task learning module. The self-attention module is used to learn the correlations between different features of the same task, while the target attention module is mainly used to learn the feature correlations between non-predetermined tasks and predetermined tasks. The multi-task learning module can adopt various model structures, such as multi-task transformers, cross-stitch networks, mixture of experts (MOE), and customized gate control (GCG).
[0031] Figure 3 This is a schematic diagram of the structure of the initial model of an embodiment of the present invention. For example... Figure 3 As shown, the initial model 30 includes a self-attention module 31, a target attention module 32, and a multi-task learning module 33. The sample data sequence is the input vector of the self-attention module 31, and the output vector of the self-attention module 31 is the input vector of the target attention module 32. The output vector of the target attention module 32 and the sample task association information are used to determine the input vector of the multi-task learning module 33. The output of the multi-task learning module 33 is the predicted execution time and the predicted evaluation parameters.
[0032] Step S200: Obtain the training sample set.
[0033] In this embodiment, the training sample set may include multiple training samples, each training sample including a sample data sequence, sample task association information of the predetermined task, task execution duration, and object evaluation parameters of the task execution object.
[0034] The sample data sequence is determined based on the task execution order of the tasks already undertaken by the task execution object. The undertaken tasks are those accepted but not yet completed by the delivery capacity (i.e., the task execution object). In this embodiment, the task execution order of the undertaken tasks can be determined in various ways, such as based on the completion degree of each undertaken task or the complexity of the undertaken tasks. In some embodiments, the task execution order of the undertaken tasks can be determined based on the sample location of the delivery capacity, the acquisition location of each undertaken task, and the delivery location.
[0035] In practical applications, each time an instant e-commerce platform assigns an instant delivery task and predicts its execution time, it typically obtains the actual location of the delivery capacity. Therefore, when using the execution time of the pre-assigned task as the training objective of the initial model, the sample location is the actual location of the delivery capacity when it accepts the pre-assigned task, which can be represented by latitude and longitude coordinates. The location of the already undertaken task can be the location of the store where the delivery entity is located, which can be represented by latitude and longitude coordinates or points of interest (POI). The location of the already undertaken task can be the location provided by the user when initiating the task creation request, which can also be represented by latitude and longitude coordinates or points of interest.
[0036] In some embodiments, the task execution order of already assigned tasks can be determined using search algorithms such as greedy algorithms, Dijkstra's algorithm, and breadth-first search (BFS). Taking the greedy algorithm as an example, it is a locally optimal algorithm. When the rule is minimum distance, the greedy algorithm sequentially selects the position closest to the current position until a feasible solution is obtained as the task execution order. Therefore, it can calculate the task execution order of already assigned tasks with relatively high computational efficiency.
[0037] Figure 4 This is a data flow diagram illustrating the process of determining the execution order of assigned tasks in this embodiment of the invention. Taking a greedy search algorithm as an example, as follows... Figure 4 As shown, in step S41, the sample location of the task execution object can be determined. and the set of tasks already undertaken As input, a position sequence can be constructed in step S42. ,in, This indicates that the i-th task has been assigned. The position of acquisition This indicates that the i-th task has been assigned. The delivery location. In step S43, a mapping can be established. This is used to restrict the order in which the acquisition position of the i-th assigned task precedes the delivery position. In step S44, the visited point set S can be defined and assigned the value of an empty set. Define the task execution sequence π and assign it the value of an empty sequence [ ], and define the position x and assign it the value of the sample position of the task execution object. In step S45, determine whether the number of elements in π, |π|, is less than the number of elements in T, |T|-1. If yes, proceed to step S46; otherwise, proceed to step S49. In step S46, when |π| < |T|-1, the candidate position set can be determined. ,in Let T represent the set of all elements in T except for the visited point set S. This indicates that if t is ,but For elements in the visited point set S. In step S47, you can select... And soon The t that has the smallest distance from x is taken as In step S48, S can be assigned a value of Assign π a value Assign the value to x and return to step S45, where Indicates the sequence It is appended to the sequence π. In step S49, when |π|≥|T|-1, π is output.
[0038] After determining the task execution order of each assigned task, a sample data sequence can be constructed based on the sample task information of each assigned task. The sample task information may include at least one of the following: acquisition location, delivery location, delivery status, promised delivery time, and task type. Specifically, the delivery status of the assigned task indicates whether the store where the delivery entity (e.g., goods) is located has prepared the delivery entity; the promised delivery time of the assigned task can be the estimated execution time provided to the user before the user initiates the task creation request; the task type of the assigned task can be determined based on the type of delivery entity, such as fresh produce orders or electronic product orders, or based on the type of delivery capacity, such as dedicated delivery capacity orders or part-time delivery capacity orders.
[0039] When constructing a sample data sequence, each node in the task execution sequence can be considered as a time step in the sample data sequence, and sample task information corresponding to the tasks already undertaken can be added to each time step. For example, a sample task sequence. Then the data at each time step Each is an embedding vector determined based on at least one of the following: latitude and longitude coordinates of the acquisition location (or delivery location) of the corresponding undertaken task, point of interest identifier of the acquisition location (or delivery location), delivery status, promised delivery duration, task type, etc.
[0040] To estimate the impact of previously assigned tasks on the execution time of the most recently assigned task, the scheduled task is the last assigned task in the allocation order. The sample task association information for the scheduled task can include two types of features: static features, such as at least one of the following: delivery capacity identifier, store identifier of the delivery entity's location, and region identifier; and dynamic features, such as at least one of the following: weather information, traffic congestion type, task urgency parameter, and the number of incomplete tasks at the delivery entity's location. In some embodiments, the task urgency parameter can be determined based on the remaining fulfillable time of the assigned tasks. Optionally, a mapping relationship between the remaining fulfillable time and the task urgency parameter can be established, and the corresponding task urgency parameter can be determined based on the remaining fulfillable time of each assigned task. The number of incomplete tasks at the delivery entity's location is the number of tasks with an incomplete delivery entity status. In the context of instant e-commerce applications, the number of incomplete delivery entities can be the number of delivery orders that have not yet been prepared.
[0041] The execution duration of a scheduled task can be defined as the time from when the real-time e-commerce platform receives the user's request to create the task to when the user receives the delivery entity for the scheduled task. The evaluation parameters for delivery capacity can be at least one of the following: the probability of the scheduled task timeout, the on-time rate of delivery capacity, and the probability of delivery capacity being urged.
[0042] Step S300: Input the sample data sequence into the self-attention module to obtain the enhanced feature vector.
[0043] In some embodiments, the self-attention module may include a time-series segmentation module, multiple projection matrix groups, multiple first attention heads, a first stitching layer, a second stitching layer, and a linear rectification layer, and each projection matrix group includes a first query projection matrix, a key projection matrix, and a value projection matrix.
[0044] Figure 5 This is a schematic diagram of the structure of the self-attention module according to an embodiment of the present invention. Figure 5 As shown, the self-attention module 31 includes a timing segmentation module 51, projection matrix groups 521 to 52h, attention heads 531 to 53h (i.e., the first attention head), a first stitching layer 54, a second stitching layer 55, and a linear rectification layer 56. The j-th projection matrix group 52j includes a K projection matrix 52j1, a Q projection matrix 52j2, and a V projection matrix 52j3. The j-th projection matrix group corresponds to the j-th attention head, where j is an integer greater than or equal to 1 and less than or equal to h. This indicates the summation of residuals (or the summation of elements one by one).
[0045] Figure 6This is a flowchart of the model training method according to an embodiment of the present invention. (Combined with...) Figure 5 ,like Figure 6 As shown, in an optional implementation of this embodiment, step S300 may include the following steps: Step S310: Input the sample data sequence into the time-series segmentation module to obtain the first feature vector of the sample data sequence at each time step.
[0046] In this step, the sample data sequence can be input into the time-series segmentation module 51 so that the time-series segmentation module 51 can segment the sample data sequence into multiple first feature vectors according to the time step dimension.
[0047] Optionally, in practical applications, the sample data sequences in the training sample set can be divided into multiple batches for training the initial model. Therefore, the time-series segmentation module 51 can determine the components of each sample data sequence at each time step as a first feature vector according to the time step dimension. Multiple sample data sequences in the same batch can be used... Let B represent the number of sample data sequences in the same batch, T represent the number of time steps in the sample data sequence, and D represent the feature dimension in the same time step; the first feature vector can be represented by... To express.
[0048] Step S320: Obtain multiple first query vectors, multiple key vectors, and multiple value vectors corresponding to each first feature vector according to each projection matrix group.
[0049] In this embodiment, the first query projection matrix (Q-projection matrix), the key projection matrix (K-projection matrix), and the value projection matrix (V-projection matrix) map each token of the sample data sequence to its corresponding dedicated subspace through independent linear transformations. Specifically, the Q-projection matrix is used to generate the retrieval intent of each token, the K-projection matrix is used to generate the matchable features in each token, and the V-projection matrix is used to generate the information corresponding to each token.
[0050] Therefore, in this step, each first feature vector can be mapped to the first query vector (i.e., Q vector) 5211 to the first query vector 52h1, the key vector (i.e., K vector) 5212 to the key vector 52h2, and the value vector (i.e., V vector) 5213 to the value vector 52h3 through the projection matrix group 52j. Further, for any attention head 53j, each first feature vector can be mapped to the first query vector corresponding to the attention head 53j through the first projection matrix 52j1, each first feature vector can be mapped to the key vector corresponding to the attention head 53j through the key projection matrix 52j2, and each first feature vector can be mapped to the value vector corresponding to the attention head 53j through the value projection matrix 52j3.
[0051] The first query vector corresponding to the j-th attention head can be used To indicate, among which This represents the first query projection matrix corresponding to the j-th attention head; the key vector corresponding to the j-th attention head can be represented by... To indicate, among which This represents the key projection matrix corresponding to the j-th attention head; the value vector corresponding to the j-th attention head can be represented by... To indicate, among which This represents the value projection matrix corresponding to the j-th attention head; , and All dimensions are , This represents the feature dimension used independently by the j-th attention head. In some embodiments, This ensures that the dimension of the feature aggregation vector is consistent with that of the sample data sequence.
[0052] Step S330: Input each first query vector, each key vector, and each value vector into the corresponding attention head to obtain the corresponding single-head attention feature vector.
[0053] In this step, the first query vector, key vector, and value vector output by the projection matrix group 52j can be input into the attention head 53j to obtain the corresponding single-head attention feature vector. For each attention head, the corresponding first query vector and key vector can be input into the scaling dot product calculation unit to determine the attention score. The attention score is then input into the softmax function to normalize the attention score and obtain the attention weight. The corresponding value vector is then weighted and summed according to the attention weight to obtain the corresponding single-head attention feature vector. The single-head attention feature vector output by the attention head 53j at time step t is shown. This can be expressed by the following formula:
[0054] Step S340: Input the single-head attention feature vectors of each time step into the first concatenation layer to obtain the corresponding block feature aggregation vector.
[0055] In this step, the single-head attention feature vectors corresponding to the same time step can be simultaneously input into the first concatenation layer 54 to concatenate the single-head attention feature vectors into the block feature aggregation vector corresponding to each time step. The block feature aggregation vector corresponding to the t-th time step... This can be expressed by the following formula:
[0056] Step S350: Input the block feature aggregation vectors of each time step into the second concatenation layer to obtain the feature aggregation vectors.
[0057] In this step, the block feature aggregation vectors from each time step can be input into the second concatenation layer 55 to concatenate the block feature aggregation vectors from each time step into a feature aggregation vector with the same dimension as the sample data sequence. This can be expressed by the following formula:
[0058] Step S360: Add the feature aggregation vector to the sample data sequence by adding the residuals to obtain the residual fusion vector.
[0059] In this step, the feature aggregation vector is added element-wise to the sample data sequence to obtain the residual fusion vector. The residual fusion vector M can be expressed by the following formula:
[0060] Step S370: Input the residual fusion vector into the linear rectifier layer to obtain the enhanced feature vector.
[0061] In this step, the residual fusion vector can be input into a linear rectified layer to obtain the enhanced feature vector. The linear rectified layer consists of a fully connected layer and an activation function layer, where the activation function layer can use ReLU. The linear rectified layer performs a linear transformation on the residual fusion vector through the fully connected layer to map the high-dimensional feature vector to a low-dimensional space. Furthermore, an activation function layer is used to perform a nonlinear transformation on the low-dimensional mapping vector of the residual fusion vector to enhance its nonlinear expressive power. The enhanced feature vector H can be expressed by the following formula:
[0062] in, Indicates the weights of the fully connected layer. This represents the bias term of the fully connected layer.
[0063] In step S400, the enhanced feature vector is input into the target attention module to obtain the fused feature vector.
[0064] In some embodiments, the target attention module may include a location embedding layer, a second query projection matrix, a feature interaction layer, and a second attention head.
[0065] Figure 7 This is a schematic diagram of the target attention module according to an embodiment of the present invention. Figure 7As shown, the target attention module 32 includes a location embedding layer 71, a Q projection matrix (i.e., a second projection matrix) 72, a feature interaction layer 73, and an attention head (i.e., a second attention head) 74.
[0066] Figure 8 This is a flowchart of the model training method according to an embodiment of the present invention. (Combined with...) Figure 7 ,like Figure 8 As shown, in an optional implementation of this embodiment, step S400 may include the following steps: Step S410: Input the time step index of the enhanced feature vector into the position embedding layer to generate a position encoding vector.
[0067] In this embodiment, the time step index is used to characterize the position of each time step in the sample data sequence. In this step, the time step index of the enhanced feature vector can be input into the position embedding layer 71 to generate a position encoding vector composed of the position encodings of each time step through the position encoding matrix of the position embedding layer 71.
[0068] Step S420: Add the position encoding vector and the enhanced feature vector element by element to obtain the position enhanced feature vector.
[0069] In this step, the positional encoding vector and the augmented feature vector can be added element-wise to embed the positional encoding into the augmented feature vector. Positional Augmented Feature Vector This can be expressed by the following formula:
[0070] Where P represents the position encoding vector.
[0071] Step S430: Obtain the second query vector corresponding to the predetermined task based on the second query projection matrix, the position enhancement feature vector, and the predetermined time step.
[0072] In this embodiment, the predetermined time step is the time step corresponding to the predetermined task. In some embodiments, the second query projection matrix 72 can be a global Q-projection matrix. Therefore, in this step, the enhanced feature vector can be linearly transformed using the second query projection matrix 72 to obtain the corresponding global query vector, and the second query vector corresponding to the predetermined task can be determined from the global query vector according to the predetermined time step. The global query vector can be used... To indicate, among which This represents the global Q-projection matrix, which can have dimensions of K×K; pre-defined task. The corresponding second query vector can be used To indicate, among which, This indicates the scheduled time step.
[0073] In some embodiments, the second query projection matrix 72 can also be the local Q-projection matrix corresponding to the predetermined task. Therefore, in this step, the position enhancement feature components corresponding to the predetermined task can be determined from the position enhancement feature vector according to a predetermined time step, and the position enhancement feature components corresponding to the predetermined task can be linearly transformed using the second query projection matrix 72 to obtain the corresponding second query vector. (Predetermined task) The corresponding location-enhanced feature components can be used To indicate; scheduled task The corresponding second query vector can be used To indicate, among which This represents the local Q-projection matrix corresponding to the predetermined task, which also has the dimension of K×K.
[0074] In this embodiment, the acquisition and delivery positions of each undertaken task correspond to a time step, which results in the predetermined task corresponding to two second query vectors. Therefore, optionally, these two second query vectors can be aggregated into a single second query vector. Vector aggregation can be achieved in various ways, such as element-wise addition, element-wise averaging, weighted summation, etc.
[0075] Step S440: Input the second query vector and the location enhancement feature vector into the feature interaction layer to obtain the interaction feature vector.
[0076] In this step, the second query vector and the location-enhanced feature vector of the predetermined task can be input into the feature interaction layer 73, which can map the second query vector to a high-dimensional space. The high-dimensional mapping vector and the position-enhanced feature vector are then concatenated to obtain the interaction feature vector by combining the interaction features across different dimensions. In this way, the target attention module can accurately learn the differences and correlations between different assigned tasks and the intended task across feature dimensions. The interaction features in each dimension can include... , , and ,in The high-dimensional mapping vector representing the second query vector With location-enhanced feature vectors Subtract element by element. Represents a high-dimensional mapping vector With location-enhanced feature vectors Element-wise dot product. Feature interaction vector. This can be expressed by the following formula:
[0077] Step S450: Input the interactive feature vector into the second attention head to obtain the fused feature vector.
[0078] In this step, the interactive feature vector can be input into the attention head 74. In some embodiments, the attention head 74 can obtain the attention score of the position enhancement feature vector at each time step through a linear layer, and input the attention score into a softmax function to normalize the attention score, thereby obtaining the attention weight of the position enhancement feature vector at each time step. Then, based on the attention weight at each time step, the position enhancement feature components of the position enhancement feature vector at the corresponding time step are weighted and summed to obtain the fused feature vector. This can be expressed by the following formula:
[0079] in, This represents the attention weights of the location-enhanced feature vector at time step t. This represents the position-enhanced feature component of the location-enhanced feature vector at time step t. Attention weights. This can be expressed by the following formula:
[0080] in, The attention score of the location-enhanced feature vector at time step i can be expressed by the following formula:
[0081] in, Represents the weights of the linear layer. This represents the bias term for the linear layer.
[0082] In some embodiments, the attention head 74 can fuse the feature components of each dimension of the interaction feature vector at each time step to obtain the feature fusion component corresponding to each time step. The feature fusion vector corresponding to each time step is then input into a linear layer to obtain the attention score of the position enhancement feature vector at each time step. The attention score is then input into a softmax function to normalize the attention score, obtaining the attention weight of the position enhancement feature vector at each time step. Based on the attention weight at each time step, the position enhancement feature components of the position enhancement feature vector at the corresponding time step are weighted and summed to obtain the fused feature vector. The feature fusion component corresponding to time step t. This can be expressed by the following formula:
[0083] in, , , and These represent the weights corresponding to each interaction feature.
[0084] Attention score This can be expressed by the following formula:
[0085] Step S500: Determine the joint input vector based on the fused feature vector and the sample task association information.
[0086] In this step, the embedding vector corresponding to the sample task association information can be determined, and the joint input vector can be determined based on the fused feature vector and the embedding vector corresponding to the sample task association information. In some embodiments, the fused feature vector and the embedding vector corresponding to the sample task association information can be concatenated to obtain the joint input vector. The joint input vector X can be represented by the following formula:
[0087] in, This represents the static features in the sample task association information. This represents the dynamic features in the sample task association information.
[0088] In step S600, the joint input vector is input into the multi-task learning module to obtain the predicted values of execution time and evaluation parameters.
[0089] In some embodiments, the multi-task learning module may include multiple expert network layers, multiple gated network layers, a first task tower for predicting task execution duration, and a second task tower for predicting object evaluation parameters, with the expert network layers and gated network layers arranged alternately. Further, each expert network layer includes a first expert network, a shared expert network, and a second expert network; the gated network layers include a front-end gated network layer and a top-end gated network layer (i.e., the gated network layer whose data processing order is last), wherein the front-end gated network layer includes a bottom-end gated network layer (i.e., the gated network layer whose data processing order is first) and intermediate gated network layers, each front-end gated network layer including a first gated network, a shared gated network, and a second gated network, and the top-end gated network including a first gated network and a second gated network.
[0090] The first expert network is used to learn the specific features of the execution duration prediction task, the second expert network is used to learn the specific features of the evaluation parameter prediction task, and the shared expert network is used to learn the general features shared by multiple tasks; the first gating network and the second gating network are used to dynamically balance the importance between the specific features and general features of the corresponding tasks, and the shared gating network is used to dynamically balance the importance between the specific features and general features of each task.
[0091] Figure 9This is a schematic diagram of the structure of the multi-task learning module according to an embodiment of the present invention. Figure 9 As shown, the multi-task learning module 33 includes expert network layers 911 to 91n, gated network layers 921 to 92n, task tower 931 (i.e., the first task tower) and task tower 932 (i.e., the second task tower), with expert network layers 911 to 91n and gated network layers 921 to 92n arranged alternately. Among them, the i-th expert network layer 91i includes expert network 91i1 (i.e., the first expert network), expert network 91i2 (i.e., the shared expert network), and expert network 91i3 (i.e., the second expert network). Expert network layer 911 is the bottom expert network layer. Gated network layers 921 to 92(n-1) are front-end gated network layers. Gated network layer 921 is the bottom gated network layer, and gated network layer 92n is the top gated network layer. The i-th gated network layer 92i, excluding gated network layer 92n, includes gated network 92i1 (i.e., the first gated network), gated network 92i2 (i.e., the shared gated network), and gated network 92i3 (i.e., the second gated network). Gated network layer 92n includes gated network 92n1 and gated network 92n3.
[0092] Figure 10 This is a flowchart of the model training method according to an embodiment of the present invention. (Combined with...) Figure 9 ,like Figure 10 As shown, in an optional implementation of this embodiment, step S600 may include the following steps: Step S610: Determine the input vector of the current expert network layer iteratively based on the joint input vector or multiple embedded dense vectors output by the previous expert network layer, until the first task mixing vector and the second task mixing vector are obtained.
[0093] In this embodiment, each expert network layer 91i outputs an embedding dense vector. Therefore, in this embodiment, the input vector of the current expert network layer 91i can be determined iteratively based on the joint input vector or multiple embedding dense vectors output by the previous expert network layer 91(i-1) until the output vector of the gated network 92n1 is used as the first task mixing vector and the output vector of the gated network 92n2 is used as the second task mixing vector.
[0094] The iterative process will be explained in detail below. Figure 11 This is a flowchart of the model training method according to an embodiment of the present invention. (Combined with...) Figure 9 ,like Figure 11 As shown, in an optional implementation of this embodiment, step S610 may include the following steps: Step S611: Determine the joint input vector as the input vector of the first cycle, determine the bottom expert network layer as the target expert network layer of the first cycle, and determine the bottom gated network layer as the target gated network layer of the first cycle.
[0095] In this step, the joint input vector can be determined as the input vector of the first cycle, the expert network layer 911 can be determined as the target expert network layer of the first cycle, and the gated network layer 921 can be determined as the target expert network layer of the first cycle.
[0096] Step S612: Input the input vector of the current period into each expert network of the target expert network layer to obtain the first task embedding dense vector, the shared task embedding dense vector, and the second task embedding dense vector of the current period.
[0097] In this embodiment, the number of expert network layers and gated network layers is n, therefore the number of iteration cycles is (n-1). In the i-th (1≤i≤n-1)-th cycle, the corresponding input vector can be simultaneously input into expert networks 91i1, 91i2, and 91i3 of the i-th expert network layer 91i. Expert network 91i1 can output a first task embedding dense vector, expert network 91i2 can output a shared task embedding dense vector, and expert network 91i3 can output a second task embedding dense vector.
[0098] Step S613: Perform a weighted summation of the first task embedding dense vector, the shared task embedding dense vector, and the second task embedding dense vector to determine the mixed dense vector for the current period.
[0099] In the i-th cycle, the corresponding dense vectors of the first task embedding and the shared task embedding can be input into the gating network 92i1 to obtain the first weight corresponding to the dense vector of the first task embedding and the second weight corresponding to the dense vector of the shared task embedding. The dense vectors of the second task embedding and the shared task embedding can also be input into the gating network 92i3 to obtain the third weight corresponding to the dense vector of the second task embedding and the fourth weight corresponding to the dense vector of the shared task embedding. Simultaneously, the dense vectors of the first task embedding, the shared task embedding, and the second task embedding can be input into the gating network 92i2 to obtain the fifth weight corresponding to the dense vector of the first task embedding, the sixth weight corresponding to the dense vector of the shared task embedding, and the seventh weight corresponding to the dense vector of the second task embedding.
[0100] During the initial model training process, the first to fourth weights in the i-th cycle are used only for updating parameters and not for weighted calculations. The mixed dense vector in the i-th cycle is obtained by weighted summation of the first task embedding dense vector, the shared task embedding dense vector, and the second task embedding dense vector according to the fifth, sixth, and seventh weights.
[0101] Step S614: Determine whether the next expert network of the target gating network layer is the top-level gating network layer.
[0102] In this step, if the next expert network of the target gated network layer is not the top gated network layer, that is, the target gated network layer in the i-th cycle is not gated network layer 92(n-1), step S615 can be executed; if the next expert network of the target gated network layer is the top gated network layer, step S616 can be executed.
[0103] Step S615: Update the mixed dense vector to the input vector of the next cycle, update the next expert network layer to the target expert network layer of the next cycle, and determine the next gated network layer as the target gated network layer of the next cycle.
[0104] In this step, the input vector, target expert network layer, and gated network layer for the next cycle can be iteratively updated.
[0105] Reference Figure 9 Taking the second cycle as an example, the target expert network layer in the second cycle is expert network layer 912. The input vectors of expert networks 9121 to 9123 in expert network layer 912 are obtained by weighted summation of the first task embedding dense vector output by expert network 9121, the shared task embedding dense vector output by expert network 9122, and the second task embedding dense vector output by expert network 9113. The weights of each embedding dense vector are generated by gating network 9212 based on each embedding dense vector.
[0106] It is easy to understand that after executing step S615, we can return to execute step S612.
[0107] Step S616: Input the hybrid dense vector of the last cycle into the top-level expert network layer to obtain the fourth task embedding dense vector output by the first expert network, the fifth task embedding dense vector output by the shared expert network, and the sixth task embedding dense vector output by the second expert network.
[0108] In this step, the mixed dense vector of the (n-1)th cycle, that is, the expert network 91n1, the shared expert network 91n2 and the expert network 91n3 input to the expert network layer 91n, can be used to obtain the fourth task embedding dense vector output by expert network 91n1, the fifth task embedding dense vector output by shared expert network 91n2 and the sixth task embedding dense vector output by expert network 91n3.
[0109] The (n-1)th period's hybrid dense vector is obtained by weighted summation of the first task embedding dense vector output by expert network 91(n-1)1, the shared task embedding dense vector output by expert network 91(n-1)2, and the second task embedding dense vector output by expert network 91(n-1)3 in expert network layer 91(n-1).
[0110] Step S617: Perform a weighted summation of the dense vectors embedded in the fourth task and the dense vectors embedded in the fifth task to obtain the mixed vector of the first task.
[0111] In this step, the dense vectors embedded in the fourth and fifth tasks can be input into the gated network 92n1 to obtain the eighth weight corresponding to the dense vector embedded in the fourth task and the ninth weight corresponding to the dense vector embedded in the fifth task. The dense vectors embedded in the fourth and fifth tasks are then weighted and summed according to the eighth and ninth weights to obtain the first task hybrid vector.
[0112] Step S618: Perform a weighted summation of the dense vectors embedded in the fifth task and the dense vectors embedded in the sixth task to obtain the hybrid vector of the second task.
[0113] In this step, the dense vectors embedded in the fifth task and the dense vectors embedded in the sixth task can be input into the gated network 92n3 to obtain the tenth weight corresponding to the dense vector embedded in the fifth task and the eleventh weight corresponding to the dense vector embedded in the sixth task. The dense vectors embedded in the fifth task and the dense vector embedded in the sixth task are then weighted and summed according to the tenth weight and the eleventh weight to obtain the first task hybrid vector.
[0114] Step S620: Input the first task mixing vector into the first task tower to obtain the execution time prediction value.
[0115] In this step, the first task mixing vector can be input into the task tower 931 to obtain the predicted execution time value corresponding to the predetermined task.
[0116] Step S630: Input the second task mixing vector into the second task tower to obtain the predicted values of the evaluation parameters.
[0117] In this step, the second task mixing vector can be input into task tower 932 to obtain the predicted values of the evaluation parameters corresponding to the predetermined task.
[0118] Step S700: Determine the joint loss of multiple tasks based on the predicted execution time, task execution time, predicted evaluation parameters, and object evaluation parameters.
[0119] In this step, the duration loss value of the initial model can be determined based on the predicted execution time of each predetermined task and the corresponding task execution time. The parameter loss value of the initial model can be determined based on the predicted evaluation parameters of each predetermined task and the object evaluation parameters. Then, the duration loss value and the parameter loss value are weighted and summed to obtain the multi-task joint loss of the initial model.
[0120] Optionally, the duration loss and parameter loss can be calculated in various ways. Taking the duration loss as an example, the mean absolute error, mean square error, SmoothL1 loss, Huber loss, etc., between the predicted execution time of each scheduled task and the actual execution time can be calculated as the loss value.
[0121] Step S800: Train the initial model based on the multi-task joint loss to obtain the data prediction model.
[0122] In this step, the parameters of the self-attention module, the target attention module, and the multi-task learning module can be adjusted according to the multi-task joint loss, and the adjusted initial model is determined as the data prediction model when the multi-task joint loss converges.
[0123] Optionally, the training termination condition of the initial model can be determined by combining the multi-task joint loss and other model evaluation metrics, such as the accuracy parameter of the initial model. For example, when the accuracy parameter meets the evaluation criteria (e.g., the accuracy parameter is higher than a preset accuracy threshold) and the multi-task joint loss converges, the initial model with updated parameters can be determined as the data prediction model.
[0124] This embodiment learns the feature correlations between the same instant delivery task and different instant delivery tasks through a self-attention module and a target attention module, and learns the differences and correlations between different prediction tasks through a multi-task learning module, thereby improving the accuracy of task execution time prediction.
[0125] In this embodiment of the invention, after obtaining an initial model and training sample set including a self-attention module, a target attention module, and a multi-task learning module, the sample data sequences from each training sample are input into the self-attention module, and the enhanced feature vector output by the self-attention module is input into the target attention module. Then, the joint input vector determined based on the fused feature vector output by the target attention module and the corresponding sample task association information is input into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value. Based on the above prediction values, the task execution time of the predetermined task, and the object evaluation parameters of the task execution object, a multi-task joint loss is calculated. The initial model is then trained based on this loss to obtain a data prediction model. This improves the accuracy of task execution time prediction.
[0126] Figure 12 This is a method for predicting task execution time according to an embodiment of the present invention. For example... Figure 12 As shown, the method in this embodiment may include the following steps: Step S100': Obtain the task set of the pre-defined task execution object.
[0127] In this step, the server can create an instant delivery task after receiving a task creation request initiated by the user terminal, and designate the instant delivery task as the target task.
[0128] In some embodiments, before assigning a target task to a specific task execution object, the server may determine multiple task execution objects based on information such as the distance between each task execution object and the store corresponding to the target task, and the number of tasks undertaken by each task execution object (i.e., the number of tasks to be completed). Each task execution object is then designated as a predetermined task execution object, and the tasks to be completed and the target task for each predetermined task execution object are determined as the task set corresponding to each predetermined task execution object. The tasks to be completed are those that the predetermined execution object has accepted but has not yet delivered the delivery entity to the corresponding user.
[0129] For example, the server determines multiple scheduled task execution objects including delivery capacity D1, delivery capacity D2, and delivery capacity D3. The tasks to be completed for delivery capacity D1 include tasks O1, O2, and O3; the tasks to be completed for delivery capacity D2 include tasks O4 and O5; and the tasks to be completed for delivery capacity D3 include tasks O6 and O7. The server can determine tasks O1, O2, O3, and the target task as the task set C1 of delivery capacity D1, tasks O4, O5, and the target task as the task set C2 of delivery capacity D2, and tasks O6, O7, and the target task as the task set C3 of delivery capacity D3.
[0130] In some embodiments, after the predetermined task execution object accepts the target task, the server can determine the tasks to be completed corresponding to the predetermined task execution object as a task set. It is easy to understand that in this embodiment, the target task is the task to be completed corresponding to the predetermined task execution object that is last in the allocation order.
[0131] Step S200': Determine the task data sequence of the predetermined task execution object according to the target task execution order of the predetermined task execution object.
[0132] In this step, the server can determine the execution order of each task to be completed and the target task in the task set (i.e., the target task execution order), and determine the task data sequence of the predetermined task execution object based on the target task execution order.
[0133] The execution order of target tasks can be determined based on a search algorithm and according to the real-time position of the pre-defined task execution object, the task acquisition position and task delivery position of each task to be completed, and the target acquisition position and target delivery position of the target task.
[0134] For example, delivery capacity D4's task set includes tasks O1, O2, O3, and O4, with task O4 being the target task. Delivery capacity D4 has already acquired the goods corresponding to task O1. Therefore, a greedy algorithm can be used to determine the target task based on the current location of delivery capacity D4 (P1), the delivery location of task O1 (P2), the acquisition location of task O2 (P3), the delivery location of task O2 (P4), the acquisition location of task O3 (P5), the delivery location of task O3 (P6), the acquisition location of task O4 (P7), and the delivery location of task O4 (P8).
[0135] Starting from position P1, the position closest to the immediate position P1 is determined as the task acquisition position P3. The position closest to the task acquisition position P3 among the remaining positions is determined as the task acquisition position P7. The position closest to the task acquisition position P7 among the remaining positions is determined as the task delivery position P2. The position closest to the task delivery position P2 among the remaining positions is determined as the task delivery position P4. The position closest to the task delivery position P4 among the remaining positions is determined as the task acquisition position P5. The position closest to the task acquisition position P5 among the remaining positions is determined as the task delivery position P8. Finally, the task delivery position P6 is determined as the endpoint.
[0136] That is, the execution order of the target task can be obtained as follows: immediate position P1 → task acquisition position P3 → task acquisition position P7 → task delivery position P2 → task delivery position P4 → task acquisition position P5 → task delivery position P8 → delivery position P6.
[0137] After obtaining the execution order of the target tasks, a task data sequence for the predetermined task execution objects can be constructed based on the execution order and the task information of each task. The construction method of the task data sequence can refer to the construction method of the sample data sequence, and will not be repeated here.
[0138] Step S300': Based on the task data sequence and the task association information of the target task, obtain the estimated execution time of the target task using a pre-trained data prediction model.
[0139] In this step, the input to the data prediction model can be determined based on the task data sequence and the task association information of the target task, so as to obtain the expected execution time of the target task.
[0140] In some embodiments, the data prediction model includes a self-attention module, a target attention module, and a multi-task learning module. Therefore, the task data sequence can be input into the self-attention module to obtain a task-enhanced feature vector, and then input into the target attention module to obtain a task fusion feature vector. Subsequently, based on the task association information of the target task and the task fusion feature vector, a joint task input vector is determined. This joint task input vector is then input into the multi-task learning module to obtain the estimated execution time of the target task. The data processing procedures for the self-attention module, the target attention module, and the multi-task learning module can be referenced from the data processing procedures in the model training method, and will not be elaborated further here.
[0141] Through the above method, this embodiment can not only obtain the estimated execution time of the target task, but also the estimated evaluation parameters of the predetermined task execution objects. Therefore, in some embodiments, before assigning the target task to a specific task execution object, the server can use the estimated evaluation parameters of the execution time of each predetermined task as the basis for the allocation of the target task, so as to improve the accuracy of the prediction of the estimated execution time of the target task and the rationality of the allocation of the target task, thereby improving user satisfaction.
[0142] For example, if there are multiple pre-defined task execution objects whose distances are relatively close to the task acquisition location of the target task (e.g., the distance difference is no more than 50 meters), the server can determine the actual task execution object corresponding to the target object based on the expected evaluation parameters of each pre-defined task execution object (e.g., the probability of being urged).
[0143] In this embodiment of the invention, after obtaining a task set of a predetermined task execution object, a task data sequence is determined based on the execution order of each task to be completed and the target task in the task set. Then, the input to a pre-trained data prediction model is determined based on the task data sequence and the task association information of the target task, resulting in the estimated execution time of the target task. The data prediction model is obtained based on training samples. Each training sample in the training sample set includes a sample data sequence, sample task association information of the predetermined task, task execution time, and object evaluation parameters of the task execution object. The task execution time is determined based on the task execution order of each accepted but uncompleted task of the task execution object, with the predetermined task being the task ranked last in the allocation order. Therefore, this embodiment of the invention can predict the task execution time based on the correlation between each task to be completed corresponding to the same task execution object and a specific task in the task execution order dimension and feature dimension, thereby improving the accuracy of task execution time prediction.
[0144] Figure 13 This is a schematic diagram of a model training device according to an embodiment of the present invention. Figure 13 As shown, the model training device in this embodiment includes an initial model acquisition unit 1301, a sample acquisition unit 1302, a first training unit 1303, a second training unit 1304, a vector determination unit 1305, a third training unit 1306, a fourth training unit 1307, and a fifth training unit 1308.
[0145] The initial model acquisition unit 1301 is used to acquire an initial model, which includes a self-attention module, a target attention module, and a multi-task learning module. The sample acquisition unit 1302 is used to acquire a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of a predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The undertaken tasks are those accepted but not yet completed by the task execution object, and the predetermined task is the undertaken task ranked last in the allocation order. The first training unit 1303 is used to input the sample data sequence into the training set. The initial model is trained by the following steps: a first training unit 1304 inputs the enhanced feature vector into the target attention module to obtain a fused feature vector; a second training unit 1305 determines a joint input vector based on the fused feature vector and the sample task association information; a third training unit 1306 inputs the joint input vector into the multi-task learning module to obtain the execution duration prediction value and the evaluation parameter prediction value; a fourth training unit 1307 determines a multi-task joint loss based on the execution duration prediction value, the task execution duration, the evaluation parameter prediction value, and the object evaluation parameter; and a fifth training unit 1308 trains the initial model based on the multi-task joint loss to obtain a data prediction model.
[0146] In this embodiment of the invention, after obtaining an initial model and training sample set including a self-attention module, a target attention module, and a multi-task learning module, the sample data sequences from each training sample are input into the self-attention module, and the enhanced feature vector output by the self-attention module is input into the target attention module. Then, the joint input vector determined based on the fused feature vector output by the target attention module and the corresponding sample task association information is input into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value. Based on the above prediction values, the task execution time of the predetermined task, and the object evaluation parameters of the task execution object, a multi-task joint loss is calculated. The initial model is then trained based on this loss to obtain a data prediction model. This improves the accuracy of task execution time prediction.
[0147] Figure 14 This is a schematic diagram of a task execution time prediction device according to an embodiment of the present invention. Figure 13 As shown, the task execution duration prediction device in this embodiment includes a set acquisition unit 1401, a sequence determination unit 1402, and a duration prediction unit 1403.
[0148] The set acquisition unit 1401 is used to acquire a task set of the predetermined task execution object, the task set including tasks to be completed and target tasks; the sequence determination unit 1402 is used to determine the task data sequence of the predetermined task execution object according to the target task execution order of the predetermined task execution object, the target task execution order being the task execution order of each task to be completed and the target task; the duration prediction unit 1403 is used to acquire the expected execution duration of the target task based on the task data sequence and the task association information of the target task, based on a pre-trained data prediction model, the data prediction model being trained based on a training sample set, the training sample set including multiple training samples, each training sample including a sample data sequence, sample task association information of the predetermined task, task execution duration, and object evaluation parameters of the task execution object, the sample data sequence being determined according to the task execution order of the tasks already undertaken by the task execution object, the tasks already undertaken being tasks accepted but not completed by the task execution object, and the predetermined task being the tasks already undertaken that are ranked last in the allocation order.
[0149] In this embodiment of the invention, after obtaining a task set of a predetermined task execution object, a task data sequence is determined based on the execution order of each task to be completed and the target task in the task set. Then, the input to a pre-trained data prediction model is determined based on the task data sequence and the task association information of the target task, resulting in the estimated execution time of the target task. The data prediction model is obtained based on training samples. Each training sample in the training sample set includes a sample data sequence, sample task association information of the predetermined task, task execution time, and object evaluation parameters of the task execution object. The task execution time is determined based on the task execution order of each accepted but uncompleted task of the task execution object, with the predetermined task being the task ranked last in the allocation order. Therefore, this embodiment of the invention can predict the task execution time based on the correlation between each task to be completed corresponding to the same task execution object and a specific task in the task execution order dimension and feature dimension, thereby improving the accuracy of task execution time prediction.
[0150] Figure 15 This is a schematic diagram of an electronic device according to an embodiment of the present invention. In this embodiment, the electronic device includes a server, a terminal, etc. Figure 15 As shown, the electronic device includes at least one processor 1501; a memory 1502 communicatively connected to at least one processor 1501; and a communication component 1503 communicatively connected to a scanning device, wherein the communication component 1503 receives and transmits data under the control of the processor 1501; wherein the memory 1502 stores instructions executable by at least one processor 1501, the instructions being executed by at least one processor 1501 to implement at least one of the above-described model training method and task execution time prediction method.
[0151] Specifically, the electronic device includes: one or more processors 1501 and a memory 1502. Figure 15 Taking a processor 1501 as an example, the processor 1501 and the memory 1502 can be connected via a bus or other means. Figure 15 Taking a bus connection as an example, memory 1502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Processor 1501 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in memory 1502, thereby implementing at least one of the aforementioned model training methods and task execution time prediction methods.
[0152] Memory 1502 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store an option list, etc. Furthermore, memory 1502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 1502 may optionally include memory remotely located relative to processor 1501, and these remote memories may be connected to external devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0153] One or more modules are stored in memory 1502, and when executed by one or more processors 1501, they execute at least one of the model training method and the task execution time prediction method in any of the above method embodiments.
[0154] The above-mentioned products can perform the methods provided in the embodiments of this application, and have the corresponding functional modules and beneficial effects of performing the methods. For technical details not described in detail in this embodiment, please refer to the methods provided in the embodiments of this application.
[0155] In this embodiment of the invention, after obtaining an initial model and training sample set including a self-attention module, a target attention module, and a multi-task learning module, the sample data sequences from each training sample are input into the self-attention module, and the enhanced feature vector output by the self-attention module is input into the target attention module. Then, the joint input vector determined based on the fused feature vector output by the target attention module and the corresponding sample task association information is input into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value. Based on the above prediction values, the task execution time of the predetermined task, and the object evaluation parameters of the task execution object, a multi-task joint loss is calculated. The initial model is then trained based on this loss to obtain a data prediction model. This improves the accuracy of task execution time prediction.
[0156] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.
[0157] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0158] This invention discloses, in embodiment A1, a model training method, the method comprising: Obtain an initial model, wherein the initial model includes a self-attention module, a target attention module, and a multi-task learning module; Obtain a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of a predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The tasks already undertaken are those that the task execution object has accepted but not completed. The predetermined task is the task already undertaken that is ranked last in the allocation order. The sample data sequence is input into the self-attention module to obtain the enhanced feature vector; The enhanced feature vector is input into the target attention module to obtain the fused feature vector; The joint input vector is determined based on the fused feature vector and the sample task association information; The joint input vector is input into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value; The multi-task joint loss is determined based on the predicted execution time, the task execution time, the predicted evaluation parameters, and the object evaluation parameters. The initial model is trained based on the multi-task joint loss to obtain a data prediction model.
[0159] A2. In the method described in A1, the task execution order is determined based on the sample location of the task execution object, the acquisition location of each of the undertaken tasks, and the delivery location.
[0160] A3. In the method described in A1, the self-attention module includes a time-series segmentation module, multiple projection matrix groups, multiple first attention heads, a first stitching layer, a second stitching layer, and a linear rectifier layer. Each projection matrix group includes a first query projection matrix, a key projection matrix, and a value projection matrix. The step of inputting the sample data sequence into the self-attention module to obtain the enhanced feature vector includes: The sample data sequence is input into the time-series segmentation module to obtain the first feature vector of the sample data sequence at each time step; Based on each of the projection matrix groups, obtain multiple first query vectors, multiple key vectors, and multiple value vectors corresponding to each first feature vector; Input each of the first query vectors, each of the key vectors and each of the value vectors into the corresponding first attention head to obtain the corresponding single-head attention feature vector; Input the single-head attention feature vectors at the same time step into the first concatenation layer to obtain the corresponding block feature aggregation vector; The block feature aggregation vectors at each time step are input into the second concatenation layer to obtain the feature aggregation vectors; The feature aggregation vector is added to the sample data sequence by residual addition to obtain the residual fusion vector; The residual fusion vector is input into the linear rectifier layer to obtain the enhanced feature vector.
[0161] A4. As described in A1, the target attention module includes a location embedding layer, a second query projection matrix, a feature interaction layer, and a second attention head; The step of inputting the enhanced feature vector into the target attention module to obtain the fused feature vector includes: The time step index of the enhanced feature vector is input into the location embedding layer to generate a location encoding vector; The location encoding vector and the enhanced feature vector are added element by element to obtain the location enhanced feature vector; The second query vector corresponding to the predetermined task is obtained based on the second query projection matrix, the location enhancement feature vector, and the predetermined time step, wherein the predetermined time step is the time step corresponding to the predetermined task. The second query vector and the location-enhanced feature vector are input into the feature interaction layer to obtain the interaction feature vector; The interaction feature vector is input into the second attention head to obtain the fused feature vector.
[0162] A5. As described in A1, determining the joint input vector based on the fused feature vector and the sample task association information includes: Determine the embedding vector corresponding to the sample task association information; The fused feature vector and the embedding vector are concatenated to obtain the joint input vector.
[0163] A6. In the method described in A1, the multi-task learning module includes multiple expert network layers, multiple gated network layers, a first task tower for predicting the execution time of the task, and a second task tower for predicting the evaluation parameters of the object, wherein each expert network layer and the gated network layer are arranged alternately. The step of inputting the joint input vector into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value includes: The input vector of the current expert network layer is determined iteratively based on the joint input vector or multiple embedded dense vectors output by the previous expert network layer, until the first task mixture vector and the second task mixture vector are obtained. The input vector is determined by weighted summation of multiple embedded dense vectors, and the weights of the weighted summation are generated by the previous gated network layer based on the embedded dense vectors. Input the first task mixing vector into the first task tower to obtain the execution time prediction value; Input the second task mixing vector into the second task tower to obtain the predicted value of the evaluation parameter.
[0164] A7. In the method described in A6, each expert network layer includes a first expert network, a shared expert network, and a second expert network. The gating network layer includes a front-end gating network layer and a top-end gating network layer. The front-end gating network layer includes a first gating network, a shared gating network, and a second gating network. The top-end gating network layer includes the first gating network and the second gating network. The step of iteratively determining the input vector of the current expert network layer based on the joint input vector or multiple densely embedded vectors output by the previous expert network layer, until the first task mixing vector and the second task mixing vector are obtained, includes: The joint input vector is determined as the input vector of the first cycle, the bottom expert network layer is determined as the target expert network layer of the first cycle, and the bottom gated network layer is determined as the target gated network layer of the first cycle. The input vector of the current period is input into each expert network of the target expert network layer to obtain the first task embedding dense vector, the shared task embedding dense vector, and the second task embedding dense vector of the current period. The first task embedding dense vector, the shared task embedding dense vector, and the second task embedding dense vector are weighted and summed to determine the mixed dense vector for the current period. The weights of the weighted summation are determined by the shared gating network of the target gating network layer based on the first task embedding dense vector, the shared task embedding dense vector, and the second task embedding dense vector. The mixed dense vector is updated to the input vector of the next cycle, the next expert network layer is updated to the target expert network layer of the next cycle, the next gated network layer is determined to be the target gated network layer of the next cycle, until the next expert network of the target gated network layer is the top gated network layer; The hybrid dense vector of the last cycle is input into the top-level expert network layer to obtain the fourth task embedding dense vector output by the first expert network, the fifth task embedding dense vector output by the shared expert network, and the sixth task embedding dense vector output by the second expert network. The fourth task embedding dense vector and the fifth task embedding dense vector are weighted and summed to obtain the first task hybrid vector. The weights of the weighted summation are generated by the first gating network of the top-level gating network layer based on the fourth task embedding dense vector and the fifth task embedding dense vector. The fifth task embedding dense vector and the sixth task embedding dense vector are weighted and summed to obtain the second task hybrid vector. The weights of the weighted summation are generated by the second gating network of the top-level gating network layer based on the fifth task embedding dense vector and the sixth task embedding dense vector.
[0165] This invention discloses, in embodiment B1, a method for predicting task execution time, the method comprising: Obtain a set of tasks for the predetermined task execution object, the set of tasks including tasks to be completed and target tasks; The task data sequence of the predetermined task execution object is determined according to the target task execution order of the predetermined task execution object, wherein the target task execution order is the task execution order of each task to be completed and the target task. Based on the task data sequence and the task association information of the target task, the estimated execution time of the target task is obtained based on a pre-trained data prediction model. The data prediction model is trained on a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of the predetermined task, task execution time, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The already undertaken tasks are those accepted but not completed by the task execution object, and the predetermined task is the already undertaken task that is ranked last in the allocation order.
[0166] B2. As described in B1, the data prediction model includes a self-attention module, a target attention module, and a multi-task learning module; The step of obtaining the estimated execution time of the target task based on the task data sequence and the task association information of the target task, and using a pre-trained data prediction model, includes: The task data sequence is input into the self-attention module to obtain the task enhancement feature vector; The task enhancement feature vector is input into the target attention module to obtain the task fusion feature vector; The task joint input vector is determined based on the task association information and the task fusion feature vector. The task joint input vector is input into the multi-task learning module to obtain the estimated execution time.
[0167] This invention discloses C1, a model training device, the device comprising: An initial model acquisition unit is used to acquire an initial model, wherein the initial model includes a self-attention module, a target attention module, and a multi-task learning module; The sample acquisition unit is used to acquire a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of a predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The already undertaken tasks are tasks that the task execution object has accepted but not completed. The predetermined task is the already undertaken task that is ranked last in the allocation order. The first training unit is used to input the sample data sequence into the self-attention module to obtain the enhanced feature vector; The second training unit is used to input the enhanced feature vector into the target attention module to obtain the fused feature vector; A vector determination unit is used to determine a joint input vector based on the fused feature vector and the sample task association information; The third training unit is used to input the joint input vector into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value; The fourth training unit is used to determine the multi-task joint loss based on the predicted execution time, the task execution time, the predicted evaluation parameters, and the object evaluation parameters. The fifth training unit is used to train the initial model based on the multi-task joint loss to obtain a data prediction model.
[0168] This invention discloses D1, a device for predicting task execution time, the device comprising: A set acquisition unit is used to acquire a set of tasks for a predetermined task execution object, wherein the set of tasks includes tasks to be completed and target tasks; A sequence determination unit is used to determine the task data sequence of the predetermined task execution object according to the target task execution order of the predetermined task execution object, wherein the target task execution order is the task execution order of each task to be completed and the target task. The duration prediction unit is used to obtain the estimated execution duration of the target task based on the task data sequence and the task association information of the target task, and on a pre-trained data prediction model. The data prediction model is trained on a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of the predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The tasks already undertaken are those accepted but not completed by the task execution object, and the predetermined task is the task already undertaken that is ranked last in the allocation order.
[0169] This invention discloses E1, an electronic device including a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of A1-A7 and B1-B2.
[0170] This invention discloses F1, a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method as described in any one of A1-A7 and B1-B2.
[0171] This invention discloses G1, a computer program product, the computer program product including a computer program / instruction, which, when executed by a processor, implements the method as described in any one of A1-A7 and B1-B2.
[0172] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A model training method, characterized in that, The method includes: Obtain an initial model, wherein the initial model includes a self-attention module, a target attention module, and a multi-task learning module; Obtain a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of a predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The tasks already undertaken are those that the task execution object has accepted but not completed. The predetermined task is the task already undertaken that is ranked last in the allocation order. The sample data sequence is input into the self-attention module to obtain the enhanced feature vector; The enhanced feature vector is input into the target attention module to obtain the fused feature vector; The joint input vector is determined based on the fused feature vector and the sample task association information; The joint input vector is input into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value; The multi-task joint loss is determined based on the predicted execution time, the task execution time, the predicted evaluation parameters, and the object evaluation parameters. The initial model is trained based on the multi-task joint loss to obtain a data prediction model.
2. The method according to claim 1, characterized in that, The task execution order is determined based on the sample location of the task execution object, the acquisition location of each of the already undertaken tasks, and the delivery location.
3. The method according to claim 1, characterized in that, The self-attention module includes a time-series segmentation module, multiple projection matrix groups, multiple first attention heads, a first stitching layer, a second stitching layer, and a linear rectification layer. Each projection matrix group includes a first query projection matrix, a key projection matrix, and a value projection matrix. The step of inputting the sample data sequence into the self-attention module to obtain the enhanced feature vector includes: The sample data sequence is input into the time-series segmentation module to obtain the first feature vector of the sample data sequence at each time step; Based on each of the projection matrix groups, obtain multiple first query vectors, multiple key vectors, and multiple value vectors corresponding to each first feature vector; Input each of the first query vectors, each of the key vectors and each of the value vectors into the corresponding first attention head to obtain the corresponding single-head attention feature vector; Input the single-head attention feature vectors at the same time step into the first concatenation layer to obtain the corresponding block feature aggregation vector; The block feature aggregation vectors at each time step are input into the second concatenation layer to obtain the feature aggregation vectors; The feature aggregation vector is added to the sample data sequence by residual addition to obtain the residual fusion vector; The residual fusion vector is input into the linear rectifier layer to obtain the enhanced feature vector.
4. The method according to claim 1, characterized in that, The target attention module includes a location embedding layer, a second query projection matrix, a feature interaction layer, and a second attention head; The step of inputting the enhanced feature vector into the target attention module to obtain the fused feature vector includes: The time step index of the enhanced feature vector is input into the location embedding layer to generate a location encoding vector; The location encoding vector and the enhanced feature vector are added element by element to obtain the location enhanced feature vector; The second query vector corresponding to the predetermined task is obtained based on the second query projection matrix, the location enhancement feature vector, and the predetermined time step, wherein the predetermined time step is the time step corresponding to the predetermined task. The second query vector and the location-enhanced feature vector are input into the feature interaction layer to obtain the interaction feature vector; The interaction feature vector is input into the second attention head to obtain the fused feature vector.
5. A method for predicting task execution time, characterized in that, The method includes: Obtain a set of tasks for the predetermined task execution object, the set of tasks including tasks to be completed and target tasks; The task data sequence of the predetermined task execution object is determined according to the target task execution order of the predetermined task execution object, wherein the target task execution order is the task execution order of each task to be completed and the target task. Based on the task data sequence and the task association information of the target task, the estimated execution time of the target task is obtained based on a pre-trained data prediction model. The data prediction model is trained on a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of the predetermined task, task execution time, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The already undertaken tasks are those accepted but not completed by the task execution object, and the predetermined task is the already undertaken task that is ranked last in the allocation order.
6. A model training device, characterized in that, The device includes: An initial model acquisition unit is used to acquire an initial model, wherein the initial model includes a self-attention module, a target attention module, and a multi-task learning module; The sample acquisition unit is used to acquire a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of a predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The already undertaken tasks are tasks that the task execution object has accepted but not completed. The predetermined task is the already undertaken task that is ranked last in the allocation order. The first training unit is used to input the sample data sequence into the self-attention module to obtain the enhanced feature vector; The second training unit is used to input the enhanced feature vector into the target attention module to obtain the fused feature vector; A vector determination unit is used to determine a joint input vector based on the fused feature vector and the sample task association information; The third training unit is used to input the joint input vector into the multi-task learning module to obtain the execution time prediction value and the evaluation parameter prediction value; The fourth training unit is used to determine the multi-task joint loss based on the predicted execution time, the task execution time, the predicted evaluation parameters, and the object evaluation parameters. The fifth training unit is used to train the initial model based on the multi-task joint loss to obtain a data prediction model.
7. A device for predicting task execution time, characterized in that, The device includes: A set acquisition unit is used to acquire a set of tasks for a predetermined task execution object, wherein the set of tasks includes tasks to be completed and target tasks; A sequence determination unit is used to determine the task data sequence of the predetermined task execution object according to the target task execution order of the predetermined task execution object, wherein the target task execution order is the task execution order of each task to be completed and the target task. The duration prediction unit is used to obtain the estimated execution duration of the target task based on the task data sequence and the task association information of the target task, and on a pre-trained data prediction model. The data prediction model is trained on a training sample set, which includes multiple training samples. Each training sample includes a sample data sequence, sample task association information of the predetermined task, task execution duration, and object evaluation parameters of the task execution object. The sample data sequence is determined according to the task execution order of the tasks already undertaken by the task execution object. The tasks already undertaken are those accepted but not completed by the task execution object, and the predetermined task is the task already undertaken that is ranked last in the allocation order.
8. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-5.
10. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the method as described in any one of claims 1-5.