Multi-task processing and model training method and apparatus, medium, and device
By constructing a multi-layered multi-task processing model, and utilizing a combination of feature extraction networks and tower networks, along with gating networks and random silencing, the problem of insufficient generalization ability of multi-layered multi-task learning models is solved, achieving higher accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2021-08-11
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional multi-layer, multi-task learning models are deficient in generalization ability and accuracy, making it difficult to improve them effectively.
A multi-layered multi-task processing model is constructed, including multi-layered feature extraction networks and task-specific tower networks. Each feature extraction network contains multiple expert networks and gating networks that are shared by the tasks. The feature data of the expert networks are fused through the gating networks, and random silencing is used to improve the stability of the model.
It improves the model's generalization ability and the accuracy of processing results, and can distinguish task specificity and integrate task relevance in multiple related task scenarios, thereby enhancing the model's flexibility and stability.
Smart Images

Figure CN114282681B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, specifically to a method, apparatus, medium, and device for multi-task processing and model training. Background Technology
[0002] Artificial Intelligence (AI) is a comprehensive technology within computer science that studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities. AI technology is a multidisciplinary field, encompassing a wide range of areas, including natural language processing, machine learning, and deep learning. With technological advancements, AI will be applied in more fields and play an increasingly important role.
[0003] Multi-task learning is a machine learning approach that combines multiple related tasks based on shared representation data; it is also a type of transfer learning. Traditional multi-task learning models are mostly single-layer network structures, and the generalization ability and accuracy of multi-layer multi-task learning models still need improvement. Summary of the Invention
[0004] To improve the generalization ability and accuracy of multi-layer, multi-task learning models, this application provides a method, apparatus, medium, and device for multi-task processing and model training. The technical solution is as follows:
[0005] Firstly, this application provides a method for training a multi-task processing model, the method comprising:
[0006] An initial multi-task processing model is constructed for the target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task.
[0007] Obtain the training data corresponding to the target multi-task;
[0008] The training data is input into the multi-task processing model to train the expert network, the gating network, and the tower network in the multi-task processing model, thereby obtaining a multi-task processing model for processing the target multi-task.
[0009] Secondly, this application provides a multi-task processing method, the method comprising:
[0010] A multi-task processing model is constructed and trained for the target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task.
[0011] Obtain the data to be processed corresponding to the target multi-task, the data to be processed including user feature data and candidate object feature data;
[0012] The data to be processed is input into the multi-task processing model to obtain the processing results of each task;
[0013] The processing results of each task are merged to obtain a target processing result, which represents the degree of association between the user and the candidate object.
[0014] Thirdly, this application provides a training apparatus for a multi-task processing model, the apparatus comprising:
[0015] The model building module is used to build an initial multi-task processing model for the target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task.
[0016] The training data acquisition module is used to acquire the training data corresponding to the target multi-task;
[0017] The model training module is used to input the training data into the multi-task processing model, train the expert network, the gating network and the tower network in the multi-task processing model, and obtain a multi-task processing model for processing the target multi-task.
[0018] Fourthly, this application provides a multitasking processing apparatus, the apparatus comprising:
[0019] The model acquisition module is used to acquire a multi-task processing model constructed and trained for the target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task.
[0020] The data acquisition module is used to acquire the data to be processed corresponding to the target multi-task, wherein the data to be processed includes user feature data and candidate object feature data;
[0021] The processing module is used to input the data to be processed into the multi-task processing model to obtain the processing results of each task;
[0022] The fusion module is used to merge the processing results of each task to obtain a target processing result, which represents the degree of association between the user and the candidate object.
[0023] Fifthly, this application provides a computer-readable storage medium storing at least one instruction or at least one program, which is loaded and executed by a processor to implement a training method for a multi-task processing model as described in the first aspect or a multi-task processing method as described in the second aspect.
[0024] In a sixth aspect, this application provides a computer device comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the processor to implement a training method for a multi-task processing model as described in the first aspect or a multi-task processing method as described in the second aspect.
[0025] In a seventh aspect, this application provides a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a training method for a multi-tasking model as described in the first aspect or a multi-tasking method as described in the second aspect.
[0026] The multi-task processing and model training methods, apparatus, media, and equipment provided in this application have the following technical effects:
[0027] The solution provided in this application constructs a multi-layer multi-task processing model based on a single-layer multi-task learning model for the target multi-task. The multi-task processing model provided in this application includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. The feature extraction network is used to extract data features and share features, while the tower networks are used to meet the specific application requirements of each task. In each layer of the feature extraction network, multiple expert networks shared by various tasks and a gating network corresponding to each task are included. The gating network is used to fuse the feature data extracted by the expert networks. The expert network weights output by the gating networks corresponding to different tasks are different, resulting in differences in the feature fusion data of each task at that layer. The feature fusion data of each task are merged and used as the input to the next layer of the feature extraction network, sharing feature data as much as possible, until finally inputting to the tower network corresponding to each task to obtain the processing results of each task. That is, in the multi-task processing model provided in this application, for each task in the target task, the corresponding gating network is also multi-layered, with the same number of layers as the feature extraction network, and the initial input data is passed upwards for each layer of the gating network to calculate the expert network weights of the corresponding layer. In the scenario of processing multiple related tasks, it not only distinguishes the specificity of the tasks but also integrates the correlation between the tasks, which can effectively improve the generalization ability and accuracy of the processing results of the model. Furthermore, during the training phase, considering the large number of expert networks and the increased number of parameters to be trained, random silencing can be applied to the expert networks in each feature extraction layer. That is, in one round of training, only a subset of expert networks are trained. Through multiple rounds of iterative training, all expert networks in the model are trained, improving the model's stability and generalization ability. Moreover, different network frameworks can be used for the tower networks of each task, making the multi-task processing model flexible and adaptable.
[0028] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0029] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a schematic diagram of the implementation environment of a multi-task processing and model training method provided in an embodiment of this application;
[0031] Figure 2 This is a schematic diagram of the structure of a blockchain system provided in an embodiment of this application;
[0032] Figure 3 This is a flowchart illustrating a training method for a multi-task processing model provided in an embodiment of this application;
[0033] Figure 4 This is a schematic diagram of the network structure of an MMOE model provided in an embodiment of this application;
[0034] Figure 5 This is a schematic diagram of the network structure of a multi-task processing model provided in an embodiment of this application;
[0035] Figure 6 This is a schematic diagram of a process for training the expert network and the gating network in a multi-task processing model, provided in an embodiment of this application.
[0036] Figure 7 This is a schematic diagram of a process for obtaining feature output data of a target expert network according to an embodiment of this application;
[0037] Figure 8 This is a schematic diagram of a process for obtaining feature fusion data corresponding to each task, provided in an embodiment of this application.
[0038] Figure 9 This is a schematic diagram of a process for determining the output data of a target-level feature extraction network, provided in an embodiment of this application.
[0039] Figure 10 This is a flowchart illustrating a multitasking method provided in an embodiment of this application;
[0040] Figure 11 This is a schematic diagram of a training device for a multi-task processing model provided in an embodiment of this application;
[0041] Figure 12 This is a schematic diagram of a multitasking device provided in an embodiment of this application;
[0042] Figure 13 This is a schematic diagram of the hardware structure of an operating terminal provided in an embodiment of this application;
[0043] Figure 14 This is a schematic diagram of the hardware structure of a server provided in an embodiment of this application. Detailed Implementation
[0044] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making capabilities. AI technology is a comprehensive discipline involving a wide range of fields, encompassing both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics.
[0045] The solutions provided in this application involve technologies such as deep learning (DL) in artificial intelligence.
[0046] Deep learning (DL) is a major research direction in the field of machine learning (ML), bringing it closer to its original goal—artificial intelligence. Deep learning learns the inherent patterns and hierarchical representations of sample data; the information gained during this learning process greatly aids in interpreting data such as text, images, and sound. Its ultimate goal is to enable machines to possess analytical and learning capabilities like humans, capable of recognizing data such as text, images, and sound. Deep learning is a complex machine learning algorithm that has achieved results in speech and image recognition far exceeding previous related technologies. Deep learning has yielded significant achievements in search technology, data mining, machine learning, machine translation, natural language processing, multimedia learning, speech recognition, recommendation and personalization technologies, and other related fields. Deep learning enables machines to mimic human activities such as sight, hearing, and thought, solving many complex pattern recognition problems and significantly advancing artificial intelligence-related technologies.
[0047] The solutions provided in this application can be deployed in the cloud, and also involve cloud technologies.
[0048] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. It can also be understood as a general term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies based on cloud computing business models. These technologies can form resource pools, allowing for on-demand use and flexibility. Backend services of cloud computing systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data require robust system support; therefore, cloud technology relies on cloud computing as its foundation. Cloud computing is a computing model that distributes computing tasks across a resource pool composed of numerous computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" are infinitely scalable, readily available, and can be used on demand, expanded at any time, and paid for based on usage. As a provider of fundamental cloud computing capabilities, a cloud resource pool platform, often referred to as a cloud platform or Infrastructure as a Service (IaaS), is established. This platform deploys various types of virtual resources within the resource pool for external customers to choose from. The cloud resource pool primarily includes: computing devices (which can be virtualized machines containing operating systems), storage devices, and network devices.
[0049] To improve the generalization ability and accuracy of multi-task processing models, embodiments of this application provide multi-task processing and model training methods, apparatuses, media, and devices. The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.
[0050] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application 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 application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0051] To facilitate understanding of the technical solutions and their effects described in the embodiments of this application, the relevant technical terms are explained in the embodiments of this application:
[0052] Multi-task learning (MTL) is a promising area in machine learning. It's a machine learning approach that combines multiple related tasks based on shared representation data, and it's also a type of transfer learning. This learning method allows different tasks to learn information related to a specific domain, and then shares this domain information within the model. Through mutual learning and sharing among multiple tasks, it aims to improve the generalization ability and overall performance of the model.
[0053] Embedding: Embedding representation is a way to transform discrete variables into continuous variables. It is usually used to transform high-dimensional sparse feature variables into low-dimensional dense feature variables without losing data information, in order to find the most suitable representation and to explore their intrinsic relationships.
[0054] Gated networks: In multi-task learning, gated networks are used to control the weights of the expert network's output. This method selects and controls the expert network in a multi-task model by using the output weights.
[0055] Expert Networks: Based on the same representation input, different network structures and parameters are used to form expert networks for different tasks.
[0056] CVR Model: CVR (Conversion Rate) is a metric for measuring advertising effectiveness. Simply put, it is the conversion rate from a user clicking on an ad to becoming an active, registered, or even paying user. The CVR model is used to estimate the probability that a user will purchase a product after seeing it and clicking on the product details page. It is a conditional probability model based on the probability of a user purchasing after exposure and clicking.
[0057] CTR Model: CTR (Click-Through-Rate) is a common term in internet advertising, referring to the click-through rate of online ads (image ads, text ads, keyword ads, ranking ads, video ads, etc.). It is calculated by dividing the actual number of clicks (strictly speaking, the number of visits to the target page) by the number of ad impressions. The CTR model is used to predict the probability of a user clicking on a specific page or product.
[0058] MMOE (Multi-gate Mixture-of-Experts) model is a multi-task learning model that aims to learn how to balance task-specific objectives and inter-task relationships from data. All tasks share a sub-model of the Mixture-of-Experts (MoE) structure to adapt to multi-task learning, while also possessing a trainable gating network to optimize for each task.
[0059] Seesaw effect: In multi-task learning, the loss magnitudes of different tasks may be different. If a certain loss is too large, the model will tend to learn the task with that loss and reduce the learning of the weights of other tasks, resulting in some tasks being overfitted and some tasks being underfitted.
[0060] Dropout is a regularization technique used in deep learning environments. It works by randomly selecting some neurons in a neural layer and temporarily hiding them during each iteration, before the neural network is trained and optimized. In the next iteration, other neurons are hidden, and this process continues until training is complete. This effectively improves the stability and generalization ability of the entire neural network framework. In practical applications, setting dropout to 0.5 means that the neuron has a 50% probability of being silenced.
[0061] Please see Figure 1 This is a schematic diagram illustrating a training method for a multi-task processing model and an implementation environment for a multi-task processing method provided in an embodiment of this application, as shown below. Figure 1 As shown, the implementation environment may include at least client 01 and server 02.
[0062] Specifically, the client 01 may include devices such as smartphones, desktop computers, tablets, laptops, digital assistants, smart wearable devices, monitoring devices, and voice interaction devices. It may also include software running on the device, such as web pages provided to users by service providers, or applications provided by those service providers. Specifically, the client 01 can be used to collect training data or data to be processed, such as basic user characteristic information and user behavior sequence data.
[0063] Specifically, the server 02 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing 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. The server 02 may include network communication units, processors, and memory, etc. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. Specifically, the server 02 can be used to construct and train a multi-task processing model for a target multi-task, the multi-task processing model including a multi-layered feature extraction network and a tower network corresponding to each task in the target multi-task; each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task. The server 02 can also be used to obtain the processing result of the target multi-task by inputting data including user feature data and item feature data, the processing result representing the association between the user and the item. Furthermore, the system recommends items that are highly relevant to the user, which can be internet application content such as short videos, articles, promotional activities, and text messages.
[0064] This application embodiment can also be implemented using cloud technology. Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. It can also be understood as a general term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies based on cloud computing business models. Cloud technology requires cloud computing as its support. Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." Specifically, the server 02 and the database are located in the cloud. The server 02 can be a physical machine or a virtualized machine.
[0065] In one embodiment of this application, the training method for the multitasking processor model can be implemented based on a distributed blockchain system. Figure 2 This is a schematic diagram of the structure of a blockchain system provided in an embodiment of this application. For example... Figure 2 As shown, the server can be a node 200 in the distributed system 100, which can be a blockchain system. The blockchain system can be a distributed system formed by multiple nodes connected through network communication. The nodes can form a peer-to-peer (P2P) network. Any form of computer device, such as a server, client 300, or other electronic device, can become a node in the blockchain system by joining the peer-to-peer network. The blockchain includes a series of blocks that are sequentially generated according to their time sequence. Once a new block is added to the blockchain, it will not be removed. The blocks record the data submitted by the nodes in the blockchain system.
[0066] Blockchain is an emerging application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, it's a decentralized database, a chain of data blocks linked using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer. The blockchain underlying platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. The user management module is responsible for managing the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user real identities and blockchain addresses (access management). Under authorization, it also monitors and audits transactions of certain real identities and provides risk control rule configuration (risk control audit). The basic service module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic service first performs interface adaptation parsing and authentication (interface adaptation), and then encrypts the business information through a consensus algorithm (consensus management). The blockchain process involves several layers of data transmission and processing. The first layer, the blockchain service layer, provides basic capabilities and implementation frameworks for typical applications. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). The second layer provides blockchain-based application services for business stakeholders. The third layer provides application services based on blockchain solutions for use by business participants.
[0067] The following describes a training method for a multi-task processing model provided in this application. Figure 3 This is a flowchart illustrating a training method for a multi-task processing model provided in an embodiment of this application. This application provides the operational steps described in the embodiments or flowchart, but based on conventional or non-inventive methods, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Please refer to... Figure 3The training method for a multi-task processing model provided in this application embodiment may include the following steps:
[0068] S210: Construct an initial multi-task processing model for the target multi-task, the multi-task processing model including a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task; each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task.
[0069] Multi-task learning based on neural networks has been widely applied in fields such as recommender systems, computer vision, natural language processing, and reinforcement learning. Multi-task learning is a machine learning method that learns multiple related tasks together based on shared representations. In multi-task learning (also referred to as multi-task processing in this application), multiple related tasks are often learned together. For example, in an advertising recommendation system, the ranking task is the main task, which may include click-through rate ranking and conversion rate ranking tasks, while simultaneously predicting the click-through rate and user conversion rate of candidate ads. Compared to single-task learning, multi-task learning allows multiple related tasks to share a single model, reducing memory usage and increasing inference speed. Multiple related tasks complement each other by sharing information, improving the model's generalization performance. In the embodiments of this application, the tasks in the target multi-task are related, and each task can improve the learning effect of the main target multi-task. Within the processing model of the main task, individual tasks can also achieve better performance. In the embodiments of this application, each task can be considered a sub-task of the target multi-task.
[0070] It is understood that the multi-task processing model provided in this application is based on the MMOE model, with multiple layers of expert networks and multiple layers of gating networks for each task superimposed. Figure 4 The network structure of the MMOE model is shown, such as Figure 4 As shown, the MMOE model stacks multiple expert networks on top of a shared underlying network, enabling different sub-tasks to extract the powerful features required for those sub-tasks. This approach uses a separate gating network for each task, and the gating network for each sub-task selectively utilizes the expert networks by varying the final output weights. Different sub-task gating networks can learn different patterns of combined expert networks. However, the MMOE model only considers single-layer expert networks and does not account for models with multiple layers of expert gating networks.
[0071] In one embodiment of this application, Figure 5 This application illustrates a multi-task processing model provided by an embodiment of the present application, such as... Figure 5 As shown, a multi-layered multi-task processing model is constructed for the target multi-task. The multi-task processing model provided in this application includes a multi-layered feature extraction network and tower networks corresponding to each task in the target multi-task. The feature extraction network is used to extract data features, and the tower networks are used to meet the specific application requirements of each task, such as classification or prediction. In each layer of the feature extraction network, there are multiple expert networks shared by all tasks and a gating network corresponding to each task. The expert networks and gating networks can be neural networks. It is also understood that in the multi-task processing model provided in this application, for each task in the target task, the corresponding gating network is also multi-layered, with the same number of layers as the feature extraction network and the same number of layers as the expert networks. Different network frameworks can be used for the tower networks of each task, making the multi-task processing model flexible and adaptable. For example, task A can use a common multi-layered neural network, task B can use DeepFM (Deep Factorization Machines), and task C can use DCN (Deep & Cross Network). Figure 5 The diagram only shows the multi-layer gating networks for tasks A and B, not the multi-layer gating network for task C. The position of the multi-layer gating network for task C in the multi-task processing model is analogous to that of tasks A and B, and will not be elaborated further.
[0072] S230: Obtain the training data corresponding to the target multi-task.
[0073] In this embodiment, the training data is directly input into the multi-task processing model. Before being input into the first-level feature extraction network of the multi-task processing model, the training data may also be initial feature data that has undergone embedding representation processing. For example... Figure 5 As shown, if the initial data is high-dimensional and sparse, the sparse data can be input into the sparse feature module for embedding representation processing to reduce the dimensionality of the data and provide it to the multi-task processing model for standardized reading.
[0074] For example, in a recommendation system, the training data may include user basic feature sequence data, user click behavior sequence data, user purchase behavior sequence data, user comment behavior sequence data, feature data of products viewed by users, feature data of short videos watched by users, etc.
[0075] S250: Input the training data into the multi-task processing model, and train the expert network, the gating network and the tower network in the multi-task processing model to obtain a multi-task processing model for processing the target multi-task.
[0076] In this embodiment, the constructed multi-task processing model implements a multi-layered feature extraction network (which can also be considered a multi-layered expert network), enabling true deep learning. Each layer of the feature extraction network includes multiple expert networks shared by various tasks and a gating network corresponding to each task. The gating network fuses the feature data extracted by the expert networks, allowing the extracted features to be customized for different tasks, thus improving the flexibility and accuracy of multi-task processing. The expert network weights determined by the gating networks for different tasks are different, resulting in differences in the feature fusion data obtained for each task at that level. The feature fusion data of each task is merged and used as input to the next layer of the feature extraction network, maximizing feature data sharing until finally inputting to the tower network corresponding to each task to obtain the processing results for each task. That is, in the multi-task processing model provided in this application, for each task in the target task, the corresponding gating network is also multi-layered, with the same number of layers as the feature extraction network, and it passes the initial input data upwards for each layer's gating network to calculate the corresponding expert network weights. In scenarios involving multiple related tasks, this approach distinguishes between the specificities of each task and integrates the correlations between them, effectively improving the model's generalization ability and the accuracy of the processing results.
[0077] It should be noted that, in the embodiments of this application, the feature extraction network includes two types of networks: expert networks and gated networks, rather than corresponding to a specific network model. The concept of layers is for descriptive purposes only.
[0078] In one embodiment of this application, when the target-level feature extraction network is a first-level feature extraction network, that is, the preceding network node is the input node of the multi-task processing model, the first-level feature extraction network includes two parts: one is multiple expert networks (expert net v1) shared by each task, and the other is the first-level gating network for each task, such as... Figure 5 As shown, for tasks A and B, there are gated networks GateA1 and GateB1 in the first-level feature extraction network, and multiple expert networks in expert net v1, which are shared by all tasks in the target multitasking.
[0079] Taking a target multi-task model containing task A and task B as an example, firstly, multiple expert networks in GateA1, GateB1, and expert netv1 respectively receive the outputs of the input nodes of the multi-task processing model, that is, the training data.
[0080] Secondly, GateA1 determines a set of expert network weights for task A in the first layer based on the training data, and GateB1 determines a set of expert network weights for task B in the first layer based on the training data. Although multiple expert networks share the same representation input, they employ different network structures and parameters. Therefore, the expert network weights can reflect the attention different tasks pay to different expert networks in this layer. Simultaneously, multiple expert networks in the first layer extract features from the training data, obtaining the feature output data of each expert network. Furthermore, as the number of model layers increases, a large number of expert networks during training can affect the model's stability, and parameter calculations also incur significant overhead. Therefore, a Dropout mechanism can be employed, such as... Figure 5 As shown, in one round of training, a portion of the expert networks in each layer are silenced (the gray pattern represents the silenced expert networks), and they do not participate in the training process of that round. This prevents gradient vanishing and overfitting during model training, improving the model's stability and generalization ability. For different tasks, the silenced expert networks at the same level are the same. In subsequent rounds of training, other portions of the expert networks are selected for silencing. After multiple rounds of training, training is completed for all expert networks at that level.
[0081] Then, based on a set of expert network weights determined by GateA1 and the feature output data of each expert network in the first layer, the feature fusion data of Task A in the first layer feature extraction network is obtained. Correspondingly, Task B also has its own feature fusion data in the first layer feature extraction network.
[0082] Next, based on the feature fusion data of Task A and Task B in the first-layer feature extraction network, the output data of the first-layer feature extraction network is determined, and this output data is then input into the expert networks in the second-layer feature extraction network for further feature extraction. Furthermore, GateA1 and GateB1 pass the training data up to GateA2 and GateB2, respectively, to calculate the weight values of a set of expert networks in the second layer for Task A and Task B, respectively.
[0083] In one embodiment of this application, when the target-level feature extraction network is an intermediate-level feature extraction network, that is, when the preceding network node and the following network node form a single-layer feature extraction network, specifically, as follows: Figure 6 As shown, inputting the training data into the multi-task processing model to train the expert network and the gating network in the multi-task processing model may include the following steps:
[0084] S251: During the training of the target-level feature extraction network, the output data of the previous-level feature extraction network is received.
[0085] It is understandable that the output data of the previous layer feature extraction network is also the result of the interaction between the feature output data of the previous layer expert network and the previous layer gating network corresponding to each task.
[0086] S252: Based on the target expert network of the target-level feature extraction network, feature extraction is performed on the output data of the previous level feature extraction network to obtain the feature output data of the target expert network.
[0087] It is understood that the target expert network may be all or part of multiple expert networks in the target hierarchical feature extraction network, which participate in this round of training.
[0088] In one embodiment of this application, specifically, as Figure 7 As shown, step S252 may include the following steps:
[0089] S2521: During the training process of the target round, a target expert network is randomly selected from multiple expert networks of the target hierarchical feature extraction network.
[0090] S2523: Input the output data of the previous layer feature extraction network into the target expert network to extract features from the output data of the previous layer feature extraction network.
[0091] This is equivalent to performing a preset operation on the expert networks other than the target expert network among the multiple expert networks of the target-level feature extraction network, so that the other expert networks do not participate in the training process of the target round.
[0092] For different tasks, the expert networks at the same level that perform the preset operation (also referred to as implementing silencing processing in this embodiment) are the same. In subsequent training rounds, other expert networks will be selected to implement silencing processing. After multiple rounds of training, training of all expert networks at this level will be completed.
[0093] In the above embodiments, dropout is used to silence part of the expert network to prevent gradient vanishing and overfitting during model training as the number of expert networks and network layers increases, thereby improving the stability and generalization ability of the model.
[0094] S253: Based on the target gating network corresponding to each task in the target hierarchical feature extraction network, the feature output data of the target expert network is fused to obtain the feature fusion data corresponding to each task.
[0095] In this embodiment, the gating network is used to fuse the feature data extracted by the expert network, so that the features extracted by the expert network can be customized for different tasks, thereby improving the flexibility and accuracy of multi-task processing. The expert network weights determined by the gating network for different tasks are different, and the feature fusion data of each task at this level are therefore different, which can improve the accuracy of each task processing.
[0096] In one embodiment of this application, specifically, as Figure 8 As shown, step S253 may include the following steps:
[0097] S2531: Receive the training data output by the gating network corresponding to each task in the previous layer feature extraction network.
[0098] It is understood that in the multi-task processing model provided in the embodiments of this application, training data is passed up between the multi-layer gating networks corresponding to each task to determine the weight values of the expert network at each level.
[0099] S2533: Based on the target gating network corresponding to each task in the target-level feature extraction network, determine the expert network weights corresponding to each task according to the training data.
[0100] It is understandable that the expert network weight values can reflect the attention different tasks pay to different expert networks in that layer.
[0101] S2535: Based on the expert network weights corresponding to each task and the feature output data of the target expert network, obtain the feature fusion data corresponding to each task.
[0102] For example, based on the expert network weights corresponding to each task, the feature output data of the target expert network are weighted and summed to obtain the feature fusion data corresponding to each task.
[0103] S254: Determine the output data of the target-level feature extraction network based on the feature fusion data corresponding to each task.
[0104] In one embodiment of this application, specifically, as Figure 9 As shown, step S254 may include the following steps:
[0105] S2541: Merge the feature fusion data corresponding to each task to obtain the output data of the target-level feature extraction network.
[0106] For example, the feature fusion data corresponding to each task are horizontally merged in the form of vectors to obtain the output data of the target-level feature extraction network.
[0107] S2543: Input the output data of the target-level feature extraction network into multiple expert networks in the next-level feature extraction network.
[0108] Furthermore, the target gating network corresponding to each task in the target-level feature extraction network transmits training data to the gating network corresponding to each task in the next level of feature extraction network.
[0109] The above embodiments demonstrate the output and input relationships between multiple feature extraction networks in a multi-task processing model, as well as the extraction and fusion of data features in each feature extraction network. This achieves true deep learning and effectively improves the accuracy and generalization ability of the target multi-task processing.
[0110] S255: Input the output data of the target-level feature extraction network into the next-level feature extraction network.
[0111] In one embodiment of this application, when the target-level feature extraction network is the last-level feature extraction network, that is, when the last network node is the tower network corresponding to each task, the feature fusion data corresponding to each task is input to the tower network corresponding to each task to train the tower network. Figure 5 As shown, based on the set of expert network weights at the nth level determined by GateAn and the feature output data of the target expert network output by expert net vn, the final feature fusion data corresponding to task A is determined, input into TowerA, and finally the training processing result OutputA for task A is obtained.
[0112] In one embodiment of this application, the tower network corresponding to each task can adopt a "hidden layer output + MIP (Multi-layer Perceptron)" framework to achieve a pluggable model framework. Specifically, after the multi-layer feature extraction network, models such as MLP, DCN, or DeepFM are superimposed. During the training phase, the optimal task tower network framework can be found through continuous trials, increasing the flexibility of the model. Building a suitable model for each task by superimposing tower networks at the output end can improve the accuracy of a single task while integrating multiple tasks, thus enhancing the flexibility of the entire model framework.
[0113] In one feasible implementation, for model training, the training objective under the traditional multi-task model framework is adopted, that is, the losses of each task are directly added together to obtain the overall loss data. The model's loss function can be as follows:
[0114]
[0115] In other words, the overall loss of the model is mainly composed of the sum of the losses of each task.
[0116] In another feasible implementation, the loss data of each task also corresponds to a weight, and the overall loss data is the result of a weighted sum of the loss data of each task.
[0117] The following describes a multitasking method provided in this application. Figure 10 This is a flowchart illustrating a multitasking method provided in an embodiment of this application. This application provides the operational steps of the method described in the embodiments or flowchart, but based on conventional or non-inventive methods, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the method can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiments or accompanying drawings. Please refer to... Figure 10 The multitasking method provided in this application embodiment may include the following steps:
[0118] S310: Obtain a multi-task processing model constructed and trained for the target multi-task, the multi-task processing model including a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task; each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task.
[0119] It is understood that in the multi-task processing method provided in the embodiments of this application, the multi-task processing model used is the multi-task processing model constructed and trained for the target multi-task in the above embodiments. The model structure can be referred to the above embodiments, and will not be repeated here.
[0120] S330: Obtain the data to be processed corresponding to the target multi-task, the data to be processed including user feature data and candidate object feature data.
[0121] For example, the data to be processed may include user basic feature sequence data, user behavior sequence data, feature data of candidate objects, and user historical feedback data of candidate objects (such as number of likes, number of comments, number of reposts, viewing time, conversion rate, etc.). The candidate objects may be products, short videos, articles, promotional text messages, activities, etc. to be recommended to users.
[0122] S350: Input the data to be processed into the multi-task processing model to obtain the processing results of each task.
[0123] It is understood that in the multi-task processing method provided in the embodiments of this application, the data processing process can also refer to the training method of the multi-task processing model provided in the above embodiments. However, the difference is that in the actual application of the model, multiple expert networks in each level of feature extraction network participate and are shared by each task. That is, the Dropout mechanism is only applicable to the model training stage.
[0124] S370: The processing results of each task are merged to obtain a target processing result, which represents the degree of association between the user and the candidate object.
[0125] For example, in a multi-objective behavior prediction scenario, the degree of association can be the predicted probability of a user performing multiple target behaviors on a candidate object, or a fusion of the aforementioned probabilities. Based on the probability of a user performing multiple target behaviors on a candidate object, or the fusion of the aforementioned probabilities, the candidate objects or users are ranked, and the top-ranked candidate objects are recommended to the user, or the top-ranked users are promoted as the audience of the candidate objects. For example, in the short video recommendation application scenario, the model uses a series of feature systems such as the user's basic characteristics and user behavior characteristics to recommend short videos with multiple objectives such as high likes, high comments, and high shares to users, so as to improve the user's retention time in short videos, accurately recommend short videos that users like and have long retention time, and improve further user conversion. For example, in SMS promotion, it is necessary to use accurate user identification, not only to improve the user's click-through rate on SMS products, but also to improve the user's conversion and willingness to pay. In the case of multiple tasks, excellent multi-task learning can also play an effective role in improving the application of SMS scenarios.
[0126] This application embodiment also provides a training device 1100 for a multi-task processing model, such as... Figure 11 As shown, the device 1100 may include:
[0127] The model building module 1110 is used to build an initial multi-task processing model for the target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task.
[0128] The training data acquisition module 1120 is used to acquire the training data corresponding to the target multi-task;
[0129] The model training module 1130 is used to input the training data into the multi-task processing model, train the expert network, the gating network and the tower network in the multi-task processing model, and obtain a multi-task processing model for processing the target multi-task.
[0130] In one embodiment of this application, the model training module 1130 may include:
[0131] The data receiving unit is used to receive the output data of the previous layer feature extraction network during the training process of the target layer feature extraction network.
[0132] The feature extraction unit is used to extract features from the output data of the previous level feature extraction network based on the target expert network of the target level feature extraction network, so as to obtain the feature output data of the target expert network.
[0133] The fusion unit is used to fuse the feature output data of the target expert network based on the target gating network corresponding to each task in the target hierarchical feature extraction network to obtain feature fusion data corresponding to each task.
[0134] The hierarchical output determination unit is used to determine the output data of the target hierarchical feature extraction network based on the feature fusion data corresponding to each of the tasks.
[0135] The output unit is used to input the output data of the target-level feature extraction network into the next-level feature extraction network.
[0136] In one embodiment of this application, the feature extraction unit may include:
[0137] Extraction sub-units are used to randomly extract the target expert network from multiple expert networks of the target-level feature extraction network during the training process of the target round;
[0138] The feature extraction subunit is used to input the output data of the previous layer feature extraction network into the target expert network to extract features from the output data of the previous layer feature extraction network.
[0139] In one embodiment of this application, the fusion unit may include:
[0140] A receiving subunit is used to receive the training data output by the gating network corresponding to each task in the previous layer feature extraction network;
[0141] The weight calculation subunit is used to determine the expert network weights corresponding to each task based on the target gating network corresponding to each task in the target-level feature extraction network and according to the training data.
[0142] The fusion subunit is used to obtain feature fusion data corresponding to each task based on the expert network weights corresponding to each task and the feature output data of the target expert network.
[0143] In one embodiment of this application, the hierarchical output determination unit may include:
[0144] The merging subunit is used to merge the feature fusion data corresponding to each of the tasks to obtain the output data of the target-level feature extraction network;
[0145] The output subunit is used to input the output data of the target-level feature extraction network into multiple expert networks in the next-level feature extraction network.
[0146] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0147] This application also provides a multitasking processing device 1200, such as... Figure 12 As shown, the device 1200 may include:
[0148] The model acquisition module 1210 is used to acquire a multi-task processing model constructed and trained for the target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task.
[0149] The data acquisition module 1220 is used to acquire the data to be processed corresponding to the target multi-task, wherein the data to be processed includes user feature data and feature data of candidate objects;
[0150] Processing module 1230 is used to input the data to be processed into the multi-task processing model to obtain the processing results of each task.
[0151] The result fusion module 1240 is used to fuse the processing results of each task to obtain a target processing result, wherein the target processing result represents the degree of association between the user and the candidate object.
[0152] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0153] This application provides a computer device including a processor and a memory. The memory stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by the processor to implement a training method for a multi-task processing model or a multi-task processing method as provided in the above method embodiments.
[0154] Please see Figure 13 The diagram shows a hardware structure of an operating terminal provided in an embodiment of this application. This operating terminal is used to implement a training method for a multi-task processing model or a multi-task processing method provided in the above embodiment.
[0155] The operating terminal 1300 may include an RF (Radio Frequency) circuit 1310, a memory 1320 including one or more computer-readable storage media, an input unit 1330, a display unit 1340, a video sensor 1350, an audio circuit 1360, a WiFi (Wireless Fidelity) module 1370, a processor 1380 including one or more processing cores, and a power supply 130, among other components. Those skilled in the art will understand that... Figure 13 The operating terminal structure shown does not constitute a limitation on the operating terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0156] RF circuit 1310 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and hands it over to one or more processors 1380 for processing; additionally, it transmits uplink data to the base station. Typically, RF circuit 1310 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, etc. Furthermore, RF circuit 1310 can also communicate wirelessly with networks and other devices. This wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), etc.
[0157] The memory 1320 can be used to store software programs and modules. The processor 1380 executes various functional applications and data processing by running the software programs and modules stored in the memory 1320. The memory 1320 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the operating terminal 1300 (such as video data, phone book, etc.). In addition, the memory 1320 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 volatile solid-state storage device. Accordingly, the memory 1320 may also include a memory controller to provide access to the memory 1320 by the processor 1380 and the input unit 1330.
[0158] Input unit 1330 can be used to receive input numeric or character information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, input unit 1330 may include image input device 1331 and other input devices 1332. Image input device 1331 may be a camera or an optoelectronic scanning device. In addition to image input device 1331, input unit 1330 may also include other input devices 1332. Specifically, other input devices 1332 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0159] The display unit 1340 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the operation terminal 1300. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The display unit 1340 may include a display panel 1341, which may optionally be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other similar formats.
[0160] The operating terminal 1300 may include at least one video sensor 1350 for acquiring video information from the user. The operating terminal 1300 may also include other sensors (not shown), such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1341 according to the ambient light level, and the proximity sensor can turn off the display panel 1341 and / or backlight when the operating terminal 1300 is moved to the ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition functions (such as pedometers, taps), etc. Other sensors that may be configured on the operating terminal 1300, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described further here.
[0161] The video circuit 1360, speaker 1361, and microphone 1362 provide a video interface between the user and the operating terminal 1300. The audio circuit 1360 converts received audio data into electrical signals and transmits them to the speaker 1361, where the speaker 1361 converts them into sound signals for output. Conversely, the microphone 1362 converts collected sound signals into electrical signals, which are then received by the audio circuit 1360, converted back into audio data, and processed by the processor 1380. The audio data is then transmitted via the RF circuit 1310 to, for example, another operating terminal, or output to the memory 1320 for further processing. The audio circuit 1360 may also include an earphone jack to facilitate communication between a peripheral headset and the operating terminal 1300.
[0162] WiFi is a short-range wireless transmission technology. The operator terminal 1300, through the WiFi module 1370, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 13 WiFi module 1370 is shown, but it is understood that it is not a necessary component of the operating terminal 1300 and can be omitted as needed without changing the essence of the invention.
[0163] The processor 1380 is the control center of the operator terminal 1300. It connects to various parts of the mobile phone via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 1320, and by calling data stored in the memory 1320, it performs various functions of the operator terminal 1300 and processes data, thereby providing overall monitoring of the mobile phone. Optionally, the processor 1380 may include one or more processing cores; preferably, the processor 1380 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may not be integrated into the processor 1380.
[0164] The operating terminal 1300 also includes a power supply 130 (such as a battery) to power various components. Preferably, the power supply can be logically connected to the processor 1380 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 130 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. Although not shown, the operating terminal 1300 may also include a Bluetooth module, etc., which will not be described in detail here.
[0165] Specifically, in this embodiment, the operating terminal 1300 further includes a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors. The aforementioned one or more programs include instructions for executing a training method for a multi-task processing model or a multi-task processing method provided in the above method embodiments.
[0166] This application embodiment also provides a server, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement a training method for a multi-task processing model or a multi-task processing method as provided in the above method embodiments.
[0167] The memory can be used to store software programs and modules. The processor executes these software programs and modules stored in the memory to perform various functional applications and detect abnormal behavior. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created based on the use of the device, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0168] Figure 14 This is a hardware structure block diagram of a server provided in an embodiment of this application. For example... Figure 14As shown, the server 1400 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1410 (CPUs 1410 may include, but are not limited to, microprocessors (MCUs) or programmable logic devices (FPGAs), a memory 1430 for storing data, and one or more storage media 1420 (e.g., one or more mass storage devices) for storing application programs 1423 or data 1422. The memory 1430 and storage media 1420 may be temporary or persistent storage. The program stored in the storage media 1420 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 1410 may be configured to communicate with the storage media 1420 and execute the series of instruction operations in the storage media 1420 on the server 1400. Server 1400 may also include one or more power supplies 1460, one or more wired or wireless network interfaces 1450, one or more input / output interfaces 1440, and / or one or more operating systems 1421, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0169] The input / output interface 1440 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 1400. In one example, the input / output interface 1440 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In one example, the input / output interface 1440 can be a radio frequency (RF) module for wireless communication with the Internet.
[0170] Those skilled in the art will understand that Figure 14 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, the server 1400 may also include... Figure 14 The more or fewer components shown, or having the same Figure 14 The different configurations shown.
[0171] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor on the operating end reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the operating end to perform a training method for a multi-task processing model or a multi-task processing method as described in the above method embodiments; or, a processor on the server end reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the server to perform a training method for a server-side multi-task processing model or a multi-task processing method as described in the above method embodiments.
[0172] This application also provides a non-transitory computer-readable storage medium including instructions, such as a memory including instructions. These instructions can be executed by a processor at an operating end to complete the various steps on the operating end side of the method embodiments described above, or the instructions can be executed by a processor at a server end to complete the various steps on the server side of the method embodiments described above. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0173] The multi-task processing and model training methods, apparatus, media, and equipment provided in this application have the following technical effects:
[0174] The solution provided in this application constructs a multi-layer multi-task processing model based on a single-layer multi-task learning model for the target multi-task. The multi-task processing model provided in this application includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. The feature extraction network is used to extract data features and share features, while the tower networks are used to meet the specific application requirements of each task. In each layer of the feature extraction network, multiple expert networks shared by various tasks and a gating network corresponding to each task are included. The gating network is used to fuse the feature data extracted by the expert networks. The expert network weights output by the gating networks corresponding to different tasks are different, resulting in differences in the feature fusion data of each task at that layer. The feature fusion data of each task are merged and used as the input to the next layer of the feature extraction network, sharing feature data as much as possible, until finally inputting to the tower network corresponding to each task to obtain the processing results of each task. That is, in the multi-task processing model provided in this application, for each task in the target task, the corresponding gating network is also multi-layered, with the same number of layers as the feature extraction network, and the initial input data is passed upwards for each layer of the gating network to calculate the expert network weights of the corresponding layer. In the scenario of processing multiple related tasks, it not only distinguishes the specificity of the tasks but also integrates the correlation between the tasks, which can effectively improve the generalization ability and accuracy of the processing results of the model. Furthermore, during the training phase, considering the large number of expert networks and the increased number of parameters to be trained, random silencing can be applied to the expert networks in each feature extraction layer. That is, in one round of training, only a subset of expert networks are trained. Through multiple rounds of iterative training, all expert networks in the model are trained, improving the model's stability and generalization ability. Moreover, different network frameworks can be used for the tower networks of each task, making the multi-task processing model flexible and adaptable.
[0175] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0176] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0177] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0178] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A training method for a multi-task processing model, characterized in that, The method includes: An initial multi-task processing model is constructed for the target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task. Obtain the training data corresponding to the target multi-task; the training data includes feature data of sample users and feature data of sample candidate objects; The training data is input into the multi-task processing model to train the expert network, the gating network, and the tower network in the multi-task processing model, thereby obtaining a multi-task processing model for processing the target multi-task; the multi-task processing model is used to execute the target multi-task and output a target processing result that represents the degree of association between the user and the candidate object, so as to recommend objects to the user based on the target processing result; The training includes: During the training process of the target round, the target-level feature extraction network receives the output data of the previous level feature extraction network; Based on the target expert network of the target hierarchical feature extraction network, feature extraction is performed on the output data of the previous level feature extraction network to obtain the feature output data of the target expert network; the target expert network is all or part of the random selection from the multiple expert networks. Based on the target gating network corresponding to each task in the target hierarchical feature extraction network, the feature output data of the target expert network is fused to obtain the feature fusion data corresponding to each task. The output data of the target-level feature extraction network is determined based on the feature fusion data corresponding to each task. The output data of the target-level feature extraction network is input into the next-level feature extraction network.
2. The training method for the multi-task processing model according to claim 1, characterized in that, The target gating network, based on the target-level feature extraction network corresponding to each task, fuses the feature output data of the target expert network to obtain feature fusion data corresponding to each task, including: Receive the training data output by the gating network corresponding to each task in the previous layer feature extraction network; Based on the target gating network corresponding to each task in the target hierarchical feature extraction network, the expert network weights corresponding to each task are determined according to the training data. Based on the expert network weights corresponding to each task and the feature output data of the target expert network, feature fusion data corresponding to each task is obtained.
3. The training method for the multi-task processing model according to claim 1, characterized in that, The step of determining the output data of the target-level feature extraction network based on the feature fusion data corresponding to each task includes: The feature fusion data corresponding to each task are merged to obtain the output data of the target-level feature extraction network. The output data of the target-level feature extraction network is input into multiple expert networks in the next-level feature extraction network.
4. A multi-task processing method, characterized in that, The method includes: A multi-task processing model is obtained and trained for a target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task. The multi-task processing model is obtained by using the training method of a multi-task processing model as described in claim 1. Obtain the data to be processed corresponding to the target multi-task, the data to be processed including user feature data and candidate object feature data; The data to be processed is input into the multi-task processing model to obtain the processing results of each task; The processing results of each task are merged to obtain a target processing result, which represents the degree of association between the user and the candidate object. The target processing result is used to recommend objects to the user.
5. A training device for a multi-task processing model, characterized in that, The device includes: The model building module is used to build an initial multi-task processing model for the target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task. The training data acquisition module is used to acquire the training data corresponding to the target multi-task; the training data includes feature data of sample users and feature data of sample objects. The model training module is used to input the training data into the multi-task processing model, train the expert network, the gating network and the tower network in the multi-task processing model, and obtain a multi-task processing model for processing the target multi-task; the multi-task processing model is used to output target processing results that characterize the degree of association between the user and the candidate object by executing the target multi-task, so as to recommend objects to the user based on the target processing results; The model training module is used during the training process of the target rounds. The target-level feature extraction network receives the output data of the previous-level feature extraction network; based on the target expert network of the target-level feature extraction network, it extracts features from the output data of the previous-level feature extraction network to obtain the feature output data of the target expert network; the target expert network is all or part of those randomly selected from multiple expert networks; based on the target gating network corresponding to each task in the target-level feature extraction network, it fuses the feature output data of the target expert network to obtain feature fusion data corresponding to each task; it determines the output data of the target-level feature extraction network based on the feature fusion data corresponding to each task; and it inputs the output data of the target-level feature extraction network into the next-level feature extraction network.
6. A multitasking processing device, characterized in that, The device includes: The model acquisition module is used to acquire and train a multi-task processing model for the target multi-task. The multi-task processing model includes a multi-layer feature extraction network and a tower network corresponding to each task in the target multi-task. Each layer of the feature extraction network includes multiple expert networks shared by each task and a gating network corresponding to each task. The multi-task processing model is obtained by using the training method of a multi-task processing model as described in claim 1. The data acquisition module is used to acquire the data to be processed corresponding to the target multi-task, wherein the data to be processed includes user feature data and candidate object feature data; The processing module is used to input the data to be processed into the multi-task processing model to obtain the processing results of each task; The fusion module is used to merge the processing results of each task to obtain a target processing result, which represents the degree of association between the user and the candidate object.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement a training method for a multi-task processing model as described in any one of claims 1 to 3 or a multi-task processing method as described in claim 4.
8. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the processor to implement a training method for a multi-task processing model as described in any one of claims 1 to 3 or a multi-task processing method as described in claim 4.