Model training method and system, data processing method and system and storage medium
By augmenting the task types and constraint types in the original training set, generating the target training set and training the target language model, the problem of insufficient singularity and flexibility of the model training data set in the existing technology is solved, and the training efficiency and performance of the model are significantly improved.
Patent Information
- Application Number
- CN202510386313.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-28
AI Technical Summary
In the prior art, the model training data set has limitations such as single data format, limited number of constraints and single-task evaluation, resulting in low efficiency and poor flexibility in model training.
By obtaining the original single-task data set, the data content of the objects to be expanded (task type and constraint type) are expanded, the target training set is generated, and after the preset data verification conditions are met, the initial language model is trained to generate the target language model.
It significantly improves the diversity and complexity of the training data set, improves the training efficiency and flexibility of the model, and enables the model to respond to complex task queries more accurately and flexibly and generates high-quality responses.
Smart Images

Figure CN119884331A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to large model technology and data processing fields, and specifically, to a model training method, a data processing method, a system and a storage medium. Background Art
[0002] With the rapid development of artificial intelligence and large model technology, large models are being used to solve increasingly complex problems with their powerful learning ability and wide applicability. However, with the deepening of application scenarios, the tasks faced by large models are not only increasing in number, but also in complexity and constraints. The traditional single-task, simple instruction data set construction method has been difficult to adapt to the needs of modern model training. Some data sets have been developed in the related art to evaluate the ability of model instruction compliance. Some of these data sets can introduce various types of fine constraints, thereby improving the flexibility and accuracy of the model when executing instructions. However, the data format of the data set is too single, mainly limited to plain text, and the number of constraints is small; some other data sets focus on the Chinese environment. Although the number of constraints has been increased, they are still limited to single-task evaluation. Therefore, the data sets in the related art have the limitations of a single data format, a limited number of constraints, and single-task evaluation, which further affects the comprehensiveness and depth of model training, resulting in low training efficiency and poor flexibility of the model.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a model training method, a data processing method, a system and a storage medium to at least solve the technical problems of low model training efficiency and poor flexibility when performing model training with the training data set provided by the related technology.
[0005] According to one aspect of an embodiment of the present application, a model training method is provided, comprising: obtaining an original training set, wherein the original training set is a single-task data set, and the single-task data set contains sample training data of predetermined task types and constraint types; performing data content expansion on objects to be expanded in the original training set to generate a target training set, wherein the objects to be expanded include at least one of the following: task type, constraint type; in response to the target training set satisfying a preset data verification condition, using the target training set to train an initial language model to generate a target language model, wherein the target language model is used to perform data processing on a target task query to generate a target task response.
[0006] According to another aspect of an embodiment of the present application, a data processing method is also provided, including: obtaining a target task query; performing data processing on the target task query using a target language model to generate a target task response; wherein the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0007] According to another aspect of an embodiment of the present application, a data processing method is also provided, including: obtaining a commodity transaction query; performing query analysis on the commodity transaction query using a target language model to obtain a virtual customer service reply; wherein the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0008] According to another aspect of an embodiment of the present application, a data processing method is also provided, including: obtaining a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: a target task query; returning a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: a target task reply, the target task reply is generated after data processing the target task query using a target language model, and the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0009] According to another aspect of an embodiment of the present application, a data processing method is also provided, including: obtaining a currently input data processing dialogue request, wherein the request data carried in the data processing dialogue request includes: a target task query; in response to the data processing dialogue request, returning a data processing dialogue reply, wherein the information carried in the data processing dialogue reply includes: a target task reply, the target task reply is generated after data processing the target task query using a target language model, and the target language model is generated according to the model training method of any one of the embodiments of the present application; and displaying the target task reply in a graphical user interface.
[0010] According to another aspect of an embodiment of the present application, a data processing method is also provided, including: displaying a target task query on the operation interface in response to an input instruction on the operation interface; displaying a target task reply on the operation interface in response to a processing instruction on the operation interface; wherein the target task reply is generated by performing data processing on the target task query using a target language model, and the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0011] According to another aspect of an embodiment of the present application, a data processing system is also provided, including: a client, used to send a target task query; a server, connected to the client, used to perform data processing on the target task query using a target language model to generate a target task reply; the client is also used to output the target task reply; wherein the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0012] According to another aspect of the embodiments of the present application, a computing device is further provided, including: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present application is executed when the program is running.
[0013] According to another aspect of an embodiment of the present application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in each embodiment of the present application.
[0014] According to another aspect of the embodiments of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.
[0015] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.
[0016] According to another aspect of the embodiments of the present application, a computer program is also provided, and when the computer program is executed by a processor, the methods in the various embodiments of the present application are implemented.
[0017] In an embodiment of the present application, by obtaining the original training set, the data content of the object to be expanded in the original training set is expanded to generate a target training set, and the object to be expanded includes at least one of the following: task type, constraint type, and finally in response to the target training set satisfying the preset data verification condition, the target training set is used to train the initial language model to generate a target language model for data processing of the target task query to generate a target task reply, thereby significantly improving the diversity and complexity of the training data set by expanding the task type and constraint type in the original training set, so that the training efficiency and flexibility of the model are significantly improved, and then the technical problem that the training data set provided by the related technology has low model training efficiency and poor flexibility when performing model training is solved. By expanding the task type and / or constraint type, the initial language model can be exposed to a wider and more complex instruction scene during the training process, thereby greatly enriching the training material of the model, improving the training efficiency, and further enhancing the understanding ability and adaptability of the model, especially when dealing with multi-level constraints and multi-task scenes, the performance of the model is significantly improved. In addition, the setting of the preset data verification condition ensures the quality of the data after expansion and avoids the interference of invalid or redundant data on model training. The target training set can effectively train the initial language model and evolve it into a target language model, which can respond to complex target task queries more accurately and flexibly and generate high-quality target task responses, thereby significantly improving the model's performance and user experience in real application scenarios.
[0018] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a schematic diagram of an application scenario of a data processing method according to an embodiment of the present application;
[0021] Figure 2 is a flow chart of a model training method according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a process of creating a target training set according to an embodiment of the present application;
[0023] Figure 4 is a flow chart of a data processing method according to an embodiment of the present application;
[0024] Figure 5 is a flow chart of another data processing method according to an embodiment of the present application;
[0025] Figure 6 is a flow chart of another data processing method according to an embodiment of the present application;
[0026] Figure 7 is a flow chart of another data processing method according to an embodiment of the present application;
[0027] Figure 8 is a flow chart of another data processing method according to an embodiment of the present application;
[0028] Fig. 9 is a structural block diagram of a model training device according to an embodiment of the present application;
[0029] Fig.10 is a structural block diagram of a data processing device according to an embodiment of the present application;
[0030] Fig.11 is a structural block diagram of another data processing device according to an embodiment of the present application;
[0031] Fig.12 is a structural block diagram of another data processing device according to an embodiment of the present application;
[0032] Fig.13 is a structural block diagram of another data processing device according to an embodiment of the present application;
[0033] Fig.14 is a structural block diagram of another data processing device according to an embodiment of the present application;
[0034] Fig.15 It is a structural block diagram of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] The technical solution provided in this application is mainly implemented using large-scale model technology. The large model here refers to a deep learning model with large-scale model parameters, which can usually contain hundreds of millions, tens of billions, hundreds of billions, trillions or even more than 10 trillion model parameters. The 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 large-scale language model (LLM), multi-modal pre-training model, etc.
[0038] It should be noted that when the large model is actually applied, the pre-trained model can be fine-tuned through a small number of samples so that the large model can be applied to different tasks. For example, the large model can be widely used in natural language processing (NLP), computer vision, speech processing and other fields, and can be specifically applied to computer vision tasks such as visual question answering (VQA), image description (IC), image generation, etc. It can also be widely used in text-based sentiment classification, text summary generation, machine translation and other natural language processing tasks. Therefore, the main application scenarios of the large model include but are not limited to digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc. In the embodiment of the present application, data processing through the target language model in the query scenario is taken as an example for explanation.
[0039] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0040] Instruction: An instruction is a task description or command input into a large model to instruct the model to perform a specific function or task. For example, in a language generation task, an instruction may be to ask the model to generate a paragraph related to the input topic.
[0041] Constraint: A set of rules or conditions that must be followed when performing or completing a task. In the training and application of large models, constraints can be logical rules, boundary conditions, rule requirements, or business logic. These constraints ensure that the model generates outputs that meet the expected requirements for different tasks when specific conditions are met.
[0042] According to an embodiment of the present application, a model training method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0043] Considering the huge number of model parameters of the large model and the limited computing resources of the mobile terminal, the above method provided in the embodiment of the present application can be applied to Figure 1 The application scenarios shown are not limited to these. Figure 1 In the application scenario shown, the large model is deployed in the 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 device 20 here may include but is not limited to: a smart phone, a tablet computer, a laptop computer, a PDA, a personal computer, a smart home device, a vehicle-mounted device, etc. The client device 20 can interact with the user through a graphical user interface to implement the call of the large model, thereby implementing the method provided in the embodiment of the present application.
[0044] In an embodiment of the present application, a system consisting of a client device and a server can perform the following steps: the server is connected to the client, the client is used to send a target task query, and after receiving the target task query, the server uses a target language model to process the target task query and generate a target task reply; the client is also used to output the target task reply, wherein the target language model is generated according to any one of the model training methods in the embodiments of the present application.
[0045] It should be noted that, with the rapid development of high-performance computing units, in other application scenarios, the above method provided in the embodiment of the present application can also be applied to the model all-in-one machine. In an optional embodiment, a plurality of models are built into the model all-in-one machine, and the user can choose to adjust a model as needed to obtain the user's own model, so that the high-performance computing unit built into the model all-in-one machine can directly call the adjusted model to execute the above method provided in the embodiment of the present application. In another optional embodiment, a trained model is built into the large model all-in-one machine, so that the high-performance computing unit built into the model all-in-one machine can directly call the model to execute the above method provided in the embodiment of the present application.
[0046] Furthermore, when users need to train their own models, they can also upload their own data sets through the client, which are sent by the client to the server, so that the server can adjust the pre-trained model with the data set to obtain the user's own model and then deploy it to the production environment. In order to facilitate users' needs for model adjustment, the server can provide complete adjustment tools, development frameworks and processes, and can support multiple adjustment strategies, so that the adjusted model can better adapt to applications in different fields and achieve a high degree of customization.
[0047] Under the above operating environment, this application provides Figure 2 The model training method shown. Figure 2 is a flow chart of a model training method according to an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps:
[0048] Step S21, obtaining an original training set, wherein the original training set is a single-task data set, and the single-task data set includes sample training data of predetermined task types and constraint types;
[0049] Step S22, expanding the data content of the objects to be expanded in the original training set to generate a target training set, wherein the objects to be expanded include at least one of the following: task type, constraint type;
[0050] Step S23, in response to the target training set satisfying the preset data verification condition, the target training set is used to train the initial language model to generate a target language model, wherein the target language model is used to perform data processing on the target task query to generate a target task response.
[0051] The above original training set is a single-task dataset used to train the initial language model before the data augmentation operation begins. Single-task datasets usually contain sample training data of specific task types and constraint types, aiming to provide basic learning materials for the initial language model. There are various ways to obtain the original training set. For example, for some high-quality but limited-scale datasets, domain experts can annotate the data to clarify the task type and constraint type. In addition, a large amount of text, conversation, image and other data can be collected from the Internet, and then filtered and annotated to form a dataset with clear tasks and constraints. Using existing models or algorithms, data containing specific task types and constraint types can be automatically generated. This method can quickly expand the size of the dataset. Extracting data from the database and annotating the corresponding tasks and constraint types in combination with specific application scenarios and task requirements can also obtain the original training set.
[0052] The above original training set is a single-task dataset with predetermined task types and constraint types, which means that the original training set is specially designed or collected to serve a specific type of task, and the constraints related to the task have been clearly marked or defined in the dataset. The original training set focuses on a specific type of task, such as text translation, sentiment analysis, question-answering system, etc. The above types are pre-selected in the dataset, and each data sample in the dataset is designed to train the initial language model to recognize and complete this type of task. In parallel with the task type, the original training set will also contain a series of constraints, which can be but are not limited to: data format requirements, restrictions on the use of specific vocabulary, compliance with logical rules, matching of industry standards, or specific requirements for output results. The setting of constraint types is to ensure that the model can meet additional specifications and requirements when performing tasks, and improve the accuracy and professionalism of the output.
[0053] Each data sample in the original training set revolves around a single task, that is, each sample only serves one type of task, and does not involve a combination of multiple tasks, which enables the model to concentrate on learning and mastering a specific task in the early stages of training. For example, an original training set focuses on the "text translation" task, and the constraint types may include "maintaining the grammatical structure of the original text" and "avoiding the use of slang". Each sample in the original training set is designed around how to accurately and appropriately translate the source language text into the target language, and the above constraints must be observed during the translation process. Although the original training set can provide accurate and focused learning materials in the early stages of model training to help the model quickly establish the ability to understand and execute specific tasks, as the model capabilities develop, it needs to expand from a single task to multiple tasks and complex constraints to adapt to a wider range of application scenarios. Therefore, after obtaining the original training set, it is necessary to expand the data content of the objects to be expanded in the original training set to generate the target training set.
[0054] Data content expansion is to enrich the content and structure of the data set by adding new data samples and / or adding additional constraints on the basis of the original training set. For large models, data content expansion can not only increase the amount of data, but more importantly, it can increase the diversity and complexity of the data, so that the model can learn more types of tasks and constraints during the training process, and improve its generalization ability and ability to handle complex scenarios.
[0055] The specific operations of data content expansion include but are not limited to: task expansion, constraint addition, data scenario enrichment, example addition, etc. When expanding tasks, related subtasks or extended tasks can be generated based on a single task in the original training set, such as expanding "translating English sentences into Chinese" to "translating English sentences into French" or "extracting keywords in English sentences". When adding constraints, more constraints can be added to each task to ensure that the model can follow more rules or standards when performing tasks, such as increasing input length limits, format requirements, specific vocabulary avoidance, etc. When enriching data scenarios, the scenarios of the original training set can be expanded from simple text interactions to more complex dialogue scenarios, image descriptions, etc., to increase the dimension and richness of the data. For example, the original training set only contains plain text and two-person dialogue data, which can be expanded to multi-person dialogue scenarios, involving 20 daily life scenarios, and supporting dialogue scenarios with up to 5 people. When adding examples, more example data can be added to each task and constraint to improve the learning efficiency and accuracy of the model. Data content expansion can effectively solve the problems of single data and insufficient constraints in model training, and provide more comprehensive and richer learning materials for the initial language model, thereby improving its performance and adaptability in complex environments.
[0056] The above-mentioned preset data verification conditions are a series of standards and rules to ensure the quality of the target training set, which are intended to verify whether the target training set is suitable for model training, including but not limited to: data integrity, constraint consistency, task diversity, data representativeness, and output quality. The data integrity condition is to ensure that each data sample has complete and correct input and output, so as to avoid the initial language model encountering errors or incomplete data during training. The constraint consistency condition is to ensure that the initial language model can correctly understand and execute the constraints by checking whether all the constraints in the data set match the task type and whether there are conflicts or duplications between the constraints. The task diversity condition can evaluate whether the task types in the data set are diverse, including the complexity of the tasks, the coverage of the task scenarios, etc., to ensure that the initial language model can learn a variety of skills and knowledge. The data representativeness condition is to ensure that the data set can represent the application scenarios of the real world, cover common tasks and diverse constraints, and improve the generalization ability of the initial language model. The output quality condition is to evaluate the output quality generated by the model based on the target training set through a preset evaluation method, including accuracy, coherence, rationality, etc., to verify the effectiveness of the target training set.
[0057] After obtaining the target training set that meets the preset data verification conditions, the target training set is used to train the initial language model to generate a target language model. Exemplarily, during the training process, the target training set is first loaded, and the target training set that meets the preset data verification conditions is input into the training framework of the initial language model. Using the initial language model as the starting point for training, the initial language model can be a pre-trained basic model. Furthermore, the initial language model adjusts its internal parameters by continuously learning the tasks and constraints in the target training set to improve the processing capability of the target training set. During the training process, the validation set can be used regularly to evaluate the performance of the model, and the training strategy or model parameters can be adjusted according to the evaluation results to optimize the performance of the model. After the training is completed, an independent test set is used to evaluate the final performance of the model to ensure its performance on unknown data. When all tests and evaluations have passed, that is, the expected performance indicators have been achieved, the trained and optimized model is called the target language model.
[0058] The above target language model is used to process data of target task queries to generate target task replies. Target task queries can be diverse, covering multiple fields and scenarios. Specific types include but are not limited to: semantic understanding and translation queries, information extraction queries, text generation and rewriting queries, sentiment analysis and response queries, dialogue management and interaction queries, knowledge graph queries and answers, code generation queries, creativity and artistic creation queries, etc. The target task replies are the specific results generated by the target language model for the above types of queries. The target task replies must not only conform to the original intention of the task, but also strictly abide by the constraints to ensure the accuracy, coherence and applicability of the replies. For example, for semantic understanding and translation queries, the target language model should generate grammatically correct, semantically accurate, and stylistically consistent translation texts; for dialogue management and interaction queries, the target language model should generate logically coherent, polite, and conversation-driving replies; for knowledge graph queries, the target language model should include correct and complete information in the replies. The target language model can handle complex tasks under multiple constraints, provide users with more intelligent and personalized services, and improve the effects and user experience in actual application scenarios.
[0059] Based on the above steps S21 to S23, by acquiring the original training set, the data content of the object to be expanded in the original training set is expanded to generate a target training set, and the object to be expanded includes at least one of the following: task type, constraint type, and finally in response to the target training set satisfying the preset data verification condition, the initial language model is trained using the target training set to generate a target language model for data processing of the target task query to generate a target task response, thereby significantly improving the diversity and complexity of the training data set by expanding the task type and constraint type in the original training set, so that the training efficiency and flexibility of the model are significantly improved, thereby solving the technical problem that the training data set provided by the related technology has low model training efficiency and poor flexibility when performing model training. By expanding the task type and / or constraint type, the initial language model can be exposed to a wider and more complex instruction scenario during the training process, thereby greatly enriching the training material of the model, improving the training efficiency, and further enhancing the understanding ability and adaptability of the model, especially when dealing with multi-level constraints and multi-task scenarios, the performance of the model is significantly improved. In addition, the setting of preset data verification conditions ensures the quality of the expanded data and avoids the interference of invalid or redundant data on model training. As a result, the target training set can effectively train the initial language model and evolve it into the target language model, which can respond to complex target task queries more accurately and flexibly and generate high-quality target task responses, thereby significantly improving the performance of the model and user experience in real application scenarios.
[0060] It should be noted that the model training method in the embodiments of the present application can be but is not limited to application in scenarios such as virtual customer service, intelligent assistants, law, education, finance, medical care, translation, e-commerce, social media review, smart homes, etc. For fields that need to understand and generate complex, multi-constrained texts or instructions, the model training method of the present application can be used to train a target language model, and then use the target language model to process the target task query to achieve more efficient and intelligent automated processing capabilities.
[0061] The model training method in the embodiment of the present application is further introduced below.
[0062] In an optional embodiment, in step S21, obtaining the original training set includes:
[0063] Obtain original task data and original constraint data;
[0064] Performing task classification on the original task data to obtain multiple task types, and performing constraint classification on the original constraint data to obtain multiple constraint types;
[0065] The original training set is constructed using multiple task types and multiple constraint types.
[0066] The above raw task data can be an initial data set containing various task instructions, which comes from different scenarios and applications, such as text translation, sentiment analysis, information extraction, etc. The raw task data is not classified or processed, and is the basis for building complex task data sets. The above raw constraint data defines the rules or conditions to be followed when performing tasks, such as grammatical structure, vocabulary selection, logical rules, etc.
[0067] Furthermore, the original task data can be analyzed and divided into different task types according to their functions, goals and execution contexts. For example, text translation, text summarization, sentiment analysis, etc. can be classified into different tasks so that a highly targeted data set can be constructed later. When summarizing the original constraint data, it can be divided into multiple constraint categories according to its type and application scenario, such as format constraints, content constraints, logical constraints, etc. For example, the original task data is task classified to obtain 10 task types, and the original constraint data is constraint classified to obtain 26 different types of constraints. After obtaining multiple task types and multiple constraint types, multiple task types and multiple constraint types are used to construct the task system and constraint system in the original training set.
[0068] Based on the above optional embodiments, by acquiring the original task data and the original constraint data, and then performing task classification on the original task data to obtain multiple task types, and performing constraint classification on the original constraint data to obtain multiple constraint types, finally, the original training set is quickly constructed using the multiple task types and the multiple constraint types to be used as the basis for data content expansion, thereby improving the speed of acquiring the target training set.
[0069] In an optional embodiment, in step S22, expanding the data content of the object to be expanded in the original training set to generate the target training set includes:
[0070] The original training set is expanded from multiple interaction scene dimensions to obtain an extended data set, wherein the multiple interaction scene dimensions include at least part or all of the following dimensions: interaction scene type, number of members participating in the interaction, and interaction rounds of members participating in the interaction; data content is expanded for the objects to be expanded in the extended data set to generate a target training set.
[0071] Specifically, the original training set is expanded from multiple interaction scenario dimensions to build a richer and more comprehensive extended dataset to enhance the ability of the initial language model to handle complex and changing interaction scenarios. The multiple interaction scenario dimensions may include at least some or all of the following dimensions: interaction scenario type, number of members participating in the interaction, and number of interaction turns of members participating in the interaction.
[0072] The above interaction scenario types can be different types of interaction situations or fields, such as daily conversations, business meetings, customer service, medical consultations, legal discussions, etc. Each scenario type has its own unique task requirements and constraints. For example, in customer service scenarios, the target language model needs to follow the constraints of polite language and solving user problems; while in medical consultations, the target language model needs to comply with the constraints of professional terminology accuracy and patient privacy protection.
[0073] The number of members participating in the interaction mentioned above refers to the number of individuals participating in the communication in a single dialogue interaction, which extends from the interaction between a single person and the model to multilateral dialogues between two, three, or even more people. The increase in the number of members not only introduces more perspectives and information, but also increases the complexity and uncertainty of the dialogue, which helps the model learn task execution and information integration in group situations.
[0074] The above-mentioned interaction rounds refer to the number of times information is exchanged during the interaction. From simple single-round questions and answers to complex scenarios involving multiple rounds of dialogue, information feedback, and iterative corrections. Increasing the number of interaction rounds can simulate a more natural dialogue flow, allowing the model to learn to maintain context in the dialogue, understand the dialogue history, and how to generate appropriate responses in subsequent dialogues.
[0075] When expanding the scenarios of the original training set, including but not limited to: scenario type expansion, member number expansion, and interaction round expansion. When expanding the scenario type, data covering the above different interaction scenario types can be collected and generated, such as obtaining conversation data from multiple channels such as social media, news reports, and professional forums, or generating simulated conversations through role-playing. This ensures that each interaction scenario type has enough data to train the initial language model so that it can adapt to task execution in various environments.
[0076] When expanding the number of members, the dataset is expanded by generating or collecting multi-person conversation data based on the original single-person or two-person conversation data. Specifically, a conversation generation model, such as a large model, can be used to create a virtual multi-person conversation scene based on the scene type and task requirements. For example, in a business meeting scene, simulate conversations between different roles, such as managers, employees, and customers, involving meeting arrangements, project discussions, customer feedback, and other content.
[0077] When expanding the interaction rounds, multiple rounds of dialogue content can be added for each dialogue sample to simulate a more realistic communication process. For example, natural language generation technology can be used to generate the next round of dialogue based on the content of the previous round of dialogue and the task requirements. For example, if the task is "customer service", the user can be asked about the nature of the problem in the first round of dialogue, and then in subsequent rounds, more specific questions can be asked or preliminary solutions can be provided based on the information provided by the user.
[0078] The original training set is expanded from multiple interaction scenario dimensions to obtain an extended data set, and then the data content of the objects to be expanded in the extended data set is expanded. The objects to be expanded include at least one of the following: task type, constraint type, so as to generate a target training set.
[0079] Based on the above optional embodiments, the original training set is expanded from multiple interaction scenario dimensions to obtain an extended data set, and then the data content of the objects to be expanded in the extended data set is expanded to generate a target training set for training a target language model. This promotes the task execution capability of the target language model in complex environments, further improves the training efficiency, and lays a solid foundation for the target language model to provide high-quality services in a wide range of practical applications.
[0080] In an optional embodiment, expanding the data content of the object to be expanded in the expanded data set to generate a target training set includes:
[0081] Obtain a single-task dataset after scene expansion from the extended dataset; perform task type expansion on the single-task dataset after scene expansion to generate a target multi-task dataset, wherein the target multi-task dataset includes: multiple sub-task instructions and / or multiple extended task instructions; perform constraint type expansion on the target multi-task dataset to generate a target training set.
[0082] The above single-task datasets can be data sets that focus on training the initial language model to perform specific types of tasks, such as text classification, sentiment analysis, translation, question answering, etc. Each data sample usually contains a clear task instruction and a corresponding input-output pair, aiming to make the initial language model highly specialized and accurate on a specific task.
[0083] When obtaining a single-task dataset after scenario expansion from an extended dataset, you can filter out data that only contains a single task type. For example, if the extended dataset covers multiple tasks such as translation, question answering, and sentiment analysis, then select the data of all translation tasks and remove relevant samples of other tasks to obtain a single-task dataset. Specifically, the data in the extended dataset can be classified by task label, and then all data under a certain label can be selected to achieve this.
[0084] After obtaining the single-task dataset, the task type expansion is performed on the single-task dataset. The goal of task type expansion is to convert the single-task dataset into a dataset that can train the model to perform multiple related or different tasks, so as to enhance the multi-task processing capability of the model.
[0085] For example, in the process of expanding the task type, for each sample in the single-task dataset, natural language generation technology or domain expert knowledge can be used to add subtask instructions or extended task instructions related to the original single task, thereby generating a target multi-task dataset. For example, in a translation task, in addition to literal translation, subtask instructions such as explaining the context, culturally adaptive translation, and synonym replacement can also be generated; or in a question-answering task dataset, in addition to answering questions, extended task instructions such as question restatement, background information provision, and answer verification can also be added.
[0086] The above-mentioned target multi-task dataset is a data set containing multiple task instructions, where each data sample can be associated with multiple sub-tasks and / or extended task instructions. It aims to simultaneously train the model's performance on different tasks and improve its adaptability and efficiency when facing diverse needs in the real world.
[0087] After generating the target multi-task dataset, the constraint type expansion is performed on the target multi-task dataset. The constraint type expansion aims to increase the types of constraints in the target multi-task dataset so as to train the model to comply with more rules and conditions when performing tasks and improve the accuracy and applicability of the output.
[0088] For example, in the process of expanding the constraint types, multiple constraint types can be added to each task instruction based on the target multi-task data set, such as format constraints, logic constraints, industry standard constraints, etc. This can be achieved through expert definition, rule-based methods, or intelligent generation using large models to ensure that each task instruction is accompanied by a clear, specific, and diverse description of constraint conditions, and the initial language model can learn how to complete the task requirements while complying with these constraints during training.
[0089] It should be noted that the above process of constructing the target training set is only a preferred embodiment. The model training process in the embodiment of the present application can also adopt a variety of variants and supplementary strategies to enhance the construction of the target training set and further improve the performance and adaptability of the model. The embodiment of the present application is not limited.
[0090] Based on the above optional embodiments, by obtaining a single-task dataset after scenario expansion from an extended dataset, and then expanding the task type of the single-task dataset after scenario expansion to generate a target multi-task dataset, and finally expanding the constraint type of the target multi-task dataset, it is possible to efficiently generate a multi-task and multi-constraint target training set, thereby further improving the model training efficiency. At the same time, the rich and diverse training sets promote the flexibility of the model in understanding the nature of tasks and responding to new challenges.
[0091] In an optional embodiment, expanding the task type of the single-task dataset after the scene expansion to generate a target multi-task dataset includes:
[0092] The single-task data set after the scenario expansion is expanded with task types to generate an initial multi-task data set; the initial multi-task data set is verified according to a first preset verification condition to obtain a target multi-task data set, wherein the first preset verification condition includes: whether the task instructions to be verified in the initial multi-task data set are derived from the extended data set, whether the task instructions to be verified are successfully executed based on the execution results of the task instructions to be verified, and whether different task instructions to be verified are independent of each other in terms of implementation functions.
[0093] Specifically, after the single-task data set is expanded by task types to generate an initial multi-task data set, the process of performing task data verification on the initial multi-task data set according to the first preset verification condition is intended to ensure that the generated initial multi-task data set meets the standard of high-quality training data. Task data verification includes but is not limited to source data traceability verification, executable verification, and independence verification.
[0094] Exemplarily, source data tracing verification is mainly used to determine whether the task instructions to be verified in the initial multi-task data set are derived from the extended data set. In the process of source data tracing verification, it is first necessary to confirm whether each task instruction to be verified in the initial multi-task data set can be directly traced back to one or more source data samples in the extended data set. This verification process can be implemented through data identification, data labeling or direct text matching, thereby ensuring that all newly generated task instructions are based on the original data and maintaining the consistency and validity of the data set.
[0095] Exemplarily, the executable check mainly determines whether the task instruction to be checked is successfully executed based on the execution result of the task instruction to be checked. In the process of executable checking, the quality of the task to be checked can usually be input into the model to obtain the output result, and then the output performance of the model is evaluated using the predefined correct output or evaluation criteria. If the model can accurately complete the task instruction to be checked and the output meets expectations, it can be determined that the task instruction to be checked passes the executable check. In the process of evaluating the output performance of the model, multiple evaluation indicators can be set according to the actual scenario requirements, including but not limited to accuracy, response time, rationality of output, etc., to comprehensively evaluate the execution capability of the model.
[0096] For example, in the process of independence verification, it is necessary to check whether the different task instructions to be verified are independent of each other in terms of implementation function, that is, the completion of one task should not affect the execution or result of another task. This ensures that each task instruction in the target data set has its own unique training objectives and application scenarios, avoids redundancy or potential conflicts between tasks, and improves the purity and efficiency of the target data set. Independence verification can be achieved by comparing the objectives, input and output formats, execution logic, etc. of the task instructions to ensure that the task instructions are independent of each other and do not interfere with each other.
[0097] When the task instructions to be verified in the initial multi-task data set meet the first preset verification condition, that is, when the task instructions to be verified pass the source data traceability verification, executable verification and independence verification, they can be stored in the target multi-task data set. The task instructions in the target multi-task data set have detailed task description information, including but not limited to information such as input format, output format and task objectives.
[0098] Based on the above optional embodiments, by expanding the task type of the single-task data set, an initial multi-task data set is generated, and then the task data of the initial multi-task data set is verified according to the first preset verification condition to obtain the target multi-task data set, which can significantly improve the quality of the target training set, thereby further improving the training efficiency and generalization effect of the model.
[0099] In an optional embodiment, expanding the constraint type of the target multi-task data set to generate a target training set includes:
[0100] The constraint types of the target multi-task data set are expanded to generate an initial multi-task multi-constraint data set; the constraint data of the initial multi-task multi-constraint data set is verified according to the second preset verification condition to obtain the target training set, wherein the second preset verification condition includes: whether the constraints to be verified in the initial multi-task multi-constraint data set, the task instructions corresponding to the constraints to be verified, and the associated data of the task instructions are consistent, based on the execution results of the constraints to be verified, determining whether the constraints to be verified are successfully executed, and whether different constraints to be verified are independent of each other in terms of implementation functions.
[0101] Specifically, when expanding the constraint type for each task in the target multi-task dataset, a large model can be used to generate five to ten constraints, thereby generating an initial multi-task multi-constraint dataset. The expanded constraints can be derived from industry standards, context requirements, format specifications, etc., and ultimately it is necessary to ensure that each constraint is closely related to the execution logic of the corresponding task instructions and is applicable to its associated data. In addition, the generated constraints must be understandable and executable by the model, that is, the constraints must be clearly stated to avoid ambiguous or overly abstract descriptions, to ensure that these constraints can be effectively applied when the initial language model is executed. Each constraint should also be functionally independent of other constraints to avoid duplication or conflicting constraints, thereby ensuring that each constraint can independently affect the output of the model, while working together to guide the training of the initial language model.
[0102] Further, after the initial multi-task multi-constraint data set is generated, the initial multi-task multi-constraint data set is subjected to constraint data verification according to a second preset verification condition to obtain a target training set. Constraint data verification includes but is not limited to: consistency verification, executable verification and independence verification.
[0103] Exemplarily, the consistency check is mainly used to determine whether the constraints to be checked in the initial multi-task multi-constraint data set, the task instructions corresponding to the constraints to be checked, and the associated data of the task instructions are consistent. During the verification process, it specifically includes checking whether the constraints are reasonably applied to the task instructions, and whether the associated data conforms to the expected input format of the task instructions and constraints. The consistency check helps to eliminate invalid or erroneous constraints and keep the data set pure and accurate.
[0104] Exemplarily, the executable check can determine whether the constraints to be checked are successfully executed based on the execution results of the constraints to be checked. By applying the constraints to the large model, using the large model to execute the task instructions, and observing whether the output execution results meet the given constraints, the rationality and effectiveness of the constraints can be confirmed.
[0105] For example, independence checking can check whether different constraints to be checked are independent of each other in terms of implementation functions, that is, the satisfaction of one constraint should not affect the execution or validity of another constraint, thereby avoiding redundancy or conflict between constraints and ensuring that each constraint provides unique value for model training.
[0106] Based on the above optional embodiments, by expanding the constraint types of the target multi-task data set, an initial multi-task multi-constraint data set is generated, and then the constraint data of the initial multi-task multi-constraint data set is verified according to the second preset verification condition, thereby obtaining a high-quality target training set, which contains a rich variety of task instructions and constraints. Using the target training set for model training can not only improve the training efficiency of the model, but also enhance the accuracy and flexibility of the model when performing tasks in accordance with the constraints, thereby showing better performance and reliability in practical applications.
[0107] In an optional embodiment, expanding the data content of the object to be expanded in the expanded data set to generate a target training set includes:
[0108] Obtain a single-task dataset after scene expansion from the extended dataset; perform constraint type expansion on the single-task dataset after scene expansion to generate a target training set.
[0109] Specifically, from an extended dataset containing a large amount of diverse data, a single-task dataset with scenario expansion can be screened out according to a specific task type. A single-task dataset focuses on a specific task, such as text translation, question answering, text classification, etc., and each piece of data in the single-task dataset is closely related to the task.
[0110] Furthermore, when expanding the constraint types of a single-task dataset, multiple constraints can be added to each task instruction in the single-task dataset. The constraints can include logical rules, format requirements, industry standards, and user-specific needs. For example, for the task of "translating English sentences into Chinese", constraints such as "maintaining semantic accuracy" and "following Chinese grammatical specifications" can be added. The generation of constraints should take into account the actual needs and application scenarios of the task to ensure that the rules and conditions followed by each task during execution fully cover the possible situations. The generated constraints can be integrated with the original task instructions to form a set of task instructions containing multiple constraints, namely the target training set.
[0111] Based on the above optional embodiments, a single-task dataset after scenario expansion is obtained from an extended dataset, and then the constraint type of the single-task dataset after scenario expansion is expanded to generate a target training set. This not only greatly enriches the diversity and complexity of the training data, but also effectively improves the performance and flexibility of the target language model in specific tasks and constraint environments.
[0112] In an optional embodiment, the constraint type is expanded on the single-task dataset after the scene expansion to generate a target training set, including:
[0113] The constraint types of the single-task data set after the scenario expansion are expanded to generate an initial multi-constraint data set; the constraint data of the initial multi-constraint data set is verified according to the second preset verification condition to obtain a target training set, wherein the second preset verification condition includes: whether the constraints to be verified in the initial multi-constraint data set, the task instructions corresponding to the constraints to be verified, and the associated data of the task instructions are consistent, based on the execution results of the constraints to be verified, determining whether the constraints to be verified are successfully executed, and whether different constraints to be verified are independent of each other in terms of implementation functions.
[0114] Specifically, by adding multiple constraints to each task instruction in the single-task dataset after the scenario expansion, an initial multi-constraint dataset is obtained, which can significantly increase the complexity and depth of the target training set. The diversity and precision of the constraints help the initial language model learn how to perform tasks under different constraints during the training process, thereby improving its performance and adaptability in practical applications. The expanded constraint types can cover multiple levels such as logic, format, style, and legal requirements, prompting the initial language model to understand the comprehensive requirements of the task and improve the accuracy and professionalism of its output.
[0115] Furthermore, when the constraint data verification is performed on the initial multi-constraint data set according to the second preset verification condition, including but not limited to consistency verification, executable verification and independence verification, when the data in the initial multi-constraint data set meets the second preset verification condition, it can be stored in the target training set.
[0116] Based on the above optional embodiments, by expanding the constraint types of the single-task data set after the scenario expansion, an initial multi-constraint data set is generated, and then the initial multi-constraint data set is subjected to constraint data verification according to the second preset verification condition. The target training set finally generated will be more suitable for training a target language model that can process complex instructions and follow multiple constraints, making it more accurate and reliable in practical applications, thereby further improving the efficiency and flexibility of model training.
[0117] In an optional embodiment, expanding the data content of the object to be expanded in the original training set to generate the target training set includes:
[0118] A single-task data set is obtained from an original training set; the task type of the single-task data set is expanded to generate a target multi-task data set, wherein the target multi-task data set includes: a plurality of sub-task instructions and / or a plurality of extended task instructions; and the constraint type of the target multi-task data set is expanded to generate a target training set.
[0119] Specifically, a single-task dataset can be obtained from the original training dataset. By using the generation capability of the large model, each task instruction in the single-task dataset can be deformed or extended to generate a series of related subtasks and / or extended task instructions, thereby obtaining the target multi-task dataset. For example, starting from the basic task instruction of "translating English sentences into Chinese", subtask instructions such as "translating English sentences into Chinese while maintaining the emotional color of the original text" or extended task instructions such as "translating an English article into Chinese, paying attention to cultural differences and accurate conversion of professional terms" can be generated. The newly added task instructions cover the range from basic tasks to more complex and specific tasks, thus forming a target multi-task dataset.
[0120] Furthermore, the constraint types of the target multi-task dataset are expanded to generate a target training set. Using the natural language understanding capabilities of the large model, five to ten constraints are generated for each task instruction, which can cover all important aspects of task execution. The generated constraints need to be verified to ensure their consistency, enforceability, and independence with the task instructions and associated data. For example, for translation tasks, "maintaining the emotional color of the original text" and "ensuring the grammatical correctness of the translation" are two different constraints, which enable the model to focus on both emotion and grammar when performing translation, rather than focusing on only one side. By adding and verifying constraints, the target training set not only includes a variety of task types, but also ensures that each task has clear rules to follow when executing, thereby providing more detailed and comprehensive guidance for the training of the initial language model.
[0121] Based on the above optional embodiments, by obtaining a single-task data set from the original training set, and then expanding the task type of the single-task data set to generate a target multi-task data set, and finally expanding the constraint type of the target multi-task data set, a high-quality target training set can be constructed that can cover basic task requirements, process complex instructions and follow multiple constraints, which can further improve the model training efficiency.
[0122] In an optional embodiment, the model training method in the embodiment of the present application also includes: using a preset data verification method to perform task and constraint verification on the target training set to obtain a verification result, wherein the preset data verification method includes one of the following: a verification method through a data verification model, a verification method through a data verification program, and the data verification program is written using the data verification model; generating repair suggestions based on the verification results.
[0123] The above data verification model can be used to evaluate the correctness and effectiveness of task instructions and constraints. The construction of the data verification model can be based on rules such as regular expressions, logical expressions, etc., or it can be a machine learning model such as a classifier, sequence model, etc., which is used to identify whether the task instructions meet the constraints and whether the output meets expectations. Each task instruction and constraint in the target training set is input into the data verification model, and the data verification model will output a verification result indicating whether the task instruction and constraint meet the preset standards, including but not limited to whether it is executable, whether it is consistent with the constraints, and whether there is a conflict or redundancy with other constraints.
[0124] The above data validation program is written using the data validation model, which usually includes defining the input and output formats of the data validation program, writing codes for checking the consistency of task instructions and constraints, and processing validation scripts for logical rules, format requirements, grammatical correctness, etc. The consistency, executableness, and independence of task instructions and constraints can be verified in the data validation program. For example, the data validation program needs to check whether the output of the task instruction meets the set constraints, and at the same time ensure that each constraint does not conflict with other constraints.
[0125] The data of the target training set is input into the data validation program one by one to execute the validation logic. The data validation program automatically evaluates the correctness and validity of each piece of data and obtains the validation results, including but not limited to the validation status of each task instruction and constraint condition.
[0126] Furthermore, according to the verification results, the main problems existing in the target training set can be summarized, such as unclear task instructions, conflicting constraints, and errors in data format. Furthermore, a repair strategy is formulated for the problems found. For example, in the case of unclear task instructions, the task instructions can be redefined to clarify the input and output formats and goals; for conflicting constraints, the conflicting constraints need to be adjusted or deleted; for data format errors, the data format should be corrected to ensure the consistency and standardization of the data. Based on the above repair strategies, specific repair suggestions can be generated. The repair suggestions can detail which data needs to be modified, how to modify it, and the expected effect after the modification. For example, it is recommended to add example data to help the initial language model better understand the task instructions, or it is recommended to adjust the task difficulty to ensure that the training data has practical significance and training value. The repair suggestions are applied to the target training set, and the data set is corrected and iterated multiple times until the data set meets the predetermined high quality standards.
[0127] Based on the above optional embodiments, the target training set is subjected to task and constraint verification by adopting a preset data verification method to obtain verification results, and then repair suggestions are generated based on the verification results. This ensures that the target training set finally generated can effectively support model training and improve the processing and generalization capabilities of the target language model under complex instruction constraints.
[0128] Figure 3 is a schematic diagram of a process of creating a target training set according to an embodiment of the present application, such as Figure 3As shown, the original task data and the original constraint data are obtained, and then the original task data are task-classified to obtain multiple task types, and the original constraint data are constraint-classified to obtain multiple constraint types, and finally the original training set is constructed using multiple task types and multiple constraint types. After obtaining the original training set, the original training set is scene-expanded from multiple interaction scene dimensions to obtain an extended data set, wherein the multiple interaction scene dimensions include at least part or all of the following dimensions: interaction scene type, number of members participating in the interaction, and interaction rounds of members participating in the interaction. A single-task data set after scene expansion is obtained from the extended data set, and then the task type expansion is performed on the single-task data set after scene expansion to generate a target multi-task data set, and the target multi-task data set includes: multiple sub-task instructions and / or multiple extended task instructions, and finally the constraint type expansion is performed on the target multi-task data set to generate a target training set. In addition, you can also use preset data verification methods to perform task and constraint verification on the target training set to obtain verification results. The preset data verification methods include one of the following: verification through a data verification model, verification through a data verification program. The data verification program is written using the data verification model and generates repair suggestions based on the verification results. This ensures that the target training set that is ultimately generated can effectively support model training, further improving model training efficiency and flexibility.
[0129] Specifically, first, a classification system is constructed. According to the nature of the tasks, the original task data can be divided into common sense tasks, generation tasks, reasoning tasks, and question-answering tasks. The original constraint data can be divided into format constraints, template constraints, keyword constraints, and other categories to ensure that each constraint condition has a clear definition and scope of application. Furthermore, the original training set is expanded from multiple interaction scenario dimensions, and the data source is expanded to long text data and multi-person dialogue data, which increases the diversity and complexity of the data. For example, when expanding the scenario dialogue between family members, the arrangement and preparation of a weekend outing can be discussed, and the role allocation, activity arrangement, and emotional communication between family members can also be involved, thereby simulating more complex dialogue scenarios. Subsequently, a target multi-task dataset can be constructed, and the constraint type of the target multi-task dataset can be expanded to generate a target training set. The target training set can be directly verified using a large model to check the correctness, executability, and consistency of each task and constraint condition. For example, a program can be written for automated verification to detect errors and inconsistencies in the target training set and provide repair suggestions. Based on the verification results, the complexity and feasibility of each task and constraint are evaluated, and the target training set is optimized, including increasing diverse example data, adjusting task difficulty, and optimizing data format. Based on the above process, an extremely complex instruction constraint dataset can be constructed. This dataset not only covers a variety of data forms, such as long texts and multi-person conversations, but also includes multiple task types and constraints. It can be used to train and verify the performance of large models when processing multi-task and multi-constraint instructions, thereby helping the model to better adapt to the complex and changeable real-world application needs and improve its processing and generalization capabilities.
[0130] Figure 4 is a flow chart of a data processing method according to an embodiment of the present application, such as Figure 4 As shown, the method may include the following steps:
[0131] Step S41, obtaining target task query;
[0132] Step S42, using the target language model to process the target task query and generate a target task response; wherein the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0133] Based on the above steps S41 to S42, by obtaining the target task query, the target language model is used to perform data processing on the target task query to generate the target task reply, the target language model uses the target training set to train the initial language model, the target training set satisfies the preset data verification conditions, and can be obtained by expanding the data content of the object to be expanded in the original training set, and the object to be expanded includes at least one of the following: task type, constraint type. Thus, by expanding the task type and constraint type in the original training set, the diversity and complexity of the training data set are significantly improved, so that the training efficiency and flexibility of the model are significantly improved, and then the technical problem that the training data set provided by the related technology has low model training efficiency and poor flexibility when performing model training is solved. By expanding the task type and / or constraint type, the initial language model can be exposed to a wider and more complex instruction scene during the training process, thereby greatly enriching the training material of the model, improving the training efficiency, and further enhancing the understanding ability and adaptability of the model, especially when dealing with multi-level constraints and multi-task scenes, the performance of the model is significantly improved. In addition, the setting of preset data verification conditions ensures the quality of the expanded data and avoids the interference of invalid or redundant data on model training. As a result, the target training set can effectively train the initial language model and evolve it into the target language model, which can respond to complex target task queries more accurately and flexibly and generate high-quality task responses, thereby significantly improving the performance of the model and user experience in real application scenarios.
[0134] Figure 5 is a flow chart of another data processing method according to an embodiment of the present application, such as Figure 5 As shown, the method may include the following steps:
[0135] Step S51, obtaining commodity transaction query;
[0136] Step S52, using the target language model to perform query analysis on the commodity transaction query to obtain a virtual customer service reply; wherein the target language model is generated according to any one of the model training methods in the embodiments of the present application.
[0137] Based on the above steps S51 to S52, by obtaining commodity transaction inquiries, query analysis is performed on the commodity transaction inquiries by using the target language model to obtain virtual customer service replies, and the target language model uses the target training set to train the initial language model. The target training set satisfies the preset data verification conditions and can be obtained by expanding the data content of the object to be expanded in the original training set. The object to be expanded includes at least one of the following: task type, constraint type. Thus, by expanding the task type and constraint type in the original training set, the diversity and complexity of the training data set are significantly improved, so that the training efficiency and flexibility of the model are significantly improved, thereby solving the technical problem that the training data set provided by the related technology has low model training efficiency and poor flexibility when performing model training. By expanding the task type and / or constraint type, the initial language model can be exposed to a wider and more complex instruction scenario during the training process, thereby greatly enriching the training material of the model, improving the training efficiency, and further enhancing the understanding ability and adaptability of the model, especially when dealing with multi-level constraints and multi-task scenarios, the performance of the model is significantly improved. In addition, the setting of preset data verification conditions ensures the quality of the expanded data and avoids the interference of invalid or redundant data on model training. As a result, the target training set can effectively train the initial language model and evolve it into the target language model, which can respond to complex commodity transaction queries more accurately and flexibly and generate high-quality virtual customer service responses, thereby significantly improving the performance of the model in the virtual customer service scenario and user experience.
[0138] Figure 6 is a flow chart of another data processing method according to an embodiment of the present application, such as Figure 6 As shown, the method may include the following steps:
[0139] Step S61, obtaining a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: target task query;
[0140] Step S62, returning a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: a target task reply, the target task reply is generated by performing data processing on the target task query using a target language model, and the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0141] Based on the above steps S61 to S62, a data processing request is obtained through a first application programming interface, wherein the request data carried in the data processing request includes: a target task query, and then a data processing response is returned through a second application programming interface, wherein the response data carried in the data processing response includes: a target task reply, the target task reply is generated after data processing of the target task query using a target language model, the target language model uses a target training set to train the initial language model, the target training set satisfies a preset data verification condition, and can be obtained by expanding the data content of the object to be expanded in the original training set, and the object to be expanded includes at least one of the following: a task type, a constraint type. Thus, by expanding the task types and constraint types in the original training set, the diversity and complexity of the training data set are significantly improved, so that the training efficiency and flexibility of the model are significantly improved, thereby solving the technical problem that the training data set provided by the related technology has low model training efficiency and poor flexibility when performing model training. By expanding the task types and / or constraint types, the initial language model can be exposed to a wider range of more complex instruction scenarios during the training process, which greatly enriches the model's training materials, improves training efficiency, and further enhances the model's understanding ability and adaptability, especially when dealing with multi-level constraints and multi-task scenarios. The performance of the model has been significantly improved. In addition, the setting of preset data verification conditions ensures the quality of the expanded data and avoids the interference of invalid or redundant data on model training. In this way, the target training set can effectively train the initial language model and evolve it into a target language model, which can respond to complex target task queries more accurately and flexibly, and generate high-quality task responses, thereby significantly improving the performance of the model in real-world application scenarios and user experience.
[0142] Figure 7 is a flow chart of another data processing method according to an embodiment of the present application, such as Figure 7 As shown, the method may include the following steps:
[0143] Step S71, obtaining the currently input data processing dialogue request, wherein the request data carried in the data processing dialogue request includes: target task query;
[0144] Step S72, in response to the data processing dialogue request, returning a data processing dialogue reply, wherein the information carried in the data processing dialogue reply includes: a target task reply, the target task reply is generated after data processing of the target task query using a target language model, and the target language model is generated according to any one of the model training methods in the embodiments of the present application;
[0145] Step S73, displaying the target task response in the graphical user interface.
[0146] Based on the above steps S71 to S73, by obtaining the currently input data processing dialogue request, wherein the request data carried in the data processing dialogue request includes: target task query, and then responding to the data processing dialogue request, returning the data processing dialogue reply, wherein the information carried in the data processing dialogue reply includes: target task reply, the target task reply is generated by processing the target task query with the target language model, and finally the target task reply is displayed in the graphical user interface, the target language model uses the target training set to train the initial language model, the target training set meets the preset data verification conditions, and can be obtained by expanding the data content of the object to be expanded in the original training set, and the object to be expanded includes at least one of the following: task type, constraint type. Thus, by expanding the task type and constraint type in the original training set, the diversity and complexity of the training data set are significantly improved, so that the training efficiency and flexibility of the model are significantly improved, thereby solving the technical problems of low model training efficiency and poor flexibility in the training data set provided by the related technology when performing model training. By expanding the task types and / or constraint types, the initial language model can be exposed to a wider range of more complex instruction scenarios during the training process, which greatly enriches the model's training materials, improves training efficiency, and further enhances the model's understanding ability and adaptability, especially when dealing with multi-level constraints and multi-task scenarios. The performance of the model has been significantly improved. In addition, the setting of preset data verification conditions ensures the quality of the expanded data and avoids the interference of invalid or redundant data on model training. In this way, the target training set can effectively train the initial language model and evolve it into a target language model, which can respond to complex target task queries more accurately and flexibly, and generate high-quality task responses, thereby significantly improving the performance of the model in real-world application scenarios and user experience.
[0147] Figure 8 is a flow chart of another data processing method according to an embodiment of the present application, such as Figure 8 As shown, the method may include the following steps:
[0148] Step S81, in response to an input instruction acting on the operation interface, displaying a target task query on the operation interface;
[0149] Step S82, in response to the processing instruction acting on the operation interface, the target task reply is displayed on the operation interface; wherein the target task reply is generated after data processing of the target task query using a target language model, and the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0150] Based on the above steps S81 to S82, by responding to the input instructions acting on the operation interface, the target task query is displayed on the operation interface, and then responding to the processing instructions acting on the operation interface, the target task reply is displayed on the operation interface; wherein, the target task reply is generated after data processing of the target task query using the target language model, the target language model uses the target training set to train the initial language model, the target training set meets the preset data verification conditions, and can be obtained by expanding the data content of the object to be expanded in the original training set, and the object to be expanded includes at least one of the following: task type, constraint type. Thus, by expanding the task types and constraint types in the original training set, the diversity and complexity of the training data set are significantly improved, so that the training efficiency and flexibility of the model are significantly improved, thereby solving the technical problems of low model training efficiency and poor flexibility in the training data set provided by the related technology when performing model training. By expanding the task types and / or constraint types, the initial language model can be exposed to a wider range of more complex instruction scenarios during the training process, which greatly enriches the model's training materials, improves training efficiency, and further enhances the model's understanding ability and adaptability, especially when dealing with multi-level constraints and multi-task scenarios. The performance of the model has been significantly improved. In addition, the setting of preset data verification conditions ensures the quality of the expanded data and avoids the interference of invalid or redundant data on model training. In this way, the target training set can effectively train the initial language model and evolve it into a target language model, which can respond to complex target task queries more accurately and flexibly, and generate high-quality task responses, thereby significantly improving the performance of the model in real-world application scenarios and user experience.
[0151] 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 this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0152] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0154] According to an embodiment of the present application, a model training device for implementing the above-mentioned model training method is also provided. Fig. 9 is a structural block diagram of a model training device according to an embodiment of the present application, such as Fig. 9 As shown, the device comprises:
[0155] An acquisition module 901 is used to acquire an original training set, wherein the original training set is a single-task data set, and the single-task data set includes sample training data of a predetermined task type and constraint type;
[0156] An expansion module 902 is used to expand the data content of the object to be expanded in the original training set to generate a target training set, wherein the object to be expanded includes at least one of the following: task type, constraint type;
[0157] The training module 903 is used to train the initial language model using the target training set in response to the target training set satisfying the preset data verification condition to generate a target language model, wherein the target language model is used to perform data processing on the target task query to generate a target task response.
[0158] Optionally, the acquisition module 901 is also used to: obtain original task data and original constraint data; perform task classification on the original task data to obtain multiple task types, and perform constraint classification on the original constraint data to obtain multiple constraint types; and construct an original training set using multiple task types and multiple constraint types.
[0159] Optionally, the expansion module 902 is also used to: expand the scene of the original training set from multiple interaction scene dimensions to obtain an extended data set, wherein the multiple interaction scene dimensions include at least some or all of the following dimensions: interaction scene type, number of members participating in the interaction, and interaction rounds of members participating in the interaction; expand the data content of the objects to be expanded in the extended data set to generate a target training set.
[0160] Optionally, the expansion module 902 is also used to: obtain a single-task data set after scene expansion from the extended data set; perform task type expansion on the single-task data set after scene expansion to generate a target multi-task data set, wherein the target multi-task data set includes: multiple sub-task instructions and / or multiple extended task instructions; perform constraint type expansion on the target multi-task data set to generate a target training set.
[0161] Optionally, the expansion module 902 is also used to: expand the task type of the single-task data set after the scene expansion to generate an initial multi-task data set; perform task data verification on the initial multi-task data set according to a first preset verification condition to obtain a target multi-task data set, wherein the first preset verification condition includes: whether the task instructions to be verified in the initial multi-task data set are derived from the extended data set, determining whether the task instructions to be verified are successfully executed based on the execution result of the task instructions to be verified, and whether different task instructions to be verified are independent of each other in terms of implementation functions.
[0162] Optionally, the expansion module 902 is also used to: expand the constraint type of the target multi-task data set to generate an initial multi-task multi-constraint data set; perform constraint data verification on the initial multi-task multi-constraint data set according to a second preset verification condition to obtain a target training set, wherein the second preset verification condition includes: whether the constraints to be verified in the initial multi-task multi-constraint data set, the task instructions corresponding to the constraints to be verified, and the associated data of the task instructions are consistent, determining whether the constraints to be verified are successfully executed based on the execution results of the constraints to be verified, and whether different constraints to be verified are independent of each other in terms of implementation functions.
[0163] Optionally, the expansion module 902 is further used to: obtain a scene-expanded single-task data set from the extended data set; and perform constraint type expansion on the scene-expanded single-task data set to generate a target training set.
[0164] Optionally, the expansion module 902 is also used to: expand the constraint type of the single-task data set after the scene expansion to generate an initial multi-constraint data set; perform constraint data verification on the initial multi-constraint data set according to a second preset verification condition to obtain a target training set, wherein the second preset verification condition includes: whether the constraints to be verified in the initial multi-constraint data set, the task instructions corresponding to the constraints to be verified, and the associated data of the task instructions are consistent, determining whether the constraints to be verified are successfully executed based on the execution results of the constraints to be verified, and whether different constraints to be verified are independent of each other in terms of implementation functions.
[0165] Optionally, the expansion module 902 is also used to: obtain a single-task data set from the original training set; expand the task type of the single-task data set to generate a target multi-task data set, wherein the target multi-task data set includes: multiple sub-task instructions and / or multiple extended task instructions; expand the constraint type of the target multi-task data set to generate a target training set.
[0166] Optionally, the model training device also includes: a verification module 904, which is used to perform task and constraint verification on the target training set using a preset data verification method to obtain a verification result, wherein the preset data verification method includes one of the following: a verification method through a data verification model, a verification method through a data verification program, and the data verification program is written using the data verification model; a generation module 905, which is used to generate repair suggestions based on the verification results.
[0167] It should be noted that the acquisition module 901, expansion module 902 and training module 903 correspond to steps S21 to S23 in the above embodiment, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be part of the device and can run in the server provided in the above embodiment.
[0168] Fig.10 is a structural block diagram of a data processing device according to an embodiment of the present application, such as Fig.10 As shown, the device comprises:
[0169] Acquisition module 1001, used to acquire target task query;
[0170] The processing module 1002 is used to use the target language model to perform data processing on the target task query and generate a target task response; wherein the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0171] It should be noted that the acquisition module 1001 and the processing module 1002 correspond to steps S41 to S42 in the above embodiment, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in the server provided in the above embodiment as part of the device.
[0172] Fig.11 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Fig.11As shown, the device comprises:
[0173] Acquisition module 1101, used to obtain commodity transaction query;
[0174] The analysis module 1102 is used to use the target language model to perform query analysis on the commodity transaction query to obtain a virtual customer service reply; wherein the target language model is generated according to any one of the model training methods in the embodiments of the present application.
[0175] It should be noted that the acquisition module 1101 and the analysis module 1102 correspond to steps S51 to S52 in the above embodiment, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in the server provided in the above embodiment as part of the device.
[0176] Fig.12 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Fig.12 As shown, the device comprises:
[0177] The acquisition module 1201 is used to acquire a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: a target task query;
[0178] Return module 1202 is used to return a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: a target task reply, the target task reply is generated after data processing of the target task query using a target language model, and the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0179] It should be noted that the acquisition module 1201 and the return module 1202 correspond to steps S61 to S62 in the above embodiment, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in the server provided in the above embodiment as part of the device.
[0180] Fig.13 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Fig.13 As shown, the device comprises:
[0181] The acquisition module 1301 is used to acquire the currently input data processing dialogue request, wherein the request data carried in the data processing dialogue request includes: target task query;
[0182] A return module 1302 is used to respond to the data processing dialogue request and return a data processing dialogue reply, wherein the information carried in the data processing dialogue reply includes: a target task reply, the target task reply is generated after data processing the target task query using a target language model, and the target language model is generated according to any one of the model training methods in the embodiments of the present application;
[0183] The display module 1303 is used to display the target task response in the graphical user interface.
[0184] It should be noted that the acquisition module 1301, the return module 1302 and the display module 1303 correspond to steps S71 to S73 in the above embodiment, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be part of the device and can run in the server provided in the above embodiment.
[0185] Fig.14 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Fig.14 As shown, the device comprises:
[0186] The first display module 1401 is used to respond to the input command acting on the operation interface and display the target task query on the operation interface;
[0187] The second display module 1402 is used to respond to the processing instructions acting on the operation interface and display the target task reply on the operation interface; wherein the target task reply is generated after data processing of the target task query using a target language model, and the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0188] It should be noted that the first display module 1401 and the second display module 1402 correspond to steps S81 to S82 in the above embodiment, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in the server provided in the above embodiment as part of the device.
[0189] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in the above embodiments, as well as the application scenario and implementation process, but is not limited to the scheme provided in the above embodiments.
[0190] An embodiment of the present application can provide a data processing system, including: a client, used to send a target task query; a server, connected to the client, used to use a target language model to perform data processing on the target task query and generate a target task reply; the client is also used to output the target task reply; wherein the target language model is generated according to the model training method of any one of the embodiments of the present application.
[0191] An embodiment of the present application may provide a computing device. Fig.15 is a structural block diagram of a computing device according to an embodiment of the present application. Fig.15 As shown, the computing device may include: one or more (only one is shown in the figure) processors 152, a memory 154, a storage controller, and a peripheral interface.
[0192] The above-mentioned computing device can be understood as an integrated intelligent terminal, including but not limited to a server, a desktop computer, a PC (Personal Computer), an all-in-one model machine, a mobile phone, a tablet computer or other portable intelligent terminal, etc., and the computing device may be pre-installed with the model described in the above-mentioned embodiments of the present application.
[0193] Specifically, the computing device can pre-set multiple types of models, including but not limited to models in the fields of natural language processing, visual processing, speech processing, code processing, multimodal task processing, etc., so as to provide a variety of model choices. In different product forms, the computing device can support one or more model usage methods, including but not limited to model training, model calling, model fine-tuning, model deployment, model reasoning and application, etc. In some product forms, the computing device also supports model management, including but not limited to multi-type model management (supporting the management of multiple types of models such as discriminant and generative models), model version control (supporting the control of different model versions), model evaluation (based on model evaluation tools, evaluating the performance and effect of the model), etc. In other product forms, the computing device can also create applications based on models, provide API calling capabilities, and can call models to the created applications through API interfaces, while providing application management tools to achieve management and monitoring of applications.
[0194] Furthermore, the computing device can also include data management (supporting the creation and management of model tuning data sets), training center (providing rich training resources to help users learn and master AI technology), and basic management and control capabilities (providing enterprise-level basic management and control capabilities to ensure the security and efficient operation of the system). Through the above functions, a comprehensive, integrated AI development, training, deployment and application device is provided.
[0195] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the methods in the above embodiments. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0196] The processor may call the executable program stored in the memory through the transmission device to execute the method described in any one of the above embodiments.
[0197] It is understood by those skilled in the art that the structure shown in the figure is for illustration only, and the computing device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. The figure does not limit the structure of the above computing device. For example, the computing device may also include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or have a configuration different from that shown in the figure.
[0198] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0199] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the method provided in the above embodiment.
[0200] Optionally, in this embodiment, the above storage medium may be located in a computing device.
[0201] Optionally, in this embodiment, the computer-readable storage medium is configured to store an executable program, and when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the method described in any one of the above embodiments.
[0202] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and the computer program implements the method provided in the embodiment when executed by a processor.
[0203] The embodiments of the present application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which may be used to store a computer program, and when the computer program is executed by a processor, the method provided in the embodiments is implemented.
[0204] The embodiment of the present application further provides a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the method provided in the above embodiment is implemented.
[0205] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0206] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0207] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0208] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0209] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.
[0210] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A model training method, characterized in that: include: Acquire an original training set, wherein the original training set is a single-task data set, and the single-task data set includes sample training data of a predetermined task type and a constraint type; Expanding the data content of the objects to be expanded in the original training set to generate a target training set, wherein the objects to be expanded include at least one of the following: the task type and the constraint type; In response to the target training set satisfying a preset data verification condition, the target training set is used to train an initial language model to generate a target language model, wherein the target language model is used to perform data processing on a target task query to generate a target task response.
2. The model training method according to claim 1, characterized in that: Acquiring the original training set includes: Obtain original task data and original constraint data; Performing task classification on the original task data to obtain a plurality of task types, and performing constraint classification on the original constraint data to obtain a plurality of constraint types; The original training set is constructed using the multiple task types and the multiple constraint types.
3. The model training method according to claim 1, characterized in that: Expanding the data content of the object to be expanded in the original training set to generate the target training set includes: Expanding the original training set from multiple interaction scene dimensions to obtain an extended data set, wherein the multiple interaction scene dimensions include at least part or all of the following dimensions: interaction scene type, number of members participating in the interaction, and interaction rounds of members participating in the interaction; The data content of the object to be expanded in the expanded data set is expanded to generate the target training set.
4. The model training method according to claim 3, characterized in that: Expanding the data content of the object to be expanded in the extended data set to generate the target training set includes: Acquire a single-task dataset after scene expansion from the extended dataset; Expanding the task type of the single-task data set after the scene expansion to generate a target multi-task data set, wherein the target multi-task data set includes: a plurality of sub-task instructions and / or a plurality of extended task instructions; The target multi-task data set is subjected to constraint type expansion to generate the target training set.
5. The model training method according to claim 4, characterized in that: Expanding the task type of the single-task dataset after the scene expansion to generate the target multi-task dataset includes: Expanding the task types of the single-task dataset after the scene expansion to generate an initial multi-task dataset; The target multi-task data set is obtained by performing task data verification on the initial multi-task data set according to a first preset verification condition, wherein the first preset verification condition includes: whether the task instructions to be verified in the initial multi-task data set are derived from the extended data set, determining whether the task instructions to be verified are successfully executed based on the execution result of the task instructions to be verified, and whether different task instructions to be verified are independent of each other in terms of implementation function.
6. The model training method according to claim 4, characterized in that: Expanding the constraint type of the target multi-task data set to generate the target training set includes: Expanding the constraint types of the target multi-task data set to generate an initial multi-task multi-constraint data set; The initial multi-task multi-constraint data set is subjected to constraint data verification according to a second preset verification condition to obtain the target training set, wherein the second preset verification condition includes: whether the constraints to be verified in the initial multi-task multi-constraint data set, the task instructions corresponding to the constraints to be verified, and the associated data of the task instructions are consistent, determining whether the constraints to be verified are successfully executed based on the execution results of the constraints to be verified, and whether different constraints to be verified are independent of each other in terms of implementation functions.
7. The model training method according to claim 3, characterized in that: Expanding the data content of the object to be expanded in the extended data set to generate the target training set includes: Acquire a single-task dataset after scene expansion from the extended dataset; The constraint type is expanded on the single-task data set after the scene expansion to generate the target training set.
8. The model training method according to claim 7, characterized in that: Expanding the constraint type of the single-task dataset after the scene expansion to generate the target training set includes: Expanding the constraint types of the single-task dataset after the scenario expansion to generate an initial multi-constraint dataset; The initial multi-constraint data set is subjected to constraint data verification according to a second preset verification condition to obtain the target training set, wherein the second preset verification condition includes: whether the constraints to be verified in the initial multi-constraint data set, the task instructions corresponding to the constraints to be verified, and the associated data of the task instructions are consistent, determining whether the constraints to be verified are successfully executed based on the execution results of the constraints to be verified, and whether different constraints to be verified are independent of each other in terms of implementation functions.
9. The model training method according to claim 1, characterized in that: Expanding the data content of the object to be expanded in the original training set to generate the target training set includes: Acquire the single-task dataset from the original training set; Expanding the single-task data set with a task type to generate a target multi-task data set, wherein the target multi-task data set includes: a plurality of sub-task instructions and / or a plurality of extended task instructions; The target multi-task data set is subjected to constraint type expansion to generate the target training set.
10. The model training method according to claim 1, characterized in that: The model training method also includes: Performing task and constraint verification on the target training set by using a preset data verification method to obtain a verification result, wherein the preset data verification method includes one of the following: a verification method by a data verification model, a verification method by a data verification program, and the data verification program is written using the data verification model; A repair suggestion is generated based on the verification result.
11. A data processing method, characterized in that: include: Get the target task query; Using a target language model to process the target task query and generate a target task response; Wherein, the target language model is generated according to the model training method described in any one of claims 1 to 10.
12. A data processing method, characterized in that: include: Get commodity transaction query; Using the target language model to perform query analysis on the commodity transaction query, and obtaining a virtual customer service response; Wherein, the target language model is generated according to the model training method described in any one of claims 1 to 10.
13. A data processing method, characterized in that: include: Obtaining a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: a target task query; A data processing response is returned through a second application programming interface, wherein the response data carried in the data processing response includes: a target task reply, wherein the target task reply is generated by performing data processing on the target task query using a target language model, and the target language model is generated according to the model training method described in any one of claims 1 to 10.
14. A data processing method, characterized in that: include: Acquire the currently input data processing dialogue request, wherein the request data carried in the data processing dialogue request includes: target task query; In response to the data processing dialogue request, a data processing dialogue reply is returned, wherein the information carried in the data processing dialogue reply includes: a target task reply, wherein the target task reply is generated by performing data processing on the target task query using a target language model, wherein the target language model is generated according to the model training method according to any one of claims 1 to 10; The target task response is displayed in a graphical user interface.
15. A data processing method, characterized in that: include: In response to an input instruction acting on the operation interface, displaying a target task query on the operation interface; In response to a processing instruction acting on the operation interface, a target task reply is displayed on the operation interface; The target task reply is generated by performing data processing on the target task query using a target language model, and the target language model is generated according to the model training method described in any one of claims 1 to 10.
16. A data processing system, characterized in that: include: Client, used to send target task queries; A server, connected to the client, configured to process the target task query using a target language model and generate a target task response; The client is also used to output the target task reply; Wherein, the target language model is generated according to the model training method described in any one of claims 1 to 10.
17. An electronic device, characterized in that: include: A memory storing an executable program; A processor, used to run the program, wherein the program, when running, executes the model training method described in any one of claims 1 to 10 or the data processing method described in any one of claims 11 to 15.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein, when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the model training method described in any one of claims 1 to 10 or the data processing method described in any one of claims 11 to 15.
19. A computer program product, characterized in that It includes a computer program which, when executed by a processor, implements the model training method described in any one of claims 1 to 10 or the data processing method described in any one of claims 11 to 15.
Citation Information
Patent Citations
Material generation method, model training method, feature extraction method and device
CN117194638A
Model training method, data processing method, electronic equipment and storage medium
CN118446338A
Model training method, data processing method, electronic equipment and storage medium
CN118886519A
Training and deployment of image generation models
US11995803B1
Method and system for controlling distributions of attributes in language models for text generation
US20220108081A1
Cited By
Model training method, task processing method and system, electronic equipment, storage medium and computer program product
CN121352074A