Task processing method and device, computer equipment and storage medium

By collecting, cleaning, and fine-tuning a Transformer-based large language model with a stochastic gradient descent algorithm, the method addresses the limitations of existing models, enabling robust multi-scenario medical information processing.

CN119226793APending Publication Date: 2024-12-31PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411243432.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing large language models are limited to single-scenario tasks in medical environments, lacking the ability to generalize across scenarios and domain knowledge, leading to unsatisfactory performance in complex multi-scenario medical information processing.

Method used

Collect and fit business data from multiple scenarios, construct a training dataset, clean and verify it, and fine-tune a Transformer-based large language model using a stochastic gradient descent algorithm to generate a target model that meets preset requirements.

Benefits of technology

Enables effective processing of tasks across multiple medical scenarios by generating a target large language model with enhanced domain knowledge and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226793A_ABST
    Figure CN119226793A_ABST
Patent Text Reader

Abstract

The invention discloses a task processing method and device, computer equipment and a storage medium, relates to the technical field of artificial intelligence, is applied to medical task processing scenes related to medical services, and comprises the following steps: collecting business data corresponding to a plurality of downstream tasks of different scenes, fitting the business data to obtain fitting data, constructing a training data set according to the fitting data; cleaning the training data set according to a data cleaning rule, and performing data labeling and data inspection on the obtained cleaned data set according to a data inspection rule to obtain a target data set; performing fine tuning training on a large language model constructed based on Transform by adopting the target data set, and when the large language model is trained to meet a preset requirement, generating a corresponding target large language model; and processing a task in a target scene based on the target large language model. According to the method and the device, tasks in multiple scenes can be effectively processed by generating the corresponding target large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and is applied to medical task processing scenarios related to medical services, and specifically to a task processing method, device, computer equipment, and non-volatile computer-readable storage medium. Background Art

[0002] At present, with the rapid development of artificial intelligence technology, large language models (LLM) are increasingly used in the medical field. These models can understand and generate natural language through deep learning technology, providing new possibilities for medical information processing. However, existing large language models usually focus on processing tasks in a single scenario, such as text classification, sentiment analysis or machine translation, which limits their application capabilities in more complex and multi-scenario medical environments.

[0003] In the medical field, the demand for information processing is far more complex than a single task. For example, in the scenario of physical examination report extraction, key information needs to be extracted from a large amount of medical text; in the scenario of case understanding, the model is required to understand and analyze the pathological description and treatment recommendations in the case; in the scenario of knowledge question and answer, it involves the query and interpretation of medical knowledge; and in the scenario of patient management, the patient's health data needs to be tracked and managed for a long time. The tasks in these scenarios require not only the model to have strong language understanding capabilities, but also to be able to process and integrate data from different sources and formats. Existing large language models perform well when processing tasks in a single scenario, but when faced with task challenges in multiple scenarios, their performance is often unsatisfactory. This is because these models are usually trained on a specific single dataset and lack the ability to generalize across scenarios. In addition, data in the medical field is usually highly professional and technical, requiring the model to have corresponding domain knowledge, and existing large language models often lack such expertise.

[0004] Based on this, how to provide a task processing method, apparatus, computer device and non-volatile computer-readable storage medium that can effectively process tasks in multiple scenarios by generating corresponding target large language models is a problem that urgently needs to be solved by technical personnel in this field. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a task processing method, apparatus, computer device and non-volatile computer-readable storage medium, aiming to solve the problem of how to effectively process tasks in multiple scenarios by generating corresponding target large language models.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] A task processing method, wherein the method comprises:

[0008] Collect business data corresponding to multiple downstream tasks in different scenarios, fit each of the business data to obtain fitting data, and construct a training data set based on the fitting data;

[0009] The training data set is cleaned according to the data cleaning rules, and the cleaned data set is labeled and verified according to the data verification rules to obtain the target data set;

[0010] The target data set is used to perform fine-tuning training on the large language model built based on Transformer, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated;

[0011] Based on the target large language model, tasks in the target scenario are processed.

[0012] In a further technical solution, the task processing method, wherein the business data corresponding to multiple downstream tasks in different scenarios are collected, each of the business data is fitted to obtain fitting data, and a training data set is constructed according to the fitting data, comprises:

[0013] Collecting business data of each downstream task through a business database corresponding to multiple downstream tasks in different scenarios;

[0014] Fitting the collected business data to obtain corresponding fitting data;

[0015] A training data set is constructed according to the fitting data.

[0016] In a further technical solution, the task processing method, wherein the target data set is used to perform fine-tuning training on a large language model built based on Transformer, and when the large language model is trained to meet preset requirements, a corresponding target large language model is generated, including:

[0017] Learning parameters of a target matrix in a large language model built based on Transformer according to the target data set to perform fine-tuning training on the large language model;

[0018] When the large language model is trained to meet preset requirements, a corresponding target large language model is generated.

[0019] In a further technical solution, the task processing method, wherein the learning of the parameters of the target matrix in the large language model constructed based on Transformer according to the target data set to fine-tune the large language model, includes:

[0020] According to the target data set, a parameter optimization algorithm is used to learn the parameters of the target matrix in the large language model built based on Transformer, so as to perform fine-tuning training on the large language model.

[0021] In a further technical solution, the task processing method, wherein the parameters of the target matrix in the large language model constructed based on Transformer are learned using a parameter optimization algorithm according to the target data set to fine-tune the large language model, wherein:

[0022] The parameter optimization algorithm is a stochastic gradient descent algorithm.

[0023] In a further technical solution, the task processing method, wherein when the large language model is trained to meet preset requirements, generating a corresponding target large language model comprises:

[0024] Pre-set fine-tuned target performance indicators;

[0025] When the large language model is trained to meet the target performance indicator, a corresponding target large language model is generated.

[0026] In a further technical solution, the task processing method, wherein the processing of the task in the target scene based on the target large language model includes:

[0027] Get the target task in the target scene;

[0028] The prompt text corresponding to the target task is input into the target large language model to generate a processing result of the target task.

[0029] A task processing device, wherein the device comprises:

[0030] A collection and fitting module is used to collect business data corresponding to multiple downstream tasks in different scenarios, fit each of the business data to obtain fitting data, and construct a training data set based on the fitting data;

[0031] A data processing module is used to clean the training data set according to the data cleaning rules, and to perform data annotation and data verification on the cleaned data set according to the data verification rules to obtain the target data set;

[0032] A fine-tuning training module is used to use the target data set to perform fine-tuning training on the large language model built based on Transformer, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated;

[0033] The task processing module is used to process tasks in a target scenario based on the target large language model.

[0034] A computer device, wherein the computer device comprises at least one processor; and

[0035] a memory communicatively connected to the at least one processor; wherein,

[0036] The memory stores a computer program that can be executed by the at least one processor. When the computer program is executed by the at least one processor, any of the task processing methods described above can be implemented.

[0037] A non-volatile computer-readable storage medium stores a computer program, wherein the computer program, when executed by at least one processor, can implement any of the task processing methods described above.

[0038] Compared with the prior art, the present invention provides a task processing method, device, computer equipment and non-volatile computer-readable storage medium, wherein the method includes: collecting business data corresponding to multiple downstream tasks in different scenarios, fitting each of the business data to obtain fitting data, and constructing a training data set according to the fitting data; cleaning the training data set according to data cleaning rules, and annotating and verifying the cleaned data set according to data verification rules to obtain a target data set; using the target data set to fine-tune the large language model built based on Transformer, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated; based on the target large language model, the tasks in the target scenario are processed. In this way, the method of the present invention can achieve effective processing of tasks in multiple scenarios by generating corresponding target large language models. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A flowchart of a task processing method provided by an embodiment of the present invention.

[0041] Figure 2 A schematic diagram of functional modules of a task processing device provided by an embodiment of the present invention.

[0042] Figure 3 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0044] In the description of the present invention, the terms "include", "including", "have", "contain", etc. are all open terms, which mean including but not limited to. The descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. The order of steps involved in each embodiment is used to schematically illustrate the implementation of the present application, and the order of steps therein is not limited and can be appropriately adjusted as needed.

[0045] Various non-limiting embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0046] At present, with the rapid development of artificial intelligence technology, large language models (LLM) are increasingly used in the medical field. These models can understand and generate natural language through deep learning technology, providing new possibilities for medical information processing. However, existing large language models usually focus on processing tasks in a single scenario, such as text classification, sentiment analysis or machine translation, which limits their application capabilities in more complex and multi-scenario medical environments.

[0047] In the medical field, the demand for information processing is far more complex than a single task. For example, in the scenario of physical examination report extraction, key information needs to be extracted from a large amount of medical text; in the scenario of case understanding, the model is required to understand and analyze the pathological description and treatment recommendations in the case; in the scenario of knowledge question and answer, it involves the query and interpretation of medical knowledge; and in the scenario of patient management, the patient's health data needs to be tracked and managed for a long time. The tasks in these scenarios require not only the model to have strong language understanding capabilities, but also to be able to process and integrate data from different sources and formats. Existing large language models perform well when processing tasks in a single scenario, but when faced with task challenges in multiple scenarios, their performance is often unsatisfactory. This is because these models are usually trained on a specific single dataset and lack the ability to generalize across scenarios. In addition, data in the medical field is usually highly professional and technical, requiring the model to have corresponding domain knowledge, and existing large language models often lack such expertise.

[0048] Based on this, how to provide a task processing method, apparatus, computer device and non-volatile computer-readable storage medium that can effectively process tasks in multiple scenarios by generating corresponding target large language models is a problem that urgently needs to be solved by technical personnel in this field.

[0049] To solve the above problems, see Figure 1 The embodiment of the present invention provides a task processing method, wherein the method comprises the steps of:

[0050] S100, collecting business data corresponding to multiple downstream tasks in different scenarios, fitting each of the business data to obtain fitting data, and constructing a training data set according to the fitting data;

[0051] S200, cleaning the training data set according to the data cleaning rule, and performing data labeling and data verification on the cleaned data set according to the data verification rule to obtain a target data set;

[0052] S300, fine-tuning the large language model built based on Transformer using the target data set, and generating a corresponding target large language model when the large language model meets preset requirements after training;

[0053] S400: Processing tasks in a target scenario based on the target large language model.

[0054] Furthermore, the task processing method, wherein the step S100, collecting business data corresponding to multiple downstream tasks in different scenarios, fitting each of the business data to obtain fitting data, and constructing a training data set according to the fitting data, specifically includes:

[0055] Collecting business data of each downstream task through a business database corresponding to multiple downstream tasks in different scenarios;

[0056] Fitting the collected business data to obtain corresponding fitting data;

[0057] A training data set is constructed according to the fitting data.

[0058] In the specific implementation, in this embodiment, the business data of each downstream task is collected through the business database corresponding to multiple downstream tasks in different scenarios; the collected business data are fitted to obtain corresponding fitting data; and a training data set is constructed according to the fitting data; wherein the specific implementation process is roughly as follows:

[0059] 1) Data Collection

[0060] Determine the data source: First, determine which business databases contain data related to downstream tasks in different scenarios; for example, physical examination report database, electronic medical record system, patient question and answer forum, patient management system, etc.

[0061] Data access and permissions: ensuring appropriate permissions and interfaces are in place to access these operational databases, while complying with data protection regulations and patient privacy rights;

[0062] Data extraction: Use database queries, API calls or data export tools to extract the required business data from various business databases; this business data may include text reports, structured records, image scans, etc.

[0063] 2) Data fitting

[0064] Feature extraction: Extract useful features from raw data. These features should be able to reflect the key information of downstream tasks; for example, extract key health indicators from physical examination reports, and extract symptoms and diagnosis information from case descriptions;

[0065] Data transformation: Convert the extracted features into a format suitable for model training; this may include normalizing numerical data, converting text into word vectors, converting images into pixel matrices, etc.

[0066] Data fitting: Use machine learning models to fit and integrate data, combining data sets from different downstream tasks to form a comprehensive training data set to support learning in multiple scenarios and tasks;

[0067] Through the above process, a training data set is constructed by constructing business data corresponding to multiple downstream tasks in different scenarios.

[0068] Further, in the task processing method, in step S200, the training data set is cleaned according to the data cleaning rule, and the cleaned data set is labeled and verified according to the data verification rule to obtain the target data set;

[0069] In the specific implementation, in this embodiment, the training data set is cleaned according to the data cleaning rule, and the cleaned data set is labeled and verified according to the data verification rule to obtain the target data set; wherein the specific implementation process is roughly as follows:

[0070] 1) Data cleaning

[0071] Define cleaning rules: Develop a set of detailed data cleaning rules based on the characteristics of the data and the requirements of the model; these rules may include removing duplicate records, correcting erroneous data entries, handling missing values, removing outliers, etc.

[0072] Automated cleaning: Use scripts or data cleaning tools to automatically process data according to cleaning rules; automation can improve efficiency and reduce human errors;

[0073] Manual review: For some complex data issues, manual review and processing may be required; this includes checking the results of automated cleaning, as well as judging and handling special situations;

[0074] 2) Data Labeling

[0075] Define annotation rules: clarify the purpose and requirements of annotation and formulate annotation rules; for example, in text classification tasks, it is necessary to define the standards for each category; in image recognition tasks, it is necessary to define the bounding box of the object, etc.;

[0076] Selection of annotation tools: Select or develop annotation tools that are suitable for the task requirements; these tools should be able to improve annotation efficiency while ensuring consistency and accuracy of annotation;

[0077] Perform annotation: Annotate the data either by professionals or using semi-automated tools; in text data, this may include classification, entity recognition, sentiment analysis, etc.; in image data, this may include object detection, segmentation, etc.

[0078] 3) Data verification

[0079] Define verification rules: formulate data verification rules according to the needs of model training; these rules are used to ensure the quality and applicability of data, which may include data distribution, coverage, balance, etc.;

[0080] Automated testing: Use statistical analysis tools or scripts to automatically test whether the various indicators of the data set meet the test rules; for example, check whether the data distribution is uniform, whether the categories are balanced, etc.

[0081] Manual verification: For some complex data problems, manual verification may be required; this includes random sampling checks of the data and in-depth analysis of possible problems in the data set;

[0082] 4) Final construction of the target dataset

[0083] Data integration: Integrate the cleaned, labeled, and verified data into a complete target dataset to prepare for model training;

[0084] Dataset division: Divide the integrated target dataset into training set, validation set and test set. Reasonable dataset division is crucial for the generalization ability and performance evaluation of the model.

[0085] Backup and documentation: Back up the final target data set and record detailed documentation of the entire data preparation process; this includes data sources, cleaning rules, labeling rules, verification rules, etc., to facilitate subsequent review and model iteration;

[0086] Through the above process, a high-quality target dataset can be obtained, providing a solid foundation for model training and evaluation.

[0087] Furthermore, the task processing method, wherein the step S300, using the target data set to fine-tune the large language model built based on Transformer, and when the large language model is trained to meet the preset requirements, generating a corresponding target large language model, specifically includes:

[0088] Learning parameters of a target matrix in a large language model built based on Transformer according to the target data set to perform fine-tuning training on the large language model;

[0089] When the large language model is trained to meet preset requirements, a corresponding target large language model is generated.

[0090] Furthermore, the task processing method, wherein the step of learning the parameters of the target matrix in the large language model constructed based on Transformer according to the target data set to fine-tune the large language model, comprises:

[0091] According to the target data set, a parameter optimization algorithm is used to learn the parameters of the target matrix in the large language model built based on Transformer, so as to perform fine-tuning training on the large language model.

[0092] Furthermore, in the task processing method, the parameters of the target matrix in the large language model constructed based on Transformer are learned using a parameter optimization algorithm according to the target data set to fine-tune the large language model, wherein:

[0093] The parameter optimization algorithm is a stochastic gradient descent algorithm.

[0094] Furthermore, in the task processing method, when the large language model is trained to meet preset requirements, generating a corresponding target large language model comprises:

[0095] Pre-set fine-tuned target performance indicators;

[0096] When the large language model is trained to meet the target performance indicator, a corresponding target large language model is generated.

[0097] In the specific implementation, this embodiment first adopts a large model low-rank adaptation fine-tuning method, wherein the Transformer-based large language model applied in the present invention specifically includes:

[0098] Selecting the i-th layer in the large language model as the target layer for adaptation; wherein 1≤i≤L, and L is the total number of layers of the large language model;

[0099] In the target layer, identify any module m that needs to be adapted, and determine its corresponding low-rank adaptation parameter PEFT i,m ;in, and is a diagonal matrix, A i,m With B i,m is a low-rank matrix, and A i,m With B i,m The parameters of A are shared across layers. i,m A 0,m , B i,m Note: B 0,m , and different modules m The parameters are not shared;

[0100] Then, the target matrix (i.e., A) in the large language model is learned according to the target data set. 0,m , B 0,m , and parameters to fine-tune the large language model, and when the large language model is trained to meet preset requirements, generate a corresponding target large language model;

[0101] In the specific implementation, in this embodiment, the i-th layer in the large language model is selected as the target layer for adaptation; wherein 1≤i≤L, and L is the total number of layers of the large language model; wherein the specific implementation process is roughly as follows:

[0102] 1. Determine the number of model layers

[0103] First, identify and determine the total number of layers L of the large language model; this is basic information about the model architecture and is usually determined during the model design phase;

[0104] Large Language Model (LLM) usually refers to a deep learning model with a large number of parameters, especially in the field of natural language processing (NLP). Because of the large number of parameters, these models can capture and understand the complexity of language and perform various language-related tasks.

[0105] 2. Select the target layer

[0106] Among layers 1 to L of the large language model, a specific layer i is selected as the target layer for adaptation according to the requirements of the fine-tuning task; the selection can be guided by prior knowledge, task characteristics, or results of previous experiments;

[0107] Through the above process, the i-th layer in the large language model can be selected as the target layer for adaptation;

[0108] Furthermore, in the target layer, any module m that needs to be adapted is identified, and its corresponding low-rank adaptation parameter PEFT is determined. i,m , wherein the module m includes: query, key, value, output, up-projection and down-projection;

[0109] In the specific implementation, in this embodiment, in the target layer, any module m that needs to be adapted is identified, and its corresponding low-rank adaptation parameter PEFT is determined. i,m ;in, and is a diagonal matrix, A i,m With B i,m is a low-rank matrix, and A i,m With B i,m The parameters of A are shared across layers. i,m A 0,m , B i,m Note: B 0,m , and different modules m and The parameters are not shared; the specific implementation process is as follows:

[0110] 1. Module identification and adaptation parameter determination

[0111] In the target layer (i-th layer) of the large language model, identify any module m among the six different modules: query, key, value, output, up-projection, and down-projection that need to be adapted;

[0112] Determine the corresponding low-rank adaptation parameter for the module m, denoted as PEFT i,m ;

[0113] Among them, in the Transformer architecture, query, key, value, output, up-projection and down-projection are the key components of the self-attention mechanism;

[0114] 2. Low-rank adaptation parameter calculation

[0115] Define the low-rank adaptation parameter PEFT i,m The calculation formula is:

[0116] in, and is a diagonal matrix, that is, there are only d non-zero elements in both matrices, that is, there are only d learnable parameters;

[0117] And A i,m With B i,m The parameters of A are shared across layers, i.e. 1,m =A 2,m =A L,m ,B 1,m =B 2,m =B L,m , but it is not shared across modules, i.e. Therefore, A i,m A 0,m (i.e. A i,m =A 0,m ), B i,m Note: B 0,m (i.e. B i,m =B 0,m ), indicating that these parameters are consistent across layers;

[0118] And different modules m and The parameters of the model are not shared (i.e., neither across layers nor across modules) to maintain the independence of each module and the adaptability to specific tasks;

[0119] Through the above process, any module m that needs to be adapted can be identified in the target layer, and its corresponding low-rank adaptation parameter PEFT can be determined. i,m ;

[0120] In the specific implementation, in this embodiment, the target matrix (i.e., A) in the large language model is learned according to the target data set. 0,m , B 0,m , and ) parameters to fine-tune the large language model, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated; wherein the specific implementation process is roughly as follows:

[0121] 1. Fine-tuning training

[0122] Use a parameter optimization algorithm such as stochastic gradient descent (SGD) or its variants to learn the model parameters A based on the target dataset 0,m , B 0,m , and These parameters will be updated according to the gradient information during training to minimize the loss function and improve model performance;

[0123] Among them, stochastic gradient descent (SGD) is a popular parameter optimization algorithm used to train machine learning models by minimizing the loss function. It gradually optimizes the model by calculating the gradient of the loss relative to the model parameters and using this gradient information to update the parameters with a learning rate as the step size. The key to SGD is that only one sample or a small batch of samples is used to estimate the gradient each time it is updated, which makes the algorithm more efficient when processing large-scale data sets. In addition, SGD and its variants (such as momentum SGD, Adam, etc.) are widely used in deep learning and are favored for their powerful performance and flexibility.

[0124] 2. Performance Evaluation and Model Generation

[0125] Pre-set the target performance indicators for fine-tuning, such as accuracy, recall, or other task-specific evaluation criteria; during the training process, continuously evaluate the model performance and compare it with the target performance indicators; when the model performance reaches or exceeds the preset target performance indicators, stop training and generate the corresponding target large language model;

[0126] 3. Model Validation and Deployment

[0127] After the model training is completed, an independent validation set is used to conduct a final evaluation of the generated target large language model to ensure that the target large language model not only performs well on the training set, but can also generalize to unseen data. After the validation is passed, the target large language model can be deployed in actual applications.

[0128] Through the above process, a complete flow from data preparation to model fine-tuning, evaluation, and deployment is formed, aiming to improve the performance and applicability of the target large language model in downstream tasks in multiple scenarios.

[0129] Furthermore, in the task processing method, the step S400 of processing the task in the target scene based on the target large language model includes:

[0130] Get the target task in the target scene;

[0131] The prompt text corresponding to the target task is input into the target large language model to generate a processing result of the target task.

[0132] In the specific implementation, in this embodiment, a target task in a target scene is obtained; a prompt text corresponding to the target task is input into the target large language model to generate a processing result of the target task; wherein the specific implementation process is roughly as follows:

[0133] 1. Clarify the target scenario and target tasks

[0134] Scenario definition: Determine the specific scenarios in which the target large language model will be applied; for example, medical diagnosis, legal consultation, customer service, etc.

[0135] Task identification: In the target scenario, identify the specific tasks that the target large language model needs to complete; this may include text generation, information extraction, question answering, data analysis, etc.

[0136] 2. Prepare prompt text

[0137] Write clear and specific task descriptions, which will serve as input prompts for the target large language model;

[0138] 3. Input prompt text into the target large language model

[0139] Interface call: Input the prepared prompt text into the target large language model through the API or direct interaction with the model's interface;

[0140] 4. Generate processing results

[0141] Result generation: The target large language model generates processing results based on the input prompt text; this may be a paragraph of text, a set of data, an analysis report, etc.

[0142] Result verification: Check whether the results generated by the target large language model are as expected and whether they meet the requirements of the target task;

[0143] Iterative optimization: If the result does not meet the requirements, adjust the prompt text or model parameters according to the feedback and regenerate the processing result;

[0144] Through the above process, the target large language model can be effectively used to process tasks in multiple specific scenarios and generate high-quality processing results.

[0145] It can be seen from the above method embodiments that the task processing method provided by the present invention includes: collecting business data corresponding to multiple downstream tasks in different scenarios, fitting each of the business data to obtain fitting data, and constructing a training data set according to the fitting data; cleaning the training data set according to data cleaning rules, and annotating and verifying the cleaned data set according to data verification rules to obtain a target data set; using the target data set to fine-tune the large language model built based on Transformer, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated; based on the target large language model, the tasks in the target scenario are processed. In this way, the method of the present invention can achieve effective processing of tasks in multiple scenarios by generating corresponding target large language models.

[0146] It should be understood that, although the present application provides method operation steps as described in the embodiments or flowcharts, more or less operation steps may be included based on conventional or non-creative labor, and these operation steps are not necessarily performed in sequence according to the embodiment or flowchart. The order of steps listed in the embodiment or flowchart is only one way of executing the order of many steps, and does not represent the only execution order. It should be noted that there is not necessarily a certain order between the above steps. A person of ordinary skill in the art can understand from the description of the embodiment of the present invention that in different embodiments, the above steps may have different execution orders, that is, they may be executed in parallel, or they may be executed in exchange, etc. Moreover, at least a part of the steps in the embodiment or flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but may be executed in turn, alternately or synchronously with other steps or at least a part of the sub-steps or stages of other steps.

[0147] Based on the above method embodiment, please refer to Figure 2 Another embodiment of the present invention further provides a task processing device, wherein the device comprises:

[0148] A collection and fitting module 11 is used to collect business data corresponding to multiple downstream tasks in different scenarios, fit each of the business data to obtain fitting data, and construct a training data set according to the fitting data;

[0149] The data processing module 12 is used to clean the training data set according to the data cleaning rules, and to perform data annotation and data verification on the cleaned data set according to the data verification rules to obtain the target data set;

[0150] A fine-tuning training module 13 is used to perform fine-tuning training on the large language model built based on Transformer using the target data set, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated;

[0151] The task processing module 14 is used to process tasks in a target scenario based on the target large language model.

[0152] Furthermore, in the task processing device, the collection and fitting module 11 specifically includes:

[0153] A collecting unit, used to collect business data of each downstream task through a business database corresponding to multiple downstream tasks in different scenarios;

[0154] A fitting unit, used for fitting the collected business data to obtain corresponding fitting data;

[0155] A construction unit is used to construct a training data set according to the fitting data.

[0156] Furthermore, in the task processing device, the fine-tuning training module 13 specifically includes:

[0157] A learning unit, used for learning parameters of a target matrix in a large language model constructed based on Transformer according to the target data set, so as to perform fine-tuning training on the large language model;

[0158] The generating unit is used to generate a corresponding target large language model when the large language model is trained to meet preset requirements.

[0159] Furthermore, the task processing device, wherein the learning of the parameters of the target matrix in the large language model constructed based on Transformer according to the target data set to fine-tune the large language model, includes:

[0160] According to the target data set, a parameter optimization algorithm is used to learn the parameters of the target matrix in the large language model built based on Transformer, so as to fine-tune the large language model.

[0161] Furthermore, the task processing device, wherein the parameters of the target matrix in the large language model constructed based on Transformer are learned by using a parameter optimization algorithm according to the target data set to fine-tune the large language model, wherein:

[0162] The parameter optimization algorithm is a stochastic gradient descent algorithm.

[0163] Furthermore, the task processing device, wherein when the large language model is trained to meet preset requirements, generating a corresponding target large language model comprises:

[0164] Pre-set fine-tuned target performance indicators;

[0165] When the large language model is trained to meet the target performance indicator, a corresponding target large language model is generated.

[0166] Furthermore, in the task processing device, the task processing module 14 specifically includes:

[0167] An acquisition unit, used for acquiring a target task in a target scene;

[0168] The input unit is used to input the prompt text corresponding to the target task into the target large language model to generate a processing result of the target task.

[0169] The specific implementation process and effects of the device embodiment of the present invention can be found in the above method embodiment, which will not be described in detail here.

[0170] It can be seen from the above device embodiments that the task processing device provided by the present invention includes: a collection and fitting module, which is used to collect business data corresponding to multiple downstream tasks in different scenarios, fit each of the business data to obtain fitting data, and construct a training data set based on the fitting data; a data processing module, which is used to clean the training data set according to the data cleaning rules, and perform data annotation and data verification on the cleaned data set obtained according to the data verification rules to obtain the target data set; a fine-tuning training module, which is used to use the target data set to fine-tune the large language model built based on Transformer, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated; a task processing module, which is used to process tasks in the target scenario based on the target large language model. In this way, the device of the present invention can achieve effective processing of tasks in multiple scenarios by generating corresponding target large language models.

[0171] Based on the above method embodiment, please refer to Figure 3 Another embodiment of the present invention further provides a computer device, wherein the computer device 10 includes:

[0172] memory 120 and one or more processors 110, Figure 3 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a communication bus or other means. Figure 3 The example of connecting via a communication bus is taken as an example.

[0173] The processor 110 is used to complete various control logics of the computer device 10. It can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP, or any other such configuration.

[0174] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as a computer program corresponding to the task processing method in any of the above method embodiments of the present invention. The processor 110 executes various functional applications and data processing of the computer device 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implements the task processing method in any of the above method embodiments.

[0175] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an application required for operating the device or at least one function; the data storage area may store data created according to the use of the computer device 10, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the computer device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0176] One or more units are stored in the memory 120, and when executed by one or more processors 110, a task processing method as in any of the above method embodiments may be implemented, for example, the task processing method described above may be implemented. Figure 1 The method comprises steps S100 to S400.

[0177] The specific implementation process and effects of the computer device embodiment of the present invention are shown in the above method embodiment, which will not be described in detail here.

[0178] It can be seen from the above computer device embodiments that the computer device provided by the present invention can achieve: collecting business data corresponding to multiple downstream tasks in different scenarios, fitting each of the business data to obtain fitting data, and constructing a training data set based on the fitting data; cleaning the training data set according to the data cleaning rules, and annotating and verifying the cleaned data set according to the data verification rules to obtain a target data set; using the target data set to fine-tune the large language model built based on Transformer, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated; based on the target large language model, the tasks in the target scenario are processed. In this way, the computer device of the present invention can achieve effective processing of tasks in multiple scenarios by generating corresponding target large language models.

[0179] Those skilled in the art will understand that Figure 3 The hardware structure diagram shown in the figure is only a schematic diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0180] Based on the above method embodiments, another embodiment of the present invention further provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the task processing method in any of the above method embodiments can be implemented, for example, the task processing method described above can be implemented. Figure 1 The method comprises steps S100 to S400.

[0181] As an example, the non-volatile storage medium can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable ROM (EEPROM), or a flash memory. Volatile memory can include a random access memory (RAM) as an external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synch link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.

[0182] Based on the above method embodiments, another embodiment of the present invention further provides a computer program product, the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by a processor, the task processing method in any of the above method embodiments can be implemented, for example, the task processing method described above can be implemented. Figure 1 The method comprises steps S100 to S400.

[0183] The embodiments described above are merely illustrative, in which the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0184] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can exist in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0185] Conditional language such as "can," "can," "might," or "may," unless specifically stated otherwise or otherwise understood within the context as used, is generally intended to convey, among other things, that a particular embodiment can include (while other embodiments do not) a particular feature, element, and / or operation. Thus, such conditional language is also generally intended to imply that a feature, element, and / or operation is required for one or more embodiments anyway or that one or more embodiments must include logic for determining, with or without input or prompting, whether such features, elements, and / or operations are included or will be performed in any particular embodiment.

[0186] What has been described herein, in this specification and in the accompanying drawings includes examples that can provide a task processing method, apparatus, computer equipment, and non-volatile computer-readable storage medium. Of course, it is not possible to describe every conceivable combination of elements and / or methods for the purpose of describing the various features of the present disclosure, but it can be recognized that many other combinations and permutations of the disclosed features are possible. Therefore, it is obvious that various modifications can be made to the present disclosure without departing from the scope or spirit of the present disclosure, but all these various modifications should belong to the scope of protection of the claims attached to the present invention. In addition, or in an alternative, other embodiments of the present disclosure may be obvious from consideration of the present specification and the accompanying drawings and from the practice of the present disclosure as presented herein. It is intended that the examples proposed in the present specification and the accompanying drawings are considered to be illustrative and not restrictive in all respects. Although specific terms are used herein, they are used in a general and descriptive sense and are not used for limiting purposes.

Claims

1. A task processing method, characterized in that: The method comprises: Collect business data corresponding to multiple downstream tasks in different scenarios, fit each of the business data to obtain fitting data, and construct a training data set based on the fitting data; The training data set is cleaned according to the data cleaning rules, and the cleaned data set is labeled and verified according to the data verification rules to obtain the target data set; The target data set is used to perform fine-tuning training on the large language model built based on Transformer, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated; Based on the target large language model, tasks in the target scenario are processed.

2. The task processing method according to claim 1, characterized in that: The collecting of business data corresponding to multiple downstream tasks in different scenarios, fitting each of the business data to obtain fitting data, and constructing a training data set according to the fitting data include: Collecting business data of each downstream task through a business database corresponding to multiple downstream tasks in different scenarios; Fitting the collected business data to obtain corresponding fitting data; A training data set is constructed according to the fitting data.

3. The task processing method according to claim 2, characterized in that: The method of fine-tuning the large language model built based on Transformer by using the target data set, and generating a corresponding target large language model when the large language model meets the preset requirements, includes: Learning parameters of a target matrix in a large language model built based on Transformer according to the target data set to perform fine-tuning training on the large language model; When the large language model is trained to meet preset requirements, a corresponding target large language model is generated.

4. The task processing method according to claim 3, characterized in that: The learning, according to the target data set, parameters of a target matrix in a large language model constructed based on Transformer to perform fine-tuning training on the large language model includes: According to the target data set, a parameter optimization algorithm is used to learn the parameters of the target matrix in the large language model built based on Transformer, so as to fine-tune the large language model.

5. The task processing method according to claim 4, characterized in that: The parameter optimization algorithm is used to learn the parameters of the target matrix in the large language model constructed based on Transformer according to the target data set, so as to fine-tune the large language model, wherein: The parameter optimization algorithm is a stochastic gradient descent algorithm.

6. The task processing method according to claim 5, characterized in that: When the large language model is trained to meet the preset requirements, a corresponding target large language model is generated, including: Pre-set fine-tuned target performance indicators; When the large language model is trained to meet the target performance indicator, a corresponding target large language model is generated.

7. The task processing method according to any one of claims 1 to 6, characterized in that: The processing of tasks in the target scenario based on the target large language model includes: Get the target task in the target scene; The prompt text corresponding to the target task is input into the target large language model to generate a processing result of the target task.

8. A task processing device, characterized in that: The device comprises: A collection and fitting module is used to collect business data corresponding to multiple downstream tasks in different scenarios, fit each of the business data to obtain fitting data, and construct a training data set based on the fitting data; A data processing module is used to clean the training data set according to the data cleaning rules, and to perform data annotation and data verification on the cleaned data set according to the data verification rules to obtain the target data set; A fine-tuning training module is used to use the target data set to perform fine-tuning training on the large language model built based on Transformer, and when the large language model is trained to meet the preset requirements, a corresponding target large language model is generated; The task processing module is used to process tasks in a target scenario based on the target large language model.

9. A computer device, characterized in that: The computer device comprises at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. When the computer program is executed by the at least one processor, the task processing method according to any one of claims 1 to 7 can be implemented.

10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the task processing method according to any one of claims 1 to 7 can be implemented.