Task processing model training, task processing and request processing based on task processing model
Patent Information
- Application Number
- CN202510228036.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]然而,在多任务的模型微调过程中,常常会出现性能冲突问题,也即,使用任务A和任务B联合训练模型时,相较于单独针对任务A进行训练所获得的模型,联合训练得到的模型在任务A上的性能可能会显著下降
[0036] This specification provides a task processing model training method according to one embodiment, comprising: acquiring a sample set and test results of a sample task, wherein the test results are obtained by the task processing model processing the test data of the sample task, the task processing model including multiple processing units, the multiple processing units being used to determine the relationship between different elements in the test data; determining, from the multiple processing units, key processing units corresponding to the sample task based on the test results, wherein the key processing units have a greater impact on the test results than non-key processing units, and non-key processing units are processing units other than the key processing units in the task processing model; and adjusting the parameters of the key processing units according to the sample set to obtain a trained task processing model. Determining the key processing units corresponding to the sample task in the task processing model before model training allows for more refined optimization of the key processing units during model training, enabling the task processing model to better capture features and patterns related to the sample task and improve the performance of the task processing model on the sample task. Furthermore, by adjusting the parameters only for the key processing units corresponding to the sample tasks, the mutual interference between different tasks is reduced, the performance conflict problem is effectively solved, and the multi-task processing performance of the task processing model is improved. At the same time, the number of parameters that need to be updated is reduced, the computational resources and time required for model training are reduced, and the training efficiency of the task processing model is improved.
Smart Images

Figure CN122656019A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of artificial intelligence technology, and in particular to task processing model training, task processing, and request processing methods based on task processing models. Background Technology
[0002] With the development of artificial intelligence technology, pre-trained models have attracted widespread attention due to their powerful generalization ability and excellent performance on various tasks. These models are typically pre-trained on large amounts of text data, learning rich language representations. To enable pre-trained models to effectively solve specific problems, such as sentiment analysis, machine translation, and question-answering systems, fine-tuning is often required for specific tasks. Fine-tuning not only improves model performance but also reduces reliance on large-scale labeled data, lowers development costs, and accelerates model deployment.
[0003] However, performance conflicts often arise during multi-task model fine-tuning. That is, when a model is jointly trained using task A and task B, the performance of the jointly trained model on task A may be significantly lower than that of a model trained solely on task A. Therefore, a model training scheme that can improve the multi-task processing performance of a model is urgently needed. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a task processing model training method. One or more embodiments of this specification also relate to a task processing method, a request processing method based on a task processing model, a task platform, a task processing model training device, a task processing device, an information processing device based on a task processing model, a computing device, an electronic device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a method for training a task processing model is provided, comprising:
[0006] Obtain the sample set and test results of the sample task. The test results are obtained by the task processing model processing the test data of the sample task. The task processing model includes multiple processing units, which are used to determine the relationship between different elements in the test data.
[0007] Based on the test results, the key processing units corresponding to the sample task were identified from multiple processing units. The key processing units had a greater impact on the test results than the non-key processing units. The non-key processing units were the processing units other than the key processing units in the task processing model.
[0008] Based on the sample set, the parameters of the key processing units are adjusted to obtain the trained task processing model.
[0009] According to a second aspect of the embodiments of this specification, a task processing method is provided, comprising:
[0010] Obtain the pending task data for the target task;
[0011] The task data to be processed is input into the task processing model to obtain the task processing result of the target task. The task processing model is trained based on the task processing model training method.
[0012] According to a third aspect of the embodiments of this specification, a request processing method based on a task processing model is provided, applied to a task platform, comprising:
[0013] Receive model requests sent by terminal devices;
[0014] Based on the model request, the target task processing model is determined from multiple task processing models, wherein the multiple task processing models are trained based on the task processing model training method.
[0015] According to a fourth aspect of the embodiments of this specification, a task platform is provided, including a request interface and a response unit;
[0016] The request interface is used to receive model requests sent by terminal devices. The model request includes at least one of the following: the scene identifier of the target task scene, the scene input data of the target task scene, and the model specification parameters.
[0017] The response unit is used to determine the target task processing model from multiple task processing models based on the model request, wherein the multiple task processing models are trained based on the task processing model training method.
[0018] According to a fifth aspect of the embodiments of this specification, a task processing model training apparatus is provided, comprising:
[0019] The first acquisition module is configured to acquire the sample set and test results of the sample task. The test results are obtained by the task processing model processing the test data of the sample task. The task processing model includes multiple processing units, which are used to determine the relationship between different elements in the test data.
[0020] The first determining module is configured to determine the key processing unit corresponding to the sample task from multiple processing units based on the test results. The key processing unit has a greater impact on the test results than the non-key processing unit. The non-key processing unit is the processing unit other than the key processing unit in the task processing model.
[0021] The adjustment module is configured to adjust the parameters of key processing units based on the sample set to obtain a trained task processing model.
[0022] According to a sixth aspect of the embodiments of this specification, a task processing apparatus is provided, comprising:
[0023] The second acquisition module is configured to acquire the pending task data of the target task;
[0024] The input module is configured to input the task data to be processed into the task processing model to obtain the task processing result of the target task. The task processing model is trained based on the task processing model training method.
[0025] According to a seventh aspect of the embodiments of this specification, an information processing apparatus based on a task processing model is provided, applied to a task platform, comprising:
[0026] The receiving module is configured to receive model requests sent by the terminal device;
[0027] The second determination module is configured to determine the target task processing model from multiple task processing models based on a model request, wherein the multiple task processing models are trained based on a task processing model training method.
[0028] According to an eighth aspect of the embodiments of this specification, a computing device is provided, comprising:
[0029] Memory and processor;
[0030] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the methods provided in the first, second, or third aspects described above.
[0031] According to a ninth aspect of the embodiments of this specification, an electronic device is provided, comprising:
[0032] The memory and processor are connected via a bus;
[0033] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the methods provided in the first, second, or third aspects described above.
[0034] According to a tenth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the methods provided in the first, second, or third aspects described above.
[0035] According to an eleventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the methods provided in the first, second, or third aspects described above.
[0036] This specification provides a task processing model training method according to one embodiment, comprising: acquiring a sample set and test results of a sample task, wherein the test results are obtained by the task processing model processing the test data of the sample task, the task processing model including multiple processing units, the multiple processing units being used to determine the relationship between different elements in the test data; determining, from the multiple processing units, key processing units corresponding to the sample task based on the test results, wherein the key processing units have a greater impact on the test results than non-key processing units, and non-key processing units are processing units other than the key processing units in the task processing model; and adjusting the parameters of the key processing units according to the sample set to obtain a trained task processing model. Determining the key processing units corresponding to the sample task in the task processing model before model training allows for more refined optimization of the key processing units during model training, enabling the task processing model to better capture features and patterns related to the sample task and improve the performance of the task processing model on the sample task. Furthermore, by adjusting the parameters only for the key processing units corresponding to the sample tasks, the mutual interference between different tasks is reduced, the performance conflict problem is effectively solved, and the multi-task processing performance of the task processing model is improved. At the same time, the number of parameters that need to be updated is reduced, the computational resources and time required for model training are reduced, and the training efficiency of the task processing model is improved. Attached Figure Description
[0037] Figure 1 This is a flowchart illustrating a task processing model training method provided in one embodiment of this specification;
[0038] Figure 2 This is a flowchart illustrating the processing procedure of a task processing model training method provided in one embodiment of this specification.
[0039] Figure 3 This is a flowchart illustrating a task processing method provided in one embodiment of this specification;
[0040] Figure 4 This is an architecture diagram of a task processing system provided in one embodiment of this specification;
[0041] Figure 5 This is a flowchart illustrating a request processing method based on a task processing model, as provided in one embodiment of this specification.
[0042] Figure 6This is a schematic diagram of the structure of a task platform provided in one embodiment of this specification;
[0043] Figure 7 This is a schematic diagram of the structure of a task processing model training device provided in one embodiment of this specification;
[0044] Figure 8 This is a schematic diagram of the structure of a task processing device provided in one embodiment of this specification;
[0045] Figure 9 This is a schematic diagram of the structure of an information processing device based on a task processing model provided in one embodiment of this specification;
[0046] Figure 10 This is a structural block diagram of a computing device provided in one embodiment of this specification;
[0047] Figure 11 This is a structural block diagram of an electronic device provided in one embodiment of this specification. Detailed Implementation
[0048] Many specific details are set forth in the following description to provide 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 extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0049] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as 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.
[0050] 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, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0051] Furthermore, 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. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0052] In one or more embodiments of this specification, a large model refers to a deep learning model with a large number of model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even tens of trillions of model parameters. A large model can also be called a foundational model (Foundation Model 1). It is pre-trained using large-scale unlabeled corpora to produce a pre-trained model with hundreds of millions of parameters. Such models can adapt to a wide range of downstream tasks and have good generalization ability. Examples include Large Language Models (LLMs) and Multi-modal Pre-training Models (MLMs).
[0053] In practical applications, large models only require a small number of samples to fine-tune the pre-trained model before they can be applied to different tasks. Large models can be widely used in fields such as Natural Language Processing (NLP) and Computer Vision. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as NLP tasks such as text-based sentiment classification, text summarization, and machine translation. The main application scenarios for large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
[0054] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0055] Performance conflict refers to the interference between different task objectives, feature requirements, or optimization strategies when a model learns multiple related or unrelated tasks simultaneously. This interference can lead to performance degradation on one or more tasks, failing to achieve the same results as training a single task, with differences exceeding 10%. Performance conflict can also be understood as task conflict. Causes of performance conflict include, but are not limited to, differences in task objectives, feature requirements, and optimization strategies. Differences in task objectives mean that the learning objectives of different tasks may be completely different. For example, sentiment analysis focuses on the sentiment of text, while named entity recognition focuses on extracting specific types of entities from text. This difference in objectives may make it difficult for the model to find a unified representation that meets the needs of all tasks. Differences in feature requirements mean that different tasks may require different feature representations. For example, some tasks may need to capture local details, while others require global contextual information. This difference means that while the model is trying to adapt to one task, it may not be able to serve another task well. Differences in optimization strategies mean that different tasks may have different optimization strategies. For example, some tasks may require a larger learning rate, while others require a smaller learning rate. In this case, a unified optimization strategy may not be able to meet the needs of all tasks simultaneously.
[0056] Multi-task fine-tuning refers to a scheme that uses datasets from multiple specific tasks (such as translation, code completion, etc.) to train a pre-trained model in order to improve the model's question-answering ability in a specific task domain.
[0057] Deep self-attention (Transformer) models are network structures based on multi-head self-attention mechanisms, primarily used for processing sequential data. A Transformer model consists of repeatedly stacked encoder and decoder units. This design allows the Transformer to efficiently learn long-term dependencies, making it suitable for various natural language processing tasks, including machine translation, text summarization, and question answering systems.
[0058] Bidirectional Encoder Representations from Transformers (BERT) model: This is a pre-trained NLP model. By learning from a large amount of unlabeled text data, this model can capture deep semantic information in text and achieves significant performance improvements on many NLP tasks.
[0059] The Text-to-Text Transfer Transformer (T5) model is an NLP model. The main characteristic of the T5 model is that it unifies all NLP tasks into a text-to-text format, meaning both the input and output are text sequences. This design makes the model more adaptable to various tasks, such as translation, question answering, and summarization.
[0060] Attention Head: An attention head is a specific module in the attention layer structure of a Transformer network. Each attention layer contains multiple attention heads, each assigning different weights to different parts of the input data, allowing the model to focus on important information and thus improving its ability to understand and model sequence data.
[0061] Activation patching is an interpretability tool used to locate key modules that have a significant impact on model predictions. The main method involves perturbing the outputs (activation values) of modules within the model and judging the importance of the modules by observing the magnitude of the perturbation's impact on model behavior.
[0062] Supervised fine-tuning (SFT) is a method of further training a model based on a pre-trained model. In this method, the model is trained on a dataset containing pairs of inputs and desired outputs so that it learns how to generate responses closer to human-level performance. Supervised fine-tuning is often used to adapt a model to task-specific or domain-specific data, thereby improving its performance on those tasks.
[0063] SFT (Small Fit Forward) is a widely used fine-tuning method for large models, used to adjust the model to adapt to downstream tasks and improve its ability to perform specific tasks. However, in practice, it has been found that SFT is prone to performance conflicts when targeting multiple tasks simultaneously. This issue affects the practical application of the model, leading to the need to deploy multiple models simultaneously in project scenarios, with resource consumption increasing proportionally to the number of tasks.
[0064] Currently, the above problems can be solved through the following two approaches. The first approach involves training a plug-and-play low-rank adaptation module for each task, followed by training a classifier to determine the task type of the model's input. During testing, the task type is determined first, and then the corresponding low-rank adaptation module is applied to the model to address the multi-task fine-tuning problem. However, this approach is complex. The classifier may make errors during the recognition phase, causing the model's final output to deviate completely from the input. Furthermore, multiple training iterations are required to obtain the additional module for each task, resulting in a high training cost. The second approach involves using sequential training to achieve multi-task fine-tuning, i.e., training task A first, then task B. In each training iteration, a small amount of data is used to train the model, identifying model parameters with significant post-training parameter changes. Then, training begins again from scratch, updating only these parameters with significant changes. Additionally, the parameters selected each time must meet the condition that they are not updated in the previous round of task training. However, this approach requires re-identifying the parameters corresponding to each task after training for each task, making the training process cumbersome. Furthermore, it requires some experimental training before determining which parameters need to be updated, which adds extra overhead to the training process.
[0065] To address the aforementioned issues, this specification, based on model interpretability methods, designs a scheme for targeted enhancement of processing units responsible for specific tasks, resolving task conflict issues during multi-task model fine-tuning. Specifically, it acquires a sample set and test results for a sample task. The test results are obtained by the task processing model processing the test data of the sample task. The task processing model includes multiple processing units used to determine the relationships between different elements in the test data. Based on the test results, the key processing unit corresponding to the sample task is identified from among the multiple processing units. The key processing unit has a greater impact on the test results than non-key processing units, which are processing units other than the key processing units in the task processing model. Based on the sample set, the parameters of the key processing units are adjusted to obtain the trained task processing model. By combining model interpretability methods, key processing units used to complete different tasks in the task processing model are identified before training, which not only improves the capabilities of the trained task processing model but also enhances its training efficiency.
[0066] This specification provides a task processing model training method, and also relates to a task processing method, a request processing method based on a task processing model, a task platform, a task processing model training device, a task processing device, an information processing device based on a task processing model, a computing device, an electronic device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0067] See Figure 1 , Figure 1 This specification illustrates a flowchart of a task processing model training method according to an embodiment, which specifically includes the following steps:
[0068] Step 102: Obtain the sample set and test results of the sample task. The test results are obtained by the task processing model processing the test data of the sample task. The task processing model includes multiple processing units, which are used to determine the relationship between different elements in the test data.
[0069] It should be noted that a sample task refers to the task that the task processing model is intended to solve or complete. The sample task serves as the goal and direction of the task processing model training process, ensuring that subsequent training proceeds in the direction of solving the sample task. A sample task can be multiple tasks with different data modalities. For example, a sample task can be a sample text task, a sample image task, a sample audio task, a sample video task, etc. When there are multiple sample tasks, sample sets and test results for each of the sample tasks can be obtained. For example, taking a sample text task as an example, if the task processing model is to possess both code processing and translation capabilities, then the sample task can include both code processing and translation tasks. By using the sample sets and test results of the code processing task and the sample sets and test results of the translation task, respectively, and training the task processing model based on the task processing model training method proposed in the embodiments of this specification, a task processing model with good code processing and translation capabilities can be obtained. Furthermore, the code processing and translation performance of the trained task processing model can exceed the performance of models trained solely on code processing tasks or solely on translation tasks.
[0070] A sample set refers to a dataset used to train a task processing model. The sample set can be supervised data including sample data and sample results, or it can be biased data including sample preference data and sample non-preference data, depending on the specific circumstances. This specification does not impose any limitations on this. The sample set provides learning material for the training process of the task processing model, enabling the model to learn specific patterns and make predictions. The modalities of the sample data in the sample set are related to the specific sample task. For example, the sample set can be a sample text set composed of sample text data, a sample image set composed of sample image data, a sample audio set composed of sample audio data, or a sample video set composed of sample video data. A task processing model is a model that can learn patterns from the sample set and predict new data based on the learned knowledge. The task processing model can be an untrained neural network model or a pre-trained large model, such as BERT or T5. The processing unit in the task processing model can be an attention head used to determine the relationships between different elements in the test data.
[0071] Test data refers to a set of data independent of the sample set; that is, test data is data outside the sample set. Test data can reflect the processing capabilities of the task processing model. Test data can be test text data, test image data, test audio data, test video data, etc. For example, when the test data is content to be translated, the test data can be used to determine the translation capability of the task processing model. Test results refer to the prediction results generated by the task processing model when the test data is input. There are usually multiple test data sets for each sample task. For example, 100 test data sets that can reflect the capabilities of the task processing model can be prepared for each sample task, and the test results output by the task processing model on these test data can be collected. If the sample task is a code generation task, the test data is function headers and function descriptions, and the test result is the function body completed by the task processing model. Or, if the sample task is a translation task, the test data is translation prompts (such as translating the following English content into Chinese) and the content to be translated (English text), and the test result is the Chinese content translated by the task processing model.
[0072] In practical applications, there are various ways to obtain the sample set and test results of a sample task, and the embodiments in this specification do not limit these methods. In one possible implementation, the sample set and test results of the sample task can be read directly from other databases or data acquisition devices. In another possible implementation, the sample set and test data of the sample task can be obtained, and the test data can be input into the task processing model to obtain the test results.
[0073] Step 104: Based on the test results, identify the key processing units corresponding to the sample task from multiple processing units. The key processing units have a greater impact on the test results than the non-key processing units. The non-key processing units are the processing units other than the key processing units in the task processing model.
[0074] It's important to note that identifying the key processing units within a task processing model used to complete different sample tasks can resolve multi-task conflicts. Key processing units are those processing units within the task processing model that contribute the most to the objective of a specific sample task. For example, a key processing unit could be the attention head that contributes the most to the objective of a specific sample task among multiple attention heads. When processing sample task data, key processing units can capture very important or highly representative features, thus significantly influencing the predictive ability of the task processing model on the sample task. For instance, if the sample tasks include code processing and translation tasks, and the task processing model includes three processing units, the key processing unit for the code processing task is the first processing unit, and the key processing unit for the translation task is the second processing unit.
[0075] In practical applications, there are various ways to determine the key processing units corresponding to a sample task from multiple processing units based on test results. The specific method chosen depends on the actual situation, and this specification does not impose any limitations on this approach. One possible implementation method in this specification is to identify the key processing units in the task processing model used to complete a specific sample task through activation value patching. Another possible implementation method in this specification is to utilize the characteristics of the attention mechanism to generate an attention map or weight distribution map based on the test results. The attention map or weight distribution map can intuitively show the focus of each processing unit on different sample tasks. Therefore, the key processing units corresponding to the sample task can be directly determined from the attention map or weight distribution map.
[0076] Step 106: Adjust the parameters of the key processing units based on the sample set to obtain the trained task processing model.
[0077] In practical applications, if there are multiple sample tasks, the process of adjusting the parameters of key processing units based on the sample set can be viewed as a multi-task fine-tuning process for the task processing model. In multi-task fine-tuning, the gradient values at all parameter positions of the task processing model can be calculated using the sample set corresponding to each sample task. The gradient values of each sample task are then used to update only the parameters of the key processing units corresponding to that sample task, resulting in a trained task processing model. Methods for adjusting the parameters of key processing units based on the sample set include, but are not limited to, supervised fine-tuning and direct preference optimization.
[0078] By applying the solution of the embodiments of this specification, parameters of the key processing unit corresponding to each sample task are adjusted by using the sample set of each sample task, while other parts remain unchanged, thereby reducing conflicts caused by global parameter update among different sample tasks. Moreover, only the key processing unit is subjected to parameter adjustment, which reduces the number of parameters that need to be updated, not only saves computing resources, but also accelerates the convergence process. Since the key processing unit usually captures information that is highly relevant to the sample task, the optimization of the key processing unit is more helpful to improve the performance of the task processing model on a specific sample task, while maintaining the performance on other sample tasks. For different sample tasks, the corresponding key processing units are selected for parameter adjustment, so that the task processing model can be customized and adjusted according to specific task requirements without redesigning the entire model architecture, which improves the flexibility of the training process of the task processing model.
[0079] In an alternative embodiment of this specification, taking the case that the sample set includes sample data and sample results of the sample data; the above-mentioned adjusting parameters of the key processing unit according to the sample set to obtain a trained task processing model may include the following steps:
[0080] inputting the sample data into the task processing model to obtain a prediction result;
[0081] adjusting parameters of the key processing unit according to the sample results and the prediction results to obtain a trained task processing model.
[0082] It should be noted that sample data refers to the data part provided to the task processing model for result prediction. The prediction result refers to the result obtained by the task processing model processing and predicting the sample data. The sample result refers to the real label or target value corresponding to the sample data, which is the result that the task processing model attempts to predict. For example, if the sample data is the untranslated data "Nice to meet you" for a translation task, the sample result is "Nice to meet you".
[0083] In practical applications, when adjusting the parameters of key processing units based on sample results and prediction results, the predicted loss value can be calculated based on the sample results and prediction results of the sample task. The parameters of the key processing unit corresponding to the sample task are then adjusted based on the predicted loss value until a preset stopping condition is reached, resulting in a trained task processing model. Many functions can be used to calculate the predicted loss value, such as the cross-entropy loss function, L1 norm loss function, maximum loss function, mean squared error loss function, and logarithmic loss function. The specific function to be selected depends on the actual situation, and this specification does not impose any limitations on this. The preset stopping condition includes, but is not limited to, the predicted loss value being less than or equal to a preset threshold or the number of iterations reaching a preset number of iterations. The preset threshold and preset number of iterations are selected based on the actual situation, and this specification does not impose any limitations on this.
[0084] By applying the solutions in the embodiments of this specification, for any given sample task, the parameters of only the key processing units corresponding to that sample task are adjusted using the sample results and prediction results of that sample task. This allows the task processing model to better capture the features and patterns related to that sample task, thereby improving the performance of the task processing model on that sample task. Furthermore, in the process of adjusting the parameters of only the key processing units corresponding to that sample task using the sample results and prediction results, keeping the parameters of the non-key processing units corresponding to that sample task unchanged can avoid affecting the processing performance of the task processing model on other sample tasks, reduce mutual interference between different tasks, effectively solve the performance conflict problem, and improve the multi-task processing performance of the task processing model.
[0085] In one optional embodiment of this specification, taking the training process of the task processing model as multi-task (e.g., two sample tasks) training as an example, the sample tasks include a first sample task and a second sample task, the key processing units include a first key processing unit corresponding to the first sample task and a second key processing unit corresponding to the second sample task, and the sample set includes a first sample set of the first sample task and a second sample set of the second sample task; the above-mentioned adjustment of the parameters of the key processing units according to the sample set to obtain the trained task processing model may include the following steps:
[0086] Based on the first sample set, the parameters of the first key processing unit are adjusted, and based on the second sample set, the parameters of the second key processing unit are adjusted to obtain the trained task processing model. The trained task processing model includes the first key processing unit and the second key processing unit after parameter adjustment.
[0087] In practical applications, there are multiple ways to adjust the parameters of the first key processing unit based on the first sample set and the second key processing unit based on the second sample set. The specific method chosen depends on the actual situation, and this specification does not impose any limitations on this approach. In one possible implementation, the parameter adjustments for the first and second key processing units can be performed independently. For example, the parameters of the first key processing unit can be adjusted first, and then the parameters of the second key processing unit can be adjusted. After these adjustments, the trained task processing model is obtained. In another possible implementation, a gradient mask can be used to mitigate task conflict by allowing the gradient of each sample task to update only the corresponding key processing unit matrix, while simultaneously adjusting the parameters of the first and second key processing units.
[0088] By applying the solutions in the embodiments of this specification, when there are multiple sample tasks, the parameters of the key processing units corresponding to each sample task are adjusted using the sample set of each sample task, thereby reducing mutual interference between different tasks, effectively solving the performance conflict problem, and improving the multi-task processing performance of the task processing model.
[0089] In one optional embodiment of this specification, taking the parameter adjustment method of the gradient mask as an example, the above-mentioned parameter adjustment of the first key processing unit based on the first sample set, and parameter adjustment of the second key processing unit based on the second sample set, to obtain the trained task processing model, may include the following steps:
[0090] Based on the first sample set, calculate the first gradient information, and mask the parameters of the non-critical processing units corresponding to the first sample task in the first gradient information to obtain the first mask gradient information.
[0091] Based on the second sample set, calculate the second gradient information, and mask the parameters of the non-critical processing units corresponding to the second sample task in the second gradient information to obtain the second mask gradient information.
[0092] Based on the gradient information of the first mask and the gradient information of the second mask, the parameters of the task processing model are adjusted to obtain the trained task processing model.
[0093] It should be noted that the values of 0 or 1 in the first and second gradient mask information can be used to update the parameters of a specified key processing unit. That is, in each batch of training sample data (before updating parameters), the gradient information at all parameter positions is calculated for each sample task's corresponding sample set. Then, for each sample task, the gradient information of the parameters other than the corresponding key processing unit is set to zero by applying a gradient mask. The gradient information applied to each sample task is then summed to obtain the summed gradient information. The parameters of the task processing model are updated using this summed gradient information. This process is repeated batch by batch until the final training is complete, resulting in a trained task processing model.
[0094] For example, suppose there is a task processing model with three processing units and two sample tasks (the first sample task and the second sample task). For each sample task, the key processing units have been identified: the key processing units for the first sample task are the first and third processing units. The key processing units for the second sample task are the second and third processing units. The original gradient information for all parameters of the entire task processing model is calculated. For the first sample task, a mask `mask_A` is created, where the positions of the first and third processing units are set to 1, and the other positions are set to 0. For the second sample task, a mask `mask_B` is created, where the positions of the second and third processing units are set to 1, and the other positions are set to 0. The original gradients are multiplied by `mask_A` and `mask_B` respectively, resulting in two new mask gradients, where the gradients of non-key processing units are 0. The two new mask gradients are added together to obtain the summed gradient information. This summed gradient information is used to update all parameters of the task processing model, resulting in the trained task processing model. During this process, since the gradients of some processing units are set to zero, they will not change during the parameter update.
[0095] By applying the solutions in the embodiments of this specification, when there are multiple sample tasks, the parameters of the key processing units corresponding to each sample task are adjusted using the sample set of each sample task, thereby reducing mutual interference between different tasks, effectively solving the performance conflict problem, and improving the multi-task processing performance of the task processing model.
[0096] In one optional embodiment of this specification, the process of using activation value imputation to identify key processing units in a task processing model for completing a specific sample task is described. That is, the process of determining the key processing unit corresponding to the sample task from multiple processing units based on test results may include the following steps:
[0097] Locate key information in the test results to obtain crucial test information.
[0098] Based on key test information, the key processing unit corresponding to the sample task is determined from multiple processing units.
[0099] It should be noted that key information localization refers to the process of locating key test information from test results. Key test information refers to keywords or key terms in the test results that can demonstrate the capabilities of the task processing model. For example, in a code completion task, the logical judgment word "if" in the test results can demonstrate the logical judgment capability of the task processing model; therefore, the logical judgment word "if" is key test information in the test results.
[0100] In practical applications, there are various ways to locate key information in test results and obtain key information from the test results. The specific method chosen depends on the actual situation, and the embodiments in this specification do not impose any limitations on this. In one possible implementation of this specification, an information location model can be used to locate key information in the test results and obtain key test information. In another possible implementation of this specification, a test information database corresponding to the sample task can be obtained, wherein the test information database includes multiple key information samples; the test results are matched with the test information database, and the key information that appears in both the test results and the test information database is determined as key test information.
[0101] Furthermore, there are multiple ways to determine the key processing unit corresponding to the sample task from multiple processing units based on key test information. The specific method chosen depends on the actual situation, and this specification does not limit this approach. In one possible implementation, an attention map or weight distribution map can be generated based on the key test information, and the key processing unit corresponding to the sample task can be determined from the attention map or weight distribution map. In another possible implementation, activation value imputation can be used to identify the key processing unit in the task processing model used to complete a specific sample task, based on the key test information and the perturbation data corresponding to the test data.
[0102] By applying the solution of the embodiments in this specification, the key processing unit corresponding to the sample task is determined from multiple processing units based on key test information, making the reference data for determining the key processing unit more accurate and improving the accuracy of the key processing unit.
[0103] In one optional embodiment of this specification, the above-described method for locating key information in the test results and obtaining key test information from the test results may include the following steps:
[0104] Obtain the task description information of the sample task;
[0105] The location prompts, task descriptions, test data, and test results are input into the location model to obtain key test information from the test results. The location prompts are used to guide the location model to locate the key test information from the test results.
[0106] It should be noted that task description information refers to all relevant information used to define and describe the sample task. Sample description information helps the information localization model understand the task objectives, input data format, output data requirements, etc., of the sample task. Test data helps the information localization model better understand the test results, such as what data processing was used to obtain the test results, so as to better locate key test information from the test results. There are multiple ways to obtain the task description information of the sample task; the specific method should be selected according to the actual situation, and this specification does not limit this approach. In one possible implementation of this specification, the task description information of the sample task can be received from the user through a client. In another possible implementation of this specification, the task description information of the sample task can be read from other data acquisition devices or databases.
[0107] Location prompts are guiding messages used to instruct or trigger information location models to extract key test information from test results based on task descriptions and test data. A typical location prompt might be, "You are a professional information analyst. Based on the task descriptions and test data, please locate which keywords in the generated test results are important key test information." An information location model is a deep learning model capable of understanding and locating information. This model can be a pre-trained large model or a deep learning model trained using training task descriptions, training test data, training test results, and training key test information.
[0108] By applying the solutions in the embodiments of this specification, the key test information that reflects the capabilities of the task processing model can be located from the test results by utilizing the information location capabilities of the information location model, thereby improving the efficiency and accuracy of locating key test information.
[0109] In one optional embodiment of this specification, determining the key processing unit corresponding to the sample task from multiple processing units based on key test information may include the following steps:
[0110] Obtain the perturbation data corresponding to the test data;
[0111] The perturbation data is input into the task processing model to obtain the perturbation attention results output by multiple processing units.
[0112] Based on key test information, multiple raw attention results, and multiple perturbation attention results, the key processing unit corresponding to the sample task is determined from multiple processing units. Among them, the multiple raw attention results are the results output by multiple processing units during the processing of test data by the task processing model.
[0113] It's important to note that perturbation data in the context of test data refers to data that has been modified or has noise added to the test data, making it impossible for the task processing model to complete the sample task corresponding to the test data. For example, if the test data is code in a code completion task, the perturbation data refers to data that has been modified so that the task processing model cannot predict "if" statements based on the perturbation data. The perturbation attention result refers to the attention weight matrix generated by each processing unit when the task processing model uses a multi-head self-attention mechanism to process the perturbation data. The attention weight matrix reflects the degree of mutual attention between different parts of the task processing model when processing perturbation data.
[0114] In practical applications, there are various ways to obtain the perturbation data corresponding to the test data, and the specific method should be selected according to the actual situation. This specification does not impose any limitations on this method in the embodiments. In one possible implementation, certain features of the test data can be modified, such as rotating, scaling, cropping, or adjusting the brightness of image data, or introducing spelling errors or adjusting word order in text data to obtain the perturbation data corresponding to the test data. In another possible implementation, a data generation model can be used to generate the perturbation data corresponding to the test data.
[0115] By applying the scheme of the embodiments of this specification, multiple perturbation attention results obtained by processing perturbation data through multiple processing units in the task processing model, combined with the original attention results, and then combined with key test information, the criticality of each processing unit to the sample task processing process can be accurately determined, thereby improving the accuracy of key processing units.
[0116] In one optional embodiment of this specification, determining the key processing unit corresponding to the sample task from multiple processing units based on key test information, multiple raw attention results, and multiple perturbation attention results may include the following steps:
[0117] During the processing of test data by the task processing model, the first original attention result output by the first processing unit is replaced with the first perturbation attention result to obtain the model processing result corresponding to the first processing unit. The model processing result is the result output by the task processing model, the first processing unit is any one of multiple processing units, and the first perturbation attention result is the perturbation attention result output by the first processing unit.
[0118] Based on the model processing results and key test information corresponding to multiple processing units, the key processing units corresponding to the sample task are determined from the multiple processing units. The correlation between the model processing results and key test information corresponding to the key processing units is lower than the correlation between the model processing results and key test information corresponding to non-key processing units.
[0119] It should be noted that replacing the first original attention result output by the first processing unit with the first perturbed attention result can be considered as perturbing the first processing unit. In the embodiments of this specification, only one processing unit is perturbed at a time, that is, when replacing the first original attention result output by the first processing unit with the first perturbed attention result, the original attention results output by other processing units remain unchanged. By iteratively perturbing all processing units in the task processing model, that is, sequentially replacing the original attention results output by multiple processing units with perturbed attention results, and observing the degree of influence of perturbing each processing unit on the final output result of the task processing model, the key processing unit can be determined. Specifically, if perturbing a processing unit causes a significant change in the final output result of the task processing model, it indicates that the processing unit is very important to the processing of the sample task, and the processing unit is a key processing unit. When observing the degree of influence of perturbing a processing unit on the final output result of the task processing model, it can be observed whether the prediction probability of the task processing model for key test information decreases. Under normal circumstances, the prediction probability of the task processing model for key test information is high. If the prediction probability decreases significantly, it indicates that the perturbed processing unit is a key processing unit.
[0120] For example, assume the task processing model includes two processing units, processing unit 1 and processing unit 2. Perturbation data is input into the task processing model, yielding perturbation attention result 1 from processing unit 1 and perturbation attention result 2 from processing unit 2. Test data is input into the task processing model, yielding original attention result 1 from processing unit 1 and original attention result 2 from processing unit 2. During the task processing model's processing of the test data, during the first perturbation, the original attention result 1 from processing unit 1 is replaced with the perturbation attention result 1, while the original attention result 2 from processing unit 2 remains unchanged, resulting in model processing result 1 from the task processing model. During the second perturbation, the original attention result 2 from processing unit 2 is replaced with the perturbation attention result 2, while the original attention result 1 from processing unit 1 remains unchanged, resulting in model processing result 2 from the task processing model. Calculations determine that the correlation between model processing result 1 and key test information is greater than the correlation between model processing result 2 and key test information. Therefore, it can be determined that perturbation of processing unit 2 decreases the prediction probability of the task processing model for key test information; thus, processing unit 2 is the key processing unit.
[0121] The scheme implemented in this specification improves the accuracy of key processing units by perturbing each processing unit in the task processing model and determining the key processing units based on the impact of the perturbation on the final output of the task processing model.
[0122] In one optional embodiment of this specification, obtaining the disturbance data corresponding to the test data described above may include the following steps:
[0123] Based on key test information, disturbance auxiliary information is extracted from the test results;
[0124] The disturbance warning information, test data, and disturbance auxiliary information are input into the data generation model to obtain disturbance data. The disturbance warning information is used to guide the data generation model to generate disturbance data.
[0125] It should be noted that perturbation assistance information refers to information used to assist the data generation model in generating perturbation data. Perturbation assistance information helps the data generation model understand the reasons why the task processing model generates key test information, thereby generating high-quality perturbation data. Perturbation prompt information refers to guiding information used to instruct or trigger the data generation model to generate perturbation data based on test data and perturbation assistance information. Perturbation prompt information includes, but is not limited to, the requirements for constructing perturbation data, specific operating procedures, and methods, which are selected according to the actual situation. This specification does not impose any limitations on these aspects in the embodiments. A perturbation prompt information might be, "You are a professional data processor. Please generate perturbation data based on the test data and perturbation assistance information that prevents the task processing model from completing the sample task corresponding to the test data." The data generation model refers to a deep learning model with data generation capabilities. The data generation model can be a pre-trained large model or a deep learning model trained based on training test data, training perturbation assistance information, and training perturbation data.
[0126] In practical applications, there are multiple ways to extract perturbation auxiliary information from test results based on key test information. The specific method should be selected according to the actual situation, and this specification does not limit this approach. Another possible implementation of this specification is to obtain a perturbation auxiliary template for key test information and add the information from the test results to the perturbation auxiliary template to obtain the perturbation auxiliary information. Another possible implementation of this specification is to directly identify the information in the test results preceding the key test information as perturbation auxiliary information (because the data generation model is expected to understand why the task processing model outputs specific key test information, the perturbation data ends before the key test information). For example, the sample task is a code processing task, and the perturbation data is a piece of code generated by the task processing model for processing the code problem. Assuming the code problem is "Generate 2 to the power of 3", the task processing model outputs "...resu lt=np.power(2,3)……". To understand how power is generated, "...resu lt=np." is identified as perturbation auxiliary information. The perturbation data output by the data generation model is the perturbated problem plus a partial solution. Using the example above, the data generation model can change the code problem, transforming it from 2 to the power of 3 to 2 multiplied by 3. This would cause the task processing model's output to become "...resu lt=np.dot" instead of "np.power". During the process of generating perturbation data, the data generation model is required to modify the test data so that the task processing model cannot generate normal output (test results).
[0127] The scheme implemented in the embodiments of this specification utilizes a data generation model to generate disturbance data based on test data and disturbance auxiliary information, thereby improving the generation efficiency and accuracy of disturbance data.
[0128] In one optional embodiment of this specification, the disturbance data generated by the data generation model may contain some unreliable data. Therefore, the disturbance data generated by the data generation model can be filtered. That is, the above-mentioned input of disturbance warning information, test data, and disturbance auxiliary information into the data generation model to obtain disturbance data may include the following steps:
[0129] The model is generated by inputting disturbance alerts, test data, and disturbance auxiliary information to obtain candidate disturbance data.
[0130] The candidate perturbation data is input into the task processing model to obtain the candidate perturbation results;
[0131] Based on the candidate perturbation results and test results, perturbation data is selected from the candidate perturbation data.
[0132] It should be noted that candidate perturbation data refers to data generated by the data generation model, and it is uncertain whether this data can guarantee that the task processing model will be unable to complete the sample task corresponding to the test data. The candidate perturbation result refers to the result obtained by the task processing model after processing the candidate perturbation data.
[0133] In practical applications, after inputting candidate perturbation data into the task processing model and obtaining the candidate perturbation results, the candidate perturbation results can be compared with the test results to determine whether the candidate perturbation results have completed the sample task corresponding to the test data. If not, it means that the task processing model cannot complete the sample task corresponding to the test data under the candidate perturbation data, and the candidate perturbation data is perturbation data. If yes, it means that the task processing model can still complete the sample task corresponding to the test data under the candidate perturbation data. At this time, the candidate perturbation data can be regenerated until the candidate perturbation results are different from the test results, and the perturbation data is obtained.
[0134] By applying the scheme of the embodiments of this specification, after generating candidate perturbation data, the candidate perturbation data is input into the task processing model, and the output change of the task processing model is observed to determine whether the candidate perturbation data generated by the data generation model is reliable, thereby ensuring the reliability of the perturbation data.
[0135] See Figure 2 , Figure 2 This specification illustrates a flowchart of a task processing model training method according to an embodiment. The training process of the task processing model (including multiple processing units) is explained using three sample tasks (sample task 1, sample task 2, and sample task 3) as an example.
[0136] For sample task 1: obtain sample set 1 and test data 1 for sample task 1; input test data 1 into the task processing model to obtain test result 1 for sample task 1; locate key information in test result 1 to determine key test information 1 in test result 1; based on key test information 1, determine the key processing unit 1 corresponding to sample task 1 from multiple processing units.
[0137] For sample task 2: obtain sample set 2 and test data 2 for sample task 2; input test data 2 into the task processing model to obtain test result 2 for sample task 2; locate key information in test result 2 to determine key test information 2 in test result 2; based on key test information 2, determine the key processing unit 2 corresponding to sample task 2 from multiple processing units.
[0138] For sample task 3: obtain sample set 3 and test data 3 for sample task 3; input test data 3 into the task processing model to obtain test result 3 for sample task 3; locate key information in test result 3 to determine key test information 3 in test result 3; based on key test information 3, determine the key processing unit 3 corresponding to sample task 3 from multiple processing units.
[0139] The parameters of key processing unit 1 are adjusted based on sample set 1, the parameters of key processing unit 2 are adjusted based on sample set 2, and the parameters of key processing unit 3 are adjusted based on sample set 3 to obtain the trained task processing model. The parameter adjustment process is as follows: Based on sample set 1, gradient information 1 is calculated; the gradient information corresponding to processing units other than key processing unit 1 in gradient information 1 is set to zero to obtain mask gradient information 1; based on sample set 2, gradient information 2 is calculated; the gradient information corresponding to processing units other than key processing unit 2 in gradient information 2 is set to zero to obtain mask gradient information 2; based on sample set 3, gradient information 3 is calculated; the gradient information corresponding to processing units other than key processing unit 3 in gradient information 3 is set to zero to obtain mask gradient information 3; mask gradient information 1, mask gradient information 2, and mask gradient information 3 are summed to obtain summed gradient information, and the parameters of the task processing model are updated using the summed gradient information to obtain the trained task processing model.
[0140] The solution described in the embodiments of this specification can resolve the conflict problem in multi-task fine-tuning of task processing models. By identifying the key processing units responsible for completing each sample task through activation value patching, and then during training, the gradient information calculated from the sample set corresponding to each sample task is used only to update the parameters of the key processing units corresponding to that sample task. This training method successfully resolves the conflict problem in multi-task fine-tuning of task processing models, and the trained multi-task model can outperform the single-task trained model.
[0141] See Figure 3 , Figure 3 A flowchart of a task processing method provided in one embodiment of this specification is shown, which specifically includes the following steps:
[0142] Step 302: Obtain the pending task data of the target task.
[0143] Step 304: Input the task data to be processed into the task processing model to obtain the task processing result of the target task. The task processing model is trained based on the task processing model training method.
[0144] It should be noted that the target task refers to the specific task that the task processing system aims to accomplish. The target task can be a task in different task scenarios, such as a virtual character dialogue task in a dialogue scenario, a code generation and code completion task in a code processing scenario, a translation task in a translation scenario, and so on. The task data to be processed refers to the data that will be input into the task processing model for target task processing. The task data to be processed can be multimodal data, such as at least one of text data, image data, audio data, and video data. Taking code generation as an example, the task data to be processed could be code to be completed. The task processing model refers to a machine learning model with good multi-task processing performance. The task processing model is obtained by adjusting the parameters of the key processing units corresponding to the sample tasks based on the sample set of the sample tasks. The key processing units corresponding to the sample tasks are selected from multiple processing units included in the task processing model based on the test results. The influence of key processing units on the test results is greater than that of non-key processing units. Non-key processing units are processing units other than the key processing units in the task processing model. The test results are obtained by the task processing model processing the test data of the sample tasks. Preferably, the sample tasks used to train the task processing model can be the same as the target task, thereby improving the accuracy of the task processing results. The task processing result refers to the output information of the task processing model, which is related to the specific target task. For example, if the target task is a code generation task, then the task processing result is the generated target code; or if the target task is a translation task, then the task processing result is the translation result.
[0145] In practical applications, there are various ways to obtain the pending task data of a target task, and the specific method should be selected according to the actual situation. This specification does not impose any limitations on these methods in the embodiments. In one possible implementation, the pending task data of the target task can be received from the user via a client. In another possible implementation, the pending task data of the target task can be read from other data acquisition devices or databases.
[0146] By applying the solutions in the embodiments of this specification, the task processing model can not only better capture the features and patterns related to the sample task, but also has good multi-task processing performance. Therefore, using the task processing model to process the target task allows the processing process to take into account multiple target tasks, improving the flexibility and accuracy of the target task processing process.
[0147] Considering the large number of model parameters in the task processing model and the limited computing resources of the client, the task processing method proposed in the embodiments of this specification can be applied to, for example, Figure 4 The task processing system shown is not limited to this. See also Figure 4 , Figure 4 This specification illustrates an architecture diagram of a task processing system provided in one embodiment of the present specification. The task processing system may include a client 402 and a server 404.
[0148] Client 402 is used to send the pending task data of the target task to server 404;
[0149] The server-side 404 is used to input the task data to be processed into the task processing model to obtain the task processing result of the target task. The task processing model is trained based on the task processing model training method. The server-side 404 is used to send the task processing result of the target task to the client 402.
[0150] Client 402 is also used to receive the task processing result of the target task sent by server 404.
[0151] like Figure 4 As shown, the task processing model is deployed in server 404. Server 404 can connect to one or more clients 402 via a local area network (LAN), wide area network (WAN), internet connection, or other types of data network. Client 402 may include, but is not limited to, smartphones, tablets, laptops, PDAs, personal computers (PCs), smart home devices, and in-vehicle devices. Client 402 can also interact with users through a graphical user interface to invoke the task processing model, thereby implementing the task processing method provided in the embodiments of this specification.
[0152] It is worth noting that the task processing methods provided in the embodiments of this specification are generally executed by the server. However, in other embodiments of this specification, if the client's runtime resources can meet the deployment and runtime conditions of the task processing model, the client can also have similar functions to the server, thereby executing the task processing methods provided in the embodiments of this specification. In other embodiments, the task processing methods provided in the embodiments of this specification can also be executed jointly by the client and the server.
[0153] See Figure 5 , Figure 5 The flowchart illustrates a request processing method based on a task processing model according to an embodiment of this specification. This request processing method is applied to a task platform and specifically includes the following steps:
[0154] Step 502: Receive the model request sent by the terminal device.
[0155] Step 504: Based on the model request, determine the target task processing model from multiple task processing models, wherein the multiple task processing models are trained based on the task processing model training method.
[0156] It should be noted that the target task processing model is a task processing model applicable to the target task scenario. The model request includes at least one of the following: the scenario identifier of the target task scenario, the scenario input data of the target task scenario, and model specification parameters. Based on the model request, there are multiple ways to determine the target task processing model from multiple task processing models; the specific method is selected according to the actual situation, and this specification does not limit this approach. In the first possible implementation of this specification, the corresponding target task processing model can be searched from at least one task processing model included in the model library based on the model request. In the second possible implementation of this specification, the target task processing model can be trained and obtained based on the model request. In the third possible implementation of this specification, the target task processing model can be constructed based on the model request.
[0157] For example, one can first search for at least one pre-trained task processing model from a model library based on the scene identifier of the target task scenario. Then, based on the model specification parameters, an initial task processing model is selected from the at least one task processing model. Finally, based on the scene input data of the target task scenario, the selected initial task processing model is trained to obtain a target task processing model suitable for user needs. The at least one task processing model can be based on... Figure 1 The task processing model shown was trained using the training method described in this specification, and will not be repeated in the embodiments.
[0158] The solutions implemented in the embodiments of this specification are adapted to user needs to obtain target task processing models, realize personalized model services, provide users with an efficient, flexible and easy-to-use model service method, and improve user experience.
[0159] In one optional embodiment of this specification, the model request includes a scene identifier of the target task scene; the process of determining the target task processing model from multiple task processing models based on the model request may include the following steps:
[0160] Based on the scenario identifier of the target task scenario, the target task processing model that is suitable for the target task scenario is searched from the model library. The model library stores multiple task processing models that are suitable for different task scenarios.
[0161] It should be noted that scene identifiers are unique or specific labels used to distinguish different task scenarios. The model library is a database for storing and managing various pre-trained deep learning models. Multiple task processing models adapted to different task scenarios cover different application scenarios and needs. The model library allows users to select appropriate models according to their needs, or directly call models for task processing through application programming interfaces.
[0162] Multiple task processing models adapted to different task scenarios are stored in the model library. Each model is optimized for a specific application environment. Any task processing model is based on... Figure 1 The training method shown is used to train the model obtained from the task processing model. For example, a target task processing model suitable for the code generation scenario can be found from the model library based on the scenario identifier "code generation" of the target task scenario.
[0163] By applying the solutions in the embodiments of this specification, based on scenario requirements, the target task processing model adapted to the corresponding scenario is accurately found through scenario identification, making task processing more accurate and more in line with the target task scenario, thereby improving user experience and task processing quality.
[0164] In one optional embodiment of this specification, the model request includes scene input data of the target task scenario; the above-mentioned determination of the target task processing model from multiple task processing models based on the model request may include the following steps:
[0165] From multiple task processing models, determine the initial task processing model that is suitable for the target task scenario;
[0166] Based on the scene input data of the target task scenario, the initial task processing model is trained to obtain the target task processing model.
[0167] It should be noted that the task processing models are adapted to different task scenarios. For example, task processing model 1 is suitable for task scenarios 1 and 2, while task processing model 2 is suitable for task scenarios 2 and 3. The initial task processing model refers to the model among multiple task processing models that is suitable for the target task scenario. If the target task scenario is task scenario 1, then the initial task processing model is task processing model 1 adapted to task scenario 1. The initial task processing model may not only be applicable to the target task scenario but also to other task scenarios; it is a general task processing model applicable to different task scenarios. While the initial task processing model can be used for target task processing, the results may not be ideal. In such cases, the initial task processing model can be optimized based on the scenario input data of the target task scenario. For example, optimizing the initial task processing model based on the scenario input data of a code generation scenario can yield a target task processing model suitable for the code generation scenario. The scenario input data of the target task scenario can be understood as the sample set and test results of the sample tasks in the target task scenario. The method for training the initial task processing model based on the scenario input data of the target task scenario to obtain the target task processing model can be found in [reference needed]. Figure 1 The training method of the task processing model shown in this specification will not be described again in the embodiments.
[0168] By applying the solutions in the embodiments of this specification, based on scenario requirements, a general initial task processing model is further trained using scenario input data to obtain a target task processing model adapted to the corresponding task scenario. This makes the target task processing model more closely fit the target task scenario, thereby improving user experience and task processing quality.
[0169] In one optional embodiment of this specification, the model request includes model specification parameters; the process of determining the target task processing model from multiple task processing models based on the model request may include the following steps:
[0170] Based on the model specification parameters, the corresponding target task processing model is searched from the model library, which stores multiple task processing models with different model specification parameters.
[0171] It's important to note that model specifications refer to the various parameters that define the model's structure and behavior. These parameters can be broadly categorized into two types: model parameters (learnable parameters) and hyperparameters. Model parameters are those automatically adjusted during model training via backpropagation, including but not limited to weight matrices and biases. For example, in a simple fully connected layer, the weight matrix is a two-dimensional tensor connecting neurons in the input and output layers; the biases are one-dimensional vectors providing additional offset values for each output neuron. Hyperparameters are parameters set before model training begins, controlling the model's learning process and architecture. Hyperparameters include, but are not limited to, the learning rate and the number of neurons per layer, chosen based on specific requirements.
[0172] By applying the solutions in the embodiments of this specification, based on the model specification parameters, the corresponding target task processing model can be accurately found, ensuring the efficient and stable operation of the target task processing model and improving the user experience.
[0173] In one optional embodiment of this specification, after determining the target task processing model from multiple task processing models based on the model request, the following steps may be further included:
[0174] Deploy the target task processing model, and build a task processing interface based on the target task processing model so that the terminal device can schedule the target task processing model to execute the target task through the task processing interface.
[0175] It should be noted that the task processing interface is an interactive programming interface for terminal devices to schedule target task processing models to process target tasks, and it is usually provided in the form of an application programming interface (API). Through the task processing interface, users can input the data of the target task to be processed in order to perform target task processing.
[0176] In practical applications, there are various ways to deploy the target task processing model, and the specific method should be chosen based on the actual situation. This specification does not impose any limitations on this approach. One possible implementation of this specification is to deploy the target task processing model on cloud-side devices using infrastructure provided by a cloud service provider. Another possible implementation of this specification is to deploy the target task processing model on edge devices using a lightweight framework. For example, the target task processing model can be deployed on a distributed system, and a task processing interface can be built based on the target task processing model and provided to terminal devices, enabling the terminal devices to schedule the target task processing model to execute target tasks through the task processing interface.
[0177] By applying the solutions provided in the embodiments of this specification, deploying the target task processing model, and building a task processing interface based on the target task processing model, terminal devices can efficiently call the target task processing model, thereby improving the processing quality and response speed of the target task.
[0178] See Figure 6 , Figure 6 This specification shows a schematic diagram of the structure of a task platform 600 provided in one embodiment of the specification. The task platform 600 includes a request interface 602 and a response unit 604.
[0179] Request interface 602 is used to receive a model request sent by a terminal device, wherein the model request includes at least one of the following: scene identifier of the target task scene, scene input data of the target task scene, and model specification parameters.
[0180] The response unit 604 is used to determine the target task processing model from multiple task processing models based on the model request, wherein the multiple task processing models are trained based on the task processing model training method.
[0181] In one optional embodiment of this specification, the task platform further includes a task processing interface, which is constructed based on the target task processing model.
[0182] The task processing interface is used to allow terminal devices to schedule and execute target tasks.
[0183] The above is an illustrative scheme of a task platform according to this embodiment. It should be noted that the technical solution of this task platform and the technical solution of the request processing method based on the task processing model described above belong to the same concept. For details not described in detail in the technical solution of the task platform, please refer to the description of the technical solution of the request processing method based on the task processing model described above.
[0184] Corresponding to the above-described embodiments of the task processing model training method, this specification also provides embodiments of the task processing model training apparatus. Figure 7 A schematic diagram of a task processing model training device provided in one embodiment of this specification is shown.
[0185] like Figure 7 As shown, the device includes:
[0186] The first acquisition module 702 is configured to acquire the sample set and test results of the sample task. The test results are obtained by the task processing model processing the test data of the sample task. The task processing model includes multiple processing units, which are used to determine the relationship between different elements in the test data.
[0187] The first determining module 704 is configured to determine the key processing unit corresponding to the sample task from multiple processing units based on the test results. The key processing unit has a greater impact on the test results than the non-key processing unit. The non-key processing unit is the processing unit other than the key processing unit in the task processing model.
[0188] The adjustment module 706 is configured to adjust the parameters of key processing units based on the sample set to obtain a trained task processing model.
[0189] Optionally, the first determining module 704 is further configured to locate key information in the test results and obtain key test information in the test results; based on the key test information, determine the key processing unit corresponding to the sample task from multiple processing units.
[0190] Optionally, the first determining module 704 is further configured to obtain the task description information of the sample task; input the positioning prompt information, task description information, test data and test results into the information positioning model to obtain key test information in the test results, wherein the positioning prompt information is used to guide the positioning model to locate the key test information from the test results.
[0191] Optionally, the first determining module 704 is further configured to: acquire perturbation data corresponding to the test data; input the perturbation data into the task processing model to obtain perturbation attention results output by multiple processing units respectively; and determine the key processing unit corresponding to the sample task from multiple processing units based on key test information, multiple original attention results and multiple perturbation attention results, wherein the multiple original attention results are the results output by multiple processing units respectively during the processing of test data by the task processing model.
[0192] Optionally, the first determining module 704 is further configured to replace the first original attention result output by the first processing unit with the first perturbation attention result during the processing of test data by the task processing model, thereby obtaining the model processing result corresponding to the first processing unit. Here, the model processing result is the result output by the task processing model, the first processing unit is any one of multiple processing units, and the first perturbation attention result is the perturbation attention result output by the first processing unit. Based on the model processing results and key test information corresponding to the multiple processing units, the key processing unit corresponding to the sample task is determined from the multiple processing units. Here, the correlation between the model processing result corresponding to the key processing unit and the key test information is lower than the correlation between the model processing result corresponding to the non-key processing unit and the key test information.
[0193] Optionally, the first determining module 704 is further configured to extract disturbance auxiliary information from the test results based on key test information; input the disturbance prompt information, test data and disturbance auxiliary information into the data generation model to obtain disturbance data, wherein the disturbance prompt information is used to guide the data generation model to generate disturbance data.
[0194] Optionally, the first determining module 704 is further configured to input the disturbance prompt information, test data and disturbance auxiliary information into the data generation model to obtain candidate disturbance data; input the candidate disturbance data into the task processing model to obtain candidate disturbance results; and filter out disturbance data from the candidate disturbance data based on the candidate disturbance results and the test results.
[0195] Optionally, the sample task includes a first sample task and a second sample task, the key processing unit includes a first key processing unit corresponding to the first sample task and a second key processing unit corresponding to the second sample task, and the sample set includes a first sample set of the first sample task and a second sample set of the second sample task; the adjustment module 706 is further configured to adjust the parameters of the first key processing unit according to the first sample set and adjust the parameters of the second key processing unit according to the second sample set to obtain a trained task processing model, wherein the trained task processing model includes the first key processing unit and the second key processing unit after parameter adjustment.
[0196] Optionally, the sample set includes sample data and sample results of the sample data; the adjustment module 706 is further configured to calculate first gradient information based on the first sample set, and mask the parameters of non-critical processing units corresponding to the first sample task in the first gradient information to obtain first mask gradient information; calculate second gradient information based on the second sample set, and mask the parameters of non-critical processing units corresponding to the second sample task in the second gradient information to obtain second mask gradient information; and adjust the parameters of the task processing model based on the first mask gradient information and the second mask gradient information to obtain the trained task processing model.
[0197] By applying the scheme of the embodiments in this specification, the key processing units corresponding to the sample tasks in the task processing model are determined before model training. This allows for more refined optimization of the key processing units during model training, enabling the task processing model to better capture features and patterns related to the sample tasks and improve its performance on those tasks. Furthermore, by adjusting parameters only for the key processing units corresponding to the sample tasks, mutual interference between different tasks is reduced, effectively resolving performance conflicts and improving the multi-task processing performance of the task processing model. Simultaneously, the number of parameters requiring updates is reduced, lowering the computational resources and time required for model training and improving the training efficiency of the task processing model.
[0198] The above is a schematic scheme of a task processing model training device according to this embodiment. It should be noted that the technical solution of this task processing model training device and the technical solution of the task processing model training method described above belong to the same concept. For details not described in detail in the technical solution of the task processing model training device, please refer to the description of the technical solution of the task processing model training method described above.
[0199] Corresponding to the above-described task processing method embodiments, this specification also provides embodiments of a task processing apparatus. Figure 8 A schematic diagram of a task processing apparatus according to one embodiment of this specification is shown. Figure 8 As shown, the device includes:
[0200] The second acquisition module 802 is configured to acquire the pending task data of the target task;
[0201] The input module 804 is configured to input the task data to be processed into the task processing model to obtain the task processing result of the target task, wherein the task processing model is trained based on the task processing model training method.
[0202] By applying the solutions in the embodiments of this specification, the task processing model can not only better capture the features and patterns related to the sample task, but also has good multi-task processing performance. Therefore, using the task processing model to process the target task allows the processing process to take into account multiple target tasks, improving the flexibility and accuracy of the target task processing process.
[0203] The above is an illustrative scheme of a task processing device according to this embodiment. It should be noted that the technical solution of this task processing device and the technical solution of the task processing method described above belong to the same concept. For details not described in detail in the technical solution of the task processing device, please refer to the description of the technical solution of the task processing method described above.
[0204] Corresponding to the above-described request processing method embodiment based on the task processing model, this specification also provides an embodiment of an information processing apparatus based on the task processing model. Figure 9 A schematic diagram of the structure of an information processing device based on a task processing model provided in one embodiment of this specification is shown. Figure 9 As shown, the device is applied to a mission platform and includes:
[0205] The receiving module 902 is configured to receive model requests sent by the terminal device;
[0206] The second determining module 904 is configured to determine the target task processing model from multiple task processing models based on a model request, wherein the multiple task processing models are trained based on a task processing model training method.
[0207] Optionally, the model request includes a scene identifier of the target task scenario; the second determining module 904 is further configured to search for a target task processing model suitable for the target task scenario from the model library based on the scene identifier of the target task scenario, wherein the model library stores multiple task processing models suitable for different task scenarios.
[0208] Optionally, the model request includes scene input data of the target task scenario; the second determining module 904 is further configured to determine an initial task processing model suitable for the target task scenario from multiple task processing models; and to train the initial task processing model based on the scene input data of the target task scenario to obtain the target task processing model.
[0209] Optionally, the model request includes model specification parameters; the second determining module 904 is further configured to search for the corresponding target task processing model from the model library based on the model specification parameters, wherein the model library stores multiple task processing models with different model specification parameters.
[0210] Optionally, the device further includes: a deployment module configured to deploy a target task processing model and, based on the target task processing model, construct a task processing interface so that the terminal device can schedule the target task processing model to execute the target task through the task processing interface.
[0211] The solutions implemented in the embodiments of this specification are adapted to user needs to obtain target task processing models, realize personalized model services, provide users with an efficient, flexible and easy-to-use model service method, and improve user experience.
[0212] The above is an illustrative scheme of an information processing device based on a task processing model according to this embodiment. It should be noted that the technical solution of this information processing device based on a task processing model and the technical solution of the request processing method based on a task processing model described above belong to the same concept. For details not described in detail in the technical solution of the information processing device based on a task processing model, please refer to the description of the technical solution of the request processing method based on a task processing model described above.
[0213] Figure 10 A structural block diagram of a computing device 1000 provided in one embodiment of this specification is shown.
[0214] The computing device 1000 includes:
[0215] Memory 1010 and processor 1020;
[0216] The memory 1010 is used to store computer programs / instructions, and the processor 1020 is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor 1020, they implement the steps of the above-mentioned task processing model training method, task processing method, or request processing method based on the task processing model.
[0217] In one or more embodiments of this specification, the computing device can be understood as an integrated smart terminal, including but not limited to a server, desktop computer, personal computer, all-in-one model machine, mobile phone, tablet computer or other portable smart terminal, etc., and the computing device may have the model described in the above embodiments of this application pre-installed.
[0218] Specifically, this computing device can pre-install various types of models, including but not limited to models in natural language processing, visual processing, speech processing, code processing, and multimodal task processing, thus providing diverse model selection. In different product forms, this computing device can support one or more model usage methods, including but not limited to model training, model invocation, model fine-tuning, model deployment, model inference, and application. In some product forms, this computing device also supports model management, including but not limited to multi-type model management (supporting the management of discriminative, generative, and other model types), model version control (supporting the control of different model versions), and model evaluation (evaluating model performance and effectiveness based on model evaluation tools). In other product forms, this computing device can also create applications based on models, providing application programming interface (API) invocation capabilities. Models can be invoked into created applications through the API interface, and application management tools are provided for application management and monitoring.
[0219] Furthermore, the computing device may also include data management (supporting the creation and management of model tuning datasets), a training center (providing abundant training resources to help users learn and master artificial intelligence technology), and basic control capabilities (providing enterprise-level basic control capabilities to ensure the security and efficient operation of the system). Through the above functions, it provides a comprehensive and integrated device for artificial intelligence development, training, deployment, and application.
[0220] Figure 11 A structural block diagram of an electronic device 1100 provided according to one embodiment of this specification is shown.
[0221] The memory 1110 and the processor 1120 are connected via a bus 1130;
[0222] The memory 1110 is used to store computer programs / instructions, and the processor 1120 is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor 1120, they implement the steps of the above-mentioned task processing model training method, task processing method, or request processing method based on the task processing model.
[0223] Specifically, the components of the electronic device 1100 include, but are not limited to, a memory 1110 and a processor 1120. The processor 1120 and the memory 1110 can be connected via a bus 1130.
[0224] Electronic device 1100 may also include access device 1140, which enables electronic device 1100 to communicate with database 1150 storing data via one or more networks 1160. Examples of such networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. Access device 1140 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) interface, a Wi-MAX (World Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0225] In one embodiment of this specification, the above-described components of the electronic device 1100 and Figure 11 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 11 The block diagram of the electronic device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0226] Electronic device 1100 can be any type of stationary or mobile electronic device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable electronic devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary electronic devices such as desktop computers or PCs. Electronic device 1100 can also be a mobile or stationary electronic device.
[0227] The above is an illustrative scheme of an electronic device according to this embodiment. It should be noted that the technical solution of this electronic device belongs to the same concept as the above-described task processing model training method, task processing method, and request processing method based on task processing model. For details not described in detail in the technical solution of the electronic device, please refer to the description of the above-described task processing model training method, task processing method, or request processing method based on task processing model.
[0228] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the task processing model training method, the task processing method, or the request processing method based on the task processing model described above.
[0229] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solutions of the task processing model training method, task processing method, and request processing method based on the task processing model described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the task processing model training method, task processing method, or request processing method based on the task processing model.
[0230] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described task processing model training method, task processing method, or request processing method based on a task processing model.
[0231] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the above-described task processing model training method, task processing method, and request processing method based on task processing model. For details not described in detail in the technical solution of the computer program product, please refer to the description of the above-described task processing model training method, task processing method, or request processing method based on task processing model.
[0232] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0233] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0234] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0235] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0236] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for training a task processing model, comprising: Obtain the sample set and test results of the sample task, wherein the test results are obtained by the task processing model processing the test data of the sample task, and the task processing model includes multiple processing units, which are used to determine the relationship between different elements in the test data. Based on the test results, the key processing unit corresponding to the sample task is determined from the plurality of processing units, wherein the key processing unit has a greater influence on the test results than the non-key processing units, and the non-key processing units are processing units other than the key processing units in the task processing model. Based on the sample set, the parameters of the key processing units are adjusted to obtain the trained task processing model.
2. The method according to claim 1, wherein determining the key processing unit corresponding to the sample task from the plurality of processing units based on the test results includes: The key information in the test results is located to obtain the key test information in the test results. Based on the key test information, the key processing unit corresponding to the sample task is determined from the plurality of processing units.
3. The method according to claim 2, wherein locating key information in the test results to obtain key test information in the test results includes: Obtain the task description information of the sample task; The location prompt information, the task description information, the test data, and the test results are input into the location model to obtain key test information from the test results. The location prompt information is used to guide the location model to locate the key test information from the test results.
4. The method according to claim 2, wherein determining the key processing unit corresponding to the sample task from the plurality of processing units based on the key test information includes: Obtain the disturbance data corresponding to the test data; The perturbation data is input into the task processing model to obtain the perturbation attention results output by the multiple processing units respectively; Based on the key test information, multiple raw attention results, and multiple perturbation attention results, the key processing unit corresponding to the sample task is determined from the multiple processing units. The multiple raw attention results are the results output by the multiple processing units respectively during the processing of the test data by the task processing model.
5. The method according to claim 4, wherein determining the key processing unit corresponding to the sample task from the plurality of processing units based on the key test information, multiple raw attention results, and multiple perturbation attention results includes: During the processing of the test data by the task processing model, the first original attention result output by the first processing unit is replaced with the first perturbation attention result to obtain the model processing result corresponding to the first processing unit. The model processing result is the result output by the task processing model, the first processing unit is any one of the plurality of processing units, and the first perturbation attention result is the perturbation attention result output by the first processing unit. Based on the model processing results corresponding to the plurality of processing units and the key test information, the key processing unit corresponding to the sample task is determined from the plurality of processing units. The correlation between the model processing result corresponding to the key processing unit and the key test information is lower than the correlation between the model processing result corresponding to the non-key processing unit and the key test information.
6. The method according to claim 4, wherein obtaining the disturbance data corresponding to the test data includes: Based on the key test information, disturbance assistance information is extracted from the test results; The disturbance prompt information, the test data, and the disturbance auxiliary information are input into the data generation model to obtain disturbance data, wherein the disturbance prompt information is used to guide the data generation model to generate the disturbance data.
7. The method according to claim 6, wherein the step of inputting the disturbance warning information, the test data, and the disturbance auxiliary information into the data generation model to obtain disturbance data includes: The disturbance prompt information, the test data, and the disturbance auxiliary information are input into the data generation model to obtain candidate disturbance data. The candidate perturbation data is input into the task processing model to obtain the candidate perturbation results; Based on the candidate perturbation results and the test results, perturbation data is selected from the candidate perturbation data.
8. The method according to claim 1, wherein the sample task includes a first sample task and a second sample task, the key processing unit includes a first key processing unit corresponding to the first sample task and a second key processing unit corresponding to the second sample task, and the sample set includes a first sample set of the first sample task and a second sample set of the second sample task; The step of adjusting the parameters of the key processing units based on the sample set to obtain the trained task processing model includes: Based on the first sample set, the parameters of the first key processing unit are adjusted, and based on the second sample set, the parameters of the second key processing unit are adjusted to obtain a trained task processing model, wherein the trained task processing model includes the first key processing unit and the second key processing unit after parameter adjustment.
9. The method according to claim 8, wherein adjusting the parameters of the first key processing unit based on the first sample set and adjusting the parameters of the second key processing unit based on the second sample set to obtain a trained task processing model comprises: Based on the first sample set, calculate the first gradient information, and mask the parameters of the non-critical processing units corresponding to the first sample task in the first gradient information to obtain the first mask gradient information. Based on the second sample set, calculate the second gradient information, and mask the parameters of the non-critical processing units corresponding to the second sample task in the second gradient information to obtain the second mask gradient information. Based on the first mask gradient information and the second mask gradient information, the parameters of the task processing model are adjusted to obtain the trained task processing model.
10. A task processing method, comprising: Obtain the pending task data for the target task; The task data to be processed is input into the task processing model to obtain the task processing result of the target task, wherein the task processing model is trained based on the training method described in any one of claims 1 to 9.
11. A request processing method based on a task processing model, applied to a task platform, comprising: Receive model requests sent by terminal devices; Based on the model request, a target task processing model is determined from a plurality of task processing models, wherein the plurality of task processing models are trained based on the training method described in any one of claims 1 to 9.
12. The method according to claim 11, wherein the model request includes a scene identifier of the target task scene; The step of determining the target task processing model from multiple task processing models based on the model request includes: Based on the scenario identifier of the target task scenario, a target task processing model suitable for the target task scenario is searched from the model library, wherein the model library stores multiple task processing models suitable for different task scenarios.
13. The method according to claim 11, wherein the model request includes scene input data of the target task scene; The step of determining the target task processing model from multiple task processing models based on the model request includes: From multiple task processing models, determine an initial task processing model that is suitable for the target task scenario; Based on the scene input data of the target task scenario, the initial task processing model is trained to obtain the target task processing model.
14. The method according to claim 11, wherein the model request includes model specification parameters; The step of determining the target task processing model from multiple task processing models based on the model request includes: Based on the model specification parameters, the corresponding target task processing model is searched from the model library, wherein the model library stores multiple task processing models with different model specification parameters.
15. The method according to any one of claims 11 to 14, wherein after determining the target task processing model from multiple task processing models based on the model request, the method further comprises: Deploy the target task processing model, and based on the target task processing model, construct a task processing interface so that the terminal device can schedule the target task processing model to execute the target task through the task processing interface.
16. A task platform, comprising a request interface and a response unit; The request interface is used to receive model requests sent by the terminal device, wherein... The model request includes at least one of the following: the scene identifier of the target task scene, the scene input data of the target task scene, and the model specification parameters. The response unit is configured to determine a target task processing model from a plurality of task processing models based on the model request, wherein the plurality of task processing models are trained based on the training method described in any one of claims 1 to 9.
17. The task platform according to claim 16, further comprising a task processing interface, wherein the task processing interface is constructed based on the target task processing model; The task processing interface is used for the terminal device to schedule and execute target tasks.
18. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 15.
19. An electronic device comprising: A memory and a processor, the memory and the processor being connected via a bus; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 15.
20. A computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 15.
21. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 15.