Generation task processing method and device and training method of generative model

By combining generative models and regular extraction methods, the target generation model is used to process the information generation task of medical scenarios, and the problems of poor accuracy and low efficiency of generation results in the prior art are solved, and higher quality and higher efficiency information generation are achieved.

CN119886328APending Publication Date: 2025-04-25ALI HEALTH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411825065.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art is time-consuming and labor-intensive when carrying out information generation tasks, and the accuracy of the generation results is poor, which affects the generation quality and service efficiency, making it difficult to meet the medical scenario needs of rapid updates and large data volumes.

Method used

A generative task processing method is adopted, combining generative models and regular extraction, and the target generation model is trained based on the training corpus, candidate information in the scene corpus is obtained, and high-quality target generation results are generated through multi-level scoring and filtering.

Benefits of technology

It improves the generation accuracy and generation quality of target generation tasks in the target scenario, ensures service efficiency, improves user experience, and better cope with diverse and complex scenario needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886328A_ABST
    Figure CN119886328A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a generation task processing method and device and a training method of a generation model, and the generation task processing method comprises the steps: responding to a target generation task of a target scene, and obtaining a scene corpus corresponding to the target scene; based on a scene extraction rule, extracting first candidate information from the scene corpus; second candidate information in the scene corpus is determined through a target generation model corresponding to the target generation task, and the target generation model is obtained through training based on a training corpus corresponding to the target scene; and based on the first candidate information and the second candidate information, determining a target generation result corresponding to the target generation task of the target scene. According to the method, the natural language processing capacity of the generative model and the matching capacity of rule extraction are combined, the matching limitation based on rule extraction information is avoided, the context of the scene corpus is better understood by utilizing the generative model, and a more accurate generation result under the target scene can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a method and device for processing a generation task, and a training method for a generation model. Background Art

[0002] With the rapid development of computer technology and information processing technology, the amount of online text data has exploded. When processing tasks in corresponding scenarios, a large amount of literature review is required, and there are challenges such as rapid knowledge update and huge data volume in this scenario.

[0003] In the prior art, information mining can be performed based on rules, and relevant words and terms can be extracted based on frequent item sets or statistical analysis methods to perform corresponding information generation tasks. However, in the above methods, performing information generation tasks is time-consuming and laborious, and the accuracy of the generated results is poor, which affects the generation quality, resulting in the restriction of scene-related service efficiency and affecting user experience. Therefore, a more accurate and higher-quality generation task processing solution is urgently needed. Summary of the invention

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

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

[0006] In response to a target generation task of a target scenario, acquiring a scenario corpus corresponding to the target scenario;

[0007] Extracting first candidate information from the scene corpus based on a scene extraction rule;

[0008] Determine the second candidate information in the scene corpus by using a target generation model corresponding to the target generation task, wherein the target generation model is obtained by training based on the training corpus corresponding to the target scene;

[0009] Based on the first candidate information and the second candidate information, a target generation result corresponding to the target generation task of the target scene is determined.

[0010] According to a second aspect of an embodiment of this specification, a training method for generating a model is provided, comprising:

[0011] In response to the training task of the target scenario, obtaining training corpus corresponding to the target scenario;

[0012] Training at least two initial task models of different sizes based on the training corpus to obtain generation models of corresponding sizes respectively;

[0013] The second generation model is adjusted and trained through the first generation model to obtain a target generation model, wherein the first generation model and the second generation model are generation models of different sizes, and the model size of the first generation model is larger than the model size of the second generation model.

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

[0015] A first acquisition module is configured to acquire a scene corpus corresponding to a target scene in response to a target generation task of the target scene;

[0016] An extraction module, configured to extract first candidate information from the scene corpus based on a scene extraction rule;

[0017] A first determination module is configured to determine the second candidate information in the scene corpus by using a target generation model corresponding to the target generation task, wherein the target generation model is obtained by training based on the training corpus corresponding to the target scene;

[0018] The second determination module is configured to determine a target generation result corresponding to the target generation task of the target scene based on the first candidate information and the second candidate information.

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

[0020] Memory and processor;

[0021] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned generation task processing method, generation model training method or information processing method based on the generation model are implemented.

[0022] According to the fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned generation task processing method, generation model training method, or information processing method based on the generation model.

[0023] According to the sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned generation task processing method, generation model training method, or generation model-based information processing method.

[0024] In the embodiments of this specification, a generation task processing method is provided, which realizes the extraction of first candidate information from the scene corpus based on the scene extraction rule, and uses the target generation model corresponding to the target generation task of the target scene to determine the second candidate information from the scene corpus, and then combines the first candidate information and the second candidate information to determine the target generation result corresponding to the target generation task of the target scene. The target generation model is obtained by training based on the training corpus corresponding to the scene, and is a generative model trained in the target scene. The target generation model has deep semantic understanding ability, can cope with diverse and complex scene requirements, effectively combines the natural language processing ability of the generative model with the matching ability of rule-based extraction, avoids the matching limitations of rule-based extraction information, and uses the generative model to better understand the context of the scene corpus, can obtain more accurate generation results in the target scene, improve the generation accuracy of the target generation task in the target scene, ensure the generation quality of the target scene, and then ensure the service efficiency related to the target scene, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 This is an application architecture diagram of a generation task provided by an embodiment of this specification;

[0026] Figure 2 is a flow chart of a method for generating task processing provided by an embodiment of this specification;

[0027] Figure 3 It is a schematic diagram of a process of generating first candidate information in a method for generating task processing provided by an embodiment of this specification;

[0028] Figure 4 It is a schematic diagram of a training process of a generative model provided by an embodiment of this specification;

[0029] Figure 5 It is a schematic diagram of an adjustment training process of a target generation model provided by an embodiment of this specification;

[0030] Figure 6 It is a schematic diagram of a processing process of a target generation task provided by an embodiment of this specification;

[0031] Figure 7 It is a processing diagram of a method for processing a generated task provided by an embodiment of this specification;

[0032] Figure 8 is a flow chart of a training method for generating a model provided by an embodiment of this specification;

[0033] Fig. 9is a structural diagram of a generation task processing device provided by an embodiment of this specification;

[0034] Fig.10 It is a structural schematic diagram of a training device for generating a model provided by an embodiment of this specification;

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

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

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

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

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

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

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

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

[0043] Generative big models: refers to artificial intelligence models based on deep learning that can generate coherent text, images, audio and other content. These models have learned the structure and semantics of language through large amounts of data training, so that they can generate content related to given input. Generative big models are widely used in the field of natural language processing (NLP), and are often used for tasks such as text generation, dialogue systems, and translation.

[0044] Initial Task Model: It is a large generative model that focuses on natural language generation tasks. It combines deep learning technology and pre-training on a large amount of text data. It has strong context understanding and content generation capabilities and can be applied to various application scenarios, including chatbots, document search platforms, document assistants, text summarization, and keyword extraction.

[0045] Embedding: It is a technology that maps discrete, high-dimensional symbols (such as words, phrases, or other category data) to a continuous low-dimensional vector space. By converting the data into vector form, mathematical operations and similarity calculations can be easily performed. These vectors are usually called embedded vectors, which can represent the original data in a multidimensional space and retain certain semantic relationships between the data.

[0046] Word Embedding: It is an important application in natural language processing. It represents words as vectors and captures the semantic relationship between words. Common methods include Word2Vec, GloVe, and FastText.

[0047] Incremental training (Continuous Pretrain): It is a machine learning method that aims to further train the model in a certain scenario based on the existing pre-trained model, allowing the model to be updated and improved by continuously receiving new data based on the existing knowledge to adapt to the tasks in the scenario. In this way, the model's adaptability and generation capabilities can be improved, and its sensitivity to new knowledge can be increased.

[0048] Supervised Fine-Tuning (SFT): is a commonly used deep learning technique that uses labeled data to further adjust the pre-trained model, further optimizing the performance of the model through supervised learning to better adapt it to specific tasks or data sets. In this way, the model can better understand the task requirements and improve its performance in specific application scenarios.

[0049] Controllable generation: refers to the process of generating content, through specific instructions or conditions to control the characteristics and style of the generated results. This capability can make the generated results meet expectations and provide personalized content for different scenarios or needs.

[0050] Relevance deduplication: refers to the process of filtering redundant or similar content through some technical means during information processing or data retrieval. This process uses the similarity evaluation between texts to ensure the uniqueness of the output results and improve the accuracy and availability of information.

[0051] Keywords: It is a refinement of text information, summarizing the main content, helping users quickly understand the main idea of ​​the text, and making it easy for users to determine whether the text is what they need, thereby improving the efficiency of information access and information search. In addition, due to the conciseness and simplicity of keywords, keywords can be used to calculate text relevance with low complexity, thereby efficiently performing text classification, text clustering, and information retrieval. In query sentences, keywords represent the main meaning of the user's question; in question analysis, extracting keywords from the question is crucial to understanding the semantics of the question; in information retrieval, keywords useful for retrieval need to be extracted from the question entered by the user.

[0052] It should be noted that, taking the medical scenario as an example, information generation and processing often rely on manual experience and cumbersome processes. When doctors provide treatment plans for patients, they not only need to consult a large amount of literature, but also face challenges such as rapid updates of medical knowledge and huge amounts of data. The mining and application of medical information is also often time-consuming and laborious, which restricts the efficiency of medical services and affects patients' medical experience.

[0053] In one implementation, a database covering biomedical literature can be provided, providing a wide range of research papers and medical literature retrieval services, and having powerful functions in literature acquisition and data storage. However, it does not focus on the ability to build and generate medical information, and lacks fine-tuning and semantic generation solutions for specific contexts. There are certain deficiencies in the mining and application of medical information. For example, the search term completion in the search box of the current retrieval database mainly provides search terms that are manually integrated and collected, which cannot cover the entirety and do not meet diversity requirements.

[0054] In another implementation, an academic literature database is also provided, which contains a wide range of journals, dissertations and conference papers, especially in the field of medicine, and provides powerful literature retrieval and management functions. Users can conduct in-depth searches by category and subject. However, there are shortcomings in the construction of medical information and the fine-tuning of contextual semantics, so its flexibility and customization capabilities are insufficient when meeting the needs of specific scenarios.

[0055] In another implementation, a medical research platform using artificial intelligence technology can be provided to quickly extract and summarize key scientific evidence from a large amount of literature. Users can quickly query specific topics and obtain relevant research information. However, there are still limitations in the generation of medical information and the application of specific terms. It mainly focuses on efficiency and results, and lacks the ability to refine terminology, which limits its use scenarios in specialized medical research. Although the medical information generation results it provides are diverse, when generating results, it fails to fully consider the context and specific needs of specific searches, affecting the practicality and accuracy of medical information, and the establishment and enrichment of medical information is insufficient. It fails to fully explore contextual relevance, resulting in weak accuracy and relevance in the generation of medical information.

[0056] As can be seen from the above, the implementation methods such as databases covering biomedical literature and academic literature databases mainly rely on the integration and supplementation of a priori medical system data, while the medical research platform of artificial intelligence technology mainly focuses on the diversity of search results, while ignoring the relevance judgment of medical information. The task platform of medical scenarios relies on rule-based retrieval systems, which mainly use information matching technology to process medical generation tasks. Rule-based systems are usually unable to effectively handle synonyms, contextual relevance, and semantic understanding, resulting in failure to find relevant information and lack of flexibility. With the continuous updating of medical knowledge, it is difficult to quickly adapt to new terms and concepts.

[0057] Some systems attempt to use data mining techniques, such as frequent itemsets or statistical analysis methods, to extract medical vocabulary and terminology. These methods are very limited in capturing complex medical semantic relationships and can often only rely on surface matching. The models have limitations, and the generated medical information lacks deep contextual understanding. Moreover, due to reliance on static data sets and manual intervention, the update speed is slow, resulting in low quality of generated terminology and information and delayed data updates.

[0058] The actual needs in the medical field are usually diverse and complex, such as different diseases, patient characteristics, regional differences, etc. In the absence of sufficient training or tuning, general large models are difficult to generate accurate medical information for these specific medical scenarios, and are prone to model hallucinations. In addition, it is impossible to combine the generated information with retrieval and filtering, resulting in low efficiency in actual applications, limited user interaction experience, and inability to meet personalized and diversified needs.

[0059] The above implementation methods have different focuses in the fields of medical information processing and data analysis, and are unable to perform complete and reliable medical generation task processing efficiently and intelligently.

[0060] With the continuous advancement of medical technology, especially the rapid development of generative artificial intelligence technology, medical scenarios can use intelligent means to improve the efficiency and accuracy of information processing. How to apply artificial intelligence to the generation and optimization of medical information is no longer just about understanding and mining data, but to participate in the generation and application of medical information through the innovation of intelligent technology, so as to achieve comprehensive empowerment of medical services.

[0061] The embodiments of this specification provide a generation task processing solution, which combines rule extraction with a generative medical big model, performs medical information mining based on the controllable generation and instruction filtering of the generative medical big model, realizes low-quality text filtering (instruction filtering) and correlation deduplication, and then realizes a process-based intelligent medical information generation solution, integrates a generative medical big model with strong diversity capabilities to perform reliable generation and instruction filtering, and utilizes efficient generative medical big models, incremental pre-training and targeted fine-tuning, instruction filtering and other technologies, which not only improves the quality and efficiency of medical information generation, but also provides a comprehensive and controllable medical generation task processing solution. Specifically, a general open source big model can be used to obtain a generative big model of the medical scenario based on big model training technologies such as continue pretrain and supervised fine-tuning and rich and comprehensive medical scenario corpus (serious medical (literature, guidelines, books, cases, etc.), non-serious medical (web pages, etc.)). The generative big model of the medical scenario can then be used to distill data, complete targeted fine-tuning training, instruction filtering, and similarity deduplication, to generate results with high relevance and controllability in medical scenarios, build a complete, reliable, and high-quality medical vocabulary, and provide convenient information retrieval and application support for search scenarios.

[0062] In this specification, a generation task processing method is provided. This specification also involves a generation model training method, a generation task processing device, a generation model training device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0063] Considering the huge amount of model parameters of the large model and the limited computing resources of the mobile terminal, the generation task processing method provided in the embodiment of this specification can be applied to the following: Figure 1 The application scenarios shown are not limited to these. Figure 1 This is an application architecture diagram of a generation task provided by an embodiment of this specification. Figure 1In the application scenario shown, the large model is deployed in a server 10, and the server 10 can be connected to one or more client devices 20 through a local area network connection, a wide area network connection, an Internet connection, or other types of data networks. The client devices 20 here may include but are not limited to: smart phones, tablet computers, laptops, PDAs, personal computers, smart home devices, car-mounted devices, etc. The client devices 20 can be connected through Figure 1 The graphical user interface shown interacts with the user to call the large model, thereby implementing the generation task processing method provided in the embodiment of this specification.

[0064] In the embodiments of this specification, Figure 1 As shown, the system composed of the client device and the server can perform the following steps: the client device executes the scene corpus corresponding to the received input target scene, generates the target generation task of the target scene and uploads it to the server. The server executes the target generation task in response to the target scene, obtains the scene corpus corresponding to the target scene; extracts the first candidate information from the scene corpus based on the scene extraction rule; uses the target generation model corresponding to the target generation task to determine the second candidate information in the scene corpus, wherein the target generation model is obtained by training the training corpus corresponding to the target scene; based on the first candidate information and the second candidate information, determines the target generation result corresponding to the target generation task of the target scene. The natural language processing capability of the generative model and the matching capability of the rule-based extraction are effectively combined to avoid the matching limitations of the rule-based extraction information, and the context of the scene corpus is better understood by the generative model, so that a more accurate generation result can be obtained in the target scene. It should be noted that when the operating resources of the client device can meet the deployment and operation conditions of the large model, the embodiment of the present application can be performed in the client device. In addition, the scene corpus corresponding to the input target scene can be received by the client and uploaded to the server, or the scene corpus corresponding to the target scene can be automatically collected by the server based on other databases.

[0065] See also Figure 2 , Figure 2 A flowchart of a method for processing a generated task is shown according to an embodiment of the present specification, which specifically includes the following steps.

[0066] Step 202: In response to the target generation task of the target scenario, the scenario corpus corresponding to the target scenario is obtained.

[0067] The embodiments of this specification are applied to applications, websites or mini-programs that have the function of processing generation tasks. On applications, websites or mini-programs, the generation task processing function is implemented. For example, a website that deploys a target generation model implements the task processing function of generating tasks such as keyword generation, summary generation, and key fragment generation. For example, a third-party application calls the deployed target generation model through an application programming interface (Application Programming Interface, referred to as API) to implement the corresponding generation task processing function.

[0068] Among them, the target scene refers to the scene that needs to mine information to generate corresponding key content, such as the target scene can be a medical scene, an educational scene, an entertainment scene, a financial scene, etc. In addition, the target scene can also be a more fine-grained scene in any scene, such as a medical device scene, a medical reconstruction scene, a medical oral scene, etc., and the embodiments of this specification do not limit this.

[0069] The target generation task refers to the task to be processed in the target scenario. The target generation task is used to indicate the acquisition of the scenario corpus of the target scenario. The subsequent analysis and processing of the scenario corpus can generate the corresponding key information in the target scenario and obtain the target generation result of the target generation task. For example, the target generation task can be a keyword generation task, a summary generation task, a key fragment generation task, etc. Among them, the scenario corpus of the target scenario refers to data that is highly relevant to the target scenario.

[0070] It should be noted that in order to ensure the reliability and accuracy of the scenario corpus, the scenario corpus of the target scenario can come from multiple data sources, including a variety of different data formats, such as text, tables, web pages, etc. Taking the target scenario as a medical scenario as an example, the scenario corpus can include serious medical data and non-serious medical data. Serious medical data refers to sensitive and important data related to health, disease diagnosis, treatment plans, clinical trials, etc. These data are directly related to the health and safety of patients and are subject to certain regulations, such as medical images, laboratory test results, monitoring data, literature, guidelines, books, cases, etc. Non-serious medical data refers to data that does not directly involve the health and safety of patients, usually auxiliary and non-core data, such as health logs, health questionnaires, health information, social interactions, wearable device data, web pages, etc.

[0071] In actual implementation, the scenario corpus corresponding to the target generation task of the target scenario can be obtained based on the user input at the front end; alternatively, the scenario corpus corresponding to the target generation task of the target scenario can also be collected from a third-party database or other data storage services. Specifically, in response to the target generation task of the target scenario, scenario corpus can be collected from a variety of reliable data sources, a large number of scenario corpus under the target scenario can be obtained, and the obtained scenario corpus can be preprocessed to obtain high-quality scenario corpus under the target scenario. Among them, the preprocessing can include at least one data processing method such as data cleaning, text standardization, low-quality content filtering, content auditing, relevance evaluation, data stratification and annotation, and diversity checking.

[0072] Data cleaning is the process of removing errors, inconsistencies, and redundant data in the obtained scenario corpus to improve data quality, and can include anomaly detection, duplicate data processing, format consistency processing, etc. Anomaly detection can use statistical methods (such as Z-score, IQR) or machine learning methods (such as Isolation Forest) to detect and process abnormal data; duplicate data processing refers to deleting duplicate records to ensure data uniqueness; format consistency refers to unifying data formats, such as date formats, numerical units, etc.

[0073] Text standardization is the process of converting text data in the scenario corpus into a unified format to improve the efficiency and accuracy of subsequent processing, and can include case conversion, punctuation processing, digital and special character processing, stemming and lemmatization, stop word removal, etc. Case conversion can convert text to a unified case, such as converting all to lowercase; punctuation processing can remove or standardize punctuation; digital and special character processing can remove or standardize numbers and special characters; stemming and lemmatization can use stemming (such as Porter Stemming) or lemmatization (such as Lemmatization) to restore words to their basic forms; stop word removal can remove common stop words, such as "of", "and", "is", etc.

[0074] Low-quality content filtering is the process of identifying and removing low-quality or irrelevant data in the scenario corpus to improve the overall quality of the scenario corpus, and can include text length filtering, duplicate content detection, noise detection, quality scoring, etc. Text length filtering can set a text length threshold to filter out texts that are too short or too long; duplicate content detection can use hash algorithms or similarity calculations (such as Jaccard similarity) to detect and remove duplicate content; noise detection can use natural language processing techniques to detect and remove noise content, such as garbled characters, meaningless character combinations, etc.; quality scoring can use machine learning models to score the text content and filter out content with a score lower than the threshold.

[0075] Content review is to ensure that the content of the scene corpus complies with the relevant regulations, which can include sensitive word filtering, sentiment analysis, content classification, manual review, etc. Sensitive word filtering can use the sensitive word list to detect and filter out content containing sensitive words; sentiment analysis can use sentiment analysis technology to detect the emotional tendency of the content and filter out negative or extreme content; content classification can use text classification technology to classify content into different categories, such as medical, non-medical, etc.; manual review can combine automatic review and manual review to ensure the accuracy and compliance of the content.

[0076] Relevance evaluation is the process of determining the relevance of the scene corpus to the target generation task of the target scene to ensure the validity of the scene corpus, which may include keyword matching, topic modeling, similarity calculation, etc. Keyword matching can use keyword matching technology to ensure that the data contains keywords related to the target generation of the target scene; topic modeling can use topic modeling technology (such as LDA) to extract the topic of the data and evaluate its relevance to the target generation task of the target scene; similarity calculation can use text similarity calculation (such as cosine similarity) to evaluate the similarity between the data and the target generation task of the target scene.

[0077] Data stratification and annotation is the process of classifying and labeling scene corpora according to specific standards to support subsequent analysis and modeling, which can include data stratification, data annotation, multi-label annotation, etc. Data stratification can divide scene corpora into different levels according to their characteristics, such as by age, gender, disease type, etc.; data annotation can use manual annotation or semi-automatic annotation technology to add labels to scene corpora, such as sentiment labels, category labels, etc.; for complex scene corpora, multi-label annotation technology can be used to add multiple labels to them.

[0078] Diversity check is to ensure that the scene corpus contains diverse data to improve the generalization ability of the model. It can include data distribution analysis, cluster analysis, sample balance, diversity scoring, etc. Data distribution analysis refers to analyzing the distribution of scene corpus on different features to ensure the diversity of scene corpus; cluster analysis can use clustering algorithms (such as K-means) to divide scene corpus into different clusters and check the characteristics of each cluster; sample balance can use resampling techniques (such as oversampling, undersampling) to balance scene corpus of different categories; diversity scoring can use diversity scoring indicators (such as Shannon entropy) to evaluate the diversity of scene corpus.

[0079] It should be noted that by performing at least one of the above preprocessing on a large amount of scene corpora obtained, high-quality scene corpora with a memory capacity of about several hundred GB can be obtained. The scene corpora may include different types, thereby improving the reliability and accuracy of the scene corpora.

[0080] For example, the scenario corpus obtained for the target scenario, the scenario corpus type and data volume can be shown in the following Table 1.

[0081] Table 1. Scenario corpus types and data table

[0082]

[0083] Step 204: extracting first candidate information from the scene corpus based on the scene extraction rule.

[0084] Among them, the scene extraction rules are pre-configured extraction rules for the target scene to extract key information. They are a set of predefined criteria and methods for automatically identifying and extracting specific types of information from unstructured or semi-structured scene corpora. The scene extraction rules are usually based on pattern matching, regular expressions, grammatical analysis or machine learning model configurations, and can efficiently extract the first candidate information that meets the rules from a large amount of scene corpora. For example, the scene extraction rules can score candidate words based on defined feature dimensions and select candidate words with a score higher than a set threshold as the first candidate information.

[0085] In actual implementation, taking the target generation task as a keyword generation task as an example, any keyword extraction tool can be used to extract core keywords in the scene corpus, and the extracted keywords can be used as the first candidate information, which is information generated based on rule matching.

[0086] In an optional implementation of this embodiment, the scene extraction rule includes scoring the candidate words based on at least one feature dimension, and filtering the information based on the scoring result; extracting the first candidate information from the scene corpus based on the scene extraction rule includes:

[0087] Segment the scene corpus to obtain candidate words;

[0088] Scoring each candidate word based on at least one feature dimension to obtain a scoring result for each candidate word;

[0089] Based on the scoring result, candidate words with scores higher than a set score threshold are selected from the candidate words as the first candidate information.

[0090] Among them, the feature dimension refers to the evaluation dimension of extracting information from the scene corpus, which is used to analyze the characteristics of each candidate word obtained by word segmentation in a single document. For example, the at least one feature dimension may include capitalized terms, word position, word frequency, contextual relationship, frequency of word occurrence in a sentence, and other feature dimensions.

[0091] In actual implementation, for the scene corpus of the target scene obtained, a set word segmentation tool can be used to perform word segmentation on a single text. Specifically, a text preprocessing process such as removing irrelevant characters, punctuation marks, stop words, etc. can be performed first, and then the set word segmentation tool can be used to divide the single text into vocabulary units to obtain multiple candidate words. The candidate word can be a single character or a combination of multiple characters, wherein the set word segmentation tool can be any tool that can realize text segmentation.

[0092] After multiple candidate words are obtained through word segmentation, each candidate word can be scored from different feature dimensions based on at least one feature dimension defined by the scene extraction rule, the score of each candidate word can be calculated, and then the candidate words with scores higher than the set score threshold can be screened as the first candidate information.

[0093] The set score threshold refers to a pre-configured value for screening high-quality candidate words. The set score threshold can be manually set based on experience, or the scores of each candidate word can be manually sampled to determine the corresponding set score threshold.

[0094] For example, Figure 3 is a schematic diagram of a process of generating first candidate information in a method for generating task processing provided by an embodiment of this specification, such as Figure 3 As shown, the scene corpus of the target scene can be obtained, the scene corpus can be segmented to obtain candidate words, at least one feature dimension can be defined, the score of each candidate word can be calculated based on the combination of various feature dimensions, the candidate words with scores higher than the set score threshold can be screened, and the first candidate information extracted based on the rules can be obtained.

[0095] In the embodiments of this specification, at least one feature dimension can be defined, and the candidate words can be scored based on at least one feature dimension combination to capture the key features of the candidate words. At least one feature dimension can be combined heuristically to assign corresponding scores to each candidate word; and a score threshold can be set based on manual sampling to select relatively high-quality candidate words as the first candidate information extracted. In this way, based on the acquired clean scene corpus, a lightweight, unsupervised automatic information extraction method can be used, relying on statistical text features extracted from a single document to identify relevant candidate words in the document. There is no need to train for a specific document set, nor does it rely on dictionaries, text size, fields or languages. The extraction process of the first candidate information is simple and efficient.

[0096] Step 206: Determine the second candidate information in the scene corpus using the target generation model corresponding to the target generation task, wherein the target generation model is trained based on the training corpus corresponding to the target scene.

[0097] Among them, the target generation model is any generation model obtained by pre-training based on the training corpus corresponding to the target scenario, and is adjusted and trained under the target generation task of the target scenario, so as to generate high-quality results for the target generation task of the target scenario. The target generation model is a generative large model under the target scenario. In the medical scenario, the target generation model can be a medical large model. The second candidate information is the information extracted from the scenario corpus using the context understanding ability of the target generation model.

[0098] It should be noted that the training corpus of the target generation model can be the same as or different from the above-mentioned scene corpus. Other data in the target scene is obtained as training corpus, and the acquisition and processing process of the training corpus can be the same as the acquisition and processing process of the above-mentioned scene corpus.

[0099] In an optional implementation of this embodiment, before determining the second candidate information in the scene corpus using the target generation model corresponding to the target generation task, the method further includes:

[0100] In response to a training task of a target scenario, obtaining training corpus corresponding to the target scenario;

[0101] Based on the training corpus, at least two initial task models of different sizes are trained to obtain generative models of corresponding sizes respectively;

[0102] The second generation model is adjusted and trained through the first generation model to obtain a target generation model, wherein the first generation model and the second generation model are generation models of different sizes, and the model size of the first generation model is larger than the model size of the second generation model.

[0103] The training task refers to the task of training the initial open source large model to obtain a specific generative model in the target scenario. The initial task model refers to any open source large model.

[0104] In actual implementation, before using the target generation model to perform generation task processing, training can be performed first to obtain a target generation model that is adapted to the target scene. Specifically, at least two initial task models of different sizes can be trained based on the acquired training corpus to obtain generation models of corresponding sizes, and then the second generation model of smaller model size can be adjusted and trained by the first generation model of larger model size to obtain the target generation model.

[0105] Specifically, the training corpora of initial task models of different sizes can be the same or different, that is, at least two initial task models of different sizes can be trained separately with the same training corpus to obtain generative models of corresponding sizes, or different training corpora can be collected, and two initial task models of different sizes can be trained separately based on different training corpora to obtain generative models of corresponding sizes. For example, an initial task model of a larger size can use a training corpus with a large amount of data, while an initial task model of a smaller size can use a training corpus with a smaller amount of data.

[0106] It should be noted that the larger the model size, the better the task processing effect of the model, and the higher the discrimination of the generated information, but the greater the amount of calculation, and the longer the task processing time. Therefore, it is possible to obtain multiple generative models of different sizes in the target scenario based on the training corpus, and use the data processing capacity of the first generative model with a larger model size to adjust the training of the second generative model with a smaller model size, so that the target generative model obtained by the adjustment training has a smaller model size and better task processing effect.

[0107] For example, the training corpus can be used to train the open source large model of 7B and the open source large model of 72B respectively to obtain the generative model of 7B and the generative model of 72B, and then the generative model of 7B is adjusted and trained based on the generative model of 72B to obtain the target generative model, which has a model size of 7B and has been adjusted and trained.

[0108] In the embodiments of the present specification, a first generation model with a larger size is used to adjust and train a second generation model with a smaller size, so as to improve the task processing effect of the second generation model and obtain a target generation model. The target generation model obtained by the adjusted training is used to process the scene corpus of the target scene and extract the second candidate information, which can meet both the time efficiency requirement and the generation effect requirement, and balance the generation effect of the model with the computational amount and time of the generation task, thereby ensuring the generation efficiency and accuracy of the second candidate information.

[0109] In an optional implementation of this embodiment, at least two initial task models of different sizes are trained based on the training corpus to obtain generation models of corresponding sizes respectively, including:

[0110] Obtain at least two initial task models of different sizes;

[0111] Determine first training data and second training data in the training corpus, wherein the first training data is training corpus in a single answer format, and the second training data is training corpus in a question-answer data pair format;

[0112] Based on the first training data, initial task models of different sizes are incrementally trained to obtain reference models of corresponding sizes, and based on the second training data, each reference model is adjusted and trained to obtain a generation model of corresponding size.

[0113] It should be noted that the training corpus may include training data in different formats. For example, one type of training data may only contain an answer field and a blank question field, while another type of training data may contain a question field and an answer field. Training data in different formats can be used in the training process of different methods.

[0114] In actual implementation, the training data in the training corpus that contains the answer field and the question field is empty can be used as the first training data, that is, the first training data is the training corpus in a single answer format; the training data in the training corpus that contains the question field and the answer field can be used as the second training data, that is, the second training data is the training corpus in the question and answer data pair format.

[0115] Based on the first training data, incremental training is performed on initial task models of different sizes to obtain reference models of corresponding sizes. Specifically, for the initial task model of the first size, first training data containing an answer field and an empty question field can be obtained from the training corpus, and pre-processing operations such as deduplication and data filtering are performed on the first training data to obtain updated first training data, which is input into the initial task model, and the loss value of the incremental training is calculated. The model parameters of the initial task model are adjusted based on the loss value, and if the training stop condition is not met, the next first training data is continuously obtained and input into the initial task model for incremental training until the training stop condition is met to obtain the reference model of the first size.

[0116] It should be noted that the first training data used for incremental training is the question field plus the answer field. The question field is empty, and only the loss value of the answer field is calculated. The loss calculation process of incremental training is essentially self-supervised training, that is, there is no need to explicitly provide label signals, but rather token-level cross-entropy loss, which is Next TokenPrediction. For example, when the token "modern" appears, it is hoped that the probability of the token "medicine" appearing later is as large as possible; when the two tokens "modern medicine" appear, it is hoped that the probability of the token "experiment" appearing later is as large as possible, and so on. Finally, all losses are accumulated or averaged to form the loss value of the first training data input, and the initial task model is incrementally trained.

[0117] For example, the first training data for incremental training of the initial task model may be as follows:

[0118] {"question":"","answer":"Modern Medical Laboratory Instruments and Applications\nThis book is a professional textbook that systematically combines comprehensive medical research instruments such as medical laboratory purification equipment, biosafety equipment, and heating and cooling equipment with purification analyzers, common and modern analytical instruments. This book is rich in content, highly technical, and covers a wide range of fields. It can be used as a textbook for undergraduate and graduate students in medicine, biotechnology, and biopharmaceuticals, as well as a reference book for teachers and researchers. Chapter 1 Introduction, 1. The relationship between medical laboratory instruments and medical research, 2. Characteristics of medical laboratory instruments and equipment, 3. Classification of medical laboratory instruments, 4. Main performance indicators of medical laboratory instruments, 5. Application of sensors in medical laboratory instruments"}.

[0119] Based on the second training data, each reference model can be adjusted and trained to obtain a generative model of the corresponding size. The adjustment training is implemented based on the prompt instruction, that is, the reference model is fine-tuned based on the second training data. Specifically, for the reference model of the first size, the second training data including the answer field and the question field can be obtained from the training corpus, and the second training data can be pre-processed such as deduplication and data filtering to obtain the updated second training data, and the second training data can be input into the reference model to calculate the loss value of the adjustment training, and the model parameters of the reference model can be adjusted based on the loss value. If the training stop condition is not met, the next second training data is continuously obtained and input into the reference model for adjustment training until the training stop condition is met to obtain the generative model of the first size. Among them, the second training data for adjustment training includes the answer field and the question field, and the question field can be obtained by constructing the question content and the corresponding prompt instruction. The prompt instruction is used to prompt the reference model to analyze the question content in a specified manner and format and output the corresponding answer.

[0120] It should be noted that the second training data used for adjustment training includes a question field and an answer field. Both the question field and the answer field are not empty, but only the loss value of the answer field is calculated. The loss value (loss) of instruction fine-tuning is calculated in the same way as the loss value of the incremental training stage. Although the question field is not empty in the adjustment training stage, the NTP (Next Token Prediction) loss is not calculated for the part of the question field, and only the NTP loss of the answer field is calculated. For example, when the content of the question field appears, it is hoped that the probability of the token "life" appearing afterwards is as large as possible; when the question field and life appear, it is hoped that the probability of the token "way" appearing afterwards is as large as possible, and so on.

[0121] Incremental training is to learn the contextual relationship of the first training data at the text level, and mainly learns the language logic and the relationship between the previous and next words in the real world. Adjustment training based on the second training data is based on the content of the question field, hoping that the model can understand the meaning of the question field and then generate the corresponding answer field, that is, it can follow the instructions required by the question field before generating, avoiding irrelevant answers.

[0122] For example, the second training data used for adjusting the reference model may be as follows:

[0123] {"question":"Human: Write an article about lifestyle and its relationship with health.\nAssistant:\nIn today's society, people's pace of life is getting faster and faster, and physical and mental health problems are increasing. The popularity of high-tech products makes life more convenient, but it also brings some unhealthy changes to life. Therefore, lifestyle has become a hot topic, and various new proposals are trying to convey how to change lifestyle to improve physical and mental health.\nIn terms of the article, I will analyze in depth how different lifestyles affect personal health. At the same time, I will explain the definitions of various lifestyles, how to quantify health, and the various factors that affect health in modern society, such as financial status, career choices, social networks, and personal subjective feelings. Finally, I will summarize some concise and practical suggestions for readers' reference.\nWhat kind of article are you looking forward to?\nHuman: Please give a summary from the article.\nAssistant:\nThe impact of lifestyle on health is a complex issue, and its factors need to be comprehensively evaluated from physical, emotional, and social perspectives. In view of the modern fast-paced life Lifestyle, some changes are recommended to improve health. We can start from multiple dimensions such as adequate sleep, active social activities, balanced diet, proper exercise, good emotional state, etc., to truly improve physical and mental health. \nHuman: Please explain how lifestyle affects career, \nAssistant: ","answer": "Lifestyle and career are closely linked. Physical health is a prerequisite for career success, and mental health is also an important condition for career success and a way to improve efficiency. Long-term unhealthy lifestyles may lead to physical exhaustion, depression, and lack of energy, which may affect work efficiency, career prospects, and personal brand image. People making good choices in their lifestyles may improve their personal time management, self-discipline, and decision-making abilities, which also have a certain impact on the development of their careers. For example, adequate sleep will increase energy and creativity, exercise can improve people's self-confidence and physical strength, and a better lifestyle can also improve personal reputation and self-brand image, all of which may help a person's performance in his career. "}.

[0124] In the above-mentioned incremental training process and adjustment training process, the training data can first be pre-processed by deduplication, data filtering and other pre-processing operations, among which data filtering can include perplexity (PPL)-based filtering, heuristic rule filtering and the like. Perplexity-based filtering is a commonly used technique for evaluating and filtering data quality. Perplexity is an indicator that measures the uncertainty or complexity of a language model on given data. The lower the perplexity, the more accurate the model's prediction of the data and the higher the data quality. In tasks such as text generation, text cleaning, and content review, perplexity-based filtering can help remove low-quality or unexpected data. Heuristic rule filtering is a method for filtering and screening data based on pre-defined rules and patterns. These rules are usually based on domain knowledge, experience, or common data features, and are used to identify and exclude data that does not meet expectations.

[0125] In addition, you can also build an evaluation set for the target scenario, evaluate the generated model according to the set evaluation indicators and evaluation indicator weaknesses, and perform multiple iterations to obtain a generated model that meets the set evaluation indicators.

[0126] For example, Figure 4 is a schematic diagram of a training process of a generative model provided by an embodiment of this specification, such as Figure 4 As shown, taking the medical scenario as an example, serious medical data such as literature, guidelines, books, cases, and non-serious medical data such as web pages can be obtained to construct training corpora for medical scenarios. The training corpus is subjected to data processing operations such as deduplication and data quality filtering to obtain updated training corpora. The first training corpus containing only the answer field and the empty question field is obtained from the training corpus to perform incremental training on the initial task model to obtain a reference model of the corresponding size. The second training corpus containing the answer field and the question field is obtained from the training corpus to perform instruction adjustment training on the incrementally trained reference model to obtain a medical generation model of the corresponding size. Based on the constructed evaluation set of medical scenarios, the performance of the medical generation model is evaluated, and the model version is iterated to optimize the medical generation model to obtain a better medical generation model.

[0127] It should be noted that an initial task model of any size can be trained to obtain a generative model of the corresponding size through the above-mentioned incremental training, adjustment training, model evaluation and other training processes.

[0128] In the embodiments of the present specification, the training corpus of the target scenario can be used to perform incremental training, instruction adjustment training, model evaluation and optimization and other multi-stage processes on the initial task model to obtain generative models of different sizes in the target scenario. Based on rich and clean training corpus, incremental training and instruction adjustment training techniques are used to train a specific generative model for the target scenario. Incremental training can more quickly adapt to knowledge updates in the target scenario, capture new terms and concepts in a timely manner, overcome the problem of data update lag, ensure the timeliness, accuracy and comprehensiveness of the generated results, and improve the language understanding and generation capabilities of the generative model obtained through training in the target scenario.

[0129] In an optional implementation of this embodiment, adjusting and training the second generation model through the first generation model to obtain the target generation model includes:

[0130] Constructing first input data based on the training corpus and the first prompt instruction, inputting the first input data into the first generation model, and obtaining corresponding prediction candidate information;

[0131] According to the confidence score of the predicted candidate information, the training corpus is selected and adjusted from the training corpus;

[0132] Construct second input data according to the adjusted training corpus and the second prompt instruction, adjust and train the second generation model based on the second input data, and obtain a target generation model, wherein the second prompt instruction is the same as or different from the first prompt instruction.

[0133] It should be noted that the model size of the first generative model is larger than that of the second generative model. The powerful ability of the large-sized generative model enables it to capture the complex relationships and contextual information of the data, thereby extracting accurate information. Therefore, the first generative model with a larger size can be used to filter out a portion of data with higher confidence from the training corpus as training data, which can be used as training data for subsequent adjustment and training of the second generative model with a smaller size. Although the second generative model with a smaller size is not as good as the first generative model with a larger size in overall performance, it has high computational efficiency and is more suitable for running in a resource-constrained environment. In other words, the task processing capability of the first generative model can be used to perform data distillation on the training corpus, filter out training data with high confidence, and then adjust and train the second generative model to obtain a target generative model with better task processing effect.

[0134] In actual implementation, the first input data can be constructed based on the training corpus and the first prompt instruction, and the first input data can be input into the first generation model to obtain the corresponding prediction candidate information. The first prompt instruction is used to prompt the content processing method and output content format of the first generation model. The first generation model can analyze and process the input training data according to the description of the first prompt instruction, and input the corresponding prediction candidate information. Then, according to the confidence score of the prediction candidate information, the adjustment training corpus with a confidence score higher than the confidence threshold can be screened out from the training corpus, and then the second input data can be constructed based on the screened adjustment training corpus and the second prompt instruction, and the second generation model is adjusted and trained to obtain the target generation model. Among them, the second prompt instruction is used to prompt the content processing method and output content format of the second generation model. The second generation model can analyze and process the input training data according to the description of the second prompt instruction, output the corresponding prediction candidate information, and perform adjustment training. The second prompt instruction can be the same as or different from the first prompt instruction.

[0135] Among them, the confidence threshold can be set based on experience, or it can be determined by sampling the confidence scores of each prediction candidate information. Based on the confidence threshold, some low-quality training data can be filtered out. For example, the original training corpus may be hundreds of GB, and the filtered adjusted training corpus is several GB. Based on the screened high-quality and small amount of training data, the second generation model is fine-tuned to improve the task processing capability of the second generation model.

[0136] The screened adjusted training corpus is a training corpus with high quality and high confidence in the output prediction candidate information. The adjusted training corpus and the second prompt instruction can be used as input data of the second generation model, and the prediction candidate information output by the first generation model for the adjusted training corpus can be used as the label of the input data of the second generation model. The second generation model is supervised fine-tuned through the label to train and obtain the corresponding target generation model.

[0137] For example, taking the medical scenario as an example, the first generation model can be a 72B medical generation model, and the second generation model can be a 7B medical generation model. Assuming that a certain training corpus is "medical fragment content A", the first prompt instruction can be "Please propose several queries and titles that are strongly related to the above medical fragment content A to help understand the fragment. Do not omit or refer to the subject in the queries and titles. The queries need to be in the form of questions; there can be multiple queries and titles. The generated related queries and titles need to include all the important content in the entire fragment as much as possible. The results are presented in the form of JSON (each JSON contains three keys: Language, Queries, Titles, Language is the language of the fragment content itself, and the specific value can be en or zh. The prompts here are all in Chinese, but the fragment content may be English or Chinese, so please pay attention to the difference; Queries and Titles are each a list)".

[0138] The medical fragment content A and the first prompt instruction are combined to obtain first input data, and the first input data is input into the medical generation model of 72B. The medical generation model of 72B can output prediction candidate information as "Language':zh,"Querys':[What are the indications of benzonatate?','What age groups of patients is benzonatate suitable for?','What is the common dose of benzonatate for adults?','What is the recommended dose of benzonatate for children?','How to take benzonatate capsules correctly?','Under what circumstances is it necessary to adjust the total dose of benzonatate?','Does benzonatate have any effects on pregnant women?','What are the contraindications of benzonatate?'],"Titles':['Detailed explanation of the indications, usage and dosage of benzonatate','Specific guidelines for the use of benzonatate in adults and children','How to take benzonatate capsules and sugar-coated pills correctly','Safety analysis of benzonatate during pregnancy']}".

[0139] It should be noted that, based on the confidence scores corresponding to the predicted candidate information output by the first generation model for each training corpus, some training data with higher confidence scores can be screened as adjusted training corpus. The format of the input data and output data of the second generation model is the same as the format of the input data and output data of the first generation model. The target generation model obtained after the adjustment training of the second generation model can be used to generate corresponding second candidate information for the scene corpus.

[0140] For example, Figure 5 FIG. 1 is a schematic diagram of an adjustment training process of a target generation model provided by an embodiment of the present specification, such as Figure 5As shown, taking the medical scenario as an example, a medical generation model of 72B is obtained, and based on the training corpus and the first prompt instruction, the predicted candidate words output by the medical generation model of 72B are obtained. Based on the confidence scores of the predicted candidate words corresponding to each training corpus, the adjusted training corpus with high confidence is screened. The above is the data distillation stage based on the large-size generation model. Based on the screened adjusted training corpus and the labels output by the medical generation model of 72B, the medical generation model of 7B is fine-tuned in a supervised manner, and the trained medical generation model of 7B is obtained as the target generation model. The above is the fine-tuning stage of the small-size generation model. Based on the target generation model (medical generation model of 7B), the corresponding second candidate information is generated for the medical corpus of the medical scenario. The above is the candidate information extraction of the full medical corpus.

[0141] In the embodiments of the present specification, a larger generative model is used to perform data distillation on the training corpus to screen out an adjusted training corpus, which is labeled data. Based on the adjusted training corpus, a smaller generative model is supervised and fine-tuned, thereby ensuring the accuracy and reliability of the adjusted training corpus, reducing data noise, and improving the output quality of the model. The labeled data is used to further optimize the parameters of the second generative model with a smaller size. Based on the supervised training data, the fine-tuning of the second generative model with a smaller size is completed to ensure that the generation process is consistent with the original training corpus, effectively preventing the model hallucination phenomenon, ensuring the authenticity and professionalism of the generated information, and the target generative model obtained through training is small in size, relatively lightweight, and has a fast inference speed, which can meet the needs of efficient processing in practical applications.

[0142] Step 208: Based on the first candidate information and the second candidate information, determine the target generation result corresponding to the target generation task of the target scene.

[0143] Among them, the first candidate information is the candidate information obtained based on rule extraction, and the second candidate information is the candidate information generated by utilizing the context understanding ability of the target generation model. By combining the first candidate information and the second candidate information, the target generation result corresponding to the target generation task can be screened out.

[0144] It should be noted that by effectively combining the natural language processing capabilities of the generative large model with the rule-based information extraction method, more accurate generation results can be obtained. This fusion avoids the limitations of rule matching and can better understand the context, thereby improving the relevance and accuracy of the generated results. It not only has deep semantic understanding capabilities, but can also cope with diverse and complex scenario requirements.

[0145] In an optional implementation of this embodiment, determining a target generation result corresponding to a target generation task of a target scene based on the first candidate information and the second candidate information includes:

[0146] Using a third generation model corresponding to the target generation task, scoring the first candidate information and the second candidate information respectively to obtain a candidate information score for each candidate information, wherein the third generation model is a generation model obtained by training based on a training corpus corresponding to the target scenario and having a size larger than the target generation model;

[0147] Screening out third candidate information from the first candidate information and the second candidate information according to the candidate information score;

[0148] Determine a target generation result corresponding to the target generation task of the target scenario based on the third candidate information.

[0149] Among them, the third generative model is any generative model obtained by training based on the training corpus corresponding to the target scene and having a size larger than the target generative model. The third generative model can be the same model as the above-mentioned first generative model, or it can be another generative model with a size larger than the target generative model.

[0150] In actual implementation, the third generation model corresponding to the target generation task can be used to score the first candidate information and the second candidate information respectively to obtain the candidate information score of each candidate information. Then, the third candidate information with a score higher than the score threshold is screened out from the first candidate information and the second candidate information, and the target generation result corresponding to the target generation task of the target scene is determined based on the screened third candidate information. Among them, the score threshold can be manually set based on experience, or it can be determined by spot checking the candidate scores of each candidate information. The score threshold can also be adjusted according to the needs of the specific application scenario. If the application scenario has high requirements for data quality, a more stringent threshold can be selected; conversely, in some scenarios that are not very sensitive to low-quality data, the threshold can be appropriately relaxed.

[0151] In the embodiment of the present specification, the third generation model is a larger generation model. The task processing capability of the large generation model is used to score each candidate information. The candidate information with higher scores can be regarded as high-quality data, while the candidate information with lower scores will be marked as low-quality data. The candidate information with scores higher than the score threshold is screened as the third candidate information, thereby filtering out low-quality data with lower scores and improving the generation quality of the target generation result corresponding to the target generation task.

[0152] In an optional implementation of this embodiment, the first candidate information and the second candidate information are scored respectively using the third generation model corresponding to the target generation task to obtain the candidate information score of each candidate information, including:

[0153] constructing scoring data based on the target candidate information and the third prompt instruction, inputting the scoring data into the third generation model, and obtaining a candidate information score of the target candidate information;

[0154] The target candidate information is any candidate information among the first candidate information and the second candidate information, and the third prompt instruction is used to indicate at least one scoring dimension, the scoring rules of each scoring dimension, and the output format of the candidate information score.

[0155] It should be noted that, for any candidate information in the first candidate information and the second candidate information, the candidate information can be used as the target candidate information, and the scoring data can be constructed in combination with the third prompt instruction, and the third prompt instruction is used to indicate at least one scoring dimension, the scoring rules of each scoring dimension, and the output format of the candidate information score. Among them, at least one scoring dimension can include content relevance, grammatical completeness, readability, information content, emotional tendency, etc.

[0156] In actual implementation, the constructed scoring data can be input into the third generation model. The prompt instruction can instruct the third generation model to score the input target candidate information according to the scoring dimensions defined by it and the scoring rules of each scoring dimension, and output the candidate information score of the target candidate information according to the defined candidate information score output format.

[0157] For example, the scoring data constructed based on certain candidate information and the third prompt instruction may be as follows:

[0158] {"lzs_input": "Please evaluate the following text and judge its relationship with the original fragment. Score it according to the following criteria: Content relevance: whether the text is relevant to the specified topic or question. Grammatical completeness: whether the grammatical structure of the text is correct and whether there are grammatical errors. Readability: whether the text is easy to read and understand, and whether the sentences are fluent. Information volume: whether the information provided by the text is rich and valuable, and whether it covers the necessary details. Emotional tendency: whether the emotion conveyed by the text is clear and whether it is suitable for its content and context. Please give a score (1-10 points) for each of the above dimensions and give a comprehensive score. Return a json. The following is the text to be evaluated and the corresponding original fragment: Text: [What is the difference between the cerebrospinal fluid pressure of patients with normal-tension glaucoma and normal people] Original fragment: K'Fragment content: Clinical studies have reported that patients with normal-tension glaucoma have significantly lower cerebrospinal fluid pressure than normal people, and the pressure difference across the isoplate is larger. We can infer that normal-tension glaucoma may be accompanied by low cerebrospinal fluid pressure. The whole body is under pressure, especially at night, which may be physiologically accompanied There is low cerebrospinal fluid pressure, which can lead to an abnormally high pressure difference across the cribriform plate, which is similar to the normal cerebrospinal fluid pressure and the elevated intraocular pressure. This model can explain why normal-tension glaucoma tends to have low systemic blood pressure and why the morphology of the optic disc of normal-tension glaucoma is very similar to that of high-tension glaucoma, but different from that of direct vascular optic neuropathy. Related research In recent years, a lot of new information has been accumulated in the study of the cause of glaucomatous optic nerve damage. Some of the past understandings need to be studied with modern technology. 1. Histopathological studies Although histopathological examination of human glaucoma cannot fully explain the pathogenesis of glaucomatous optic nerve damage, it is the most direct method to study its changes. In the past, specimens were mostly late-stage glaucoma, which may lead to misunderstandings of early causes. In recent years, attempts have been made to study the clinical observations of various stages of glaucoma in conjunction with histopathological changes, which has clarified some viewpoints. (1) Changes in glial cells: Past studies have believed that the loss of glial branching tissue occurs before the loss of neural tissue.

[0159] The candidate information score output by the third generation model can be {"Lzs_output":"{'"Content relevance: 9, 'Grammatical completeness': 10, 'Readability': 8, 'Information amount': 9, 'Emotional tendency: 7, 'Comprehensive score': 8.6}.

[0160] Another example, Figure 6 is a schematic diagram of a process of processing a target generation task provided by an embodiment of this specification, such as Figure 6As shown, the first candidate information and the second candidate information can be integrated; a third prompt instruction is generated to define at least one scoring dimension, scoring rules for each scoring dimension, and an output format of the candidate information score; scoring data is constructed based on the target candidate information and the third prompt instruction, and input into the medical generation model 72B to obtain the corresponding candidate information score; for candidate information with a score higher than the score threshold, it is marked as high-quality information and used as the third candidate information; for candidate information with a score not higher than the score threshold, it is marked as low-quality information.

[0161] In the embodiments of this specification, the first candidate information and the second candidate information can be integrated to uniformly filter low-quality data, relying on the instruction filtering capability of the large-scale third generation model in the target scenario, defining at least one scoring dimension and the corresponding scoring criteria, and using the third generation model to score each candidate information from at least one scoring dimension. The third generation model can output the comprehensive score of each candidate information and indicate its performance in each scoring dimension. The instruction filtering capability is utilized to conduct a comprehensive evaluation of multiple scoring dimensions for each candidate information, and filter the generated candidate information to ensure that it meets the set scoring dimensions. In addition, not only the consistency of the scoring criteria is ensured, but also the filter score threshold is allowed to be flexibly adjusted according to the specific application scenario, so as to meet the data quality requirements of different scenarios; and, the scoring criteria covering multiple dimensions such as content relevance, grammatical completeness, readability, information volume, emotional tendency, etc. can be customized, so that the filtering is not limited to the judgment of a single dimension, ensuring that the filtered data can meet the high quality requirements.

[0162] In an optional implementation of this embodiment, determining a target generation result corresponding to the target generation task of the target scene based on the third candidate information includes:

[0163] Input each third candidate information into a fourth generation model, and obtain corresponding candidate information vectors based on the embedding layer of the fourth generation model, wherein the fourth generation model is a generation model obtained by training based on training corpus corresponding to the target scene, and the model size of the fourth generation model is smaller than that of the third generation model;

[0164] The similarity between each candidate information vector is calculated, and the third candidate information is deduplicated according to the similarity to obtain the target generation result corresponding to the target generation task of the target scene.

[0165] It should be noted that after screening out high-quality third candidate information, the third candidate information can be directly used as the final target generation result, or the third candidate information can be further deduplicated to obtain the target generation result corresponding to the target generation task.

[0166] In actual implementation, the fourth generative model is any generative model obtained by training based on the training corpus corresponding to the target scenario. The model size of the fourth generative model is smaller than that of the third generative model. The fourth generative model can be the same model as the target generative model, such as the generative model of 7B above, or other generative models with smaller sizes. Using a generative model with a smaller size can meet both the time efficiency requirements and the task processing effect requirements, which is more balanced.

[0167] Input each third candidate information into the fourth generation model, perform word embedding processing on each third candidate information based on the embedding layer (Embedding layer) of the fourth generation model, obtain the corresponding candidate information vector respectively, calculate the cosine similarity between each third candidate information vector, evaluate the correlation between the third candidate information based on the similarity threshold, screen out the third candidate information with a similarity higher than the similarity threshold, implement deduplication operation, and obtain the target generation result corresponding to the target generation task.

[0168] It should be noted that a series of deduplication rules can also be set, including string matching, field consistency, similarity threshold, etc., to achieve deduplication operations, but rule-based deduplication methods may have certain limitations when dealing with complex or obscure duplicate data.

[0169] Therefore, the embedding technology of a small-sized generative model is introduced in the embodiments of this specification to improve the efficiency and effect of deduplication through deep learning. The embedding technology can convert the third candidate information into a vector representation, so that similar candidate information is close in the vector space, that is, the small-sized generative model can be used to map each third candidate information into the vector space, and the cosine similarity of different vectors can be calculated to evaluate their relevance. By setting a similarity threshold, those candidate information expressing similar meanings can be screened out for deduplication.

[0170] In actual implementation, in order to further improve the efficiency of deduplication, a combination of the two methods can be adopted. First, the rule method is used for preliminary screening to filter out obviously duplicate data, and then the embedding technology of the large model is used to refine the remaining candidate information for deduplication.

[0171] In the embodiments of this specification, the accuracy and efficiency of deduplication can be improved by combining the rule-based method with the embedding technology provided by the generative model. Deep learning technology is used to convert candidate information into vector representation, and the similarity between candidate information is evaluated by cosine similarity, thereby overcoming the limitations of rule-based methods in deduplication of complex data. The combination of the two makes the overall deduplication process more efficient, and can effectively filter out obviously duplicate data without sacrificing the ability to process complex similar data, thereby ensuring the uniqueness and relevance of the target generation results obtained.

[0172] In an optional implementation of this embodiment, the target generation task is a keyword generation task, and the target generation result includes keywords generated for the target scenario; after determining the target generation result corresponding to the target generation task of the target scenario, the following is further included:

[0173] Building a scene word library of the target scene based on the keywords included in the target generation result;

[0174] In response to a vocabulary acquisition request from a downstream task platform, a scene vocabulary of the target scene is fed back to the downstream task platform, wherein the downstream task platform is a platform for executing tasks related to the target scene.

[0175] It should be noted that the target generation task can be a keyword generation task, and the target generation result includes keywords generated for the target scene. In actual implementation, a scene word library of the target scene can be constructed based on the keywords included in the target generation result, and transmitted to the downstream task platform to implement the corresponding downstream task. Among them, the downstream task platform can be a search platform, a document assistant, etc.

[0176] As an example, taking the medical scenario as an example, the scenario vocabulary constructed in the embodiment of this specification can be used as a medical search compound vocabulary, and can also be used to solve the problem of query cold start in the medical text retrieval scenario, and improve the accuracy of the doctor platform in various modules, such as the query process (QP) module in retrieval (the search terms mined by this solution can be used for QP rewriting and other model training processes), the translation module (the search vocabulary can be used as a medical dictionary for training and reasoning construction), the term interpretation module (the search vocabulary can be used as a medical term library), search query completion and other downstream tasks.

[0177] It should be noted that the scene vocabulary library constructed with the assistance of generative big models not only provides underlying data support for AI search / retrieval tools, but also provides a full range of high-quality data sources for various downstream applications (translation, AI study, vector representation, AI search recommendation, etc.). By utilizing the generative big model capabilities in the target scenario, data distillation and targeted fine-tuning training can be achieved to generate relevant and controllable candidate information. After low-quality instruction filtering and correlation deduplication processing, the reliability and accuracy of the constructed scene vocabulary are greatly guaranteed, which can quickly adapt to downstream tasks of various target scenarios and enhance flexibility and adaptability.

[0178] In the embodiments of this specification, a generation task processing method is provided, which realizes the extraction of first candidate information from the scene corpus based on the scene extraction rule, and uses the target generation model corresponding to the target generation task of the target scene to determine the second candidate information from the scene corpus, and then combines the first candidate information and the second candidate information to determine the target generation result corresponding to the target generation task of the target scene. The target generation model is obtained by training based on the training corpus corresponding to the scene, and is a generative model trained in the target scene. The target generation model has deep semantic understanding ability, can cope with diverse and complex scene requirements, effectively combines the natural language processing ability of the generative model with the matching ability of rule-based extraction, avoids the matching limitations of rule-based extraction information, and uses the generative model to better understand the context of the scene corpus, can obtain more accurate generation results in the target scene, improve the generation accuracy of the target generation task in the target scene, ensure the generation quality of the target scene, and then ensure the service efficiency related to the target scene, and improve the user experience.

[0179] The following combination Figure 7 Taking the application of the generation task processing method provided in this specification to the keyword generation task in the medical scenario as an example, the generation task processing method is further explained. Figure 7 A schematic diagram of a processing process of a method for generating task processing provided by an embodiment of the present specification is shown.

[0180] like Figure 7 As shown, medical corpus in medical scenarios can be obtained, and the medical corpus can be collected and analyzed from multiple data sources, including serious medical data and non-serious medical data.

[0181] For the medical corpus, the first keyword is extracted based on the scene extraction rule. Specifically, statistical feature analysis and important keyword identification can be performed based on the scoring standard of at least one feature dimension to obtain the corresponding first keyword.

[0182] Based on the medical corpus, the initial large model can be trained to obtain medical generation models of different sizes. Specifically, incremental training, adjustment training, model evaluation and optimization can be performed based on the scenario corpus to obtain medical generation models of different sizes.

[0183] Based on the medical corpus, the large-scale medical generative model can be used to perform targeted fine-tuning training on the small-scale medical generative model. Specifically, the large-scale medical generative model can be used to perform data distillation on the scene corpus, screen and obtain the adjustment training corpus, and based on the adjustment training corpus, the small-scale medical generative model can be supervised fine-tuned to obtain the target medical generative model.

[0184] The medical corpus is generated and processed based on the target medical generation model to obtain the second keyword.

[0185] Define at least one scoring dimension, scoring rules for each scoring dimension, and the output format of the candidate information score. Use a large-scale medical generation model to score each keyword based on the defined scoring rules, filter out low-quality keywords, and obtain high-quality keywords.

[0186] The embedding layer of the small-sized medical generative model is used to determine the word vectors of high-quality keywords, and deduplication is performed based on the similarity of the word vectors to obtain the target keywords after deduplication.

[0187] Build a medical vocabulary based on target keywords and transfer the medical vocabulary to the downstream task platform.

[0188] In the embodiments of this specification, a generation task processing method is provided, which realizes the extraction of a first keyword from a medical corpus based on an extraction rule, and uses a medical generation model to determine a second keyword from the medical corpus, and then combines the first medical and the second medical to determine the target keyword of the medical scene. The medical generation model is a generative model trained in a medical scene. The medical generation model has a deep semantic understanding ability and can cope with diverse and complex medical task requirements. It effectively combines the natural language processing ability of the generative model with the matching ability of rule-based extraction, avoids the matching limitations of rule-based keyword extraction, and uses the generative model to better understand the context of the medical corpus, so as to obtain more accurate keywords in the medical scene, improve the accuracy of keyword generation in the medical scene, ensure the quality of medical vocabulary construction in the medical scene, and then ensure the efficiency of medical services related to the medical scene and improve the user experience.

[0189] See also Figure 8 , Figure 8 A flowchart of a training method for generating a model provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0190] Step 802: In response to the training task of the target scenario, obtain the training corpus corresponding to the target scenario.

[0191] Step 804: Train at least two initial task models of different sizes based on the training corpus to obtain generation models of corresponding sizes respectively.

[0192] In an optional implementation of this embodiment, at least two initial task models of different sizes are trained based on the training corpus to obtain generation models of corresponding sizes respectively, including:

[0193] Obtain at least two initial task models of different sizes;

[0194] Determine first training data and second training data in the training corpus, wherein the first training data is training corpus in a single answer format, and the second training data is training corpus in a question-answer data pair format;

[0195] Based on the first training data, initial task models of different sizes are incrementally trained to obtain reference models of corresponding sizes, and based on the second training data, each reference model is adjusted and trained to obtain a generation model of corresponding size.

[0196] Step 806: The second generation model is adjusted and trained through the first generation model to obtain a target generation model, wherein the first generation model and the second generation model are generation models of different sizes, and the model size of the first generation model is larger than the model size of the second generation model.

[0197] In an optional implementation of this embodiment, adjusting and training the second generation model through the first generation model to obtain the target generation model includes:

[0198] Constructing first input data based on the training corpus and the first prompt instruction, inputting the first input data into the first generation model, and obtaining corresponding prediction candidate information;

[0199] According to the confidence score of the predicted candidate information, the training corpus is selected and adjusted from the training corpus;

[0200] Construct second input data according to the adjusted training corpus and the second prompt instruction, adjust and train the second generation model based on the second input data, and obtain a target generation model, wherein the second prompt instruction is the same as or different from the first prompt instruction.

[0201] The embodiments of the present specification provide a method for training a generative model, which uses a larger generative model to perform data distillation on a training corpus, screens out an adjusted training corpus, and the adjusted training corpus is labeled data. Based on the adjusted training corpus, a smaller generative model is fine-tuned in a supervised manner, thereby ensuring the accuracy and reliability of the adjusted training corpus, reducing data noise, and improving the output quality of the model. The labeled data is used to further optimize the parameters of a second generative model with a smaller size. Based on the supervised training data, the second generative model with a smaller size is fine-tuned to ensure that the generation process is consistent with the original training corpus, effectively preventing the model hallucination phenomenon, and ensuring the authenticity and professionalism of the generated information. The target generative model obtained through training is small in size, relatively lightweight, and has a fast inference speed, and can meet the needs of efficient processing in practical applications.

[0202] The above is a schematic scheme of a training method for a generative model of this embodiment. It should be noted that the technical scheme of the training method for the generative model and the training process of the generative model in the above-mentioned generation task processing method belong to the same concept, and the details not described in detail in the technical scheme of the training method for the generative model can be referred to the description of the technical scheme of the above-mentioned generation task processing method.

[0203] Corresponding to the above method embodiment, this specification also provides an embodiment of a generating task processing device, Fig. 9 FIG. 1 shows a schematic diagram of a structure of a task generation processing device provided by an embodiment of the present specification. Fig. 9 As shown, the device comprises:

[0204] A first acquisition module 902 is configured to acquire a scene corpus corresponding to a target scene in response to a target generation task of the target scene;

[0205] An extraction module 904 is configured to extract first candidate information from the scene corpus based on a scene extraction rule;

[0206] A first determination module 906 is configured to determine second candidate information in the scene corpus using a target generation model corresponding to the target generation task, wherein the target generation model is obtained by training based on training corpus corresponding to the target scene;

[0207] The second determination module 908 is configured to determine a target generation result corresponding to the target generation task of the target scenario based on the first candidate information and the second candidate information.

[0208] Optionally, the scene extraction rule includes scoring the candidate words based on at least one feature dimension, and filtering the information based on the scoring result; the extraction module 904 is further configured to:

[0209] Segment the scene corpus to obtain candidate words;

[0210] Scoring each candidate word based on at least one feature dimension to obtain a scoring result for each candidate word;

[0211] Based on the scoring result, candidate words with scores higher than a set score threshold are selected from the candidate words as the first candidate information.

[0212] Optionally, the device further comprises a training module configured to:

[0213] In response to a training task of a target scenario, obtaining training corpus corresponding to the target scenario;

[0214] Based on the training corpus, at least two initial task models of different sizes are trained to obtain generative models of corresponding sizes respectively;

[0215] The second generation model is adjusted and trained through the first generation model to obtain a target generation model, wherein the first generation model and the second generation model are generation models of different sizes, and the model size of the first generation model is larger than the model size of the second generation model.

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

[0217] Obtain at least two initial task models of different sizes;

[0218] Determine first training data and second training data in the training corpus, wherein the first training data is training corpus in a single answer format, and the second training data is training corpus in a question-answer data pair format;

[0219] Based on the first training data, initial task models of different sizes are incrementally trained to obtain reference models of corresponding sizes, and based on the second training data, each reference model is adjusted and trained to obtain a generation model of corresponding size.

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

[0221] Constructing first input data based on the training corpus and the first prompt instruction, inputting the first input data into the first generation model, and obtaining corresponding prediction candidate information;

[0222] According to the confidence score of the predicted candidate information, the training corpus is selected and adjusted from the training corpus;

[0223] Construct second input data according to the adjusted training corpus and the second prompt instruction, adjust and train the second generation model based on the second input data, and obtain a target generation model, wherein the second prompt instruction is the same as or different from the first prompt instruction.

[0224] Optionally, the second determining module 908 is further configured to:

[0225] Using a third generation model corresponding to the target generation task, scoring the first candidate information and the second candidate information respectively to obtain a candidate information score for each candidate information, wherein the third generation model is a generation model obtained by training based on a training corpus corresponding to the target scenario and having a size larger than the target generation model;

[0226] Screening out third candidate information from the first candidate information and the second candidate information according to the candidate information score;

[0227] Determine a target generation result corresponding to the target generation task of the target scenario based on the third candidate information.

[0228] Optionally, the second determining module 908 is further configured to:

[0229] constructing scoring data based on the target candidate information and the third prompt instruction, inputting the scoring data into the third generation model, and obtaining a candidate information score of the target candidate information;

[0230] The target candidate information is any candidate information among the first candidate information and the second candidate information, and the third prompt instruction is used to indicate at least one scoring dimension, the scoring rules of each scoring dimension, and the output format of the candidate information score.

[0231] Optionally, the second determining module 908 is further configured to:

[0232] Input each third candidate information into a fourth generation model, and obtain corresponding candidate information vectors based on the embedding layer of the fourth generation model, wherein the fourth generation model is a generation model obtained by training based on training corpus corresponding to the target scene, and the model size of the fourth generation model is smaller than that of the third generation model;

[0233] The similarity between each candidate information vector is calculated, and the third candidate information is deduplicated according to the similarity to obtain the target generation result corresponding to the target generation task of the target scene.

[0234] Optionally, the target generation task is a keyword generation task, and the target generation result includes keywords generated for the target scenario; the device also includes a construction module, which is configured to:

[0235] Building a scene word library of the target scene based on the keywords included in the target generation result;

[0236] In response to a vocabulary acquisition request from a downstream task platform, a scene vocabulary of the target scene is fed back to the downstream task platform, wherein the downstream task platform is a platform for executing tasks related to the target scene.

[0237] A generation task processing device is provided in an embodiment of the present specification, including a first acquisition module, an extraction module, a first determination module and a second determination module. Through the interaction and cooperation of the modules in the device, it is possible to combine the natural language processing capability of the generative model with the matching capability of the rule-based extraction, thereby avoiding the matching limitations of rule-based extraction information, and using the generative model to better understand the context of the scene corpus, thereby obtaining more accurate generation results in the target scene, improving the generation accuracy of the target generation task in the target scene, ensuring the generation quality of the target scene, and thus ensuring the service efficiency related to the target scene and improving the user experience.

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

[0239] Corresponding to the above method embodiment, this specification also provides an embodiment of a generating task processing device, Fig.10 FIG. 1 is a schematic diagram showing a structure of a training device for generating a model provided by an embodiment of the present specification. Fig.10 As shown, the device comprises:

[0240] The second acquisition module 1002 is configured to acquire training corpus corresponding to the target scenario in response to the training task of the target scenario;

[0241] A first obtaining module 1004 is configured to train at least two initial task models of different sizes based on the training corpus to obtain generation models of corresponding sizes respectively;

[0242] The second acquisition module 1006 is configured to adjust and train the second generation model through the first generation model to obtain a target generation model, wherein the first generation model and the second generation model are generation models of different sizes, and the model size of the first generation model is larger than the model size of the second generation model.

[0243] Optionally, the first obtaining module 1004 is further configured to:

[0244] Obtain at least two initial task models of different sizes;

[0245] Determine first training data and second training data in the training corpus, wherein the first training data is training corpus in a single answer format, and the second training data is training corpus in a question-answer data pair format;

[0246] Based on the first training data, initial task models of different sizes are incrementally trained to obtain reference models of corresponding sizes, and based on the second training data, each reference model is adjusted and trained to obtain a generation model of corresponding size.

[0247] Optionally, the second obtaining module 1006 is further configured to:

[0248] Constructing first input data based on the training corpus and the first prompt instruction, inputting the first input data into the first generation model, and obtaining corresponding prediction candidate information;

[0249] According to the confidence score of the predicted candidate information, the training corpus is selected and adjusted from the training corpus;

[0250] Construct second input data according to the adjusted training corpus and the second prompt instruction, adjust and train the second generation model based on the second input data, and obtain a target generation model, wherein the second prompt instruction is the same as or different from the first prompt instruction.

[0251] The embodiment of the present specification provides a training device for a generative model, including a second acquisition module, a first acquisition module, and a second acquisition module. Through the interactive cooperation of the modules in the device, a larger generative model is used to perform data distillation on the training corpus, and an adjusted training corpus is screened out. The adjusted training corpus is labeled data. Based on the adjusted training corpus, a smaller generative model is supervised fine-tuned, which ensures the accuracy and reliability of the adjusted training corpus, reduces data noise, and improves the output quality of the model. The labeled data is used to further optimize the parameters of the smaller second generative model. Based on the supervised training data, the smaller second generative model is fine-tuned to ensure that the generation process is consistent with the original training corpus, effectively prevent the model hallucination phenomenon, ensure the authenticity and professionalism of the generated information, and the target generative model obtained by training is small in size, relatively lightweight, and has a fast inference speed, which can meet the needs of efficient processing in practical applications.

[0252] The above is a schematic scheme of a training device for a generative model of this embodiment. It should be noted that the technical scheme of the training device for the generative model and the technical scheme of the training method for the generative model are of the same concept, and the details not described in detail in the technical scheme of the training device for the generative model can be found in the description of the technical scheme of the training method for the generative model.

[0253] Fig.11 The block diagram of a computing device according to an embodiment of the present specification is shown. The components of the computing device 1100 include but are not limited to a memory 1110 and a processor 1120. The processor 1120 is connected to the memory 1110 via a bus 1130, and the database 1150 is used to store data.

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

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

[0256] The 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, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1100 may also be a mobile or stationary server.

[0257] Among them, the processor 1120 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned generation task processing method, generation model training method or information processing method based on the generation model.

[0258] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned generation task processing method, generation model training method or information processing method based on the generation model belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned generation task processing method, generation model training method or information processing method based on the generation model.

[0259] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned generation task processing method, generation model training method, or information processing method based on the generation model.

[0260] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned generation task processing method, the training method of the generation model, or the information processing method based on the generation model belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned generation task processing method, the training method of the generation model, or the information processing method based on the generation model.

[0261] 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 generation task processing method, generation model training method, or information processing method based on the generation model.

[0262] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above-mentioned generation task processing method, generation model training method or information processing method based on the generation model belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above-mentioned generation task processing method, generation model training method or information processing method based on the generation model.

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

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

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

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

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

Claims

1. A method for processing a generated task, comprising: In response to a target generation task of a target scenario, acquiring a scenario corpus corresponding to the target scenario; Extracting first candidate information from the scene corpus based on a scene extraction rule; Determine the second candidate information in the scene corpus by using a target generation model corresponding to the target generation task, wherein the target generation model is obtained by training based on the training corpus corresponding to the target scene; Based on the first candidate information and the second candidate information, a target generation result corresponding to the target generation task of the target scene is determined.

2. The method according to claim 1, wherein the scene extraction rule comprises scoring candidate words based on at least one feature dimension, and filtering information based on the scoring result; The extracting first candidate information from the scene corpus based on the scene extraction rule includes: Performing word segmentation on the scene corpus to obtain candidate words; Scoring each candidate word based on the at least one feature dimension to obtain a scoring result for each candidate word; Based on the scoring result, candidate words with scores higher than a set score threshold are selected from the candidate words as the first candidate information.

3. The method according to claim 1, before using the target generation model corresponding to the target generation task to determine the second candidate information in the scene corpus, further comprising: In response to the training task of the target scenario, obtaining training corpus corresponding to the target scenario; Training at least two initial task models of different sizes based on the training corpus to obtain generation models of corresponding sizes respectively; The target generation model is obtained by adjusting and training the second generation model through the first generation model, wherein the first generation model and the second generation model are generation models of different sizes, and the model size of the first generation model is larger than the model size of the second generation model.

4. The method according to claim 3, wherein the training of at least two initial task models of different sizes based on the training corpus to obtain generative models of corresponding sizes respectively comprises: Obtain at least two initial task models of different sizes; Determine first training data and second training data in the training corpus, wherein the first training data is training corpus in a single-answer format, and the second training data is training corpus in a question-answer data pair format; Based on the first training data, incremental training is performed on initial task models of different sizes to obtain reference models of corresponding sizes, and based on the second training data, adjustment training is performed on each reference model to obtain a generation model of corresponding size.

5. According to the method of claim 3, the step of adjusting and training the second generation model through the first generation model to obtain the target generation model comprises: Constructing first input data based on the training corpus and the first prompt instruction, inputting the first input data into the first generation model, and obtaining corresponding prediction candidate information; According to the confidence score of the prediction candidate information, selecting and adjusting the training corpus from the training corpus; Construct second input data according to the adjusted training corpus and the second prompt instruction, adjust and train the second generation model based on the second input data, and obtain the target generation model, wherein the second prompt instruction is the same as or different from the first prompt instruction.

6. The method according to claim 1, wherein determining the target generation result corresponding to the target generation task of the target scene based on the first candidate information and the second candidate information comprises: Using a third generation model corresponding to the target generation task, scoring the first candidate information and the second candidate information respectively to obtain a candidate information score of each candidate information, wherein the third generation model is a generation model obtained by training based on the training corpus corresponding to the target scenario and having a size larger than that of the target generation model; Filtering out third candidate information from the first candidate information and the second candidate information according to the candidate information score; Determine a target generation result corresponding to the target generation task of the target scenario based on the third candidate information.

7. The method according to claim 6, wherein the step of using the third generation model corresponding to the target generation task to score the first candidate information and the second candidate information respectively to obtain a candidate information score of each candidate information comprises: constructing scoring data based on the target candidate information and the third prompt instruction, inputting the scoring data into the third generation model, and obtaining the candidate information score of the target candidate information; The target candidate information is any candidate information among the first candidate information and the second candidate information, and the third prompt instruction is used to indicate at least one scoring dimension, scoring rules of each scoring dimension and an output format of the candidate information score.

8. The method according to claim 6, wherein determining the target generation result corresponding to the target generation task of the target scene based on the third candidate information comprises: Input each third candidate information into a fourth generation model, and obtain corresponding candidate information vectors based on an embedding layer of the fourth generation model, wherein the fourth generation model is a generation model obtained by training based on a training corpus corresponding to the target scene, and the model size of the fourth generation model is smaller than that of the third generation model; The similarities between the candidate information vectors are calculated, and the third candidate information is deduplicated according to the similarities to obtain a target generation result corresponding to the target generation task of the target scene.

9. The method according to claim 1, wherein the target generation task is a keyword generation task, and the target generation result includes keywords generated for the target scenario; after determining the target generation result corresponding to the target generation task of the target scenario, the method further comprises: Building a scene word library of the target scene based on the keywords included in the target generation result; In response to a vocabulary acquisition request of a downstream task platform, the scene vocabulary of the target scene is fed back to the downstream task platform, wherein the downstream task platform is a platform that performs tasks related to the target scene.

10. A training method for generating a model, comprising: In response to a training task of a target scenario, obtaining training corpus corresponding to the target scenario; Training at least two initial task models of different sizes based on the training corpus to obtain generation models of corresponding sizes respectively; The second generation model is adjusted and trained through the first generation model to obtain a target generation model, wherein the first generation model and the second generation model are generation models of different sizes, and the model size of the first generation model is larger than the model size of the second generation model.

11. A generation task processing device, comprising: A first acquisition module is configured to acquire a scene corpus corresponding to a target scene in response to a target generation task of the target scene; An extraction module, configured to extract first candidate information from the scene corpus based on a scene extraction rule; A first determination module is configured to determine the second candidate information in the scene corpus by using a target generation model corresponding to the target generation task, wherein the target generation model is obtained by training based on the training corpus corresponding to the target scene; The second determination module is configured to determine a target generation result corresponding to the target generation task of the target scene based on the first candidate information and the second candidate information.

12. 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 programs / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 10 are implemented.

13. 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 10.

14. 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 10.