Multi-task model training, multimedia resource recommendation method and device, and electronic device
By identifying the target expert network corresponding to the task in the multi-task model and conducting supervised training, the redundancy problem caused by the convergence of expert networks is solved, thereby improving the learning ability and recommendation accuracy of the multi-task model.
Patent Information
- Application Number
- CN202110578564.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-26
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2041-05-26
AI Technical Summary
In existing multi-task models, expert networks exhibit convergence during training, leading to redundant network outputs that resemble noise and negatively impact recommendation accuracy.
By identifying the target expert network for each task from multiple expert networks and training a multi-task model based on feature information and supervised prediction information, supervised constraints are implemented to ensure that each expert network learns in a balanced manner.
It improves the overall learning ability and recommendation accuracy of the multi-task model, avoids the redundancy of expert networks, and improves the accuracy of recommendations.
Smart Images

Figure CN115410020B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a method, apparatus, and electronic device for multi-task model training and multimedia resource recommendation. Background Technology
[0002] In multimedia resource recommendation, the purpose of recommendation is generally diverse, considering factors such as whether a user will like or share, or whether they will watch, making the recommendation process multi-task. Related technologies typically use multi-task models for multi-task learning to achieve multi-task recommendation. This multi-task model is generally an MMOE (Multi-gated Mixture of Experts), which is a multi-expert model based on multiple gate networks. This includes multiple expert networks and multiple gate networks, and multiple tasks corresponding to multiple gate networks can share multiple expert networks. While this avoids training a separate network for each task, the expert networks exhibit "convergence." During training, the expert networks that gain an advantage early on gradually become dominant, while other expert networks become redundant. The output of these redundant expert networks approaches noise, affecting the training process. Therefore, the resulting multi-task model may not provide accurate recommendations. Summary of the Invention
[0003] This disclosure provides a method, apparatus, and electronic device for multi-task model training and multimedia resource recommendation, aiming to at least address the issues of balancing the learning of expert networks and improving the recommendation accuracy of target multi-task models in related technologies. The technical solution of this disclosure is as follows:
[0004] According to a first aspect of the present disclosure, a multi-task model training method is provided, comprising:
[0005] Acquire sample data and corresponding multi-task label information, wherein the sample data includes sample user attribute features and sample multimedia attribute features;
[0006] The sample user attribute features and the sample multimedia attribute features are input into the multi-task model to perform multi-task learning, thereby obtaining multiple prediction information corresponding to multiple tasks and feature information output by multiple expert networks in the multi-task model.
[0007] From the multiple expert networks, determine the target expert network corresponding to each of the multiple tasks;
[0008] Based on the feature information output by the target expert network corresponding to each of the multiple tasks, multiple supervised prediction information corresponding to the multiple tasks is obtained.
[0009] The multi-task model is trained based on the multiple prediction information, the multiple supervised prediction information, and the multi-task label information to obtain the target multi-task model.
[0010] In one possible implementation, the step of determining the target expert network corresponding to each of the multiple tasks from the multiple expert networks includes:
[0011] Obtain the mapping configuration information between the multiple tasks and the expert network;
[0012] Based on the mapping configuration information, the target expert network corresponding to each task is determined from the plurality of expert networks.
[0013] In one possible implementation, after the step of obtaining the mapping configuration information between the multiple tasks and the expert network, the method further includes:
[0014] Based on the mapping configuration information, a first correspondence between multiple tasks and multiple expert networks is determined;
[0015] Based on the sample user attribute features and the sample multimedia attribute features, a second correspondence between the sample data and the multiple expert networks is determined;
[0016] Based on the first correspondence and the second correspondence, determine the target expert network corresponding to each task.
[0017] In one possible implementation, the step of determining the second correspondence between the sample data and the plurality of expert networks based on the sample user attribute features and the sample multimedia attribute features includes:
[0018] Random numbers are generated based on the sample user attribute features and the sample multimedia attribute features;
[0019] The second correspondence is determined based on the random number.
[0020] In one possible implementation, the step of determining the target expert network corresponding to each task based on the first correspondence and the second correspondence includes:
[0021] Based on the first correspondence, determine the first target expert network corresponding to each task;
[0022] Based on the second correspondence, determine the second target expert network corresponding to the sample data;
[0023] For each task, identify the expert network that intersects with the first target expert network and the second target expert network, and use that network as the target expert network for each task.
[0024] In one possible implementation, the step of determining the second correspondence between the sample data and the plurality of expert networks based on the sample user attribute features and the sample multimedia attribute features includes:
[0025] The sample user attribute features and the sample multimedia attribute features are input into the expert allocation unit. The expert allocation unit generates random numbers based on the sample user attribute features and the sample multimedia attribute features, and determines the second correspondence based on the random numbers.
[0026] The step of determining the target expert network corresponding to each task based on the first correspondence and the second correspondence includes:
[0027] The first correspondence and the second correspondence are input into the plurality of supervisory gate networks. Each supervisory gate network determines the first target expert network corresponding to each task based on the first correspondence; and determines the second target expert network corresponding to the sample data based on the second correspondence; and determines the expert network that has an intersection between the first target expert network and the second target expert network corresponding to each task as the target expert network corresponding to each task.
[0028] In one possible implementation, the step of training the multi-task model based on the plurality of prediction information, the plurality of supervised prediction information, and the multi-task label information to obtain the target multi-task model includes:
[0029] Based on the multiple prediction information and the multi-task label information, the first loss information is determined;
[0030] The second loss information is determined based on the multiple supervised prediction information and the multi-task label information;
[0031] The multi-task model is trained based on the first loss information and the second loss information to obtain the target multi-task model.
[0032] In one possible implementation, the first loss information includes multiple first sub-loss information corresponding to the multiple tasks, and the second loss information includes multiple second sub-loss information corresponding to the multiple tasks; the step of training the multi-task model based on the first loss information and the second loss information to obtain the target multi-task model includes:
[0033] Based on the first sub-loss information, the corresponding gate network in the multi-task model is trained to obtain the target gate network;
[0034] Based on multiple first sub-loss information and each second sub-loss information, train the target expert network corresponding to each second sub-loss information to obtain the first expert network;
[0035] Obtain the non-target expert networks other than the target expert network from the full expert network of the multi-task model;
[0036] Based on multiple first sub-loss information, the non-target expert network is trained to obtain the second expert network;
[0037] The target multi-task model is obtained based on the target gate network, the first expert network, and the second expert network.
[0038] According to a second aspect of the present disclosure, a multimedia resource recommendation method is provided, comprising:
[0039] Obtain multimedia resources that match the target user;
[0040] Obtain the target user attribute features of the target user and the multimedia attribute features corresponding to the recalled multimedia resources;
[0041] The target user attribute features and the multimedia attribute features are input into the target multi-task model, and multi-task prediction processing is performed to obtain the multi-task prediction result; wherein, the target multi-task model is obtained based on any one of the methods described in the first aspect above;
[0042] Based on the multi-task prediction results, target multimedia resources are selected from the recalled multimedia resources;
[0043] Recommend the target multimedia resources to the target user.
[0044] According to a third aspect of the present disclosure, a multi-task model training apparatus is provided, comprising:
[0045] The sample information acquisition module is configured to acquire sample data and corresponding multi-task tag information, wherein the sample data includes sample user attribute features and sample multimedia attribute features.
[0046] The multi-task learning module is configured to input the sample user attribute features and the sample multimedia attribute features into the multi-task model, perform multi-task learning, and obtain multiple prediction information corresponding to multiple tasks and feature information output by multiple expert networks in the multi-task model.
[0047] The target expert network determination module is configured to determine the target expert network corresponding to each of the multiple tasks from the multiple expert networks.
[0048] The supervised prediction information acquisition module is configured to execute the feature information output by the target expert network corresponding to each of the multiple tasks to acquire multiple supervised prediction information corresponding to the multiple tasks.
[0049] The training module is configured to train the multi-task model based on the multiple prediction information, the multiple supervised prediction information, and the multi-task label information to obtain the target multi-task model.
[0050] In one possible implementation, the target expert network determination module includes:
[0051] The mapping configuration information acquisition unit is configured to acquire mapping configuration information between multiple tasks and the expert network;
[0052] The first target expert network determination unit is configured to determine the target expert network corresponding to each task from the plurality of expert networks based on the mapping configuration information.
[0053] In one possible implementation, the target expert network determination module further includes:
[0054] The first correspondence determination unit is configured to determine, based on the mapping configuration information, a first correspondence between the multiple tasks and the multiple expert networks;
[0055] The second correspondence determination unit is configured to determine the second correspondence between the sample data and the multiple expert networks based on the sample user attribute features and the sample multimedia attribute features.
[0056] The second target expert network determination unit is configured to determine the target expert network corresponding to each task based on the first correspondence and the second correspondence.
[0057] In one possible implementation, the second correspondence determination unit includes:
[0058] The random number generation subunit is configured to generate random numbers based on the sample user attribute features and the sample multimedia attribute features; the random numbers are a portion of the corresponding serial numbers of the plurality of expert networks;
[0059] The second correspondence determination subunit is configured to perform the determination of the second correspondence based on the random number.
[0060] In one possible implementation, the second target expert network determination unit includes:
[0061] The first target expert network determination subunit is configured to execute the first target expert network corresponding to each task based on the first correspondence.
[0062] The second target expert network determination subunit is configured to execute the second target expert network corresponding to the sample data based on the second correspondence.
[0063] The target expert network determination subunit is configured to execute the determination of the expert network in the first target expert network corresponding to each task that intersects with the second target expert network, as the target expert network corresponding to each task.
[0064] In one possible implementation, the second correspondence determination unit includes:
[0065] The second correspondence acquisition subunit is configured to input the sample user attribute features and the sample multimedia attribute features into the expert allocation unit, the expert allocation unit generates random numbers based on the sample user attribute features and the sample multimedia attribute features, and determines the second correspondence based on the random numbers;
[0066] The second target expert network determination unit includes:
[0067] The target expert network acquisition subunit is configured to input the first correspondence and the second correspondence into the plurality of supervisory gate networks. Each supervisory gate network determines a first target expert network corresponding to each task based on the first correspondence; determines a second target expert network corresponding to the sample data based on the second correspondence; and determines an expert network in which the first target expert network and the second target expert network corresponding to each task intersect, as the target expert network corresponding to each task.
[0068] In one possible implementation, the training module includes:
[0069] The first loss information determination unit is configured to determine first loss information based on the plurality of prediction information and the multi-task label information;
[0070] The second loss information determination unit is configured to determine second loss information based on the plurality of supervised prediction information and the multi-task label information;
[0071] The training unit is configured to train the multi-task model based on the first loss information and the second loss information to obtain the target multi-task model.
[0072] In one possible implementation, the first loss information includes multiple first sub-loss information corresponding to the multiple tasks, and the second loss information includes multiple second sub-loss information corresponding to the multiple tasks; the training unit includes:
[0073] The gate network training subunit is configured to train the corresponding gate network in the multi-task model based on each first sub-loss information to obtain the target gate network.
[0074] The first expert network acquisition subunit is configured to perform training of the target expert network corresponding to each second sub-loss information based on multiple first sub-loss information and each second sub-loss information, thereby obtaining the first expert network.
[0075] The non-target expert network acquisition subunit is configured to acquire the non-target expert networks other than the target expert network in the full expert network of the multi-task model.
[0076] The second expert network acquisition subunit is configured to perform training of the non-target expert network based on multiple first sub-loss information to obtain the second expert network.
[0077] The target multi-task model acquisition sub-unit is configured to execute the process of obtaining the target multi-task model based on the target gate network, the first expert network, and the second expert network.
[0078] According to a fourth aspect of the present disclosure, a multimedia resource recommendation apparatus is provided, comprising:
[0079] The recall module is configured to retrieve multimedia resources matching the target user.
[0080] The attribute information acquisition module is configured to acquire the target user attribute features of the target user and the multimedia attribute features corresponding to the recalled multimedia resources.
[0081] The prediction processing module is configured to input the target user attribute features and the multimedia attribute features into a target multi-task model, perform multi-task prediction processing, and obtain a multi-task prediction result; wherein the target multi-task model is obtained based on the multi-task model training device in the third aspect above.
[0082] The filtering module is configured to perform a filtering of target multimedia resources from the recalled multimedia resources based on the multi-task prediction results.
[0083] The recommendation module is configured to recommend the target multimedia resources to the target user.
[0084] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method as described in any one of the first aspects above and the method as described in the second aspect above.
[0085] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided such that, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform any of the methods described in the first aspect of the present disclosure and the methods described in the second aspect above.
[0086] According to a seventh aspect of the present disclosure, a computer program product is provided, including computer instructions that, when executed by a processor, cause a computer to perform the method described in any one of the first aspects of the present disclosure and the method described in the second aspect above.
[0087] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:
[0088] By identifying the target expert network for each task from multiple expert networks, and based on feature information and the target expert network for each task, multiple supervised prediction information corresponding to multiple tasks is obtained. This allows for the training of a multi-task model by combining multiple prediction information and supervised prediction information, thus achieving supervised constraints on the training of the multi-task model. This ensures that each expert network can learn the task, avoiding redundancy and ensuring balanced learning among the expert networks, thereby improving the overall learning ability of the multi-task model. Furthermore, the target multi-task model obtained based on this training method can improve recommendation accuracy in recommendation applications.
[0089] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0090] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0091] Figure 1 This is a schematic diagram illustrating an application environment according to an exemplary embodiment.
[0092] Figure 2 This is a flowchart illustrating a multi-task model training method according to an exemplary embodiment.
[0093] Figure 3 This is a schematic diagram illustrating a multitasking model according to an exemplary embodiment.
[0094] Figure 4This is a flowchart illustrating a method for training a multi-task model based on multiple prediction information, multiple supervised prediction information, and multi-task label information to obtain a target multi-task model, according to an exemplary embodiment.
[0095] Figure 5 This is a flowchart illustrating a method for determining the target expert network corresponding to each task from multiple expert networks, according to an exemplary embodiment.
[0096] Figure 6 This is a flowchart illustrating a method for determining the target expert network corresponding to each task from multiple expert networks, according to an exemplary embodiment.
[0097] Figure 7 This is a schematic diagram illustrating a model to be trained according to an exemplary embodiment.
[0098] Figure 8 This is a flowchart illustrating a method for determining the target expert network corresponding to each task from multiple expert networks, according to an exemplary embodiment.
[0099] Figure 9 This is a flowchart illustrating a multimedia resource recommendation method according to an exemplary embodiment.
[0100] Figure 10 This is a block diagram of a multi-task model training device according to an exemplary embodiment.
[0101] Figure 11 This is a block diagram illustrating a multimedia resource recommendation device according to an exemplary embodiment.
[0102] Figure 12 This is a block diagram illustrating an electronic device for multi-task model training or multimedia resource recommendation according to an exemplary embodiment. Detailed Implementation
[0103] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0104] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0105] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or computers-controlled machines to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. AI software technology mainly includes computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0106] In recent years, with the research and progress of artificial intelligence technology, it has been widely applied in many fields. The solutions provided in this disclosure involve technologies such as machine learning / deep learning and computer vision, which are specifically illustrated through the following embodiments:
[0107] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an application environment according to an exemplary embodiment, such as... Figure 1 As shown, the application environment may include server 01 and terminal 02.
[0108] In an optional embodiment, server 01 can be used for training a multi-task model. Specifically, server 01 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0109] In an optional embodiment, terminal 02 can use a target multi-task model trained by server 01 to recommend multimedia resources. Specifically, terminal 02 can be, but is not limited to, electronic devices such as smartphones, desktop computers, tablets, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, and smart wearable devices. Optionally, the operating system running on the electronic device can be, but is not limited to, Android, iOS, Linux, Windows, etc.
[0110] In addition, it should be noted that, Figure 1 The example shown is merely one application environment of the image processing method provided in this disclosure. Terminal 02 can also be used for training multi-task models, and server 01 can also be used for recommending multimedia resources.
[0111] In the embodiments described in this specification, the server 01 and the terminal 02 can be directly or indirectly connected through wired or wireless communication, and this application does not impose any restrictions on this.
[0112] It should be noted that the following diagram illustrates one possible sequence of steps, and it is not strictly required to follow this order. Some steps can be performed in parallel without interdependence. The user information (including but not limited to user device information, user personal information, user behavior information, etc.) and data (including but not limited to data used for display, training data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0113] Figure 2 This is a flowchart illustrating a multi-task model training method according to an exemplary embodiment. For example... Figure 2 As shown, the steps may include the following.
[0114] In step S201, sample data and corresponding multi-task label information are obtained. The sample data may include sample user attribute features and sample multimedia attribute features.
[0115] In the embodiments of this specification, the sample user attribute features can refer to the attribute features of the sample user, such as the sample user's identification features, activity level features, and age features. The sample multimedia attribute features can refer to the attribute features of the sample multimedia, such as the sample multimedia's identification features and content type, such as sports, film / television, or food. When the sample multimedia is a sample video, the sample multimedia attribute features can include the sample multimedia's identification features, the sample video's content type, and the sample video's length type. The length type can include long videos and short videos; this disclosure does not limit these. The sample user's activity level feature can characterize the sample user's activity level relative to the sample multimedia. For example, the number of times the sample user requests the sample multimedia within a preset time period can be used to characterize activity. A number greater than or equal to a preset number can characterize activity; a number less than a preset number can characterize inactivity.
[0116] In step S203, the sample user attribute features and sample multimedia attribute features are input into the multi-task model for multi-task learning to obtain multiple prediction information corresponding to multiple tasks and feature information output by multiple expert networks in the multi-task model.
[0117] In one example, the multi-task model can be an MMOE model, which may include multiple expert networks, multiple gate networks, and multiple tower networks corresponding to the gate networks. Each gate network and tower network corresponds to multiple tasks, such as liking, sharing, and playing for a preset duration. These tasks may also correspond to multiple task labels. The multiple expert networks can be multiple neural networks.
[0118] Taking two tasks as an example, such as Figure 3 As shown, the MMOE model may include multiple expert networks, gate network A, gate network B, and tower network A and tower network B. Optionally, the MMOE model may also include a low-level neural network and multiple fully connected layers, wherein the low-level neural network can connect to multiple fully connected layers, and these multiple fully connected layers can connect to multiple expert networks. Figure 3 The underlying neural network and multiple fully connected layers are not shown. Tower network A and tower network B can be connected to their respective output layers. Figure 3 It is not shown in the middle either.
[0119] When training a multi-task model, sample user attribute features and sample multimedia attribute features can be input into the multi-task model for multi-task learning. This yields multiple prediction information corresponding to multiple tasks, as well as feature information output by multiple expert networks in the multi-task model. The feature information output by multiple expert networks can refer to the feature information output separately by each expert network, i.e., multiple feature information. The prediction information corresponding to each task can refer to the prediction information for each specific task. For example, if task A is a "like" task, the prediction information for task A can be either "like" or "not like".
[0120] Each tower network can be connected to an output layer, and the output of each tower network can pass through the corresponding output layer, which can output prediction information. The output of each tower network can be the predicted probability for each task.
[0121] Taking gate network A as an example, the feature information of gate network A and the output of multiple expert networks can be fused using the following formula (1) (e.g., Figure 3 shown The result f A (x):
[0122]
[0123] Where N can be the number of expert networks; g A (x) can be a gate network A; g A (x) i It can be the weight of the i-th expert network in gate network A, and the sum of the weights of the N expert networks in gate network A can be 1; f i(x) can be the feature information output by the i-th expert network, where x can be the input of the i-th expert network.
[0124] Optionally, after obtaining f A After (x), f can be... A (x) Input the tower network A and pass through the corresponding output layer to obtain the prediction information corresponding to task A.
[0125] In step S205, the target expert network corresponding to each of the multiple tasks is determined from the multiple expert networks.
[0126] In practical applications, to constrain the training of MMOEs and ensure the balanced learning of multiple expert networks, a target expert network corresponding to each task can be determined from among the multiple expert networks. For example, the expert networks corresponding to the tasks can be pre-configured. Based on this correspondence, the target expert network for each task can be determined from among the multiple expert networks, so that each expert can learn the task.
[0127] In step S207, based on the feature information output by the target expert network corresponding to each of the multiple tasks, multiple supervised prediction information corresponding to the multiple tasks is obtained.
[0128] In the embodiments of this specification, the supervised prediction information corresponding to each task can be determined based on the feature information output by the target expert network corresponding to each task. For example, the sum of the feature information output by the target expert network corresponding to each task can be used as the supervised prediction information, or the weighted sum of the feature information output by the target expert network corresponding to each task can be used as the supervised prediction information. Alternatively, the feature information output by the target expert network corresponding to each task can be processed by referring to the processing method of each gate network and feature information in MMOE (the above formula (1)) to obtain the supervised prediction information corresponding to each of the multiple tasks. This disclosure does not limit this.
[0129] In step S209, a multi-task model is trained based on multiple prediction information, multiple supervised prediction information, and multi-task label information to obtain the target multi-task model.
[0130] In the embodiments of this specification, loss information can be determined based on multiple prediction information, multiple supervised prediction information, and multi-task label information. This loss information can then be used to train a multi-task model to obtain the target multi-task model. For example, gradient descent can be used to train the multi-task model to obtain the target multi-task model.
[0131] In one example, such as Figure 4 As shown, step S209 may include the following steps:
[0132] In step S401, the first loss information is determined based on multiple prediction information and multi-task label information;
[0133] In step S403, the second loss information is determined based on multiple supervised prediction information and multi-task label information;
[0134] In step S405, a multi-task model is trained based on the first loss information and the second loss information to obtain the target multi-task model.
[0135] In practical applications, the differences between multiple predicted information and multi-task label information can be used as the first loss information; the differences between multiple supervised predicted information and multi-task label information can be used as the second loss information; and a multi-task model can be trained based on the first and second loss information to obtain the target multi-task model. This disclosure does not limit this approach. For example, the first and second loss information can be used to train the multi-task model separately to obtain the target multi-task model. Training the multi-task model using two parts of loss information not only preserves the original MMOE training process but also adds supervised prediction information to supervise the MMOE training process. This allows the supervised prediction information to participate in training, ensuring that each expert network fully learns the task and making the prediction results of the trained target multi-task model more accurate.
[0136] Optionally, the parameters of the multi-task model can be acquired periodically to obtain the target multi-task model. For example, the parameters of the multi-task model in training can be acquired every 10 minutes to obtain the target multi-task model, so that the target multi-task model can adapt to real-time recommendation scenarios.
[0137] By identifying the target expert network for each task from multiple expert networks, and based on feature information and the target expert network for each task, multiple supervised prediction information corresponding to multiple tasks is obtained. This allows for the training of a multi-task model by combining multiple prediction information and supervised prediction information, thus achieving supervised constraints on the training of the multi-task model. This ensures that each expert network can learn the task, avoiding redundancy and ensuring balanced learning among the expert networks, thereby improving the overall learning ability of the multi-task model. Furthermore, the target multi-task model obtained based on this training method can improve recommendation accuracy in recommendation applications.
[0138] In one possible implementation, the first loss information may include multiple first sub-loss information corresponding to multiple tasks, and the second loss information may include multiple second sub-loss information corresponding to multiple tasks; accordingly, step S405 may include the following steps:
[0139] Based on the first sub-loss information, the corresponding gate network in the multi-task model is trained to obtain the target gate network;
[0140] Based on multiple first sub-loss information and each second sub-loss information, train the target expert network corresponding to each second sub-loss information to obtain the first expert network;
[0141] Obtain the non-target expert networks, excluding the target expert network, from the full expert network of the multi-task model;
[0142] Based on multiple first sub-loss information, a non-target expert network is trained to obtain a second expert network;
[0143] Based on the target gate network, the first expert network, and the second expert network, the target multi-task model is obtained.
[0144] In one example, say two tasks: Task A and Task B, such as Figure 3 As shown, based on the prediction information and multi-task label information corresponding to gate network A, the first sub-loss information S1 corresponding to task A can be obtained; similarly, the first sub-loss information S2 corresponding to task B can be obtained. Figure 7 As shown, based on the supervised prediction information and multi-task label information corresponding to the supervised gate network A', the second sub-loss information S3 corresponding to task A' can be obtained; similarly, the second sub-loss information S4 corresponding to task B' can be obtained. Therefore, gate network A can be trained using S1; gate network B can be trained using S2; assuming the full set of expert networks consists of expert networks 1-8, the target expert networks for task A are determined to be expert networks 2 and 4, and the target expert network for task B is expert network 6; the non-target expert networks are determined to be expert networks 1, 3, 5, and 7-8. Therefore, expert networks 1, 3, 5, and 7-8 can be trained using S1 and S2; expert networks 2 and 4 can be trained using S1, S2, and S3; and expert network 6 can be trained using S1, S2, and S4. By training different expert networks using different loss information, and since different loss information corresponds to different tasks, different expert networks can both learn the task and possess their own domain expertise.
[0145] Figure 5 This is a flowchart illustrating a method for determining the target expert network corresponding to each task from multiple expert networks, according to an exemplary embodiment. In one possible implementation, step S205 above may include the following steps:
[0146] In step S501, the mapping configuration information between multiple tasks and the expert network is obtained.
[0147] In practical applications, multiple tasks can be pre-set, along with mapping configuration information between the tasks and the expert network. This disclosure does not limit this, as long as each expert can learn the tasks, and the tasks learned by different experts are differentiated so that different experts can become proficient in different tasks.
[0148] As an example, assume there are 8 expert networks: Expert Network 1 to Expert Network 8, and multiple tasks are represented by two: Task A and Task B. The mapping configuration information between multiple tasks and expert networks can be pre-set as shown in Table 1 below:
[0149] Table 1
[0150] Expert Network Task Expert Network 1, Expert Network 2 Task A Expert Network 3 to Expert Network 6 Task A, Task B Expert Network 7, Expert Network 8 Task B
[0151] As shown in Table 1, by pre-setting the mapping configuration information between multiple tasks and expert networks, the tasks that the expert network is proficient in can be differentiated. The tasks corresponding to each expert network can be all or some of the tasks among multiple tasks. This differentiated setting can balance the learning domain of the expert network and improve the overall ability of the expert network.
[0152] In step S503, the target expert network corresponding to each task is determined from multiple expert networks based on the mapping configuration information.
[0153] In the embodiments of this specification, the target expert network corresponding to each task can be determined from multiple expert networks based on the mapping configuration information. For example, as shown in Table 1, the target expert networks corresponding to task A can be determined to be expert networks 1 to 6.
[0154] By configuring the mapping relationship between expert networks and tasks, it can be ensured that each expert network can learn the task, thereby improving the ability of the expert network. Furthermore, it allows different expert networks to learn different tasks, enabling each expert network to have its own strengths in specific tasks. This avoids the offset problem in MMOE training, allowing expert networks with their own strengths to make more accurate recommendations when making recommendations.
[0155] Figure 6 This is a flowchart illustrating a method for determining the target expert network corresponding to each task from multiple expert networks, according to an exemplary embodiment. In one possible implementation, after step S501, step S205 may further include the following steps:
[0156] In step S601, based on the mapping configuration information, the first correspondence between multiple tasks and the expert network is determined;
[0157] In step S603, a second correspondence between the sample data and the expert network is determined based on the sample user attribute characteristics and the sample multimedia attribute characteristics;
[0158] In step S605, the target expert network corresponding to each task is determined according to the first correspondence and the second correspondence.
[0159] In practical applications, to ensure that each expert network can learn at least one task and differentiate itself by its own domain of expertise (different sample data can represent different domains), the target expert network for each task can be determined by combining mapping configuration information and sample attribute information. Here, sample attribute information can refer to sample user attribute features and sample multimedia attribute features. Based on this, a first correspondence between multiple tasks and expert networks can be determined based on the mapping configuration information; and a second correspondence between sample data and expert networks can be determined based on the sample user attribute features and sample multimedia attribute features. In one example, random numbers can be generated based on the sample user attribute features and sample multimedia attribute features; and the second correspondence can be determined based on the random numbers. For example, a pre-set mapping relationship between random numbers and expert networks can be obtained, and the second correspondence can be determined based on this mapping relationship and the random numbers.
[0160] In one example, the random number can be a partial index from multiple expert network corresponding indices; however, this disclosure does not limit the method or function for generating the random number. Determining the corresponding expert network by generating random numbers ensures that sample data with the same user attribute features and multimedia attribute features can be learned by the same expert network. This not only guarantees the overall capability diversity of the expert networks but also ensures that each expert network has its own area of expertise.
[0161] Furthermore, in one possible implementation, step S605 above may include the following steps:
[0162] Based on the first correspondence, determine the first target expert network corresponding to each task;
[0163] Based on the second correspondence, determine the second target expert network corresponding to the sample data;
[0164] For each task, identify the expert network in the first target expert network that intersects with the second target expert network, and use it as the target expert network for each task.
[0165] In the embodiments of this specification, the first and second correspondences can be fused, and the expert network in the first target expert network corresponding to each task that intersects with the second target expert network can be used as the target expert network for each task. By fusing the first and second correspondences, not only is the configuration relationship between the expert network and the task reflected, but also the dynamic correspondence between each sample data and the expert network. This allows the target expert network for each task to be dynamic during training, enabling the expert network to fully learn the task and its areas of expertise. This makes the training of multi-task models more effective, and the resulting target multi-task model more accurate in prediction.
[0166] As an example, suppose there are 8 expert networks, numbered 1 to 8 (Expert Network 1 to Expert Network 8); and tasks include Task A and Task B. Based on the mapping configuration information, the first correspondence between multiple tasks and expert networks can be determined as follows: Task A corresponds to Expert Networks 1 to 4, and Task B corresponds to Expert Networks 5 to 8. Random numbers are generated based on the sample user attribute features and sample multimedia attribute features; these random numbers can be 2, 4, or 6. Therefore, the second correspondence between the sample data and expert networks is: the sample data corresponds to Expert Networks 2, 4, and 6. In an optional approach, the first and second correspondences can be determined using a mask, as shown below:
[0167] The second correspondence can be represented as “sample data: [0,1,0,1,0,1,0,0]”;
[0168] The first correspondence can include the following:
[0169] Task A can be represented by expert networks 1 to 4 as “Task A: [1,1,1,1,0,0,0,0]”;
[0170] Task B, corresponding to expert networks 5 to 8, can be represented as "Task B: [0,0,0,0,1,1,1,1]".
[0171] The brackets [] represent the status of 8 expert networks. A value of 1 indicates that an expert network has been selected, while a value of 0 indicates that an expert network has not been selected.
[0172] Based on the first correspondence: "Task A: [1,1,1,1,0,0,0,0]", "Task B: [0,0,0,0,1,1,1,1]", and the second correspondence: "Sample Data: [0,1,0,1,0,1,0,0]", the target expert network corresponding to each task can be determined for that sample data. For example, a logical AND operation can be performed on "Task A: [1,1,1,1,0,0,0,0]" and "Sample Data: [0,1,0,1,0,1,0,0]" to obtain the mask of the target expert network corresponding to Task A: [0,1,0,1,0,0,0,0], which is expert network 2 and expert network 4; based on the same processing method, the target expert network corresponding to Task B: [0,0,0,0,0,1,0,0], which is expert network 6.
[0173] By combining mapping configuration information and sample attribute information, the target expert network corresponding to each task is determined. This ensures that each expert network can fully learn the task, balancing the learning bias problem of expert networks in multi-task model training. It also allows different expert networks to have their own knowledge domains of expertise, resulting in a rich variety of knowledge domains among expert networks, thereby improving the recommendation accuracy of multi-task models.
[0174] Optionally, in practical applications, the acquisition of the aforementioned supervised prediction information can be performed using an expert allocation unit and multiple supervised gate networks. The number of these multiple supervised gate networks can be the same as the number of gate networks in an MMOE, and the multiple tasks corresponding to the multiple supervised gate networks can be the same as the multiple tasks corresponding to the multiple gate networks in an MMOE. Based on this, the model to be trained can include an MMOE, an expert allocation unit, and multiple supervised gate networks, such as... Figure 7 As shown. Based on Figure 7 The model to be trained shown, in one possible implementation, Figure 8 This is a flowchart illustrating a method for determining the target expert network corresponding to each task from multiple expert networks, according to an exemplary embodiment. Step S603 above may include the following steps:
[0175] In step S801, the sample user attribute features and sample multimedia attribute features are input into the expert allocation unit for task allocation processing to obtain the second correspondence. In practical applications, the expert allocation unit in step S801 can generate random numbers based on the sample user attribute features and sample multimedia attribute features, and determine the second correspondence based on the random numbers.
[0176] Accordingly, step S605 above may include the following steps:
[0177] In step S803, the first correspondence and the second correspondence are input into multiple supervisory gate networks. Each supervisory gate network determines the first target expert network corresponding to each task based on the first correspondence; and determines the second target expert network corresponding to the sample data based on the second correspondence; and determines the expert network that has an intersection between the first target expert network and the second target expert network corresponding to each task as the target expert network corresponding to each task.
[0178] The processing procedure for each supervisory gate network in step S803 above can be referred to the processing method in step S605 above, and will not be repeated here.
[0179] In one possible implementation, the expert allocation unit may also store mapping configuration information. Accordingly, the expert allocation unit can determine a first correspondence between multiple tasks and the expert network based on the mapping configuration information. The expert allocation unit may be an encoding network, and this disclosure does not limit its scope.
[0180] Optionally, such as Figure 7 As shown, the model to be trained may also include tower network A', tower network B', and corresponding output layers. The outputs of multiple supervisory gate networks can be fused with the feature information output by the expert network, for example... Figure 7 In For details, please refer to the above formula (1). The fusion result can be input into the corresponding tower network, such as tower network A' and tower network B'. Furthermore, the output of each tower network can be used as the input of the output layer to obtain supervised prediction information.
[0181] By setting up expert assignment units and multiple supervised gate networks to determine the target expert network for each task, training efficiency can be improved, and the recommendation accuracy of the target expert network can be enhanced.
[0182] In practical applications, the target multi-task model trained above can be used for multimedia resource recommendation. Figure 9 This is a flowchart illustrating a multimedia resource recommendation method according to an exemplary embodiment. For example... Figure 9 As shown, the multimedia resource recommendation method may include the following steps:
[0183] In step S901, the recall multimedia resources matched with the target user are obtained;
[0184] In step S903, the target user attribute features of the target user and the multimedia attribute features corresponding to the recalled multimedia resources are obtained.
[0185] In step S905, the target user attribute features and multimedia attribute features are input into the target multi-task model for multi-task prediction processing to obtain the multi-task prediction result.
[0186] In step S907, target multimedia resources are selected from the recalled multimedia resources based on the multi-task prediction results.
[0187] In step S909, target multimedia resources are recommended to the target user.
[0188] In practical applications, when recommending multimedia resources to target users, we can obtain recalled multimedia resources that match the target user's profile information. Furthermore, these recalled multimedia resources can be further filtered using a target multi-task model. For example, we can obtain the target user's attribute features and the corresponding multimedia attribute features of the recalled multimedia resources. These features can then be input into the target multi-task model for multi-task prediction processing, yielding prediction results, such as two tasks: liking and sharing. Multimedia resources predicted to be liking or sharing can be selected from the recalled resources and used as target multimedia resources. These target multimedia resources can then be recommended to the target user, for example, by sending them to the user's device for display.
[0189] The target multi-task model obtained through the above training method is used to recommend multimedia resources. Since each expert network in the target multi-task model has fully learned the task and has its own domain of expertise, it can balance the multimedia attribute features and user attribute features, thereby improving the accuracy of the target multimedia resources.
[0190] Figure 10 This is a block diagram illustrating a multi-task model training apparatus according to an exemplary embodiment. (Refer to...) Figure 10 The device may include:
[0191] The sample information acquisition module 1001 is configured to acquire sample data and corresponding multi-task label information. The sample data includes sample user attribute features and sample multimedia attribute features.
[0192] The multi-task learning module 1003 is configured to input sample user attribute features and sample multimedia attribute features into the multi-task model, perform multi-task learning, and obtain multiple prediction information corresponding to multiple tasks as well as feature information output by multiple expert networks in the multi-task model.
[0193] The target expert network determination module 1005 is configured to determine the target expert network corresponding to each of the multiple tasks from multiple expert networks;
[0194] The supervised prediction information acquisition module 1007 is configured to acquire multiple supervised prediction information corresponding to multiple tasks by executing feature information output by the target expert network corresponding to each of the multiple tasks.
[0195] Training module 1009 is configured to train a multi-task model based on multiple prediction information, multiple supervised prediction information, and multi-task label information to obtain the target multi-task model.
[0196] By identifying the target expert network for each task from multiple expert networks, and based on feature information and the target expert network for each task, multiple supervised prediction information corresponding to multiple tasks is obtained. This allows for the training of a multi-task model by combining multiple prediction information and supervised prediction information, thus achieving supervised constraints on the training of the multi-task model. This ensures that each expert network can learn the task, avoiding redundancy and ensuring balanced learning among the expert networks, thereby improving the overall learning ability of the multi-task model. Furthermore, the target multi-task model obtained based on this training method can improve recommendation accuracy in recommendation applications.
[0197] In one possible implementation, the target expert network determination module 1005 may include:
[0198] The mapping configuration information acquisition unit is configured to acquire mapping configuration information between multiple tasks and the expert network;
[0199] The first target expert network determination unit is configured to determine the target expert network corresponding to each task from multiple expert networks based on the mapping configuration information.
[0200] In one possible implementation, the target expert network determination module 1005 may further include:
[0201] The first correspondence determination unit is configured to perform the determination of the first correspondence between multiple tasks and multiple expert networks based on the mapping configuration information.
[0202] The second correspondence determination unit is configured to determine the second correspondence between sample data and multiple expert networks based on the sample user attribute features and sample multimedia attribute features.
[0203] The second target expert network determination unit is configured to determine the target expert network corresponding to each task based on the first correspondence and the second correspondence.
[0204] In one possible implementation, the second correspondence determination unit may include:
[0205] The random number generation subunit is configured to generate random numbers based on the sample user attribute features and sample multimedia attribute features; the random numbers are a subset of the corresponding numbers from multiple expert networks.
[0206] The second correspondence determination subunit is configured to perform the determination of the second correspondence based on a random number.
[0207] In one possible implementation, the second objective expert network determination unit includes:
[0208] The first target expert network determination subunit is configured to execute the first target expert network corresponding to each task based on the first correspondence.
[0209] The second target expert network determination subunit is configured to execute the second target expert network corresponding to the sample data based on the second correspondence.
[0210] The target expert network determination subunit is configured to execute the determination of the expert network in the first target expert network corresponding to each task that intersects with the second target expert network, as the target expert network corresponding to each task.
[0211] In one possible implementation, the second correspondence determination unit may include:
[0212] The second correspondence acquisition subunit is configured to input sample user attribute features and sample multimedia attribute features into an expert allocation unit, which generates random numbers based on the sample user attribute features and sample multimedia attribute features, and determines the second correspondence based on the random numbers.
[0213] The second objective expert network determination unit includes:
[0214] The target expert network acquisition subunit is configured to input a first correspondence and a second correspondence into multiple supervisory gate networks. Each supervisory gate network determines a first target expert network corresponding to each task based on the first correspondence; determines a second target expert network corresponding to the sample data based on the second correspondence; and determines an expert network in which the first target expert network and the second target expert network corresponding to each task intersect, which is then used as the target expert network corresponding to each task.
[0215] In one possible implementation, the training module 1009 may include:
[0216] The first loss information determination unit is configured to determine the first loss information based on multiple prediction information and multi-task label information;
[0217] The second loss information determination unit is configured to determine the second loss information based on multiple supervised prediction information and multi-task label information;
[0218] The training unit is configured to train a multi-task model based on the first loss information and the second loss information to obtain the target multi-task model.
[0219] In one possible implementation, the first loss information may include multiple first sub-loss information corresponding to multiple tasks, and the second loss information may include multiple second sub-loss information corresponding to multiple tasks; the training unit may include:
[0220] The gate network training subunit is configured to train the corresponding gate network in the multi-task model based on each first sub-loss information to obtain the target gate network.
[0221] The first expert network acquisition subunit is configured to perform training of the target expert network corresponding to each second sub-loss information based on multiple first sub-loss information and each second sub-loss information, thereby obtaining the first expert network.
[0222] The non-target expert network acquisition subunit is configured to execute the non-target expert network other than the target expert network in the full expert network of the acquisition multi-task model.
[0223] The second expert network acquisition subunit is configured to perform training of a non-target expert network based on multiple first sub-loss information to obtain the second expert network.
[0224] The target multi-task model acquisition sub-unit is configured to execute the target multi-task model based on the target gate network, the first expert network, and the second expert network.
[0225] Figure 11 This is a block diagram illustrating a multimedia resource recommendation device according to an exemplary embodiment. (Refer to...) Figure 11 The device may include:
[0226] The recall module 1101 is configured to retrieve multimedia resources matching the target user;
[0227] The attribute information acquisition module 1103 is configured to acquire the target user attribute features of the target user and recall the multimedia attribute features corresponding to the multimedia resources.
[0228] The prediction processing module 1105 is configured to input the target user attribute features and multimedia attribute features into the target multi-task model, perform multi-task prediction processing, and obtain multi-task prediction results; wherein, the target multi-task model is obtained based on the above-mentioned multi-task model training device.
[0229] The filtering module 1107 is configured to perform a filtering of target multimedia resources from the recalled multimedia resources based on the multi-task prediction results.
[0230] Recommendation module 1109 is configured to recommend target multimedia resources to target users.
[0231] The target multi-task model obtained through the above training device is used to recommend multimedia resources. Since each expert network in the target multi-task model has fully learned the task and has its own area of expertise, it can balance the multimedia attribute features and user attribute features, thereby improving the accuracy of the target multimedia resources.
[0232] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0233] Figure 12 This is a block diagram illustrating an electronic device for multi-task model training or multimedia resource recommendation according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as follows: Figure 12 As shown, the electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a method for multi-task model training or multimedia resource recommendation.
[0234] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the electronic device to which the present disclosure is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0235] In an exemplary embodiment, an electronic device is also provided, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement a multi-task model training method or a multimedia resource recommendation method as described in the embodiments of this disclosure.
[0236] In an exemplary embodiment, a computer-readable storage medium is also provided, which, when executed by a processor of an electronic device, enables the electronic device to perform the multi-task model training method or the multimedia resource recommendation method of the present disclosure embodiments. The computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0237] In an exemplary embodiment, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the methods for multi-task model training or multimedia resource recommendation as described in this disclosure.
[0238] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0239] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0240] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A multi-task model training method, characterized in that, include: Acquire sample data and corresponding multi-task label information, wherein the sample data includes sample user attribute features and sample multimedia attribute features; The sample multimedia attribute features are the attribute features of the sample multimedia. The sample user attribute features and the sample multimedia attribute features are input into a multi-task model for multi-task learning to obtain multiple prediction information corresponding to multiple tasks and feature information output by multiple expert networks in the multi-task model; the multiple tasks include tasks for recommending multimedia resources, such as liking, forwarding, and playing for a preset duration. From the multiple expert networks, determine the target expert network corresponding to each of the multiple tasks; Based on the feature information output by the target expert network corresponding to each of the multiple tasks, multiple supervised prediction information corresponding to the multiple tasks is obtained. The multi-task model is trained based on the multiple prediction information, the multiple supervised prediction information, and the multi-task label information to obtain a target multi-task model; the target multi-task model is used for multimedia resource recommendation.
2. The multi-task model training method according to claim 1, characterized in that, The step of determining the target expert network corresponding to each of the multiple tasks from the multiple expert networks includes: Obtain the mapping configuration information between the multiple tasks and the expert network; Based on the mapping configuration information, the target expert network corresponding to each task is determined from the plurality of expert networks.
3. The multi-task model training method according to claim 2, characterized in that, After the step of obtaining the mapping configuration information between the multiple tasks and the expert network, the method further includes: Based on the mapping configuration information, a first correspondence between multiple tasks and multiple expert networks is determined; Based on the sample user attribute features and the sample multimedia attribute features, a second correspondence between the sample data and the multiple expert networks is determined; Based on the first correspondence and the second correspondence, determine the target expert network corresponding to each task.
4. The multi-task model training method according to claim 3, characterized in that, The step of determining the second correspondence between the sample data and the multiple expert networks based on the sample user attribute features and the sample multimedia attribute features includes: Random numbers are generated based on the sample user attribute features and the sample multimedia attribute features; The second correspondence is determined based on the random number.
5. The multi-task model training method according to claim 4, characterized in that, The step of determining the target expert network corresponding to each task based on the first correspondence and the second correspondence includes: Based on the first correspondence, determine the first target expert network corresponding to each task; Based on the second correspondence, determine the second target expert network corresponding to the sample data; For each task, identify the expert network that intersects with the first target expert network and the second target expert network, and use that network as the target expert network for each task.
6. The multi-task model training method according to claim 3, characterized in that, The step of determining the second correspondence between the sample data and the multiple expert networks based on the sample user attribute features and the sample multimedia attribute features includes: The sample user attribute features and the sample multimedia attribute features are input into the expert allocation unit. The expert allocation unit generates random numbers based on the sample user attribute features and the sample multimedia attribute features, and determines the second correspondence based on the random numbers. The step of determining the target expert network corresponding to each task based on the first correspondence and the second correspondence includes: The first correspondence and the second correspondence are input into multiple supervisory gate networks. Each supervisory gate network determines the first target expert network corresponding to each task based on the first correspondence; and determines the second target expert network corresponding to the sample data based on the second correspondence; and determines the expert network that has an intersection between the first target expert network and the second target expert network corresponding to each task as the target expert network corresponding to each task.
7. The multi-task model training method according to claim 1, characterized in that, The step of training the multi-task model based on the multiple prediction information, the multiple supervised prediction information, and the multi-task label information to obtain the target multi-task model includes: Based on the multiple prediction information and the multi-task label information, the first loss information is determined; The second loss information is determined based on the multiple supervised prediction information and the multi-task label information; The multi-task model is trained based on the first loss information and the second loss information to obtain the target multi-task model.
8. The multi-task model training method according to claim 7, characterized in that, The first loss information includes multiple first sub-loss information corresponding to the multiple tasks, and the second loss information includes multiple second sub-loss information corresponding to the multiple tasks; The step of training the multi-task model based on the first loss information and the second loss information to obtain the target multi-task model includes: Based on the first sub-loss information, the corresponding gate network in the multi-task model is trained to obtain the target gate network; Based on multiple first sub-loss information and each second sub-loss information, train the target expert network corresponding to each second sub-loss information to obtain the first expert network; Obtain the non-target expert networks other than the target expert network from the full expert network of the multi-task model; Based on multiple first sub-loss information, the non-target expert network is trained to obtain the second expert network; The target multi-task model is obtained based on the target gate network, the first expert network, and the second expert network.
9. A multimedia resource recommendation method, characterized in that, include: Obtain multimedia resources that match the target user; Obtain the target user attribute features of the target user and the multimedia attribute features corresponding to the recalled multimedia resources; The target user attribute features and the multimedia attribute features are input into the target multi-task model, and multi-task prediction processing is performed to obtain the multi-task prediction result; wherein, the target multi-task model is obtained based on any one of the methods described in claims 1 to 8; Based on the multi-task prediction results, target multimedia resources are selected from the recalled multimedia resources; Recommend the target multimedia resources to the target user.
10. A multi-task model training device, characterized in that, include: The sample information acquisition module is configured to acquire sample data and corresponding multi-task tag information. The sample data includes sample user attribute features and sample multimedia attribute features; the sample multimedia attribute features are the attribute features of the sample multimedia. The multi-task learning module is configured to input the sample user attribute features and the sample multimedia attribute features into a multi-task model, perform multi-task learning, and obtain multiple prediction information corresponding to multiple tasks as well as feature information output by multiple expert networks in the multi-task model; the multiple tasks include tasks for recommending multimedia resources, such as liking, forwarding, and playing for a preset duration. The target expert network determination module is configured to determine the target expert network corresponding to each of the multiple tasks from the multiple expert networks. The supervised prediction information acquisition module is configured to execute the feature information output by the target expert network corresponding to each of the multiple tasks to acquire multiple supervised prediction information corresponding to the multiple tasks. The training module is configured to train the multi-task model based on the multiple prediction information, the multiple supervised prediction information, and the multi-task label information to obtain a target multi-task model; the target multi-task model is used for multimedia resource recommendation.
11. The multi-task model training apparatus according to claim 10, characterized in that, The target expert network determination module includes: The mapping configuration information acquisition unit is configured to acquire mapping configuration information between multiple tasks and the expert network; The first target expert network determination unit is configured to determine the target expert network corresponding to each task from the plurality of expert networks based on the mapping configuration information.
12. The multi-task model training apparatus according to claim 11, characterized in that, The target expert network determination module also includes: The first correspondence determination unit is configured to determine, based on the mapping configuration information, a first correspondence between the multiple tasks and the multiple expert networks; The second correspondence determination unit is configured to determine the second correspondence between the sample data and the multiple expert networks based on the sample user attribute features and the sample multimedia attribute features. The second target expert network determination unit is configured to determine the target expert network corresponding to each task based on the first correspondence and the second correspondence.
13. The multi-task model training device according to claim 12, characterized in that, The second correspondence determination unit includes: The random number generation subunit is configured to generate random numbers based on the sample user attribute features and the sample multimedia attribute features; the random numbers are a portion of the corresponding serial numbers of the plurality of expert networks; The second correspondence determination subunit is configured to perform the determination of the second correspondence based on the random number.
14. The multi-task model training apparatus according to claim 13, characterized in that, The second target expert network determination unit includes: The first target expert network determination subunit is configured to execute the first target expert network corresponding to each task based on the first correspondence. The second target expert network determination subunit is configured to execute the second target expert network corresponding to the sample data based on the second correspondence. The target expert network determination subunit is configured to execute the determination of the expert network in the first target expert network corresponding to each task that intersects with the second target expert network, as the target expert network corresponding to each task.
15. The multi-task model training device according to claim 12, characterized in that, The second correspondence determination unit includes: The second correspondence acquisition subunit is configured to input the sample user attribute features and the sample multimedia attribute features into the expert allocation unit, the expert allocation unit generates a random number based on the sample user attribute features and the sample multimedia attribute features, and determines the second correspondence based on the random number; The second target expert network determination unit includes: The target expert network acquisition subunit is configured to input the first correspondence and the second correspondence into multiple supervisory gate networks. Each supervisory gate network determines a first target expert network corresponding to each task based on the first correspondence; determines a second target expert network corresponding to the sample data based on the second correspondence; and determines an expert network that intersects with the first target expert network and the second target expert network corresponding to each task as the target expert network corresponding to each task.
16. The multi-task model training apparatus according to claim 10, characterized in that, The training module includes: The first loss information determination unit is configured to determine first loss information based on the plurality of prediction information and the multi-task label information; The second loss information determination unit is configured to determine second loss information based on the plurality of supervised prediction information and the multi-task label information; The training unit is configured to train the multi-task model based on the first loss information and the second loss information to obtain the target multi-task model.
17. The multi-task model training apparatus according to claim 16, characterized in that, The first loss information includes multiple first sub-loss information corresponding to the multiple tasks, and the second loss information includes multiple second sub-loss information corresponding to the multiple tasks; the training unit includes: The gate network training subunit is configured to train the corresponding gate network in the multi-task model based on each first sub-loss information to obtain the target gate network. The first expert network acquisition subunit is configured to perform training of the target expert network corresponding to each second sub-loss information based on multiple first sub-loss information and each second sub-loss information, thereby obtaining the first expert network. The non-target expert network acquisition subunit is configured to acquire the non-target expert networks other than the target expert network in the full expert network of the multi-task model. The second expert network acquisition subunit is configured to perform training of the non-target expert network based on multiple first sub-loss information to obtain the second expert network. The target multi-task model acquisition sub-unit is configured to execute the process of obtaining the target multi-task model based on the target gate network, the first expert network, and the second expert network.
18. A multimedia resource recommendation device, characterized in that, include: The recall module is configured to retrieve multimedia resources matching the target user. The attribute information acquisition module is configured to acquire the target user attribute features of the target user and the multimedia attribute features corresponding to the recalled multimedia resources. The prediction processing module is configured to input the target user attribute features and the multimedia attribute features into a target multi-task model, perform multi-task prediction processing, and obtain a multi-task prediction result; wherein the target multi-task model is obtained based on the multi-task model training device according to any one of claims 10 to 17. The filtering module is configured to perform a filtering of target multimedia resources from the recalled multimedia resources based on the multi-task prediction results. The recommendation module is configured to recommend the target multimedia resources to the target user.
19. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the multi-task model training method as described in any one of claims 1 to 8 or the multimedia resource recommendation method as described in claim 9.
20. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the multi-task model training method as claimed in any one of claims 1 to 8 or the multimedia resource recommendation method as claimed in claim 9.
21. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the multi-task model training method of any one of claims 1 to 8 or the multimedia resource recommendation method of claim 9.
Citation Information
Patent Citations
Method and device for constructing multi-task learning model, electronic equipment and storage medium
CN111723910A
Recommendation probability prediction method and device, electronic equipment and storage medium
CN112183818A