Task processing method, translation method, task processing model training method, computing device, computer-readable storage medium and computer program product

By generating domain prompt information of the target domain and performing tasks under instructions, the overfitting and catastrophic forgetting problems of task processing models in multi-domain tasks are solved, and the adaptability and accuracy of the model in different domains are improved.

WO2025194935A1PCT designated stage Publication Date: 2025-09-25ALIBABA (CHINA) CO LTD

Patent Information

Application Number
PCT/CN2024/142906
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-22
Filing Date
2024-12-26
Publication Date
2025-09-25

AI Technical Summary

Technical Problem

Existing task processing models are prone to overfitting and catastrophic forgetting when faced with multi-domain tasks, resulting in high accuracy in specific domains but insufficient accuracy outside of the domain and insufficient versatility.

Method used

By generating domain prompt information of the target domain, using the task processing model to generate domain prompt information under the instruction of the first indication information, and executing the task based on the information under the instruction of the second indication information, the processing of the target task is realized, and the execution logic of the target task is split using the thinking chain model.

Benefits of technology

It effectively alleviates the problems of overfitting and catastrophic forgetting, improves the adaptability and generalization ability of the model in different fields, and improves the accuracy and versatility of task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024142906_25092025_PF_FP_ABST
    Figure CN2024142906_25092025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a task processing method, a translation method, a task processing model training method, a computing device, a computer-readable storage medium and a computer program product. The task processing method comprises: acquiring task data to be processed; and inputting said task data into a task processing model, under the indication of first indication information, generating domain prompt information of a target domain on the basis of domain knowledge of the target domain to which the task data belongs, and under the indication of second indication information, executing a target task on the task data on the basis of the domain prompt information to obtain a task processing result. The target task has undergone execution logic splitting, and when the domain prompt information of the target domain is generated, the target task is executed on the basis of the domain prompt information, effectively mitigating the overfitting and catastrophic forgetting problems of a model, retaining a strong generalization capability while enhancing the adaptability of the model to a domain, and improving the task processing accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Task processing method, translation method, task processing model training method, computing device, computer-readable storage medium, and computer program product Technical Field

[0001] The present disclosure relates to the field of deep learning technology, and in particular to a task processing method, a translation method, a task processing model training method, a computing device, a computer-readable storage medium, and a computer program product. Background Art

[0002] With the development of deep learning technology, task processing models represented by large models have been widely used in various tasks, such as translation models for performing translation tasks, image generation models for performing image generation tasks, and speech synthesis models for performing speech synthesis tasks.

[0003] At present, for the task data in different fields of the task, the task processing model is trained using sample task data from the corresponding field, so that the initial task processing model, a general model, has the task processing capability adapted to specific fields and can perform tasks on task data belonging to specific fields more accurately.

[0004] However, because the sample task data is too limited in its domain, it is prone to overfitting and catastrophic forgetting. This results in the task processing model being highly accurate when processing tasks within its domain, but inaccurate when processing tasks outside of its domain. Consequently, the task processing accuracy is insufficient when facing multi-domain tasks, and the task processing versatility is insufficient. Therefore, a highly accurate and versatile task processing method is urgently needed. Summary of the Invention

[0005] In view of this, the present disclosure provides a task processing method. One or more embodiments of this specification also relate to a translation method, a task processing model training method, a task processing device, a translation device, a task processing model training device, a computing device, a computer-readable storage medium, and a computer program product to address technical deficiencies in the prior art.

[0006] According to a first aspect of the present disclosure, there is provided a task processing method, comprising:

[0007] Get the task data to be processed;

[0008] The task data is input into the task processing model. Under the instruction of the first indication information, domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the task data belongs. Under the instruction of the second indication information, the target task is performed on the task data based on the domain prompt information to obtain the task processing result.

[0009] According to a second aspect of the present disclosure, a translation method is provided, comprising:

[0010] Receive information to be translated sent by front-end users;

[0011] Inputting information to be translated into the translation model, generating domain prompt information of the target domain based on domain knowledge of the target domain to which the information to be translated belongs under the instruction of first instruction information, and performing a translation task on the information to be translated based on the domain prompt information under the instruction of second instruction information to obtain a translation result;

[0012] Send the translation results to the front-end user.

[0013] According to a third aspect of the present disclosure, a task processing model training method is provided, which is applied to a cloud-side device and includes:

[0014] Acquire a sample set, wherein the sample set includes sample task data of at least two sample fields;

[0015] Inputting the sample task data into the initial task processing model, generating predicted domain prompt information based on the domain knowledge of the domain to which the sample task data belongs under the instruction of the first instruction information, and executing the target task on the sample task data based on the predicted domain prompt information under the instruction of the second instruction information to obtain a predicted task processing result;

[0016] Based on the prediction domain prompt information and the prediction task processing results, the initial task processing model is trained to obtain the task processing model;

[0017] The model parameters of the task processing model are sent to the terminal device.

[0018] According to a fourth aspect of the present disclosure, there is provided a task processing device, comprising:

[0019] A first acquisition module is configured to acquire task data to be processed;

[0020] The first processing module is configured to input task data into the task processing model, generate domain prompt information of the target domain based on the domain knowledge of the target domain to which the task data belongs under the instruction of the first indication information, and execute the target task on the task data based on the domain prompt information under the instruction of the second indication information to obtain the task processing result.

[0021] According to a fifth aspect of the present disclosure, there is provided a translation device, comprising:

[0022] A receiving module is configured to receive information to be translated sent by a front-end user;

[0023] The second processing module is configured to input the information to be translated into the translation model, generate domain prompt information of the target domain based on the domain knowledge of the target domain to which the information to be translated belongs, under the instruction of the first instruction information, and perform the translation task on the information to be translated based on the domain prompt information to obtain a translation result, under the instruction of the second instruction information.

[0024] The result feedback module is configured to send the translation results to the front-end user.

[0025] According to a sixth aspect of the present disclosure, a task processing model training apparatus is provided, which is applied to a cloud-side device and includes:

[0026] A third acquisition module is configured to acquire a sample set, wherein the sample set includes sample task data of at least two sample fields;

[0027] a third processing module configured to input the sample task data into the initial task processing model, generate prediction domain prompt information based on domain knowledge of the domain to which the sample task data belongs under the instruction of the first instruction information, and execute the target task on the sample task data based on the prediction domain prompt information under the instruction of the second instruction information to obtain a prediction task processing result;

[0028] The model training module is configured to train the initial task processing model based on the prediction domain prompt information and the prediction task processing results to obtain the task processing model;

[0029] The model feedback module is configured to send the model parameters of the task processing model to the terminal device.

[0030] According to a seventh aspect of the present disclosure, there is provided a computing device, including:

[0031] memory and processor;

[0032] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.

[0033] According to an eighth aspect of the present disclosure, a computer-readable storage medium is provided, which stores a computer program / instruction, and the computer program / instruction implements the steps of the above method when executed by a processor.

[0034] According to a ninth aspect of the present disclosure, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0035] In one embodiment of the present specification, task data to be processed is obtained; the task data is input into a task processing model; under the instruction of first indication information, domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the task data belongs; and under the instruction of second indication information, the target task is executed on the task data based on the domain prompt information to obtain a task processing result. The target task is logically split, and when the domain prompt information of the target domain is generated, the target task is executed on the task data based on the domain prompt information to obtain a task processing result, thereby achieving task processing in different domains, effectively alleviating the overfitting problem and catastrophic forgetting problem of the model, improving the adaptability of the model to the domain, while retaining a high generalization ability, achieving high accuracy when processing tasks both within and outside the domain, and improving the accuracy and versatility of task processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] FIG1 is a flow chart of a task processing method;

[0037] FIG2 is a flowchart of a task processing method provided by one embodiment of this specification;

[0038] FIG3 is a flowchart of a task processing method provided by one embodiment of this specification;

[0039] FIG4 is a flow chart of a translation method provided by one embodiment of this specification;

[0040] FIG5 is a flowchart of a task processing model training method provided by one embodiment of this specification;

[0041] FIG6 is a flowchart of a translation method for multi-domain translation provided by one embodiment of this specification;

[0042] FIG7 is a front-end schematic diagram of a translation method applied to multi-field translation provided by one embodiment of this specification;

[0043] FIG8 is a schematic diagram of the structure of a task processing device provided by one embodiment of this specification;

[0044] FIG9 is a schematic structural diagram of a translation device provided by one embodiment of this specification;

[0045] FIG10 is a schematic diagram of the structure of a task processing model training device provided by one embodiment of this specification;

[0046] FIG11 is a structural block diagram of a computing device provided in one embodiment of this specification. DETAILED DESCRIPTION

[0047] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

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

[0049] It should be understood that although the terms first, second, etc. are 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 each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

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

[0051] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. A large model can also be called a cornerstone model / foundation model (Foundation Model), which is pre-trained by large-scale unlabeled corpus to produce an initial task processing model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as a large-scale language model (LLM) and a multi-modal initial task processing model (multi-modal pre-training model).

[0052] In actual applications, large models only require a small number of samples to fine-tune the initial task processing model and can be applied to different tasks. Large models can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), and image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.

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

[0054] Deep Learning: A branch of machine learning, it is an algorithm that uses artificial neural networks as its architecture to represent and learn data.

[0055] Convolutional Neural Networks (CNN) model: A multi-layer deep learning model with forward propagation and backpropagation, and a convolution filter for processing feature data.

[0056] Recurrent Neural Network (RNN) model: A recursive deep learning model that processes vector representations recursively and connects intermediate layers in a chain-like manner.

[0057] Long Short Term Memory (LSTM) model: A deep learning model that has the ability to memorize long-term and short-term information and has a convolution filter for processing feature data.

[0058] Deep Self-Attention Model (Transformer Model): A deep learning architecture based on the attention mechanism for processing sequential data such as natural language.

[0059] Bidirectional Encoder Representations from Transformers (BERT): A special Transformer model trained using a bidirectional Transformer encoder and large-scale unlabeled text data.

[0060] Pre-training: refers to the pre-training stage conducted on large-scale pre-training data, which can be used to generate processing results, can also be used for fine-tuning, or directly applied to specific tasks in various fields.

[0061] Fine-tuning: refers to the stage of adjusting and optimizing the pre-trained model on a specific task to improve the performance of the model on that task.

[0062] Reinforcement Learning (RL): A deep learning method that enables a model to learn how to make optimal decisions through continuous trial and error and feedback.

[0063] Multi-domain machine translation: A machine translation technology capable of translating texts across different domains. Traditional machine translation systems typically perform well only on texts in specific domains due to differences in language style, terminology, and grammatical structures. Multi-domain machine translation aims to overcome these challenges, enabling machine translation systems to accurately and fluently translate texts across multiple domains.

[0064] Large Language Model (LLM): A large language model is an AI model based on deep learning. Trained on a vast corpus, it typically consists of a deep neural network with billions of parameters. By learning and predicting large amounts of text data, it can generate coherent, grammatically correct, and semantically relevant text. Large language models can understand and generate language, demonstrating powerful natural language processing capabilities. They are widely used in areas such as automated question answering, machine translation, text generation, and dialogue systems.

[0065] Instructions: In deep learning, instructions typically refer to explicit instructions that guide the model's operations. These instructions can be in the form of human language or structured data, and they tell the model what task to perform, how to process input data, and the type of expected output. For example, in large language model applications, instructions can include specific commands such as "Translate this English paragraph into Chinese," "Summarize the main points of this article," or more complex tasks such as "Analyze whether the defendant has committed infringement based on the following legal provisions."

[0066] Prompt: In deep learning, prompts refer to direct input provided to a model to guide it in generating subsequent outputs that meet specific goals or contexts. Prompts generally include instructions, task input data (input), knowledge information (hint), and example information (demo). Prompts are used to inspire the model to perform tasks based on its internally learned knowledge and patterns. For example, in a large language model, if a user provides a prompt such as "Please write the opening paragraph of an article about quantum physics," the model will generate the corresponding article content based on this prompt.

[0067] Chain of Thought (CoT): In large models, CoT typically refers to a specific reasoning pattern used to understand and solve complex problems. This pattern emphasizes the need to break down complex problems into a series of sub-problems or steps, and gradually solve these sub-problems or steps to ultimately reach a conclusion. The benefit of this reasoning pattern is that it allows large models to better understand and handle complex tasks, while also improving the accuracy and efficiency of reasoning. Furthermore, CoT can help large models better cope with uncertainty, as each sub-problem and step can be viewed as an independent probabilistic event, allowing for better handling of probability and uncertainty.

[0068] Overfitting: In deep learning, overfitting occurs when a trained model learns and matches the training dataset too precisely, leading to overly complex model structures or excessive capture of noise, outliers, and random fluctuations in the training data during parameter optimization. As a result, while the model achieves a low error rate on the training dataset, it may fail to achieve the expected accurate prediction performance on new datasets not used for training or in real-world applications due to insufficient generalization.

[0069] Catastrophic forgetting: During continuous learning or transfer learning in deep neural networks, catastrophic forgetting manifests itself when a model's weight update strategy fails to effectively retain knowledge learned from previous tasks when learning a new task. This leads to a significant decline in performance when handling previously mastered tasks. This is because while adapting to the new data distribution and achieving the learning objectives of the new task, the model fails to maintain the persistence and stability of the storage and reuse of information from the previous task. This results in a significant decrease in the accuracy of the output when switching back to the old task.

[0070] BM25 (Best Match 25): A probabilistic retrieval model widely used in the field of information retrieval, used to estimate the relevance of a document to a specific query and rank search results accordingly.

[0071] In-Distribution Data (ID): Data that meets the processing capabilities of the model and belongs to the expected domain.

[0072] Out-of-Distribution (OOD) data: data that does not meet the processing capabilities of the model and does not belong to the expected domain.

[0073] Currently, in order to accurately implement task processing for task data in different domains within a task, one method uses sample task data from the corresponding domain to train the task processing model. This allows the initial task processing model, a general model, to have task processing capabilities adapted to specific domains and more accurately perform tasks on task data belonging to specific domains. As shown in Figure 1, Figure 1 shows a flow chart of a task processing method: In the training phase, the task processing model is supervised trained using a sample set consisting of sample task data from the target domain and labeled task processing results to obtain a trained task processing model. In the application phase, the task data is input into the task processing model, the target task is performed on the task data, and the task processing results are obtained. However, this method is prone to overfitting and catastrophic forgetting problems, that is, it performs well on data from the training domain that has been seen, but performs poorly on unseen domains.

[0074] Another approach is to achieve better task processing through external knowledge enhancement. Fuzzy matching (such as BM25) is performed through correlation to obtain external knowledge to enhance task processing performance. However, this method is heavily dependent on external knowledge or evaluation tools, which increases cost and instability.

[0075] In response to the above problems, a task processing method is provided in this specification. This specification also involves a translation method, a task processing model training method, a task processing device, a translation device, a task processing model training device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0076] 2 , which shows a flowchart of a task processing method according to an embodiment of this specification, including the following specific steps:

[0077] Step 202: Obtain task data to be processed.

[0078] The present disclosure is applied to applications, websites or mini-programs with task processing functions. On applications, websites or mini-programs, task processing of target tasks is realized. For example, a website with a large language model deployed can handle text question-answering tasks, translation tasks, opinion summarization tasks, knowledge retrieval tasks, document generation tasks, data analysis tasks, code generation tasks, etc. For another example, an e-commerce platform calls a large language model deployed through an application programming interface (Application Programming Interface, referred to as API) to handle user portrait generation tasks, user preference analysis tasks, product recommendation tasks, etc. in the e-commerce field. For another example, a search engine calls a retrieval enhancement model deployed through an application programming interface to handle information retrieval tasks in different fields.

[0079] The target task is a specific problem to be solved or a function to be realized in a specific field corresponding to the task processing. The target task is realized by a deep learning model. For example, the target field is the scientific field, and the target task is a scientific literature translation task. For another example, the target field is the legal field, and the target task is a legal consulting task. For another example, the target field is the financial field, and the target task is a financial report analysis task. For another example, the target field is the medical field, and the target task is a medical record interpretation task. In the present disclosure, the target task includes two subtasks: field prompt information generation and multi-field task processing, which is a task of a thinking chain mode (the target task is logically split).

[0080] The task data to be processed is the task input data for the task to be processed. The task data is data of at least one modality, including but not limited to text, images, audio, video, and structured data. The task data to be processed is the task input data belonging to the target domain of the target task. For example, the target domain is the scientific domain, the target task is a scientific literature translation task, and the task data to be processed is a scientific paper to be translated. For another example, the target domain is the legal domain, the target task is a text question-answering task, and the task data to be processed is a text question about intellectual property law. For another example, the target domain is the financial domain, the target task is a report analysis task, and the task data to be processed is a company's annual financial report. For another example, the target domain is the medical domain, the target task is a medical record interpretation task, and the task data to be processed is a patient's medical record report. The target domain is not predefined and is predicted and determined using the task processing model in step 104. No expected domain is set for the task data input to the task processing model.

[0081] For example, on a website where a large language model is deployed, a user enters the German text to be translated on the front-end interface: "Eine Vollremission(VR)wurde definiert als das Fehlen sichtbarer im Knochenmark und die periphere Regeneration von Thrombozyten und Leukozyten.”.

[0082] Obtaining the task data to be processed provides task input data for the subsequent use of the task processing model to execute the target task.

[0083] Step 204: Input the task data into the task processing model, and under the instruction of the first indication information, generate domain prompt information of the target domain based on the domain knowledge of the target domain to which the task data belongs, and under the instruction of the second indication information, execute the target task on the task data based on the domain prompt information to obtain the task processing result.

[0084] A task processing model is a deep learning model capable of processing target tasks. It is acquired through training (fine-tuning, reinforcement learning, etc.). During the training phase, the model uses sample task data from target tasks in at least two sample domains, enabling the model to sequentially generate domain-cue information and then process tasks based on that information. Training of the task processing model combines domain-cue information generation training with multi-domain task processing training. This training framework employs a thought chain approach (model training is logically split, with domain-cue information generated first and then tasks executed). The task processing model possesses domain-discriminatory generation capabilities and multi-domain task processing capabilities. Based on the data processing modality, task processing models include but are not limited to: text processing models, image processing models, audio processing models, video processing models, and structured data processing models. Based on the task, task processing models include but are not limited to: generative models, classification models (discriminative models), policy selection models, and regression prediction models. Based on model type, task processing models include but are not limited to: CNN models, RNN models, LSTM models, Transformer models, BERT models, and large language models.

[0085] The first instruction information is instruction information for instructing the task processing model to generate domain hint information of the target domain to which the task input data belongs. It is a task execution instruction for the task processing model, instructing the model to execute the domain hint information to generate this subtask. For example, if the target task is a translation task of translating German into English, the first instruction information is: "Come up with a helpful translation hint to better translate the following German text into English (generate a useful translation domain hint to better translate the following German text into English)". Optionally, the first instruction information limits the level of the target domain corresponding to the generated domain hint information. For example, if the target task is a translation task of translating German into English, the first instruction information can be: "Come up with a translation hint for scientific field to better translate the following German text into English (generate a translation domain hint for scientific field to better translate the following German text into English)", or "Come up with a translation hint for biologic field to better translate the following German text into English (generate a translation domain hint for biological field to better translate the following German text into English)". The first instruction information can be directly input by the front-end user, generated according to a preset instruction information template, obtained through search and matching, or automatically generated by the task processing model, without limitation. Generally, to ensure that task processing is adapted to model performance, the first instruction information is consistent with the first instruction information used during model training.

[0086] The second indication information is used to instruct the task processing model to perform the target task on the task input data based on the generated domain prompt information. It is a task execution instruction for the task processing model, instructing the model to perform the subtask of task processing based on the domain prompt information. For example, the target task is a translation task of translating German into English, and the second indication information is: "Translate the following German text into English". The second indication information can be directly input by the front-end user, or generated according to a preset indication information template, or obtained by retrieval and matching, or automatically generated by the task processing model, which is not limited here. Generally, in order to ensure that the task processing is adapted to the model performance, the second indication information is consistent with the second indication information used in the model training process.

[0087] The target domain is the specific knowledge domain to which the task data belongs. Examples include science, law, finance, and medicine. The target domain can have multiple levels. The more detailed the target domain, the higher the model performance and task processing accuracy of the trained task processing model. For example, the domain of intellectual property law has a more detailed level than the legal domain, so the trained task processing model will achieve higher accuracy when processing tasks in this domain.

[0088] Domain knowledge in the target domain refers to the specialized knowledge, concepts, laws, and background information related to the target domain. This domain knowledge is learned by the deep learning model during training and is used to understand and execute the target task on the task input data. Domain knowledge in the target domain is an abstract representation of the data attributes within the target domain. For example, if the target domain is quantum mechanics, the domain knowledge in the target domain includes core concepts such as quantum states, wave-particle duality, and quantum entanglement. For another example, if the target domain is intellectual property law, the domain knowledge in the target domain includes relevant laws, regulations, and case precedents, such as the Patent Law, its Implementing Regulations, and the Patent Examination Guidelines; the Trademark Law, its Implementing Regulations, and the Trademark Examination Guidelines.

[0089] Domain hints for the target domain are used to prompt the task processing model to perform the target task on the task data. This can be understood as contextual information (clues) provided to the task processing model, used to understand and perform the target task on the task input data. Domain hints for the target domain are concrete representations of the domain knowledge in the target domain and are used to characterize the domain knowledge of the task data. For example, if the target domain is medicine, the domain hint might be: "The sentence is from a text related to medicine and pharmacy, translated into a medical domain style."

[0090] The task processing result is the task output data of the task processing model after executing the target task. The task processing result is data of at least one modality, including but not limited to: text, image, audio, video and structured data. For example, the target field is the scientific field, the target task is the scientific literature translation task, and the task processing result is the generated translated version of the scientific paper. For another example, the target field is the legal field, the target task is the text question-answering task, and the task processing result is a reply text that responds to a question text about intellectual property law. For another example, the target field is the financial field, the target task is the report analysis task, and the task processing result is an analysis report of the company's annual financial statements. For another example, the target field is the medical field, the target task is the medical record interpretation task, and the task processing result is an interpretation report of the medical record report (medical term explanation, medical advice, etc.).

[0091] Under the guidance of the first indication information, domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the task data belongs. The specific method is as follows: under the guidance of the first indication information, the target domain to which the task data belongs is determined, and based on the domain knowledge of the target domain, domain prompt information of the target domain is generated. Through the domain discrimination generation capability of the task processing model, the model determines the target domain to which the task data belongs, and generates domain prompt information of the target domain based on the domain indication. This step is to inspire the task processing model to self-perceive domain knowledge. Without introducing external knowledge, task processing can be performed by mining the knowledge learned by the task processing model itself. This can realize task processing in different domains, effectively alleviate the model's overfitting problem and catastrophic forgetting problem, improve the model's adaptability to the domain, and retain a high generalization ability.

[0092] For example, the German text to be translated is "Eine Vollremission(VR)wurde definiert als das Fehlen sichtbarer im Knochenmark und die periphere Regeneration von Thrombozyten und Leukozyten." is input into the large language model. Under the instruction of the first instruction information "Generate a useful translation domain hint to better translate the following German text into English", it is determined that the target domain to which the German text belongs is the medical field. Based on the domain knowledge of the medical field, the medical field domain hint information "This sentence comes from a text related to medicine and pharmacy and is translated into the style of the medical field" is generated. Under the instruction of the second instruction information "Translate the following German text into English", the translation task is performed on the German text based on the domain hint information, and the English text "Complete remission (CR) was defined as the absence of visible leukaemic cells in the bone marrow and peripheral recovery of platelets and white blood cells." is obtained.

[0093] In the present disclosure, task data to be processed is obtained; the task data is input into a task processing model; under the instruction of first indication information, domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the task data belongs; and under the instruction of second indication information, the target task is executed on the task data based on the domain prompt information to obtain a task processing result. The execution logic of the target task is split, and when the domain prompt information of the target domain is generated, the target task is executed on the task data based on the domain prompt information to obtain a task processing result, thereby realizing task processing in different domains, effectively alleviating the overfitting problem and catastrophic forgetting problem of the model, improving the adaptability of the model to the domain, while retaining a high generalization ability, achieving high accuracy when processing tasks both within and outside the domain, and improving the accuracy and versatility of task processing.

[0094] In an optional embodiment of the present specification, in step 204, the task data is input into the task processing model, and under the instruction of the first indication information, domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the task data belongs, including the following specific steps:

[0095] Constructing first task information based on the first instruction information and the task data, wherein the first instruction information is used to instruct the task processing model to perform the task of generating domain prompt information;

[0096] The first task information is input into the task processing model, and under the instruction of the first instruction information, domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the task data belongs.

[0097] In the present disclosure, the first task information is constructed, and the target task is logically split through the task processing framework of the thinking chain model, and the execution field prompt information is generated first.

[0098] The first task information is the direct input information provided to the task processing model when executing the domain prompt information generation. The first task information is a prompt information (prompt), which includes the first instruction information and task data. The first instruction information provides the task content generated by the domain prompt information, and the task data provides the task input generated by the domain prompt information. For example, if the target task is a scientific literature translation task, the first task information is as follows:

[0099] {

[0100] Instruction (first instruction): Generate a useful translation field prompt to better translate the following English text into Chinese;

[0101] Input (mission data): Quantum entanglement is a phenomenon that occurs when two particles become correlated in such a way that the state of one particle affects the state of the other, even if they are separated by vast distances;

[0102] Response (field prompt information):

[0103] }

[0104] The first task information may be directly input by a front-end user, generated according to a preset prompt information template, or automatically generated by a task processing model, which is not limited here.

[0105] Under the instruction of the first indication information, based on the domain knowledge of the target domain to which the task data belongs, domain prompt information of the target domain is generated. The specific method is: under the instruction of the first indication information, the target domain to which the task data belongs is determined, and based on the domain knowledge of the target domain, the domain prompt information of the target domain is generated.

[0106] It should be noted that the implementation process of the present disclosure can be referred to the application stage in the subsequent Figure 3.

[0107] For example, based on the first instruction information "generate a useful translation field hint to better translate the following German text into English" and the German text to be translated "Eine Vollremission(VR)wurde definiert als das Fehlen sichtbarer im Knochenmark und die periphere Regeneration von Thrombozyten und Leukozyten.", construct the first task information Prompt_1:

[0108] {

[0109] Instruction_1: Generate a useful translation domain hint to better translate the following English text into Chinese;

[0110] Input: Eine Vollremission(VR)wurde definiert als das Fehlen sichtbarer im Knochenmark und die periphere Regeneration von Thrombozyten und Leukozyten;

[0111] Response:

[0112] }

[0113] The first task information Prompt_1 is input into the large language model. Under the instruction of the first instruction information Instruction_1, it is determined that the target field to which the German text belongs is the medical field. Based on the domain knowledge of the medical field, the domain prompt information of the medical field is generated: "This sentence comes from a text related to medicine and pharmacy, and is translated into the style of the medical field."

[0114] In this disclosure, the target task is logically split through the task processing framework of the thinking chain model, and the domain prompt information is generated first, laying the foundation for subsequent task processing with higher accuracy and versatility.

[0115] In an optional embodiment of the present specification, in step 204, under the instruction of the second instruction information, based on the domain prompt information, executing the target task on the task data to obtain the task processing result includes the following specific steps:

[0116] Constructing second task information based on the second instruction information, the domain prompt information, and the task data, wherein the second instruction information is used to instruct the task processing model to perform the target task;

[0117] The second task information is input into the task processing model, and under the instruction of the second instruction information, based on the domain prompt information, the target task is executed on the task data to obtain a task processing result.

[0118] In the present disclosure, the second task information is constructed, and the target task is logically split through the task processing framework of the thinking chain model, and then the task is processed based on the domain prompt information.

[0119] The second task information is direct input information provided to the task processing model when performing multi-domain task processing. The second task information is a prompt information, which includes second instruction information, domain prompt information and task data. The second instruction information provides the task content of the multi-domain task processing, the domain prompt information provides the context information (clue information) of the multi-domain task processing, and the task data provides the task input of the multi-domain task processing. For example, if the target task is a scientific literature translation task, the second task information is as follows:

[0120] {

[0121] Instruction (second instruction information): translate this text from English to Chinese;

[0122] Hint: This text discusses quantum mechanics, a branch of physics that describes the behavior of microscopic particles such as atoms and subatomic particles. Please ensure that the technical terms and theoretical concepts are accurately captured during the translation process.

[0123] Input (mission data): Quantum entanglement is a phenomenon that occurs when two particles become correlated in such a way that the state of one particle affects the state of the other, even if they are separated by vast distances;

[0124] Response (task processing result):

[0125] }

[0126] The second task information may be directly input by a front-end user, generated according to a preset prompt information template, or automatically generated by a task processing model, which is not limited here.

[0127] It should be noted that the implementation process of the present disclosure can be referred to the application stage in the subsequent Figure 3.

[0128] For example, based on the second instruction information "Translate the following German text into English", the domain prompt information and the German text, the second task information Prompt_2 is constructed:

[0129] {

[0130] Instruction_2: Translate this text from German to English;

[0131] Hint: This sentence comes from medical and pharmacy-related texts and is translated into the medical field style;

[0132] Input: Quantum entanglement is a phenomenon that occurs when two particles become correlated in such a way that the state of one particle affects the state of the other, even if they are separated by vast distances;

[0133] Response:

[0134] }

[0135] The second task information Prompt_2 is input into the large language model. Under the instruction of the second instruction information Instruction_2, the translation task is performed on the German text based on the domain prompt information to obtain the English text "Complete remission (CR) was defined as the absence of visible leukaemic cells in the bone marrow and peripheral recovery of platelets and white blood cells.".

[0136] In the present disclosure, the target task is executed logically through the task processing framework of the thinking chain model, and the domain prompt information generation and task processing based on the domain prompt information are executed successively, thereby realizing task processing in different domains, further alleviating the overfitting problem and catastrophic forgetting problem of the model, further improving the adaptability of the model to the domain, while retaining a high generalization ability, and achieving high accuracy when processing tasks both within and outside the domain, further improving the accuracy and versatility of task processing.

[0137] In an optional embodiment of the present specification, before constructing the second task information based on the second indication information, the domain prompt information and the task data, the following specific steps are also included:

[0138] Send field prompt information to front-end users;

[0139] Receiving a first evaluation message for the domain prompt information sent by a front-end user;

[0140] Based on the first evaluation message, a first inquiry guidance message is generated, and the first inquiry guidance message is sent to the front-end user;

[0141] Receiving updated domain prompt information fed back by the front-end user based on the first inquiry guidance message;

[0142] Correspondingly, constructing the second task information based on the second indication information, the domain prompt information and the task data includes the following specific steps:

[0143] Second task information is constructed based on the second indication information, the updated field prompt information and the task data.

[0144] By mining the knowledge learned by the task processing model itself to generate domain prompt information and then perform task processing, there is a certain probability of "knowledge hallucination". Therefore, in the present disclosure, timely evaluation and feedback of the generated domain prompt information are provided to eliminate the "knowledge hallucination" problem that occurs in the process of generating domain prompt information by the task processing model, thereby further improving the accuracy of task processing.

[0145] The first evaluation message is the evaluation message given by the front-end user for the generated domain prompt information after receiving the domain prompt information. These messages can be the user's subjective feelings and objective corrections on the quality, accuracy, relevance, etc. of the document, including but not limited to: failure to understand instructions, failure to find errors in the question, inability to understand the context, irrelevant answers, factual errors, repeated replies, confusing answer logic, incorrect answer format, sensitive / harmful replies, etc. In the present disclosure, the purpose of receiving the first evaluation message sent by the front-end user is to collect the user's evaluation of the domain prompt information generated by the model, so as to further improve the model performance or promptly resolve erroneous domain prompt information, and improve the accuracy of subsequent task processing. For example, the target task is a scientific literature translation task, and the generated domain prompt information is "This sentence comes from a text related to astronomy and geology, translated into professional terms in neurobiology." The first evaluation message sent by the user is: inability to understand the context and factual errors.

[0146] The first inquiry guidance message is generated by the task processing model based on the first evaluation message. It is used to guide the front-end user to provide more specific feedback on the field prompt information. For example, if a user receives a first evaluation message about the timeliness of a news article, the following first inquiry guidance message may be generated: "Which parts of this field prompt information do you think reflect a lack of context or factual errors? Please point them out and correct them."

[0147] Updated domain prompts are the new versions of domain prompts generated during task processing, after being revised or adjusted based on the feedback from front-end users on the initially generated domain prompts. This process embodies the characteristics of human-computer interaction and iterative model optimization, ensuring that domain prompts are more accurate, relevant, and adapted to the target task.

[0148] For example, in a medical translation task, the large language model generates a domain prompt: "This sentence comes from a text in the field of physics and needs to be translated into biochemical terms." After receiving this prompt, the user discovers that it does not match the actual content to be translated (a German article on blood diseases). They then provide a first feedback feedback message through the front-end interface: "The domain prompt information is incorrect. It should be in the medical field, not physics or biochemistry." Based on the user's feedback, the system generates a first query guidance message: "Can you specify the medical subfield or more precise context that should be used?" The user further provides updated feedback: "This sentence is about hematology and oncology. Please ensure that you use professional terminology when translating." Based on this user feedback, the large language model generates an updated domain prompt: "This sentence comes from a text related to hematology and oncology. Please ensure that you use the corresponding professional terminology when translating to maintain accuracy."

[0149] In the present disclosure, the update of domain prompt information is completed in an interactive manner, avoiding the problem of "knowledge hallucination" caused by mining the knowledge learned by the task processing model itself to generate domain prompt information and then perform task processing, thereby improving the accuracy of subsequent task processing.

[0150] In an optional embodiment of this specification, before step 204, the following specific steps are further included:

[0151] Acquire a sample set, wherein the sample set includes sample task data of at least two sample fields;

[0152] Inputting the sample task data into the initial task processing model, generating predicted domain prompt information based on the domain knowledge of the domain to which the sample task data belongs under the instruction of the first instruction information, and executing the target task on the sample task data based on the predicted domain prompt information under the instruction of the second instruction information to obtain a predicted task processing result;

[0153] Based on the prediction domain prompt information and the prediction task processing results, the initial task processing model is trained to obtain the task processing model.

[0154] In the present disclosure, the joint training of domain prompt information generation training and multi-domain task processing training is a training framework of the thinking chain model (the execution logic of the model training is split, and the domain prompt information is generated first and then the task is executed). The task processing model has the domain discrimination generation capability and multi-domain task processing capability.

[0155] The sample set is a collection of sample data used to train the task processing model. It can be constructed from historical data in historical task processing scenarios, obtained from open source databases, or manually generated, and there is no limitation here.

[0156] Sample domains are representative knowledge domains used to train task processing models. These include, but are not limited to, science, law, finance, and medicine. Each sample domain provides sample task data specific to that domain. During training, the task processing model is trained and optimized using sample task data from diverse domains to ensure that the model understands and adapts to the task processing requirements of diverse domains.

[0157] Sample task data is the task input data in the dataset used to train the document generation model. During training, sample task data is used as input for two training subtasks: domain prompt information generation training and multi-domain task processing training.

[0158] The initial task processing model is a pre-trained model that has not been trained for a specific domain or task. The initial task processing model has certain task processing capabilities, but has not yet been fine-tuned or reinforced for specific domains or tasks. For example, for translation tasks, the initial task processing model can achieve general word-by-word translation, but does not have translation capabilities for specific domains. The translated text has problems such as not being adapted to a specific domain (for example, translating the specialized term "robust" in the field of deep learning as "strong" instead of "robust") and information omissions. In practical applications, by further training the initial task processing model with domain prompt information generation and multi-domain task processing, it can better perform the target task and possess domain discrimination and multi-domain task processing capabilities.

[0159] The domain knowledge of the sample task data is the specialized knowledge, concepts, patterns, and background information directly related to the sample task data. The task processing model needs to learn and understand this domain knowledge through training in order to more accurately process the task data in the corresponding domain.

[0160] Predicted domain hints are generated during training by the initial task processing model based on sample task data, guided by the first instruction. These hints are intended to help the initial task processing model understand the domain of the input data and adjust the style, content, and expertise of its output accordingly.

[0161] The predicted task processing result is the task output data of the initial task processing model executing the target task during the training process. The predicted task processing result is the task processing that the initial task processing model tentatively performs on the sample task data based on the learned domain knowledge.

[0162] In an optional embodiment of the present specification, sample task data is input into an initial task processing model, and under the instruction of first instruction information, prediction domain prompt information is generated based on domain knowledge of the domain to which the sample task data belongs, including the following specific steps:

[0163] The sample task data is input into the initial task processing model, and under the instruction of the first instruction information, the domain to which the sample task data belongs is predicted, and based on the domain knowledge of the domain, predicted domain prompt information is generated.

[0164] The domain to which the sample task data belongs is the specific knowledge domain predicted by the task processing model. Domains can have multiple levels. The more refined the predicted domain level, the higher the model performance of the trained task processing model and the higher the task processing accuracy.

[0165] Domain knowledge refers to the specialized knowledge, concepts, patterns, and background information related to a domain. This knowledge is learned by deep learning models during training and is used to understand and execute the target task on the input data. It is an abstract representation of the data attributes within the domain.

[0166] By heuristically training the task processing model's ability to self-perceive domain knowledge, it is possible to perform task processing by mining the knowledge learned by the task processing model itself without introducing external knowledge in the future, thereby achieving task processing in different fields. This effectively alleviates the model's overfitting and catastrophic forgetting problems, improves the model's adaptability to the domain, and retains a high generalization ability.

[0167] In an optional embodiment of the present specification, sample task data is input into an initial task processing model, and under the instruction of first instruction information, prediction domain prompt information is generated based on domain knowledge of the domain to which the sample task data belongs. Under the instruction of second instruction information, a target task is performed on the sample task data based on the prediction domain prompt information to obtain a prediction task processing result, including the following specific steps:

[0168] Constructing first sample task information based on the first instruction information and the sample task data, wherein the first instruction information is used to instruct the task processing model to perform the task of generating domain prompt information;

[0169] Inputting the first sample task information into the initial task processing model, and generating predicted domain prompt information of the domain based on the domain knowledge of the domain to which the sample task data belongs under the instruction of the first instruction information;

[0170] Constructing second sample task information based on the second instruction information, the prediction field prompt information, and the sample task data, wherein the second instruction information is used to instruct the task processing model to perform the target task;

[0171] The second sample task information is input into the initial task processing model, and under the instruction of the second instruction information, the target task is performed on the sample task data based on the prediction field prompt information to obtain the prediction task processing result.

[0172] During the training process, the first sample task information and the second sample task information constructed can refer to the first task information and the second task information of the application process in the above embodiment of the specification, and will not be repeated here.

[0173] Based on the prediction domain prompt information and the prediction task processing results, the initial task processing model is trained to obtain the task processing model. The specific method is as follows: based on the prediction domain prompt information and the prediction task processing results, a total loss is determined, and based on the total loss, the initial task processing model is trained to obtain the task processing model. The total loss can be a supervised loss, such as cross-entropy loss (Cross-Entropy Loss), mean squared error (MSE), or hinge loss, or an unsupervised loss, such as discriminator loss, contrastive loss, and objective function loss, which are not limited here.

[0174] For example, sample texts to be translated are collected from four fields: science, law, finance, and medicine. Each field has 10,000 sample texts to be translated (X i , i~[1,10000]) and the corresponding label translation text (Y i , i~[1,10000]), for the multi-domain translation task in four fields, a sentence of related label domain prompt information P1 is written for each field to determine the sample set. i Input the initial large language model and predict the sample text to be translated X under the instruction of the first instruction information Instruction_1 i The domain to which it belongs is based on the domain knowledge of the domain, and the predicted domain prompt information P′1 is generated, and under the instruction of the second instruction information Instruction_2, the sample text to be translated X is generated based on the predicted domain prompt information P′1. i Perform the translation task and obtain the predicted translation text Y′ i , based on the predicted domain prompt information P′1 and the predicted translation text Y′ i , train the initial large language model to obtain a trained large language model.

[0175] In this disclosure, by performing logical splitting of model training, multi-domain prompt information generation and multi-domain task processing are jointly trained on the initial task processing model, so that the model can simultaneously learn domain discrimination generation capabilities and multi-domain general task processing capabilities, providing model support for high-accuracy and high-versatility task processing, and completing model training on cloud-side devices, thereby improving the efficiency and training effect of model training.

[0176] In an optional embodiment of the present specification, based on the prediction domain prompt information and the prediction task processing result, the initial task processing model is trained to obtain the task processing model, including the following specific steps:

[0177] Obtain the label task processing results corresponding to the sample task data;

[0178] Determine a first loss based on the prediction domain prompt information, and determine a second loss based on the prediction task processing result and the labeling task processing result;

[0179] determining a total loss based on the first loss and the second loss;

[0180] Based on the total loss, the model parameters of the initial task processing model are adjusted, and the task processing model is obtained when the preset training end conditions are met.

[0181] The labeling task processing result is the data that serves as the true answer or target output during the training process, corresponding to the ideal output of the input sample task data. The labeling task processing result can be pre-set in the sample set, or it can be obtained by performing the target task on the sample task data using the initial task processing model based on the label domain prompt information, without limitation. For example, if the target task is a translation task, the labeling task processing result is the language text obtained by performing the translation task based on the label domain prompt information. For another example, if the target task is a text classification task, the labeling task processing result is a pre-defined category label.

[0182] The first loss measures the difference between the predicted domain hint and the labeled domain hint corresponding to the domain of the sample data. It is a supervised loss, including but not limited to cross-entropy loss, mean squared error, and Hinge loss. The first loss reflects the model's ability to generate domain hints.

[0183] The second loss measures the difference between the task processing results generated by the task processing model and the actual expected output (i.e., the labeled task processing result). It is a supervised loss, including but not limited to: cross entropy loss, mean squared error, and Hinge loss. The second loss reflects the model's ability to perform specific target tasks.

[0184] The model parameters of a task processing model are learnable variables such as the weight matrix and bias term within the task processing model. They determine the specific form and function of the model structure. During training, model parameters are adjusted through backpropagation to minimize the loss function, enabling the model to more accurately fit the training data and generalize to unknown data.

[0185] Preset training termination conditions are pre-set criteria for stopping training during model training, including but not limited to: reaching a certain number of iterations, no significant decrease in loss on the validation set, the model's performance on the validation set meeting preset indicators (such as accuracy exceeding a certain threshold), and the learning rate falling below a certain minimum. When any one or more of these conditions are met, training stops and the model is considered to have converged to the ideal state. The resulting trained task processing model is considered complete.

[0186] Based on the prediction domain prompt information, a first loss is determined, wherein the first loss can be a supervised loss or an unsupervised loss.

[0187] In the case where the first loss is a supervised loss, the first loss is determined based on the predicted domain prompt information. An optional method is to determine the first loss based on the predicted domain prompt information and the label domain prompt information. Among them, the sample set also includes the label domain prompt information of the sample domain to which the sample task data belongs. The label domain prompt information of the sample domain is the label domain prompt information with clear domain orientation provided in advance for each sample domain in the sample set. This information is a precise domain background description or professional guidance for each sample task, which aims to help the model learn how to correctly identify and understand the characteristics of different fields and generate accurate domain prompt information. Correspondingly, the calculation formula of the first loss is shown in Formula 1: L hint (θ) = -logP(h|inst1, X; θ) Formula 1

[0188] Among them, L hint (θ) is the first loss, X is the sample task data, h is the label domain prompt information, inst1 is the first indication information, and θ is the model parameter.

[0189] Based on the prediction task processing results and the label task processing results, the second loss is determined. An optional calculation formula for the second loss is shown in Formula 2: trans (θ) = -logP(y|inst2, h, X; θ) Formula 2

[0190] Among them, L trans (θ) is the second loss, X is the sample task data, Y is the label task processing result, h is the label domain prompt information, inst2 is the second indication information, and θ is the model parameter.

[0191] Based on the first loss and the second loss, the total loss is determined by weighting the first loss and the second loss to obtain the total loss. The specific calculation formula is shown in Formula 3: L cot_sft =L trans +αL hint Formula 3

[0192] Among them, L hint is the first loss, L trans is the second loss, L cot_sft is the total loss, and the weight α is used to control the proportion of sample task data in domain cue information generation training and multi-domain task processing training.

[0193] In an optional embodiment of this specification, the initial task processing model is a pre-trained task processing model;

[0194] Obtaining the label task processing results corresponding to the sample task data includes the following specific steps:

[0195] The sample task data is input into the pre-trained task processing model, and under the instruction of the second instruction information, the target task is performed on the sample task data based on the label domain prompt information to obtain the label task processing result.

[0196] If the label domain prompt information and the label task processing results are both set manually, multiple variable factors will inevitably be introduced. Therefore, the pre-trained task processing model can be directly used to perform the target task on the sample task data based on the label domain prompt information to obtain the label task processing results. This ensures that the determined second loss only reflects the model's ability to perform specific target tasks, and is not interfered with the model's ability to generate execution domain prompt information, thereby achieving a clearer split of the execution logic of model training.

[0197] For example, 10,000 sample texts to be translated (X i , i~[1,10000]) inputs the pre-trained large language model, and under the instruction of the second instruction information Instruction_2, based on the label domain prompt information P1, the sample text to be translated X i Execute the translation task and obtain 10,000 label translation texts (Y i , i~[1,10000]). Based on the prediction domain prompt information P1 ′ And the label field prompt information P1, determine the first loss L hint , and based on the predicted translation text Y′ i and label translated text Y i , determine the second loss L trans , for the first loss L hint and the second loss L trans Weighted, get the total loss L cot_sft , based on the total loss L cot_sft , through the gradient descent method, the model parameters θ of the initial large language model are adjusted, and when the preset training end conditions are met, the trained large language model is obtained.

[0198] In this disclosure, through supervised training, the first loss of domain prompt information generation training and the second loss of multi-domain task processing training are determined respectively, and then the total loss is determined, so that the task processing model has both domain discrimination generation capability and multi-domain task processing capability.

[0199] In an optional embodiment of the present specification, before inputting the sample task data into the pre-trained task processing model, the following specific steps are further included:

[0200] Obtain a pre-training set and a basic task model, wherein the pre-training set includes multiple pre-training task data;

[0201] Input the pre-training task data into the basic task model, perform the target task on the pre-training task data, and obtain the estimated task processing result;

[0202] Based on the estimated task processing results, the basic task model is pre-trained to obtain the initial task processing model.

[0203] A pre-training set is a dataset used to pre-train a task processing model, typically containing a large number of diverse data samples. In this embodiment, the pre-training set includes multiple pre-training task data. Its purpose is to use large amounts of unlabeled or weakly labeled data to allow the model to first learn general laws and representations of language, images, or other modalities, thereby achieving general target task processing, such as performing general translation tasks.

[0204] The basic task model is an initial deep learning model that has not been trained for a specific task or field and has a general understanding of data.

[0205] The pre-training task data is the task input data in the dataset used to pre-train the basic task model, which serves as the pre-training input.

[0206] The estimated task processing result is the task output data of the basic task model executing the target task during the pre-training process. The predicted task processing result is the task processing that the initial task processing model tentatively performs on the pre-trained task data.

[0207] For example, a pre-training set is obtained from an open source sample database, including 1,000,000 pre-trained texts to be translated (X j , j~[1,1000000]) and the corresponding label translation text (Y j , j~[1,1000000]), the pre-trained text to be translated X j Input the basic large language model and train the pre-trained translation text X j Perform the translation task and obtain the estimated translation text Y′ j , based on the estimated translation text Y′ jand label translated text Y j , calculate the cross entropy loss value, and pre-train the basic large language model based on the cross entropy loss to obtain the initial large language model.

[0208] In this disclosure, through pre-training, the basic task model has the general target task processing capability, providing model support for the subsequent training process.

[0209] In an optional embodiment of the present specification, the sample set further includes label domain prompt information of the sample domain to which the sample task data belongs, the prediction domain prompt information includes a plurality of prompt unit information, and the label prompt information includes a plurality of prompt unit information;

[0210] Based on the prediction domain prompt information, determining the first loss includes the following specific steps:

[0211] A first loss is determined based on the prediction domain prompt information and the prompt unit information in the label domain prompt information.

[0212] The sample domain label hints are pre-defined for each sample domain in the sample set. This information provides precise domain context or professional guidance for each sample task, helping the model learn how to correctly identify and understand the characteristics of different domains and generate accurate domain hints.

[0213] Hint unit information refers to the basic elements that constitute the prediction domain hint information or label domain hint information. These hint unit information can be text units (words, phrases, sentence fragments), audio units, image units (pixels), or more abstract conceptual representations.

[0214] Based on the prediction domain prompt information and the prompt unit information in the label domain prompt information, a first loss is determined. An optional calculation formula for the first loss is shown in Formula 4:

[0215] Among them, L hint (θ) is the first loss, X is the sample task data, h is the label domain prompt information, inst1 is the first indication information, T1 is the length of the label domain prompt information h (the number of prompt unit information), and θ is the model parameter.

[0216] For example, based on the prediction domain prompt information P′1 and each word in the label domain prompt information P1, the first loss L is calculated by formula 4. hint .

[0217] In the present disclosure, a more accurate first loss is calculated through refined prompt unit information.

[0218] In an optional embodiment of this specification, the prediction task processing result includes multiple processing unit results, and the label task processing result includes multiple processing unit results;

[0219] Based on the prediction task processing results and the label task processing results, the second loss is determined, including the following specific steps:

[0220] The second loss is determined based on the results of each processing unit in the prediction task processing result and the label task processing result.

[0221] Processing unit results refer to the basic components that constitute the prediction task processing results or labeling task processing results. These processing unit results can be text units (words, phrases, sentence fragments), audio units, image units (pixels), or more abstract conceptual representations.

[0222] Based on the prediction task processing results and the results of each processing unit in the label task processing results, the second loss is determined. An optional calculation formula for the second loss is shown in Formula 5:

[0223] Among them, L trans (θ) is the second loss, X is the sample task data, Y is the label task processing result, h is the label field prompt information, inst2 is the second indication information, T2 is the length of the label task processing result Y (the number of processing unit results), and θ is the model parameter.

[0224] For example, based on the predicted translation text Y′ i and label translated text Y i For each word in, calculate the second loss L through formula 5 trans .

[0225] In the present disclosure, a more accurate second loss is calculated through the refined processing unit results.

[0226] In an optional embodiment of this specification, after step 204, the following specific steps are further included:

[0227] Send task processing results to front-end users;

[0228] Receive a second evaluation message regarding the task processing result sent by the front-end user;

[0229] Based on the second evaluation message, a second inquiry guidance message is generated, and the second inquiry guidance message is sent to the front-end user;

[0230] Collecting feedback information input by the front-end user based on the second query guidance message, and obtaining an updated sample set based on the feedback information;

[0231] The task processing model is trained using the updated sample set.

[0232] The second evaluation message is the evaluation, suggestion, error correction or other related message given by the front-end user for the generated task processing result after receiving the task processing result. These messages can be the user's subjective feelings and objective corrections on the quality, accuracy, relevance and other aspects of the task processing result, including but not limited to: failure to understand instructions, failure to find errors in the question, inability to understand the context, irrelevant answers, factual errors, repeated replies, confusing answer logic, wrong answer format, sensitive / harmful replies, etc. In the present disclosure, the purpose of receiving the second evaluation message sent by the front-end user is to collect the user's actual use effect and satisfaction data on the task processing results generated by the model, so as to further improve the model performance or solve problems in the generated file. For example, the target task is a scientific literature translation task, and there are errors in the translation of professional terms in the translation results of the scientific paper. The second evaluation message is: there are factual errors.

[0233] The second inquiry guidance message is generated by the task processing model based on the second evaluation message. It is used to guide the front-end user to provide more specific feedback on the task processing results. For example, if a user receives a second evaluation message about the timeliness of a news article, the following second inquiry guidance message may be generated: "Which parts of the translation result do you think contain factual errors? Please point them out and correct them."

[0234] Feedback is a more detailed and targeted evaluation, modification suggestions, or recommendations provided by the front-end user regarding the task processing results after receiving the second query guidance message. Feedback directly reflects the user's satisfaction with the task processing results and their desired improvement directions, and serves as an important basis for updating the sample set and optimizing the model. For example, in response to the second query guidance message above, the user replied, "I think robust should be translated as robustness rather than strong."

[0235] The updated sample set is a new set of training data collected and organized during the model training process based on feedback from front-end users regarding task processing results. This set includes improved sample data resulting from user evaluation, error correction, or suggestions. The updated sample set is a dynamically generated data resource based on real-time user feedback on the output of the task processing model in actual applications. By analyzing, integrating, and annotating this feedback, a training dataset is formed that can be used to further optimize the performance of the task processing model.

[0236] For example, a user submitted a German article for translation on the pathology of a certain disease. The model's initial translation included the sentence: "Die schwerwiegende Krankheitsstadium wurde als Grad III kategorisiert im Pathologischen Klassifikationssystem." (Original text: The severe stage of the disease was categorized as Grade III in the pathological classification system.) The model translated this sentence into "Severe stage of the disease was categorized as Grade III in the pathological classification system." However, after reviewing the translation results, the user pointed out that the technical translation of "schwerwiegende Krankheitsstadium" should be "severe stage of the disease" and that it was necessary to clarify that "Pathologischen Klassifikationssystem" should be translated as "specific pathology grading system." The user then provided a second evaluation message through the front-end interface: "'schwerwiegende Krankheitsstadium' should be translated as 'severe stage of disease,' and 'Pathologischen Klassifikationssystem' should be translated into the more specific 'a certain pathology grading system.'" After receiving this feedback, the system constructs an updated sample based on the user's suggestion, including the original German text and the revised Chinese translation: "Severe stage of disease is classified as grade III of a certain pathology grading system." This revised sample based on user feedback is then added to the updated sample set. When the task processing model is trained in the next round, it will learn from and refer to this new sample data.

[0237] In this disclosure, the sample set update is completed in an interactive manner, the task processing model is further trained, the model performance of the task processing model is improved, and more accurate model support is provided for subsequent task processing.

[0238] FIG3 shows a flowchart of a task processing method provided by an embodiment of this specification, as shown in FIG3 :

[0239] During the training phase, sample task data is input into the task processing model. Based on the first indication information, the sample task data, and the label domain prompt information, the task processing model is trained to enable the model to have domain-recognition generation capabilities. Based on the second indication information, the predicted domain prompt information, the sample task data, and the label task processing results, the task processing model is trained to enable the model to have multi-domain task processing capabilities.

[0240] In the application stage, based on the task data and the first indication information, the first task information is constructed, and the first task information is input into the task processing model. Under the instruction of the first indication information, based on the domain knowledge of the target domain to which the task data belongs, domain prompt information of the target domain is generated. Based on the second indication information, the domain prompt information and the task data, the second task information is constructed, and the second task information is input into the task processing model. Under the instruction of the second indication information, based on the domain prompt information, the target task is executed on the task data to obtain the task processing result.

[0241] Deep learning models have demonstrated impressive capabilities in various natural language processing tasks. However, the capabilities of most open-source deep learning models for machine translation remain limited, far behind those of professional commercial translation models. Recent work has explored the use of prompt strategies to enhance the translation capabilities of open-source deep learning models. However, these approaches rely heavily on external knowledge or tools. Instruction fine-tuning is a common method for enhancing the performance of deep learning models. This method aims to improve the language model's responsiveness to instructions in natural language processing tasks by teaching the model to complete tasks according to instructions through supervised training. However, existing methods rarely focus on multi-domain machine translation tasks. Multi-domain machine translation has a wide range of applications, including text translation in fields such as medicine, law, finance, and technology. It can provide professionals with more accurate translation results and improve the efficiency of cross-domain communication. In the era of deep learning models, models possess sufficient domain knowledge. Existing thought chaining work has demonstrated that complex tasks can be decomposed into multiple subtasks to achieve better performance. Multi-domain translation can also be broken down into multiple steps, such as domain identification and machine translation. However, existing fine-tuning solutions for deep learning models do not fully consider multi-domain translation.

[0242] To address the above issues, FIG4 shows a flowchart of a translation method provided according to an embodiment of this specification, including the following specific steps:

[0243] Step 402: Receive information to be translated sent by the front-end user.

[0244] Step 404: Input the information to be translated into the translation model. Under the instruction of the first instruction information, based on the domain knowledge of the target domain to which the information to be translated belongs, generate domain prompt information of the target domain. Under the instruction of the second instruction information, based on the domain prompt information, perform the translation task on the information to be translated to obtain a translation result.

[0245] Step 406: Send the translation result to the front-end user.

[0246] The present disclosure is applicable to applications, websites, or mini-programs with multi-domain machine translation capabilities, enabling accurate and smooth translation of information in multiple fields.

[0247] The information to be translated is the original input information for the translation task to be performed, which needs to be translated from one language into another language, including but not limited to: text, images, audio, video and structured data. For example, the information to be translated is a German text "Eine Vollremission(VR)wurde definiert als das Fehlen sichtbarer im Knochenmark und die periphere Regeneration von Thrombozyten und Leukozyten.", this text is the target content to be translated into English.

[0248] The translation result is the output information of the translation model after performing the translation task. The translation result should reflect the content and context of the original text as faithfully as possible and conform to the domain knowledge of the target domain. For example, for the German text to be translated above, the translation result is: "Complete remission (CR) was defined as the absence of visible leukaemic cells in the bone marrow and peripheral recovery of platelets and white blood cells."

[0249] The present disclosure and the embodiment of the specification in FIG2 are based on the same inventive concept. The specific method of step 404 is referred to the above step 204 and will not be repeated here.

[0250] In the present disclosure, information to be translated is received from a front-end user; the information to be translated is input into a translation model; under the guidance of first indication information, domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the information to be translated belongs; and under the guidance of second indication information, a translation task is performed on the information to be translated based on the domain prompt information to obtain a translation result; and the translation result is sent to the front-end user. The execution logic of the translation task is split; when the domain prompt information of the target domain is generated, the translation task is performed on the information to be translated based on the domain prompt information to obtain a translation result, thereby achieving translation in different domains, effectively alleviating the model's overfitting and catastrophic forgetting problems, improving the model's adaptability to the domain, while retaining a high level of generalization ability. The accuracy of translation is high both within and outside the domain, thereby improving the accuracy and versatility of translation.

[0251] 5 , which shows a flow chart of a task processing model training method provided according to an embodiment of this specification, applied to a cloud-side device, including the following specific steps:

[0252] Step 502: Acquire a sample set, wherein the sample set includes sample task data of at least two sample fields.

[0253] Step 504: Input the sample task data into the initial task processing model, and under the instruction of the first indication information, generate prediction domain prompt information based on the domain knowledge of the domain to which the sample task data belongs, and under the instruction of the second indication information, execute the target task on the sample task data based on the prediction domain prompt information to obtain the prediction task processing result.

[0254] Step 506: Based on the prediction domain prompt information and the prediction task processing result, the initial task processing model is trained to obtain a task processing model.

[0255] Step 508: Send the model parameters of the task processing model to the terminal device.

[0256] Cloud-side devices are virtual devices that provide model training. Terminal devices are physical devices that provide task processing. Terminal devices and cloud-side devices are connected via network channels for data transmission. Cloud-side devices have higher computing power and storage capacity than terminal devices.

[0257] The present disclosure and the embodiment of FIG. 2 are based on the same inventive concept. For the specific methods of steps 502 to 508, refer to the embodiment of the training phase in the embodiment of FIG. 2 and will not be described in detail here.

[0258] In an optional embodiment of this specification, before step 504, the following specific steps are further included:

[0259] Obtain a pre-training set and a basic task model, wherein the pre-training set includes multiple pre-training task data;

[0260] Input the pre-training task data into the basic task model, perform the target task on the pre-training task data, and obtain the estimated task processing result;

[0261] Based on the estimated task processing results, the basic task model is pre-trained to obtain the initial task processing model.

[0262] The present disclosure and the embodiment of FIG2 described above are based on the same inventive concept. For the specific methods of each step, please refer to the embodiment of the pre-training stage in the embodiment of FIG2 described above, which will not be repeated here.

[0263] In the present disclosure, a sample set is obtained, wherein the sample set includes sample task data of at least two sample fields; the sample task data is input into an initial task processing model, and under the instruction of first indication information, prediction field prompt information is generated based on the field knowledge of the field to which the sample task data belongs, and under the instruction of second indication information, the target task is performed on the sample task data based on the prediction field prompt information to obtain a prediction task processing result; based on the prediction field prompt information and the prediction task processing result, the initial task processing model is trained to obtain a task processing model; and the model parameters of the task processing model are sent to a terminal device. By performing logical splitting of model training, multi-field prompt information generation and multi-field task processing are jointly trained on the initial task processing model, so that the model can simultaneously learn the field discrimination generation capability and multi-field general task processing capability, providing model support for high-accuracy and high-versatility task processing, and completing model training on cloud-side devices, thereby improving the efficiency and training effect of model training.

[0264] The following further describes the translation method provided in this specification using the application of the translation method in multi-field translation as an example, in conjunction with FIG6 . FIG6 shows a flowchart of the processing process of a translation method applied to multi-field translation provided in one embodiment of this specification, including the following specific steps:

[0265] Step 602: Receive the text to be translated sent by the front-end user "Eine Vollremission(VR)wurde definiert als das Fehlen sichtbarer Im Knochenmark und die periphere Regeneration von Thrombozyten und Leukozyten.”

[0266] Step 604: Construct first task information based on the first instruction information "generate a useful translation field prompt to better translate the following German text into English" and the text to be translated.

[0267] Step 606: Input the first task information into the large language model. Under the instruction of the first instruction information, based on the domain knowledge of the medical field to which the text to be translated belongs, generate domain prompt information of the medical field: "This sentence comes from a text related to medicine and pharmacy, and is translated into the style of the medical field."

[0268] Step 608: Construct second task information based on the second instruction information “Translate this text from German into English”, the domain prompt information, and the text to be translated.

[0269] Step 610: Input the second task information into the large language model. Under the instruction of the second instruction information, based on the domain prompt information, perform the target task on the translation text to obtain the translation result "Complete remission (CR) was defined as the absence of visible leukaemic cells in the bone marrow and peripheral recovery of platelets and white blood cells."

[0270] Step 612: Send the translation result to the front-end user.

[0271] In this disclosure, the large language model is first inspired to perceive the domain style of the text during translation, and then performs universal translation across multiple domains. By generating domain prompts for the domain to which the text to be translated belongs, and using these prompts to perform domain translation, not only does this enable diversified translation across multiple domains through prompts, but it also further stimulates the large model's existing domain knowledge, allowing for even greater translation performance across multiple domains. Even in unseen domains, the self-generated domain prompts can enhance translation results and improve translation accuracy.

[0272] FIG7 shows a front-end schematic diagram of a translation method applied to multi-domain translation provided by an embodiment of this specification, as shown in FIG7 :

[0273] The front-end interface includes a dialog display area, an input box, a send control, and an export control. The user enters the task data in the input box. im Knochenmark und die periphere Regeneration von Thrombozyten und Leukozyten." and the instruction "Please translate this text into English," then click the Send control. After processing from steps 602 to 612, the translation result "Complete remission (CR) was defined as the absence of visible leukemic cells in the bone marrow and peripheral recovery of platelets and white blood cells." is received, and the translation result is rendered and displayed in the dialog display area. The user can export the translation result into a file in a specific format, such as txt, doc, or pdf, by clicking the Export control.

[0274] Corresponding to the above method embodiment, this specification also provides an embodiment of a task processing device. FIG8 shows a schematic diagram of the structure of a task processing device provided in one embodiment of this specification. As shown in FIG8 , the device includes:

[0275] A first acquisition module 802 is configured to acquire task data to be processed;

[0276] The first processing module 804 is configured to input the task data into the task processing model, generate domain prompt information of the target domain based on the domain knowledge of the target domain to which the task data belongs under the instruction of the first indication information, and execute the target task on the task data based on the domain prompt information under the instruction of the second indication information to obtain the task processing result.

[0277] Optionally, the first processing module 804 is further configured to:

[0278] Based on the first indication information and the task data, the first task information is constructed, wherein the first indication information is used to instruct the task processing model to perform the task of generating domain prompt information; the first task information is input into the task processing model, and under the instruction of the first indication information, the domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the task data belongs.

[0279] Optionally, the first processing module 804 is further configured to:

[0280] Based on the second indication information, the domain prompt information and the task data, the second task information is constructed, wherein the second indication information is used to instruct the task processing model to perform the target task; the second task information is input into the task processing model, and under the instruction of the second indication information, the target task is performed on the task data based on the domain prompt information to obtain the task processing result.

[0281] Optionally, the device further comprises:

[0282] The guidance feedback module is configured to send the domain prompt information to the front-end user; receive a first evaluation message sent by the front-end user regarding the domain prompt information; generate a first inquiry guidance message based on the first evaluation message, and send the first inquiry guidance message to the front-end user; receive updated domain prompt information fed back by the front-end user based on the first inquiry guidance message;

[0283] Correspondingly, the first processing module 804 is further configured to:

[0284] Second task information is constructed based on the second indication information, the updated field prompt information and the task data.

[0285] Optionally, the device further comprises:

[0286] The training module is configured to obtain a sample set, wherein the sample set includes sample task data of at least two sample fields; input the sample task data into an initial task processing model, generate prediction field prompt information based on the domain knowledge of the field to which the sample task data belongs under the instruction of first indication information, and execute the target task on the sample task data based on the prediction field prompt information under the instruction of second indication information to obtain a prediction task processing result; and train the initial task processing model based on the prediction field prompt information and the prediction task processing result to obtain a task processing model.

[0287] Optionally, the training module is further configured to:

[0288] Obtain the label task processing result corresponding to the sample task data; determine the first loss based on the prediction domain prompt information, and determine the second loss based on the prediction task processing result and the label task processing result; determine the total loss based on the first loss and the second loss; adjust the model parameters of the initial task processing model based on the total loss, and obtain the task processing model when the preset training end conditions are met.

[0289] Optionally, the training module is further configured to:

[0290] The sample task data is input into the pre-trained task processing model, and under the instruction of the second instruction information, the target task is performed on the sample task data based on the label domain prompt information to obtain the label task processing result.

[0291] Optionally, the device further comprises:

[0292] The pre-training module is configured to obtain a pre-training set and a basic task model, wherein the pre-training set includes multiple pre-training task data; input the pre-training task data into the basic task model, perform the target task on the pre-training task data, and obtain an estimated task processing result; based on the estimated task processing result, pre-train the basic task model to obtain an initial task processing model.

[0293] Optionally, the training module is further configured to:

[0294] The sample task data is input into the initial task processing model, and under the instruction of the first instruction information, the domain to which the sample task data belongs is predicted, and based on the domain knowledge of the domain, predicted domain prompt information is generated.

[0295] Optionally, the sample set further includes label domain prompt information of the sample domain to which the sample task data belongs, the prediction domain prompt information includes a plurality of prompt unit information, and the label prompt information includes a plurality of prompt unit information;

[0296] Correspondingly, the training module is further configured as follows:

[0297] A first loss is determined based on the prediction domain prompt information and the prompt unit information in the label domain prompt information.

[0298] Optionally, the prediction task processing result includes multiple processing unit results, and the label task processing result includes multiple processing unit results;

[0299] Correspondingly, the training module is further configured as follows:

[0300] The second loss is determined based on the results of each processing unit in the prediction task processing result and the label task processing result.

[0301] Optionally, the device further comprises:

[0302] The feedback adjustment module is configured to send the task processing results to the front-end user; receive a second evaluation message sent by the front-end user regarding the task processing results; generate a second inquiry guidance message based on the second evaluation message, and send the second inquiry guidance message to the front-end user; collect feedback information input by the front-end user based on the second inquiry guidance message, and obtain an updated sample set based on the feedback information; and use the updated sample set to train the task processing model.

[0303] In the present disclosure, the execution logic of the target task is split. When the domain prompt information of the target domain is generated, the target task is executed on the task data based on the domain prompt information to obtain the task processing result, thereby realizing task processing in different domains, effectively alleviating the overfitting problem and catastrophic forgetting problem of the model, improving the adaptability of the model to the domain, while retaining a high generalization ability. The accuracy is high when processing tasks both within and outside the domain, thereby improving the accuracy and versatility of task processing.

[0304] The above is a schematic scheme of a task processing device of this embodiment. It should be noted that the technical scheme of the task processing device and the technical scheme of the task processing method described above are of the same concept. For details not described in detail in the technical scheme of the task processing device, please refer to the description of the technical scheme of the task processing method described above.

[0305] Corresponding to the above method embodiment, this specification also provides a translation device embodiment. FIG9 shows a schematic diagram of the structure of a translation device provided in one embodiment of this specification. As shown in FIG9, the device includes:

[0306] The receiving module 902 is configured to receive information to be translated sent by a front-end user;

[0307] The second processing module 904 is configured to input the information to be translated into the translation model, generate domain prompt information of the target domain based on the domain knowledge of the target domain to which the information to be translated belongs, under the instruction of the first instruction information, and perform the translation task on the information to be translated based on the domain prompt information to obtain a translation result, under the instruction of the second instruction information.

[0308] The result feedback module 906 is configured to send the translation result to the front-end user.

[0309] In the present disclosure, the execution logic of the translation task is split. When the domain prompt information of the target domain is generated, the translation task is performed on the translation information based on the domain prompt information to obtain the translation result, thereby realizing translation in different domains, effectively alleviating the overfitting problem and catastrophic forgetting problem of the model, improving the adaptability of the model to the domain, while retaining a high generalization ability. The accuracy is high when translating both within and outside the domain, thereby improving the accuracy and versatility of the translation.

[0310] The above is a schematic diagram of a translation device according to this embodiment. It should be noted that the technical solution of the translation device and the technical solution of the translation method described above are based on the same concept. For details not described in detail in the technical solution of the translation device, please refer to the description of the technical solution of the translation method described above.

[0311] Corresponding to the above method embodiment, this specification also provides an embodiment of a task processing model training device. Figure 10 shows a schematic diagram of the structure of a task processing model training device provided by one embodiment of this specification. As shown in Figure 10, the device is applied to a cloud-side device and includes:

[0312] The third acquisition module 1002 is configured to acquire a sample set, wherein the sample set includes sample task data of at least two sample fields;

[0313] The third processing module 1004 is configured to input the sample task data into the initial task processing model, generate prediction domain prompt information based on the domain knowledge of the domain to which the sample task data belongs under the instruction of the first instruction information, and execute the target task on the sample task data based on the prediction domain prompt information under the instruction of the second instruction information to obtain a prediction task processing result;

[0314] The model training module 1006 is configured to train the initial task processing model based on the prediction domain prompt information and the prediction task processing result to obtain the task processing model;

[0315] The model feedback module 1008 is configured to send the model parameters of the task processing model to the terminal device.

[0316] Optionally, the device further comprises:

[0317] The model pre-training module is configured to obtain a pre-training set and a basic task model, wherein the pre-training set includes multiple pre-training task data; input the pre-training task data into the basic task model, perform the target task on the pre-training task data, and obtain an estimated task processing result; based on the estimated task processing result, pre-train the basic task model to obtain an initial task processing model.

[0318] In this disclosure, by performing logical splitting of model training, multi-domain prompt information generation and multi-domain task processing are jointly trained on the initial task processing model, so that the model can simultaneously learn domain discrimination generation capabilities and multi-domain general task processing capabilities, providing model support for high-accuracy and high-versatility task processing, and completing model training on cloud-side devices, thereby improving the efficiency and training effect of model training.

[0319] The above is a schematic diagram of a task processing model training device according to this embodiment. It should be noted that the technical solution of the task processing model training device and the technical solution of the task processing model training method described above are based on 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.

[0320] Figure 11 shows a block diagram of a computing device according to one embodiment of this specification. Components of computing device 1100 include, but are not limited to, a memory 1110 and a processor 1120. Processor 1120 and memory 1110 are connected via a bus 1130, and a database 1150 is used to store data.

[0321] The computing device 1100 also includes an access device 1140 that enables the computing device 1100 to communicate via one or more networks 1160. Examples of such networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 1140 may include one or more of any type of network interface (e.g., a Network Interface Controller (NIC)) whether wired or wireless, such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC). In one embodiment of the present specification, the aforementioned components of the computing device 1100 and other components not shown in FIG11 may also be connected to each other, for example, via a bus. It should be understood that the computing device structure block diagram shown in FIG11 is for illustrative purposes only and does not limit the scope of this specification. Those skilled in the art may add or replace other components as needed.

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

[0323] Among them, the processor 1120 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-mentioned task processing method, translation method or task processing model training method.

[0324] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device is based on the same concept as the technical solutions of the aforementioned task processing method, translation method, and task processing model training method. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solutions of the aforementioned task processing method, translation method, or task processing model training method.

[0325] An embodiment of the present specification also provides a computer-readable storage medium storing a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned task processing method, translation method, or task processing model training method.

[0326] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium is based on the same concept as the technical solutions of the aforementioned task processing method, translation method, and task processing model training method. 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 aforementioned task processing method, translation method, or task processing model training method.

[0327] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned task processing method, translation method or task processing model training method.

[0328] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of this computer program and the technical schemes of the aforementioned task processing method, translation method, and task processing model training method are based on the same concept. For details not described in detail in the technical scheme of the computer program, please refer to the description of the technical schemes of the aforementioned task processing method, translation method, or task processing model training method.

[0329] The foregoing description of specific embodiments of this specification is intended to be a description of other embodiments. 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 an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or advantageous.

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

[0331] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

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

[0333] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the content of this disclosure. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of this disclosure, so that those skilled in the art can better understand and use this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A task processing method, comprising: Get the task data to be processed; The task data is input into a task processing model, and under the instruction of the first indication information, domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the task data belongs. Under the instruction of the second indication information, the target task is executed on the task data based on the domain prompt information to obtain a task processing result.

2. The method according to claim 1, wherein inputting the task data into the task processing model and generating domain prompt information of the target domain based on domain knowledge of the target domain to which the task data belongs under the instruction of the first instruction information comprises: Constructing first task information based on first indication information and the task data, wherein the first indication information is used to instruct the task processing model to perform the task of generating the domain prompt information; The first task information is input into the task processing model, and under the instruction of the first instruction information, domain prompt information of the target domain is generated based on the domain knowledge of the target domain to which the task data belongs.

3. The method according to claim 1 or 2, wherein under the instruction of the second instruction information, based on the domain prompt information, the target task is executed on the task data to obtain the task processing result, including Based on the second indication information, the field prompt information and the task data, second task information is constructed, wherein: The second instruction information is used to instruct the task processing model to execute the target task; The second task information is input into the task processing model, and under the instruction of the second instruction information, based on the domain prompt information, the target task is executed on the task data to obtain a task processing result.

4. The method according to claim 3, before constructing the second task information based on the second indication information, the domain prompt information and the task data, further comprising: Sending the field prompt information to the front-end user; receiving a first evaluation message sent by the front-end user for the field prompt information; generating a first inquiry guidance message based on the first evaluation message, and sending the first inquiry guidance message to the front-end user; receiving updated domain prompt information fed back by the front-end user based on the first inquiry guidance message; The constructing the second task information based on the second indication information, the field prompt information and the task data includes: Second task information is constructed based on the second indication information, the updated field prompt information and the task data.

5. The method according to claim 1, before inputting the task data into the task processing model, further comprising: Acquire a sample set, wherein the sample set includes sample task data of at least two sample fields; Inputting the sample task data into an initial task processing model, generating predicted domain prompt information based on domain knowledge of the domain to which the sample task data belongs under the instruction of first instruction information, and executing the target task on the sample task data based on the predicted domain prompt information under the instruction of second instruction information to obtain a predicted task processing result; Based on the prediction domain prompt information and the prediction task processing result, the initial task processing model is trained to obtain a task processing model.

6. The method according to claim 5, wherein the training of the initial task processing model based on the prediction domain prompt information and the prediction task processing result to obtain the task processing model comprises: Obtaining a label task processing result corresponding to the sample task data; Determining a first loss based on the prediction domain prompt information, and determining a second loss based on the prediction task processing result and the label task processing result; determining a total loss based on the first loss and the second loss; Based on the total loss, the model parameters of the initial task processing model are adjusted, and when a preset training end condition is met, a task processing model is obtained.

7. The method according to claim 6, wherein the initial task processing model is a pre-trained task processing model; The obtaining of the label task processing result corresponding to the sample task data includes: The sample task data is input into the pre-trained task processing model, and under the instruction of the second instruction information, the target task is performed on the sample task data based on the label domain prompt information to obtain a label task processing result.

8. The method according to claim 7, before inputting the sample task data into the pre-trained task processing model, further comprising: Obtaining a pre-training set and a basic task model, wherein the pre-training set includes a plurality of pre-training task data; Inputting the pre-training task data into the basic task model, performing the target task on the pre-training task data, and obtaining an estimated task processing result; Based on the estimated task processing results, the basic task model is pre-trained to obtain an initial task processing model.

9. The method according to claim 5, wherein inputting the sample task data into an initial task processing model and generating prediction domain prompt information based on domain knowledge of the domain to which the sample task data belongs under the instruction of the first instruction information comprises: The sample task data is input into an initial task processing model, and under the instruction of first instruction information, the domain to which the sample task data belongs is predicted, and based on the domain knowledge of the domain, predicted domain prompt information is generated.

10. The method according to any one of claims 6 to 8, wherein the sample set further comprises label domain prompt information of the sample domain to which the sample task data belongs, the prediction domain prompt information comprises a plurality of prompt unit information, and the label prompt information comprises a plurality of prompt unit information; The determining the first loss based on the prediction domain prompt information includes: A first loss is determined based on the prediction domain prompt information and each prompt unit information in the label domain prompt information.

11. The method according to any one of claims 6 to 8, wherein the prediction task processing result includes multiple processing unit results, and the label task processing result includes multiple processing unit results; The determining the second loss based on the prediction task processing result and the label task processing result includes: A second loss is determined based on the prediction task processing result and the results of each processing unit in the label task processing result.

12. The method according to claim 1, further comprising, after obtaining the task processing result: Sending the task processing result to the front-end user; receiving a second evaluation message sent by the front-end user regarding the task processing result; generating a second inquiry guidance message based on the second evaluation message, and sending the second inquiry guidance message to the front-end user; collecting feedback information input by the front-end user based on the second inquiry guidance message, and obtaining an updated sample set based on the feedback information; The task processing model is trained using the updated sample set.

13. A translation method comprising: Receive information to be translated sent by front-end users; Inputting the information to be translated into a translation model, generating domain prompt information of the target domain based on domain knowledge of the target domain to which the information to be translated belongs under the instruction of first instruction information, and performing a translation task on the information to be translated based on the domain prompt information under the instruction of second instruction information to obtain a translation result; The translation result is sent to the front-end user.

14. A task processing model training method, applied to a cloud-side device, comprising: Acquire a sample set, wherein the sample set includes sample task data of at least two sample fields; Inputting the sample task data into an initial task processing model, generating predicted domain prompt information based on domain knowledge of the domain to which the sample task data belongs under the instruction of first instruction information, and executing the target task on the sample task data based on the predicted domain prompt information under the instruction of second instruction information to obtain a predicted task processing result; Based on the prediction domain prompt information and the prediction task processing result, the initial task processing model is trained to obtain a task processing model; The model parameters of the task processing model are sent to the terminal device.

15. The method according to claim 14, before inputting the sample task data into the initial task processing model, further comprising: Obtaining a pre-training set and a basic task model, wherein the pre-training set includes a plurality of pre-training task data; Inputting the pre-training task data into the basic task model, performing the target task on the pre-training task data, and obtaining an estimated task processing result; Based on the estimated task processing result, the basic task model is pre-trained to obtain the initial task processing model.

16. 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. When the computer program / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 15 are implemented.

17. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 15.

18. A computer program product comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Text translation method, device and equipment and readable storage medium

    CN116933807A

  • Task processing method, entity identification method and data processing method for task processing

    CN117291185A

  • Task processing and code processing method, computing device, medium and program product

    CN117648986A

  • Task processing method, translation method, task processing model training method, computing device, computer readable storage medium and computer program product

    CN118364828A

Cited By

  • Data processing method, computing device, server, storage medium and program product

    CN121658594A