Task processing method and automatic question answering method

By using multiple task adaptation units and target weight sequences in the task processing model, the problem of insufficient processing performance of large models is solved, and efficient task processing performance improvement and cost-effective improvement are achieved.

CN119645579APending Publication Date: 2025-03-18HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311180794.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing large models have shortcomings in processing performance, mainly due to insufficient data, insufficient data volume, and insufficient model layers, which lead to relatively low cost performance improvement, and the stacking of parameters leads to high fine-tuning and training costs.

Method used

By introducing the collaboration of multiple task adaptation units and target weight sequences into the task processing model, the interference between multi-task data is reduced, and the model architecture is modified based on task analysis to improve the performance of the task processing model.

Benefits of technology

It effectively improves the performance of the task processing model, reduces interference between different tasks, improves the cost-effectiveness of task processing, and reduces training costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645579A_ABST
    Figure CN119645579A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task processing method and an automatic question answering method. The task processing method comprises the steps of obtaining task data and a task type corresponding to a target task; the task data are input into a plurality of task adaptation units in the task processing model, a target task sequence is obtained, the target task sequence comprises a plurality of target task features, and the target task features correspond to the task adaptation units one to one; according to the task type, a target weight sequence is screened out from the multiple sets of weight sequences, the weight sequence represents the importance degree of each task feature in the corresponding task sequence, the target weight sequence comprises multiple target weights, and the target weights correspond to the target task features one to one; and determining a task processing result according to the target task sequence and the target weight sequence. Through cooperation of the multiple task adaptation units and the target weight sequence, interference among the multi-task data can be reduced, the task processing model performance is improved, and the task processing performance is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to a task processing method. Background Art

[0002] With the development of computer technology, large models have begun to shine, showing extraordinary capabilities in language understanding, generation, interaction and reasoning, and are widely used in natural language processing fields such as dialogue, translation, and code generation. Due to insufficient data, insufficient data volume, and insufficient model layers, the processing performance of large models is low. Therefore, how to improve the processing performance of large models has gradually become a research focus.

[0003] Currently, the performance of large models is usually improved by stacking parameters. However, a small improvement in model performance comes at the cost of a huge increase in the number of parameters, which greatly reduces the cost-effectiveness of performance improvement. At the same time, the high fine-tuning and training costs brought by stacking parameters are difficult to be widely used. Therefore, a high-performance task processing solution is urgently needed. Summary of the invention

[0004] In view of this, an embodiment of this specification provides a task processing method. One or more embodiments of this specification also relate to an automatic question-answering method, a task processing device, an automatic question-answering device, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a task processing method is provided, including:

[0006] Get the task data and task type corresponding to the target task;

[0007] Inputting task data into a plurality of task adaptation units in a task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one;

[0008] According to the task type, a target weight sequence is selected from multiple groups of weight sequences, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond to the target task features one by one;

[0009] Determine the task processing results based on the target task sequence and target weight sequence.

[0010] According to a second aspect of an embodiment of this specification, there is provided a task processing device, including:

[0011] A first acquisition module is configured to acquire task data and task type corresponding to the target task;

[0012] A first input module is configured to input task data into a plurality of task adaptation units in the task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one;

[0013] A first screening module is configured to screen a target weight sequence from a plurality of weight sequences according to the task type, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes a plurality of target weights, and the target weights correspond to the target task features one by one;

[0014] The first determination module is configured to determine the task processing result according to the target task sequence and the target weight sequence.

[0015] According to a third aspect of an embodiment of this specification, there is provided an automatic question-answering method, comprising:

[0016] Obtain the question-answering data and question-answering type corresponding to the target question-answering task;

[0017] Input the question-answering data into a plurality of task adaptation units in the task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one;

[0018] According to the question-answering type, a target weight sequence is selected from multiple groups of weight sequences, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond to the target task features one by one;

[0019] The question-answering result is determined based on the target task sequence and target weight sequence.

[0020] According to a fourth aspect of the embodiments of this specification, an automatic question-answering device is provided, including:

[0021] A second acquisition module is configured to acquire question and answer data and question and answer types corresponding to the target question and answer task;

[0022] A second input module is configured to input the question-answering data into a plurality of task adaptation units in the task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one;

[0023] The second screening module is configured to screen a target weight sequence from multiple groups of weight sequences according to the question and answer type, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond to the target task features one by one;

[0024] The second determination module is configured to determine the question-answering result according to the target task sequence and the target weight sequence.

[0025] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:

[0026] Memory and processor;

[0027] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method provided in the first aspect or the third aspect are implemented.

[0028] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the method provided in the first aspect or the third aspect are implemented.

[0029] According to a seventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the method provided in the first aspect or the third aspect above.

[0030] The task processing method provided by one embodiment of the present specification obtains the task data and task type corresponding to the target task; inputs the task data into multiple task adaptation units in the task processing model to obtain a target task sequence, wherein the target task sequence includes multiple target task features, and the target task features correspond one to one with the task adaptation units; according to the task type, a target weight sequence is screened out from multiple groups of weight sequences, wherein the weight sequence characterizes the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond one to one with the target task features; according to the target task sequence and the target weight sequence, the task processing result is determined. Since the task processing model includes multiple task adaptation units, the interference between multiple task data can be reduced through the collaboration of multiple task adaptation units and target weight sequences, so that the task processing model performance can be improved by modifying the model architecture based on task analysis, and the task processing performance can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is an architecture diagram of a task processing system provided by an embodiment of this specification;

[0032] Figure 2 is an architecture diagram of another task processing system provided by an embodiment of this specification;

[0033] Figure 3 is a flowchart of a task processing method provided by an embodiment of this specification;

[0034] Figure 4 is a flow chart of an automatic question-answering method provided by an embodiment of this specification;

[0035] Figure 5 is a flowchart of a task processing model training method provided by an embodiment of this specification;

[0036] Figure 6 is a flowchart of another task processing model training method provided by an embodiment of this specification;

[0037] Figure 7 This is a schematic diagram of an automatic question-and-answer interface provided by an embodiment of this specification;

[0038] Figure 8 is a structural diagram of a task processing device provided by an embodiment of this specification;

[0039] Fig. 9 is a structural schematic diagram of an automatic question-answering device provided by an embodiment of this specification;

[0040] Fig.10 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0041] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0042] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0043] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0044] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0045] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM, Large Language Model), a multi-modal pre-training model, etc.

[0046] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image description (IC, Image Caption), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.

[0047] First, the terms involved in one or more embodiments of this specification are explained.

[0048] Large-scale language model: A large-scale language model is a language model that can process large-scale corpora. Such models usually have very high parameter count and complexity, and can learn the deep structure and complex relationships of language, thereby achieving natural generation and understanding of language.

[0049] Transformer: Transformer is a deep learning architecture widely used in natural language processing tasks. It can effectively solve the problem of modeling sequence data and is also the basis of the mainstream large model architecture in recent years.

[0050] Zero-shot learning: A machine learning method that aims to solve the problems of traditional supervised learning, such as the inability to train and fine-tune models, insufficient data, and incomplete labels. Zero-shot learning can infer new categories that the model has not seen by given attributes or other prior knowledge.

[0051] Multi-task learning: Improve the generalization performance of the model by learning multiple different tasks at the same time. The multi-task learning in the embodiments of this specification refers to solving different natural language processing tasks, such as classification tasks, natural language reasoning tasks and generation tasks, through one task processing model.

[0052] Large-scale language models have demonstrated amazing high performance in zero-shot learning in the field of natural language processing, but most of the performance improvements are achieved by piling up parameters: the problem is attributed to insufficient data, insufficient data volume, insufficient model depth, etc. A small improvement in model performance comes at the cost of a huge increase in the number of parameters, which greatly reduces the cost-effectiveness of the increase in the number of parameters.

[0053] At present, it is possible to generate specific expert weights according to different tasks through multi-gate control modules, but the above scheme leads to direct influence between expert outputs, and the influence between different tasks is still large. Furthermore, the method of sparsely adding parallel expert modules can be used to reduce the sharp increase in the number of parameters brought by adding parallel expert modules to the model, but the model trained by the above scheme still has low performance.

[0054] In order to solve the above problems, the embodiments of this specification analyze the task attributes through multi-task learning to modify the model architecture and improve the model performance. There are two difficulties in multi-task learning. First, how to reduce the mutual interference between inputs of different task types in the same model when all parameters are shared. Second, there is a certain collaborative relationship between different tasks. How to improve the collaboration between tasks under the premise of reducing the mutual interference between different tasks. Inspired by this, the embodiments of this specification propose a hybrid task adapter unit multi-task learning framework (ALTER, multi-task Learners with mixture-of-task-adapters) for the transformer architecture, which is plug-and-play. It is applicable to various transformer-based information extraction models. In addition, the multi-task learning framework can also uniformly process different types of natural language tasks in a highly similar way, including the most common classification tasks, natural language reasoning tasks, and generation tasks.

[0055] Specifically, the embodiment of this specification proposes a task processing method, which obtains task data and task type corresponding to a target task; inputs the task data into multiple task adaptation units in a task processing model to obtain a target task sequence, wherein the target task sequence includes multiple target task features, and the target task features correspond one to one with the task adaptation units; according to the task type, a target weight sequence is screened out from multiple groups of weight sequences, wherein the weight sequence characterizes the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond one to one with the target task features; according to the target task sequence and the target weight sequence, the task processing result is determined. Since the task processing model includes multiple task adaptation units, the interference between multiple task data can be reduced through the collaboration of multiple task adaptation units and target weight sequences, so as to improve the performance of the task processing model by modifying the model architecture based on task analysis, and further improve the task processing performance.

[0056] In this specification, a task processing method is provided. This specification also involves an automatic question-and-answer method, a task processing device, an automatic question-and-answer device, a computing device, a computer-readable storage medium, and a computer program, which are described in detail one by one in the following embodiments.

[0057] See also Figure 1 , Figure 1 An architecture diagram of a task processing system provided by an embodiment of the present specification is shown, and the task processing system may include a client 100 and a server 200;

[0058] The client 100 is used to send task data and task type corresponding to the target task to the server 200;

[0059] The server 200 is used to input task data into multiple task adaptation units in the task processing model to obtain a target task sequence, wherein the target task sequence includes multiple target task features, and the target task features correspond to the task adaptation units one by one; according to the task type, a target weight sequence is selected from multiple groups of weight sequences, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond to the target task features one by one; according to the target task sequence and the target weight sequence, a task processing result is determined; and the task processing result is sent to the client 100;

[0060] The client 100 is also used to receive the task processing result sent by the server 200.

[0061] By applying the solution of the embodiments of this specification, since the task processing model includes multiple task adaptation units, the interference between multi-task data can be reduced through the collaboration of multiple task adaptation units and target weight sequences, and the task processing model performance can be improved by modifying the model architecture based on task analysis, thereby further improving the task processing performance.

[0062] See also Figure 2 , Figure 2 The architecture diagram of another task processing system provided by an embodiment of the present specification is shown, and the task processing system may include a server 200 and multiple clients 100. Multiple clients 100 may establish a communication connection through the server 200. In the task processing scenario, the server 200 is used to provide task processing services between multiple clients 100. Multiple clients 100 may respectively serve as a sending end or a receiving end, and realize communication through the server 200.

[0063] The user can interact with the server 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In the task processing scenario, the user can publish a data stream to the server 200 through the client 100, and the server 200 generates a task processing result based on the data stream and pushes the task processing result to other clients that have established communication.

[0064] The client 100 and the server 200 are connected via a network. The network provides a medium for a communication link between the client 100 and the server 200. The network may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, etc. before being released to the server 200.

[0065] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language Version 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The client 100 can be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server 200, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The client 100 can be deployed in an electronic device, and needs to rely on the device to run or some APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0066] The server 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers for background training that provide support for models used on clients, and servers that process data sent by clients. It should be noted that the server 200 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0067] It is worth noting that the task processing method provided in the embodiments of this specification is generally executed by the server, but in other embodiments of this specification, the client may also have similar functions to the server, thereby executing the task processing method provided in the embodiments of this specification. In other embodiments, the task processing method provided in the embodiments of this specification may also be jointly executed by the client and the server.

[0068] See also Figure 3 , Figure 3 A flowchart of a task processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps:

[0069] Step 302: Obtain task data and task type corresponding to the target task.

[0070] In one or more embodiments of the present specification, in response to a task processing request, task data and a task type corresponding to a target task may be acquired, and the task data may be further processed based on the task type to obtain a task processing result.

[0071] Specifically, the target task can be a task in different scenarios, such as e-commerce scenarios, conference scenarios, etc. The target task can also be different types of tasks, such as classification tasks, natural language reasoning tasks, generation tasks, translation tasks, etc. Task data refers to the processing object of the task processing process, and task data can be data in different formats, such as text data, audio data, video data, image data, etc. Task data can also be data in different languages, such as English data, Chinese data, etc. Task type refers to the type of target task, and task types include but are not limited to classification, natural language reasoning, generation, and translation.

[0072] It should be noted that if the task data is data in a format other than text data, the task data can be converted to obtain task data in text format. For example, if the task data is image data, optical character recognition (OCR) can be performed on the task data to obtain task data in text format. If the task data is audio data, an audio-to-text conversion tool can be used to process the task data to obtain task data in text format.

[0073] In actual applications, there are many ways to obtain the task data and task type corresponding to the target task, which can be selected according to the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, a task processing request sent by a user through a client can be received, and the task processing request carries task data and task type, that is, the task data and task type sent by the user through the client can be received. In another possible implementation of this specification, the task processing request may carry a data identifier of the task type and task data, and the task data can be read from other data acquisition devices or databases based on the data identifier of the task data. In another possible implementation of this specification, the task processing request may carry task data but not the task type, then the task data can be type identified to determine the task type of the target task.

[0074] Step 304: Input the task data into a plurality of task adaptation units in the task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one.

[0075] In one or more embodiments of the present specification, after obtaining the task data and task type corresponding to the target task, the task data may be further input into a plurality of task adaptation units in the task processing model to obtain a target task sequence.

[0076] Specifically, the task processing model is a deep learning model based on the transformer architecture. The task adaptation unit refers to a model unit in the task processing model that extracts features from task data. The task adaptation unit is related to the task type. Multiple task adaptation units can be called mix-of-task-adapters (MTA). Multiple task adaptation units can be easily and conveniently added to the task processing model. With the addition of multiple task adaptation units, the model parameters of the task processing model also increase, which can further improve the model performance. The target task sequence refers to a sequence composed of target task features output by each task adaptation unit. The target task feature is a feature vector obtained by encoding the task data by the task adaptation unit.

[0077] It should be noted that the transformer architecture is composed of multiple layers of encoding units (encoders) and multiple layers of decoding units (decoders) stacked together. For example, the architecture of the T5 (Transfer Text-to-Text Transformer)-base model is a 24-layer architecture composed of 12 layers of encoding units and 12 layers of decoding units. There is a feed-forward neural network (FFN) in each encoding unit and decoding unit. When multiple task adaptation units are added to the transformer architecture, the feed-forward neural network of the specified layer can be replaced with multiple task adaptation units to obtain the architecture of the task processing model. For example, the 10th-layer feed-forward neural network of the encoding unit and the decoding unit of the T5-base model architecture can be replaced with multiple task adaptation units at the same time to obtain the architecture of the task processing model.

[0078] In practical applications, there are multiple ways to input task data into multiple task adaptation units in the task processing model to obtain the target task sequence, which can be selected according to the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, in order to enable a specific task adaptation unit to complete a specific type of task, the task adaptation unit may include a parallel task adaptation unit, and the task data is input into multiple parallel task adaptation units in the task processing model to obtain the target task sequence.

[0079] In another possible implementation of the present specification, in order to improve the cooperation ability between the task adaptation units, in addition to the parallel task adaptation unit, at least one shared task adaptation unit may be introduced, and the parallel task adaptation unit and the shared task adaptation unit are used to process the task data to obtain the target task sequence, that is, the task adaptation unit includes at least one shared task adaptation unit and multiple parallel task adaptation units; the above-mentioned inputting the task data into the multiple task adaptation units in the task processing model to obtain the target task sequence may include the following steps:

[0080] Inputting the task data into a plurality of parallel task adaptation units in the task processing model to obtain a first target task sequence, and inputting the task data into a shared task adaptation unit in the task processing model to obtain a second target task sequence;

[0081] A target task sequence is generated according to the first target task sequence and the second target task sequence.

[0082] It should be noted that the multiple task adapter units may include multiple parallel task adapter units (ParallelAdapters) and at least one shared task adapter unit (Share Adapters), wherein the parallel task adapter unit may be referred to as a parallel adapter and the shared task adapter unit may be referred to as a shared adapter. A parallel task adapter unit refers to a task adapter unit with different processing capabilities for different types of tasks. A shared task adapter unit refers to a task adapter unit with the same processing capabilities for different types of tasks. The shared task adapter unit has no bias when processing different types of tasks and can collaboratively participate in processing various types of tasks. The parallel task adapter unit processes a certain type of task with a bias, such as the parallel task adapter unit A has a strong ability to process classification tasks, but a weak ability to process generation tasks. The parallel task adapter unit and the shared task adapter unit have the same structure, but in the task processing process, in order to ensure that the task processing model processes different tasks in a collaborative manner, the task sequence output by the shared task adapter unit will not be screened; in order to avoid interference when the task processing model processes different tasks, the task sequence output by the parallel task adapter unit can be screened.

[0083] In practical applications, when generating a target task sequence according to the first target task sequence and the second target task sequence, the first target task sequence and the second target task sequence may be spliced ​​to obtain the target task sequence.

[0084] By applying the solution of the embodiment of this specification, task data is input into a plurality of parallel task adapter units in a task processing model to obtain a first target task sequence, and task data is input into a shared task adapter unit in the task processing model to obtain a second target task sequence; a target task sequence is generated according to the first target task sequence and the second target task sequence. Task data is processed by a plurality of parallel task adapter units, and task data is extensively processed by at least one shared task adapter unit, thereby improving task processing performance.

[0085] Step 306: According to the task type, a target weight sequence is selected from multiple groups of weight sequences, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond to the target task features one by one.

[0086] In one or more embodiments of the present specification, task data and task type corresponding to the target task are obtained, and the task data is input into multiple task adaptation units in the task processing model. After obtaining the target task sequence, the target weight sequence can be further screened out from multiple groups of weight sequences according to the task type.

[0087] Specifically, multiple groups of weight sequences correspond to different types of tasks, that is, the weight sequences correspond to the task types one by one. The weight sequences are used to screen the task features in the corresponding task sequences. The target weight sequence refers to the weight sequence corresponding to the task type of the target task. The target weight characterizes the importance of the target task features relative to the task processing results. Since the target weight sequence includes multiple target weights, and the target weights correspond to the target task features one by one, the target weight sequence can be used to screen the target task features output by the parallel task adaptation unit, and further ensure the accuracy of the task processing results.

[0088] It should be noted that, during the task processing model training process, multiple sets of initial weight sequences may be trained to obtain multiple sets of weight sequences. The multiple sets of weight sequences may be stored in the weight selection unit in the task processing model, or may be stored separately in a database.

[0089] In practical applications, there are many ways to filter out a target weight sequence from multiple sets of weight sequences according to the task type, and the specific selection is based on the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the target weight sequence can be filtered out from multiple sets of weight sequences stored in a database according to the task type.

[0090] In another possible implementation of the present specification, the task processing model includes a weight selection unit; the above-mentioned screening out a target weight sequence from multiple groups of weight sequences according to the task type may include the following steps:

[0091] According to the task type, a target weight sequence is screened out from multiple groups of weight sequences stored in the weight selection unit, wherein the multiple groups of weight sequences correspond to different types of tasks, respectively.

[0092] It should be noted that, when selecting a target weight sequence from multiple groups of weight sequences stored in a weight selection unit according to a task type, the task type can be input into the weight selection unit in the task processing model to obtain the target weight sequence.

[0093] By applying the solution of the embodiment of this specification, a target weight sequence is screened out from multiple groups of weight sequences stored in a weight selection unit according to the task type, and the task processing process is guided by the target weight sequence, thereby improving the accuracy of task processing.

[0094] In an optional embodiment of the present specification, since some parallel task adaptation units among multiple parallel task adaptation units have strong processing capabilities for target tasks, while some parallel task adaptation units have weak processing capabilities for target tasks, the first target weight sequences corresponding to the parallel task adaptation units may be screened, and the first target weights that are not screened out may be set to zero, and the screened first target task weights may be further used to screen the target task features output by the parallel task adaptation units, that is, the target weight sequence includes a first target weight sequence corresponding to the first target task sequence and a second target weight sequence corresponding to the second target task sequence; after the target weight sequence is screened out from multiple groups of weight sequences according to the task type, the following steps may also be included:

[0095] Get preset filtering parameters;

[0096] Sorting a plurality of first target weights in the first target weight sequence, and screening out a first target task weight from the sorted plurality of first target weights using a preset screening parameter;

[0097] Determining the task processing result according to the target task sequence and the target weight sequence may include the following steps:

[0098] The task processing result is determined according to the first target task sequence, the second target task sequence, the second target weight sequence and the first target task weight.

[0099] Specifically, the preset screening parameter is used to screen out the first target task weight from the first target weight sequence. The preset screening parameter is set according to the actual situation, and the embodiment of this specification does not make any limitation on this.

[0100] In practical applications, after obtaining the preset screening parameters, multiple first target weights in the first target weight sequence can be sorted, and the first target weight with the preset screening parameters ranked higher can be selected from the sorted multiple first target weights as the first target task weight.

[0101] Furthermore, when determining the task processing result based on the first target task sequence, the second target task sequence, the second target weight sequence and the first target task weight, the unselected first target weights in the first target weight sequence can be set to zero to construct an updated first target weight sequence, and the task processing result can be further determined based on the first target task sequence, the second target task sequence, the second target weight sequence and the updated first target weight sequence.

[0102] Exemplarily, assuming that the multiple task adaptation units include a shared task adaptation unit A and three parallel task adaptation units (parallel task adaptation unit B, parallel task adaptation unit C and parallel task adaptation unit D), the target weight sequence is obtained as [a, b, c, d], wherein the first target weight sequence is [b, c, d], the second target weight sequence is [a], weight a is the weight corresponding to the shared task adaptation unit A, weight b is the weight corresponding to the parallel task adaptation unit B, weight c is the weight corresponding to the parallel task adaptation unit C, and weight d is the weight corresponding to the parallel task adaptation unit D. The preset screening parameter is obtained as 2, the weights in the first target weight sequence are sorted, and c>b>d is determined, and the first target task weights are screened from the sorted multiple weights using the preset screening parameter as weight c and weight b, and the updated first target weight sequence is further determined as [b, c, 0], and finally the updated target weight sequence is determined according to the second target weight sequence and the updated first target weight sequence, and the task processing result is determined according to the updated target weight sequence and the target task sequence.

[0103] By applying the solution of the embodiment of this specification, since the weights other than the first target task weight in the updated first target weight sequence are zero, the updated first target weight sequence can be used to exclude the target task features corresponding to zero weights to ensure the accuracy of the task processing results.

[0104] Step 308: Determine the task processing result according to the target task sequence and the target weight sequence.

[0105] In one or more embodiments of the present specification, task data and task type corresponding to the target task are obtained, the task data is input into multiple task adaptation units in the task processing model, and a target task sequence is obtained. After the target weight sequence is screened out from multiple groups of weight sequences according to the task type, the task processing result can be further determined based on the target task sequence and the target weight sequence.

[0106] It should be noted that when determining the task processing result based on the target task sequence and the target weight sequence, the target task sequence and the target weight sequence can be weighted summed according to the correspondence between the target task characteristics and the target weights, and the result of the weighted summation can be decoded to obtain the task processing result.

[0107] By applying the solution of the embodiments of this specification, since the task processing model includes multiple task adaptation units, the interference between multi-task data can be reduced through the collaboration of multiple task adaptation units and target weight sequences, and the task processing model performance can be improved by modifying the model architecture based on task analysis, thereby further improving the task processing performance.

[0108] In an optional embodiment of the present specification, after determining the task processing result, the task processing result can be sent to the client so that the client can display the task processing result to the user. Further, the task processing result can be sent to the client according to the user's display requirement information, that is, after determining the task processing result according to the target task sequence and the target weight sequence, the following steps can also be included:

[0109] According to the display requirement information, the task processing result is sent to the client so that the client can display the task processing result to the user.

[0110] It should be noted that the display requirement information represents the user's demand for viewing the task processing results. The display requirement information includes but is not limited to displaying only the task processing results, displaying the task processing results and the parallel task adaptation unit information corresponding to the task processing results. The display requirement information is specifically set according to the actual needs of the user, and this specification embodiment does not impose any limitation on this.

[0111] By applying the solution of the embodiment of this specification, the task processing result is sent to the client according to the display requirement information, so that the client can display the task processing result to the user, thereby increasing the interaction with the user and improving the user satisfaction.

[0112] In an optional embodiment of the present specification, after sending the task processing result to the client, the user can perform data processing based on the task processing result. Furthermore, the adjustment sample data can be sent to train the task processing model again. That is, after sending the task processing result to the client according to the display requirement information, the following steps can also be included:

[0113] Receive adjustment sample data sent by the user based on the task processing result, and adjust the model parameters of the task processing model according to the adjustment sample data.

[0114] It should be noted that after the user obtains the task processing result, if he is not satisfied with the task processing result, he can send adjustment sample data based on the task processing result to retrain the task processing model and perform secondary task processing. The implementation method of "adjusting the model parameters of the task processing model according to the adjustment sample data" is the same as the training method of the task processing model, and will not be described in detail in this specification embodiment.

[0115] By applying the solution of the embodiments of this specification, adjustment sample data sent by the user based on the task processing result is received, and the model parameters of the task processing model are adjusted according to the adjustment sample data, which increases the interaction with the user and improves the user satisfaction.

[0116] In an optional embodiment of the present specification, before the task data is input into the multiple task adaptation units in the task processing model and the target task sequence is obtained, the following steps may also be included:

[0117] Obtain a multi-task sample set;

[0118] The initial processing model is trained according to the multi-task sample set to obtain an intermediate model, wherein the intermediate model includes an intermediate encoding unit and an intermediate decoding unit;

[0119] The intermediate model is trained according to the multi-task sample set to obtain a trained task processing model, wherein the parameters of the intermediate encoding unit and the intermediate decoding unit are fixed during the training process of the intermediate model.

[0120] Specifically, the multi-task sample set refers to a sample set composed of sample data of different task types. The task processing model is obtained based on the initial processing model after two stages of training. The initial processing model is a model that directly loads the pre-trained parameter weights, the intermediate model is a model obtained by training the initial processing model in the first stage, and the task processing model is a model obtained by training the intermediate model in the second stage. Among them, all parameters of the initial processing model are adjusted during the first stage of training, and the parameters of the intermediate encoding unit and the intermediate decoding unit are fixed during the second stage of training, and the parameters of the remaining units are adjusted.

[0121] In practical applications, there are many ways to obtain a multi-task sample set, which can be selected according to the actual situation, and the embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, a multi-task sample set can be extracted from other data acquisition devices or databases. In another possible implementation of this specification, a multi-task sample set that can be used to train and test the multi-task processing performance of the model can be constructed by sampling and fusing sample sets of different types of tasks, such as sampling and fusing six sample sets of three common natural language processing tasks (classification tasks, natural language reasoning tasks, and generation tasks) to construct a multi-task sample set.

[0122] It should be noted that both the training of the initial processing model and the training of the intermediate model are supervised training, that is, each sample data in the multi-task sample set carries a real sample training label. The sample training label is the generation target of the model and is used to guide the model training process.

[0123] Apply the scheme of the embodiments of this specification to obtain a multi-task sample set; train the initial processing model according to the multi-task sample set to obtain an intermediate model, wherein the intermediate model includes an intermediate encoding unit and an intermediate decoding unit; train the intermediate model according to the multi-task sample set to obtain a trained task processing model, wherein the parameters of the intermediate encoding unit and the intermediate decoding unit are fixed during the training of the intermediate model, and the trained task processing model is made more accurate through two-stage model training, and most of the parameters are frozen in the second stage to further improve the synergy between different tasks and reduce mutual interference between tasks at a very low computational cost.

[0124] In an optional embodiment of the present specification, the training of the initial processing model according to the multi-task sample set to obtain the intermediate model may include the following steps:

[0125] Extracting first sample data from the multi-task sample set, wherein the first sample data is any sample data in the multi-task sample set, and the first sample data carries a first sample type label and a first sample training label;

[0126] Inputting the first sample data and the first sample type label into the initial processing model to obtain a first prediction result;

[0127] According to the first prediction result and the first sample training label, the model parameters of the initial processing model are adjusted, and the step of extracting the first sample data from the multi-task sample set is returned to be executed until the first training stop condition is reached to obtain a trained intermediate model.

[0128] In actual applications, when adjusting the model parameters of the initial processing model according to the first prediction result and the first sample training label, the first loss value can be calculated according to the first prediction result and the first sample training label, the model parameters of the initial processing model can be adjusted according to the first loss value, and the step of extracting the first sample data from the multi-task sample set is returned to execute until the first preset stop condition is reached to obtain a trained intermediate model.

[0129] It should be noted that there are many functions for calculating the first loss value, such as cross entropy loss function, L1 norm loss function, maximum loss function, mean square error loss function, logarithmic loss function, etc. The specific selection is based on the actual situation, and the embodiments of this specification do not impose any restrictions on this.

[0130] In a possible implementation of the present specification, the first preset stop condition includes that the first loss value is less than or equal to a first preset threshold value. After calculating the first loss value according to the first prediction result and the first sample training label, the first loss value is compared with the first preset threshold value.

[0131] Specifically, if the first loss value is greater than the first preset threshold, it means that the difference between the first prediction result and the first sample training label is large, and the initial processing model has poor prediction ability for the first sample data. At this time, the model parameters of the initial processing model can be adjusted, and the step of extracting the first sample data from the multi-task sample set is returned to continue training the initial processing model until the first loss value is less than or equal to the first preset threshold, indicating that the difference between the first prediction result and the first sample training label is small, and the first preset stop condition is met, and the intermediate model that completes the training is obtained.

[0132] In another possible implementation of the present specification, in addition to comparing the first loss value and the first preset threshold, it is also possible to determine whether the current intermediate model has been trained in combination with the number of iterations.

[0133] Specifically, if the first loss value is greater than the first preset threshold, the model parameters of the initial processing model are adjusted, and the step of extracting the first sample data from the multi-task sample set is returned to execute, and the initial processing model is continued to be trained until the first preset number of iterations is reached, and the iteration is stopped to obtain an intermediate model that has completed the training, wherein the first preset threshold and the first preset number of iterations are selected according to the actual situation, and the embodiments of this specification do not impose any limitations on this.

[0134] The solution of the embodiment of this specification is applied, and a first loss value is calculated based on the first prediction result and the first sample training label, and the first loss value is compared with a first preset stop condition. If the first preset stop condition is not met, the initial processing model is continuously trained until the first preset stop condition is met, and the training is completed to obtain an intermediate model. By continuously adjusting the model parameters of the initial processing model, the intermediate model finally obtained can be made more accurate.

[0135] In an optional embodiment of the present specification, the initial processing model includes an initial encoding unit, an initial weight selection unit, an initial decoding unit, and a plurality of initial parallel task adaptation units; the above-mentioned inputting the first sample data and the first sample type label into the initial processing model to obtain the first prediction result may include the following steps:

[0136] Inputting the first sample data into the initial encoding unit to obtain a first encoding feature;

[0137] Inputting the first coding feature into a plurality of initial parallel task adaptation units to obtain a first sample sequence, wherein the first sample sequence includes a plurality of first sample features, and the first sample features correspond to the initial parallel task adaptation units one by one;

[0138] Inputting the first sample type label into an initial weight selection unit to obtain an initial weight sequence, wherein the initial weight sequence includes a plurality of initial weights, and the initial weights correspond to the first sample features one by one;

[0139] Determine a first decoding sequence according to the initial weight sequence and the first sample sequence;

[0140] The first decoding sequence is input into an initial decoding unit to obtain a first prediction result.

[0141] In the embodiment of this specification, after the first coding feature is input into multiple initial parallel task adaptation units and the first sample feature output by each initial parallel task adaptation unit is obtained, a first sample sequence can be constructed according to the first sample feature output by each initial parallel task adaptation unit.

[0142] Specifically, multiple initial weights in the initial weight sequence can be called initial guided adaptive weights, where adaptive means that weights can be updated together with other parameters of the model due to loss feedback and gradient update. Using multiple initial weights can guide each initial parallel task adaptation unit to lead the completion of different types of tasks, achieving independence between tasks to a certain extent while allowing mutual cooperation between each initial parallel task adaptation unit.

[0143] In practical applications, the initial weight selection unit (Task Weight Selector) can select a guiding initial weight according to the first sample type label. Specifically, the initial weight sequence corresponding to the i-th task can be obtained by the following formula (1):

[0144]

[0145] Among them, W i is the initial weight sequence, λ is the task bias, and N is the number of initial parallel task adaptation units. For different types of tasks, the initial weight can be obtained by adding the preset task bias to the initial weight, thereby guiding the corresponding initial parallel task adaptation unit to learn a certain type of task in a targeted manner.

[0146] For example, assuming there are three types of tasks, three different sets of weight sequences can be constructed, and each set of weight sequences will have different biases. Taking four initial parallel task adaptation units as an example, the first sample type label is input into the initial weight selection unit, and the initial weight sequence obtained can be [0.22, 0.2, 0.2, 0.2]. Because the initial weight corresponding to the first initial parallel task adaptation unit is larger, the loss of the first sample type task during gradient backpropagation will focus on guiding the first initial parallel task adaptation unit to focus on learning the first sample type task.

[0147] In practical applications, when determining the first decoding sequence according to the initial weight sequence and the first sample sequence, the initial weight sequence and the first sample sequence may be weighted and summed to obtain the first decoding sequence. Specifically, the first decoding sequence may be determined by the following formula (2):

[0148]

[0149] Among them, out 1 is the first decoding sequence, W is the initial weight, A(x) is the output of multiple initial parallel task adaptation units, T is the weight sharpening parameter, and softmax is the activation function.

[0150] It should be noted that when determining the first decoding sequence based on the initial weight sequence and the first sample sequence, the initial weights can be sharpened through the weight sharpening parameters to highlight the output of a specific initial parallel task adaptation unit and weaken the contribution of other initial parallel task adaptation units to help the model achieve a specific initial parallel task adaptation unit to mainly complete a specific type of task.

[0151] When applying the scheme of the embodiments of this specification, due to the influence of the initial weight, there will be specific initial parallel task adaptation units among multiple initial parallel task adaptation units that mainly affect the results of specific types of tasks, that is, they have a large weight on specific types of tasks, so that a certain degree of independence between tasks can be achieved. In addition, since each type of task has an initial parallel task adaptation unit that mainly affects its processing results, the initial parallel task adaptation unit that is mainly responsible for other types of tasks will make a relatively small contribution. Therefore, the commonalities between different types of tasks can help improve task processing performance to a certain extent and achieve mutual cooperation among the initial parallel task adaptation units.

[0152] In an optional embodiment of the present specification, after the initial processing model is trained in the first stage and the intermediate model is obtained, all parameters of the intermediate model can be inherited to the second stage. Compared with the training of the initial processing model in the first stage, when the intermediate model is trained in the second stage, at least one initial shared task adaptation unit is additionally added to solve the mutual interference between the initial parallel task adaptation units, that is, the intermediate model also includes an intermediate weight selection unit, an initial shared task adaptation unit and multiple intermediate parallel task adaptation units, and the weight corresponding to the initial shared task adaptation unit is different from the weight corresponding to each intermediate parallel task adaptation unit; the above training of the intermediate model according to the multi-task sample set to obtain the trained task processing model can include the following steps:

[0153] Extracting first sample data from the multi-task sample set, wherein the first sample data is any sample data in the multi-task sample set, and the first sample data carries a first sample type label and a first sample training label;

[0154] Inputting the first sample data and the first sample type label into the intermediate model to obtain a second prediction result;

[0155] According to the second prediction result and the first sample training label, the weights in the intermediate weight selection unit, the parameters of the initial shared task adaptation unit and the parameters of each intermediate parallel task adaptation unit are adjusted, and the step of extracting the first sample data from the multi-task sample set is returned to execute until the second training stop condition is reached, thereby obtaining a trained task processing model.

[0156] In actual applications, when adjusting the weights in the intermediate weight selection unit, the parameters of the initial shared task adaptation unit, and the parameters of each intermediate parallel task adaptation unit according to the second prediction result and the first sample training label, the second loss value can be calculated according to the second prediction result and the first sample training label, and the weights in the intermediate weight selection unit, the parameters of the initial shared task adaptation unit, and the parameters of each intermediate parallel task adaptation unit can be adjusted according to the second loss value, and the step of extracting the first sample data from the multi-task sample set is returned until the second preset stop condition is reached to obtain the trained task processing model.

[0157] In a possible implementation of the present specification, the second preset stop condition includes that the second loss value is less than or equal to the second preset threshold value, and also includes that the number of iterations reaches the second preset number of iterations, wherein the second preset threshold value and the second preset number of iterations are selected according to actual conditions, and the embodiments of the present specification do not impose any limitations on this.

[0158] By applying the solution of the embodiment of this specification, a second loss value is calculated based on the second prediction result and the first sample training label, and the second loss value is compared with the second preset stop condition. If the second preset stop condition is not met, the intermediate model is continuously trained until the second preset stop condition is met, and the training is completed to obtain the task processing model. This makes the task processing model finally obtained more accurate.

[0159] In an optional embodiment of the present specification, the inputting of the first sample data and the first sample type label into the intermediate model to obtain the second prediction result may include the following steps:

[0160] Inputting the first sample data into the intermediate encoding unit to obtain a second encoding feature;

[0161] Inputting the second encoding feature into a plurality of intermediate parallel task adaptation units to obtain a second sample sequence, wherein the second sample sequence includes a plurality of second sample features, and the second sample features correspond to the intermediate parallel task adaptation units one by one;

[0162] Inputting the second encoding feature into the initial shared task adaptation unit to obtain a third sample sequence, wherein the third sample sequence includes a third sample feature corresponding to the initial shared task adaptation unit;

[0163] Inputting the first sample type label into an intermediate weight selection unit to obtain an intermediate weight sequence, wherein the intermediate weight sequence includes a plurality of intermediate weights;

[0164] Determine a second decoding sequence according to the intermediate weight sequence, the second sample sequence and the third sample sequence;

[0165] The second decoded sequence is input into the intermediate decoding unit to obtain a second prediction result.

[0166] Specifically, the intermediate weights in the intermediate weight sequence can be called intermediate adaptive weights. The intermediate weight sequence includes both the first intermediate weight sequence corresponding to each intermediate parallel task adaptation unit and the second intermediate weight sequence corresponding to the initial shared task adaptation unit, wherein the first intermediate weight in the first intermediate weight sequence is the weight obtained by training the initial weight in the first stage, and the second intermediate weight in the second intermediate weight sequence is the weight set by initialization, that is, the second intermediate weight in the second intermediate weight sequence has not been trained in the first stage.

[0167] It should be noted that when determining the second decoding sequence based on the intermediate weight sequence, the second sample sequence and the third sample sequence, a preset screening parameter can be obtained, and the multiple first intermediate weights in the first intermediate weight sequence can be sorted. The preset screening parameter is used to screen out the first target intermediate weight from the sorted multiple first intermediate weights, and an updated intermediate weight sequence is generated based on the first target intermediate weight. The second decoding sequence is determined based on the second sample sequence and the third sample sequence, the second intermediate weight sequence and the updated intermediate weight sequence.

[0168] Exemplarily, after the first stage of training is completed, the initial weight sequence of the first stage has undergone a large differentiation and is updated to a first intermediate weight sequence, from [0.22, 0.2, 0.2, 0.2] to [0.32, 0.28, 0.12, 0.08]. The first intermediate weight sequence is then screened using configurable preset screening parameters, and other intermediate parallel task adaptation units with too small first intermediate weights and their corresponding first intermediate weights are discarded. The intermediate parallel task adaptation units corresponding to the screened first target intermediate weights are used as parallel task adaptation units in the second stage that can affect the task processing results.

[0169] In practical applications, the above-mentioned method of "determining the second decoding sequence according to the intermediate weight sequence, the second sample sequence and the third sample sequence" is the same as the above-mentioned method of "determining the first decoding sequence according to the initial weight sequence and the first sample sequence", and will not be repeated in the embodiments of this specification.

[0170] Furthermore, in order to better fuse the second sample sequence output by the intermediate parallel task adaptation unit and the third sample sequence output by the initial shared task adaptation unit, an initial weight network can be introduced in the second stage, and the second sample sequence and the third sample sequence are input into the initial weight network. The initial weight network learns the second sample sequence and the third sample sequence as feature information to obtain intermediate weights. Specifically, the initial weight network is shown in the following formula (3):

[0171] W * =G(concat(S(x) [START] ,A * (x) [START] )) (3)

[0172] Among them, S(x) is the third sample sequence output by the initial shared task adaptation unit, A * (x) is the second sample sequence output by the intermediate parallel task adaptation unit. The output of the initial shared task adaptation unit and the intermediate parallel task adaptation unit is a multi-dimensional output result. [START] indicates taking the 0th dimension data, which contains the information of the entire sentence. *is the intermediate weight output by the initial weight network. The intermediate weight is a 1xM-dimensional tensor. M is the number of initial shared task adaptation units plus the number of intermediate parallel task adaptation units. G represents the initial weight network (Gate Network), which can also be called the weight generation network. concat is the connection function. It should be noted that when the intermediate model is trained, the parameters of the initial weight network are also adjusted accordingly.

[0173] By applying the scheme of the embodiments of the present specification, in order to compensate for the synergy of the discarded intermediate parallel task adaptation units, an initial shared task adaptation unit can be introduced as a channel for interaction between the intermediate parallel task adaptation units, so that the information interaction between the intermediate parallel task adaptation units passes through the initial shared task adaptation unit, thereby alleviating the interference between tasks, and the output of the initial shared task adaptation unit and the output of the screened intermediate parallel task adaptation unit interact through the intermediate weight, reducing the direct mutual interference between the intermediate parallel task adaptation units and improving the collaborative effect between the task adaptation units.

[0174] It is worth noting that the task processing method provided in the embodiments of this specification can be applied to a variety of scenarios, including but not limited to e-commerce scenarios and conference scenarios. Taking the commodity search question-and-answer scenario in e-commerce as an example, a conversation robot can be built based on the generation capability of a large model to answer users' questions. Figure 4 , taking the application of the task processing method provided in this specification in the intelligent question-answering scenario as an example, the task processing method is further explained. Figure 4 A flowchart of an automatic question-answering method provided by an embodiment of this specification is shown, which specifically includes the following steps:

[0175] Step 402: Obtain question and answer data and question and answer types corresponding to the target question and answer task.

[0176] Step 404: Input the question and answer data into a plurality of task adaptation units in the task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one.

[0177] Step 406: According to the question and answer type, a target weight sequence is screened out from multiple groups of weight sequences, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond one-to-one to the target task features.

[0178] Step 408: Determine the question-answering result according to the target task sequence and the target weight sequence.

[0179] It should be noted that the implementation of step 402 to step 408 is the same as the implementation of step 302 to step 308 described above, and will not be described in detail in this embodiment of the specification.

[0180] By applying the solution of the embodiments of this specification, since the task processing model includes multiple task adaptation units, the interference between multi-task data can be reduced through the collaboration of multiple task adaptation units and target weight sequences, and the task processing model performance can be improved by modifying the model architecture based on task analysis, thereby further improving the automatic question answering performance.

[0181] See also Figure 5 , Figure 5 A flowchart of a task processing model training method provided by an embodiment of the present specification is shown, which specifically includes the following steps:

[0182] Step 502: Obtain a multi-task sample set.

[0183] Step 504: Train the initial processing model according to the multi-task sample set to obtain an intermediate model, wherein the intermediate model includes an intermediate encoding unit and an intermediate decoding unit.

[0184] Step 506: Train the intermediate model according to the multi-task sample set to obtain a trained task processing model, wherein the parameters of the intermediate encoding unit and the intermediate decoding unit remain fixed during the training of the intermediate model.

[0185] It should be noted that the implementation of steps 502 to 506 can refer to the above Figure 3 The task processing method shown will not be described in detail in the embodiments of this specification.

[0186] The scheme of the embodiment of this specification is applied, by introducing task adaptation unit technology and two-stage training technology, utilizing the mutual cooperation and guided adaptive weights between multiple task adaptation units, to differentiate different tasks to a certain extent, thereby reducing the interference between different task data. In addition, through two-stage training, an initial shared task adaptation unit is added to the intermediate parallel task adaptation unit, and further fine-tuning is performed to enhance the interaction between different tasks and reduce the interference between different tasks. Compared with the model training cost of the same magnitude, the training cost of the task processing model has not increased significantly, but its performance is better on the multi-task data set constructed by the common natural language data set, and the training method of the task processing model is also applicable to the model architecture with a large number of parameters.

[0187] See also Figure 6 , Figure 6A flowchart of another task processing model training method provided by an embodiment of the present specification is shown. The task processing model training process is divided into two stages. After the first stage of training is completed, all parameters are inherited to the model of the second stage for parameter initialization. The input form of the task processing model is as follows: {"input":"input sample data","target":"sample training label","type":"sample type label"}.

[0188] Phase 1:

[0189] Input the sample data into the initial encoding unit of the initial processing model to obtain a first encoding feature; input the first encoding feature into multiple initial parallel task adaptation units to obtain a first sample sequence; input the sample type label into the initial weight selection unit of the initial processing model, and obtain an initial weight sequence (including W1, W2, W3, W4, W5) after weight sharpening; determine the first decoding sequence according to the initial weight sequence and the first sample sequence; input the first decoding sequence into the initial decoding unit of the initial processing model to obtain a first prediction result; train the initial processing model according to the first prediction result and the sample training label to obtain a trained intermediate model;

[0190] It is worth noting that, with the help of each initial guided adaptive weight in the initial weight sequence, different initial parallel task adaptation units are guided to lead and complete different types of tasks, achieving a certain degree of independence between tasks while allowing the initial parallel task adaptation units to cooperate with each other;

[0191] Phase 2:

[0192] The sample data is input into the intermediate encoding unit of the intermediate model to obtain a second encoding feature; the second encoding feature is input into multiple intermediate parallel task adaptation units of the intermediate model to obtain a second sample sequence; the second encoding feature is input into the initial shared task adaptation unit of the intermediate model to obtain a third sample sequence; the sample type label is input into the intermediate weight selection unit of the intermediate model, and W1 and W2 are obtained through weight sharpening and preset screening parameters screening, and the second sample sequence is screened using W1 and W2; the second sample sequence and the third sample sequence are connected and input into the initial weight network, and the initial weight network learns the second sample sequence and the third sample sequence as feature information to obtain intermediate weights; in the weighted summation unit, a second decoding sequence is determined according to the screened second sample sequence, the third sample sequence and the intermediate weight sequence; the second decoding sequence is input into the intermediate decoding unit of the intermediate model to obtain a second prediction result; the intermediate model is trained according to the second prediction result and the sample training label to obtain a trained task processing model, wherein the parameters of the intermediate encoding unit and the intermediate decoding unit remain fixed during the training of the intermediate model.

[0193] Applying the scheme of the embodiment of this specification, in the first stage of training, a guided adaptive weight initialization method is proposed, and a specific parallel task adaptation unit is realized in conjunction with multiple parallel task adaptation units. The unit mainly completes a specific task, reduces the interference between different tasks, and solves the problem that the mutual interference between different tasks in multi-task learning makes it difficult for the model to improve the performance of multiple tasks at the same time. In the second stage of training, a shared task adaptation unit is introduced and a training method of parameter freezing is used to further improve the collaboration ability between task adaptation units, and the synergy between different tasks is brought into play as much as possible with very little computing power consumption, which has a good prospect for further improvement of training and performance of large-scale language models. At the same time, the task processing model training method proposed in the embodiment of this application can realize fine-tuning of the model on specific multiple tasks under the premise of a small computing cost, and the performance can be aligned with or even exceed the performance of zero-sample learning, and the task processing model training method proposed in the embodiment of this specification can be widely used in various text generation applications to improve the effect of downstream tasks.

[0194] See also Figure 7 , Figure 7 The following is a schematic diagram of an automatic question-and-answer interface provided by an embodiment of the present specification. The automatic question-and-answer interface is divided into a question-and-answer task input interface and a question-and-answer result display interface. The question-and-answer task input interface includes a task input box, an "OK" control, and a "Cancel" control. The question-and-answer result display interface includes a result display box.

[0195] The user inputs the question and answer data and question and answer type corresponding to the target question and answer task through the task input box displayed on the client. The user clicks the "OK" control, and the server receives the question and answer data and question and answer type sent by the client, inputs the question and answer data into multiple task adaptation units in the task processing model, and obtains the target task sequence, wherein the target task sequence includes multiple target task features, and the target task features and task adaptation units correspond one to one; according to the question and answer type, the target weight sequence is selected from multiple groups of weight sequences, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond one to one with the target task features; according to the target task sequence and the target weight sequence, the question and answer result is determined, and the question and answer result is sent to the client. The client displays the question and answer result in the result display box.

[0196] In actual applications, users can operate controls by clicking, double-clicking, touching, hovering the mouse, sliding, long pressing, voice control, or shaking, etc. The selection is based on actual conditions, and the embodiments of this specification do not impose any limitations on this.

[0197] Corresponding to the above-mentioned task processing method embodiment, this specification also provides a task processing device embodiment. Figure 8 FIG. 1 shows a schematic diagram of a task processing device provided by an embodiment of the present specification. Figure 8 As shown, the device comprises:

[0198] The first acquisition module 802 is configured to acquire task data and task type corresponding to the target task;

[0199] The first input module 804 is configured to input the task data into a plurality of task adaptation units in the task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one;

[0200] The first screening module 806 is configured to screen a target weight sequence from multiple groups of weight sequences according to the task type, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond to the target task features one by one;

[0201] The first determination module 808 is configured to determine the task processing result according to the target task sequence and the target weight sequence.

[0202] Optionally, the task adaptation unit includes at least one shared task adaptation unit and multiple parallel task adaptation units; the first input module 804 is further configured to input task data into multiple parallel task adaptation units in the task processing model to obtain a first target task sequence, and input task data into the shared task adaptation unit in the task processing model to obtain a second target task sequence; generate a target task sequence based on the first target task sequence and the second target task sequence.

[0203] Optionally, the target weight sequence includes a first target weight sequence corresponding to the first target task sequence and a second target weight sequence corresponding to the second target task sequence; the device also includes: a third screening module, configured to obtain preset screening parameters; sorting multiple first target weights in the first target weight sequence, and using preset screening parameters to screen out the first target task weight from the sorted multiple first target weights; a first determination module 808, further configured to determine the task processing result based on the first target task sequence, the second target task sequence, the second target weight sequence and the first target task weight.

[0204] Optionally, the task processing model includes a weight selection unit; the first screening module 806 is further configured to screen out a target weight sequence from multiple groups of weight sequences stored in the weight selection unit according to the task type, wherein the multiple groups of weight sequences correspond to different types of tasks respectively.

[0205] Optionally, the device also includes: a training module, configured to obtain a multi-task sample set; train the initial processing model according to the multi-task sample set to obtain an intermediate model, wherein the intermediate model includes an intermediate encoding unit and an intermediate decoding unit; train the intermediate model according to the multi-task sample set to obtain a trained task processing model, wherein the parameters of the intermediate encoding unit and the intermediate decoding unit remain fixed during the training of the intermediate model.

[0206] Optionally, the training module is further configured to extract first sample data from the multi-task sample set, wherein the first sample data is any sample data in the multi-task sample set, and the first sample data carries a first sample type label and a first sample training label; input the first sample data and the first sample type label into the initial processing model to obtain a first prediction result; adjust the model parameters of the initial processing model according to the first prediction result and the first sample training label, and return to execute the step of extracting the first sample data from the multi-task sample set until the first training stop condition is reached to obtain a trained intermediate model.

[0207] Optionally, the initial processing model includes an initial encoding unit, an initial weight selection unit, an initial decoding unit and multiple initial parallel task adaptation units; the training module is further configured to input the first sample data into the initial encoding unit to obtain a first encoding feature; input the first encoding feature into multiple initial parallel task adaptation units to obtain a first sample sequence, wherein the first sample sequence includes multiple first sample features, and the first sample features and the initial parallel task adaptation units correspond one to one; input the first sample type label into the initial weight selection unit to obtain an initial weight sequence, wherein the initial weight sequence includes multiple initial weights, and the initial weights correspond one to one to the first sample features; determine a first decoding sequence based on the initial weight sequence and the first sample sequence; input the first decoding sequence into the initial decoding unit to obtain a first prediction result.

[0208] Optionally, the intermediate model also includes an intermediate weight selection unit, an initial shared task adaptation unit and multiple intermediate parallel task adaptation units, and the weight corresponding to the initial shared task adaptation unit is different from the weight corresponding to each intermediate parallel task adaptation unit; the training module is further configured to extract first sample data from the multi-task sample set, wherein the first sample data is any sample data in the multi-task sample set, and the first sample data carries a first sample type label and a first sample training label; input the first sample data and the first sample type label into the intermediate model to obtain a second prediction result; according to the second prediction result and the first sample training label, adjust the weight in the intermediate weight selection unit, the parameters of the initial shared task adaptation unit and the parameters of each intermediate parallel task adaptation unit, and return to execute the step of extracting the first sample data from the multi-task sample set until the second training stop condition is reached to obtain a task processing model that has completed training.

[0209] Optionally, the training module is further configured to input the first sample data into the intermediate encoding unit to obtain a second encoding feature; input the second encoding feature into multiple intermediate parallel task adaptation units to obtain a second sample sequence, wherein the second sample sequence includes multiple second sample features, and the second sample features correspond to the intermediate parallel task adaptation units one-to-one; input the second encoding feature into the initial shared task adaptation unit to obtain a third sample sequence, wherein the third sample sequence includes a third sample feature corresponding to the initial shared task adaptation unit; input the first sample type label into the intermediate weight selection unit to obtain an intermediate weight sequence, wherein the intermediate weight sequence includes multiple intermediate weights; determine a second decoding sequence based on the intermediate weight sequence, the second sample sequence and the third sample sequence; input the second decoding sequence into the intermediate decoding unit to obtain a second prediction result.

[0210] Optionally, the device further includes: a sending module configured to send the task processing result to the client according to the display requirement information, so that the client displays the task processing result to the user.

[0211] Optionally, the device further includes: a receiving module configured to receive adjustment sample data sent by a user based on the task processing result, and adjust the model parameters of the task processing model according to the adjustment sample data.

[0212] By applying the solution of the embodiments of this specification, since the task processing model includes multiple task adaptation units, the interference between multi-task data can be reduced through the collaboration of multiple task adaptation units and target weight sequences, and the task processing model performance can be improved by modifying the model architecture based on task analysis, thereby further improving the task processing performance.

[0213] The above is a schematic scheme of a task processing device of this embodiment. It should be noted that the technical scheme of the task processing device and the technical scheme of the above task processing method belong to the same concept, and the details of the technical scheme of the task processing device that are not described in detail can all be referred to the description of the technical scheme of the above task processing method.

[0214] Corresponding to the above-mentioned automatic question-answering method embodiment, this specification also provides an automatic question-answering device embodiment, Fig. 9 FIG. 1 shows a schematic diagram of the structure of an automatic question-answering device provided by an embodiment of this specification. Fig. 9 As shown, the device comprises:

[0215] The second acquisition module 902 is configured to acquire question and answer data and question and answer types corresponding to the target question and answer task;

[0216] The second input module 904 is configured to input the question-answer data into a plurality of task adaptation units in the task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one;

[0217] The second screening module 906 is configured to screen a target weight sequence from multiple groups of weight sequences according to the question and answer type, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond to the target task features one by one;

[0218] The second determination module 908 is configured to determine the question-answering result according to the target task sequence and the target weight sequence.

[0219] By applying the solution of the embodiments of this specification, since the task processing model includes multiple task adaptation units, the interference between multi-task data can be reduced through the collaboration of multiple task adaptation units and target weight sequences, and the task processing model performance can be improved by modifying the model architecture based on task analysis, thereby further improving the automatic question answering performance.

[0220] The above is a schematic scheme of an automatic question-answering device of this embodiment. It should be noted that the technical scheme of the automatic question-answering device and the technical scheme of the automatic question-answering method described above are of the same concept, and the details not described in detail in the technical scheme of the automatic question-answering device can be found in the description of the technical scheme of the automatic question-answering method described above.

[0221] Fig.10 The block diagram of a computing device provided by one embodiment of the present specification is shown. The components of the computing device 1000 include but are not limited to a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and the database 1050 is used to store data.

[0222] The computing device 1000 also includes an access device 1040 that enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1040 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world microwave interconnection access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0223] In one embodiment of the present specification, the above components of the computing device 1000 and Fig.10 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.10 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0224] The computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1000 may also be a mobile or stationary server.

[0225] Among them, the processor 1020 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned task processing method or automatic question and answer method.

[0226] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned task processing method and automatic question-answering method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned task processing method or automatic question-answering method.

[0227] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned task processing method or automatic question-answering method.

[0228] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium is the same as the technical scheme of the above-mentioned task processing method and automatic question-answering method. For details not described in detail in the technical scheme of the storage medium, please refer to the description of the technical scheme of the above-mentioned task processing method or automatic question-answering method.

[0229] An embodiment of the present specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned task processing method or automatic question-answering method.

[0230] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above-mentioned task processing method and automatic question answering method belong to the same concept, and the details not described in detail in the technical scheme of the computer program can be referred to the description of the technical scheme of the above-mentioned task processing method or automatic question answering method.

[0231] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0232] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0233] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0234] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0235] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A task processing method, comprising: Get the task data and task type corresponding to the target task; Inputting the task data into a plurality of task adaptation units in a task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one; According to the task type, a target weight sequence is screened out from a plurality of weight sequences, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes a plurality of target weights, and the target weights correspond to the target task features one by one; A task processing result is determined according to the target task sequence and the target weight sequence.

2. The method according to claim 1, wherein the task adaptation unit comprises at least one shared task adaptation unit and a plurality of parallel task adaptation units; The step of inputting the task data into a plurality of task adaptation units in the task processing model to obtain a target task sequence includes: Inputting the task data into a plurality of parallel task adaptation units in a task processing model to obtain a first target task sequence, and inputting the task data into a shared task adaptation unit in the task processing model to obtain a second target task sequence; A target task sequence is generated according to the first target task sequence and the second target task sequence.

3. The method according to claim 2, wherein the target weight sequence comprises a first target weight sequence corresponding to the first target task sequence and a second target weight sequence corresponding to the second target task sequence; After selecting the target weight sequence from the plurality of weight sequences according to the task type, the method further includes: Get preset filtering parameters; Sorting a plurality of first target weights in the first target weight sequence, and screening out a first target task weight from the sorted plurality of first target weights using the preset screening parameter; The step of determining the task processing result according to the target task sequence and the target weight sequence includes: A task processing result is determined according to the first target task sequence, the second target task sequence, the second target weight sequence, and the first target task weight.

4. The method according to claim 1, wherein the task processing model comprises a weight selection unit; The step of selecting a target weight sequence from a plurality of weight sequences according to the task type includes: According to the task type, a target weight sequence is screened out from a plurality of groups of weight sequences stored in the weight selection unit, wherein the plurality of groups of weight sequences correspond to different types of tasks, respectively.

5. The method according to claim 1, before inputting the task data into a plurality of task adaptation units in a task processing model to obtain a target task sequence, further comprises: Obtain a multi-task sample set; Training the initial processing model according to the multi-task sample set to obtain an intermediate model, wherein the intermediate model includes an intermediate encoding unit and an intermediate decoding unit; The intermediate model is trained according to the multi-task sample set to obtain a trained task processing model, wherein the parameters of the intermediate encoding unit and the intermediate decoding unit are fixed during the training process of the intermediate model.

6. The method according to claim 5, wherein the initial processing model is trained according to the multi-task sample set to obtain an intermediate model, comprising: Extracting first sample data from the multi-task sample set, wherein the first sample data is any sample data in the multi-task sample set, and the first sample data carries a first sample type label and a first sample training label; Inputting the first sample data and the first sample type label into the initial processing model to obtain a first prediction result; According to the first prediction result and the first sample training label, the model parameters of the initial processing model are adjusted, and the step of extracting the first sample data from the multi-task sample set is returned to be executed until the first training stop condition is reached to obtain a trained intermediate model.

7. The method according to claim 6, wherein the initial processing model comprises an initial encoding unit, an initial weight selection unit, an initial decoding unit and a plurality of initial parallel task adaptation units; The step of inputting the first sample data and the first sample type label into the initial processing model to obtain a first prediction result includes: Inputting the first sample data into the initial encoding unit to obtain a first encoding feature; Inputting the first coding feature into the multiple initial parallel task adaptation units to obtain a first sample sequence, wherein the first sample sequence includes multiple first sample features, and the first sample features correspond to the initial parallel task adaptation units one by one; Inputting the first sample type label into an initial weight selection unit to obtain an initial weight sequence, wherein the initial weight sequence includes a plurality of initial weights, and the initial weights correspond one-to-one to the first sample features; Determine a first decoding sequence according to the initial weight sequence and the first sample sequence; The first decoding sequence is input into the initial decoding unit to obtain a first prediction result.

8. According to the method of claim 5, the intermediate model further comprises an intermediate weight selection unit, an initial shared task adaptation unit and a plurality of intermediate parallel task adaptation units, and the weight corresponding to the initial shared task adaptation unit is different from the weight corresponding to each intermediate parallel task adaptation unit; The step of training the intermediate model according to the multi-task sample set to obtain a trained task processing model includes: Extracting first sample data from the multi-task sample set, wherein the first sample data is any sample data in the multi-task sample set, and the first sample data carries a first sample type label and a first sample training label; Inputting the first sample data and the first sample type label into the intermediate model to obtain a second prediction result; According to the second prediction result and the first sample training label, the weights in the intermediate weight selection unit, the parameters of the initial shared task adaptation unit and the parameters of each intermediate parallel task adaptation unit are adjusted, and the step of extracting the first sample data from the multi-task sample set is returned to be executed until the second training stop condition is reached, thereby obtaining a trained task processing model.

9. The method according to claim 8, wherein the step of inputting the first sample data and the first sample type label into the intermediate model to obtain a second prediction result comprises: Inputting the first sample data into the intermediate encoding unit to obtain a second encoding feature; Inputting the second encoding feature into the plurality of intermediate parallel task adaptation units to obtain a second sample sequence, wherein the second sample sequence includes a plurality of second sample features, and the second sample features correspond to the intermediate parallel task adaptation units one by one; Inputting the second encoding feature into the initial shared task adaptation unit to obtain a third sample sequence, wherein the third sample sequence includes a third sample feature corresponding to the initial shared task adaptation unit; Inputting the first sample type label into the intermediate weight selection unit to obtain an intermediate weight sequence, wherein the intermediate weight sequence includes a plurality of intermediate weights; Determine a second decoding sequence according to the intermediate weight sequence, the second sample sequence and the third sample sequence; The second decoded sequence is input into the intermediate decoding unit to obtain a second prediction result.

10. The method according to claim 1, after determining the task processing result according to the target task sequence and the target weight sequence, further comprises: The task processing result is sent to the client according to the display requirement information, so that the client displays the task processing result to the user.

11. The method according to claim 10, after sending the task processing result to the client according to the display requirement information, further comprising: Receive adjustment sample data sent by the user based on the task processing result, and adjust model parameters of the task processing model according to the adjustment sample data.

12. An automatic question-answering method, comprising: Obtain the question-answering data and question-answering type corresponding to the target question-answering task; Inputting the question-answer data into a plurality of task adaptation units in a task processing model to obtain a target task sequence, wherein the target task sequence includes a plurality of target task features, and the target task features correspond to the task adaptation units one by one; According to the question-answer type, a target weight sequence is screened out from multiple groups of weight sequences, wherein the weight sequence represents the importance of each task feature in the corresponding task sequence, and the target weight sequence includes multiple target weights, and the target weights correspond to the target task features one by one; The question-answering result is determined according to the target task sequence and the target weight sequence.

13. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 or claim 12 are implemented.

14. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of any one of claims 1 to 11 or the method of claim 12.