Model training method, data processing method, system and storage medium

By augmenting the original training set, generating the target training set and training the target language model, the problem of low efficiency and poor flexibility in the existing technology is solved, and more efficient and flexible model training and application is achieved.

CN119884331BActive Publication Date: 2025-08-19ALIBABA (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510386313.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-08-19
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

The training data sets in the prior art have a single data format and limited number of constraints, resulting in low model training efficiency and poor flexibility, making it difficult to adapt to complex and changeable application scenarios.

Method used

By obtaining the original training set and augmenting its data content, adding task types and constraint types, generating the target training set, and training the initial language model after the preset verification conditions are met to generate the target language model.

Benefits of technology

It significantly improves the diversity and complexity of the training data set, improves the training efficiency and flexibility of the model, enables it to respond to complex task queries more accurately and flexibly, and improves the performance and user experience of the model in practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884331B_ABST
    Figure CN119884331B_ABST
Patent Text Reader

Abstract

The present application discloses a model training method, a data processing method, a system and a storage medium, which relate to large model technology and data processing fields. The method comprises: 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 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; in response to the target training set meeting the preset data verification conditions, 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. The present application solves the technical problem that the training data set provided by the related art has low model training efficiency and poor flexibility when performing model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of large-scale model technology and data processing, 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 capabilities and wide applicability. However, as the application scenarios deepen, the number of tasks faced by large models has not only increased, but their complexity and constraints have also increased. The traditional single-task, simple instruction dataset construction method has been unable to adapt to the needs of modern model training. Some datasets have been developed in related technologies to evaluate the model's ability to follow instructions. Some of these datasets can introduce multiple types of fine constraints, thereby improving the model's flexibility and accuracy when executing instructions. However, the data format of the dataset is too simple, mainly limited to plain text, and the number of constraints is relatively small; other datasets focus on the Chinese environment. Although the number of constraints has been increased, they are still limited to single-task evaluation. Therefore, the datasets in related technologies, due to the limitations of a single data format, a limited number of constraints, and single-task evaluation, further affect the comprehensiveness and depth of model training, resulting in low model training efficiency and poor flexibility.

[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. 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 relevant technology.

[0005] According to one aspect of an embodiment of the present application, a model training method is provided, including: 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 response; 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, and 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 acting on the operation interface; displaying a target task reply on the operation interface in response to a processing instruction acting 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.

[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 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.

[0012] According to another aspect of an embodiment 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 of 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, which 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 methods in various embodiments of the present application.

[0014] According to another aspect of the embodiments of the present application, a computer program product is further provided, including a computer program, which implements the methods in various embodiments of the present application when executed by a processor.

[0015] According to another aspect of an embodiment of the present application, a computer program product is further 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 further provided, which implements the methods in various embodiments of the present application when executed by a processor.

[0017] In an embodiment of the present application, by obtaining an original training set, and then expanding the data content of the object to be expanded in the original training set, a target training set is generated, 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 thus solving the technical problem that the training data set provided by the related art 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 model's understanding ability and adaptability, especially when dealing with multi-level constraints and multi-task scenarios, 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 is used to effectively train the initial language model, allowing it to evolve into a target language model that 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-world application scenarios.

[0018] It is easy to notice that the above general description and the following detailed description are merely 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 This 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 for 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 flowchart of another data processing method according to an embodiment of the present application;

[0025] Figure 6 is a flowchart of another data processing method according to an embodiment of the present application;

[0026] Figure 7 is a flowchart of another data processing method according to an embodiment of the present application;

[0027] Figure 8 is a flowchart of another data processing method according to an embodiment of the present application;

[0028] Figure 9 is a structural block diagram of a model training device according to an embodiment of the present application;

[0029] Figure 10 is a structural block diagram of a data processing device according to an embodiment of the present application;

[0030] Figure 11 is a structural block diagram of another data processing device according to an embodiment of the present application;

[0031] Figure 12 is a structural block diagram of another data processing device according to an embodiment of the present application;

[0032] Figure 13 is a structural block diagram of another data processing device according to an embodiment of the present application;

[0033] Figure 14 is a structural block diagram of another data processing device according to an embodiment of the present application;

[0034] Figure 15 This 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 present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this 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 sequential order. 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 a sequence 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 typically contain hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. The large model can also be called a foundation model. It is pre-trained on 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 has good generalization capabilities. For example, large-scale language models (LLMs) and multi-modal pre-training models are used.

[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. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, etc. It can also be widely used in natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. 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 interpretations:

[0040] Instructions are task descriptions or commands that are input into a large model to guide the model in performing a specific function or task. For example, in a language generation task, an instruction might be to ask the model to generate a paragraph related to the input topic.

[0041] Constraints are a set of rules or conditions that must be followed when executing or completing a task. In the training and application of large models, constraints can be logical rules, boundary conditions, regulatory requirements, or business logic. These constraints ensure that the model produces the expected output 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 large models and the limited computing resources of mobile terminals, 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 this. Figure 1 In the illustrated application scenario, the large model is deployed on a server 10. The server 10 can be connected to one or more client devices 20 via a local area network, a wide area network, the Internet, or other types of data networks. The client devices 20 herein may include, but are not limited to, smartphones, tablet computers, laptops, PDAs, personal computers, smart home devices, and in-vehicle devices. The client devices 20 can interact with users via a graphical user interface to access the large model and thereby implement the methods provided in the embodiments 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, the model all-in-one machine has multiple models built in, and the user can choose to adjust with a model as needed to obtain the user's own model, so that the high-performance computing unit built in 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 in the large model all-in-one machine, so that the high-performance computing unit built in 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 upload their own datasets through the client. This dataset is then sent to the server, which then adjusts the pre-trained model using the dataset to create the user's own model, which can then be deployed in production. To facilitate user model adjustment needs, the server provides a complete set of adjustment tools, development frameworks, and processes, supporting a variety of adjustment strategies, making the adjusted model more adaptable to different application fields and highly customized.

[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] In 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 original training set described above is a single-task dataset used to train the initial language model before data augmentation begins. Single-task datasets typically contain sample training data of specific task types and constraint types, providing foundational learning material for the initial language model. There are various ways to obtain the original training set. For example, for high-quality but limited-scale datasets, domain experts can annotate the data to clearly define the task and constraint types. Alternatively, large amounts of text, conversations, images, and other data can be collected from the internet and then filtered and annotated to form a dataset with clear tasks and constraints. Leveraging existing models or algorithms, data containing specific task and constraint types can be automatically generated, allowing for rapid expansion of the dataset. The original training set can also be obtained by extracting data from a database and annotating it with the appropriate task and constraint types based on the specific application scenario and task requirements.

[0052] The above-mentioned 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 systems, 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, thereby improving the accuracy and professionalism of the output.

[0053] Each data sample in the original training set revolves around a single task, meaning each sample serves only one type of task and does not involve a combination of multiple tasks. This allows the model to focus on learning and mastering a specific task in the early stages of training. For example, an original training set focuses on the task of "text translation," and constraints may include "maintaining the grammatical structure of the original text" and "avoiding 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 aforementioned constraints must be adhered to during the translation process. Although the original training set can provide precise and focused learning material in the early stages of model training, helping the model quickly establish an understanding and execution capability for specific tasks, as model capabilities develop, it needs to expand from a single task to multiple tasks and complex constraints to accommodate 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 augmentation enriches the content and structure of a dataset by adding new data samples and / or adding additional constraints to the original training set. For large models, data augmentation not only increases the amount of data but, more importantly, increases its diversity and complexity. This allows the model to learn a wider range of tasks and constraints during training, improving its generalization and ability to handle complex scenarios.

[0055] Specific operations for data content expansion include, but are not limited to, task expansion, constraint addition, data scenario enrichment, and example addition. When expanding tasks, you can generate related subtasks or extended tasks based on a single task in the original training set. For example, expanding "translating English sentences into Chinese" to "translating English sentences into French" or "extracting keywords from English sentences" can be done. When adding constraints, you can add more constraints to each task to ensure that the model adheres to more rules or standards when performing the task, such as adding input length limits, formatting requirements, and specific vocabulary avoidance. When enriching data scenarios, you can expand the scenarios in the original training set from simple text interactions to more complex conversation scenarios, such as image descriptions, to increase the dimensionality and richness of the data. For example, if the original training set only contains plain text and two-person conversation data, you can expand it to include multi-person conversation scenarios, covering 20 daily life scenarios and supporting conversations with up to five people. When increasing examples, you can add more example data for 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 aforementioned preset data validation conditions are a set of standards and rules to ensure the quality of the target training set. They aim to verify its suitability for model training, including but not limited to data integrity, constraint consistency, task diversity, data representativeness, and output quality. Data integrity ensures that each data sample has complete and correct input and output, preventing the initial language model from encountering erroneous or incomplete data during training. Constraint consistency ensures that all constraints in the dataset match the task type and that there are no conflicts or duplications between constraints, ensuring that the initial language model correctly understands and executes the constraints. Task diversity assesses the diversity of task types in the dataset, including task complexity and the coverage of task scenarios, ensuring that the initial language model learns diverse skills and knowledge. Data representativeness ensures that the dataset represents real-world application scenarios, covering common tasks and diverse constraints, thereby improving the generalization ability of the initial language model. Output quality evaluates the quality of the output generated by the model based on the target training set using preset evaluation methods, including accuracy, coherence, and rationality, to verify the validity 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. For example, 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. The initial language model is used as the starting point for training, and 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 its processing capabilities for 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 based on 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 it passes all tests and evaluations, that is, it reaches the expected performance indicators, the trained and optimized model is called the target language model.

[0058] The target language model is used to process data for target task queries to generate target task responses. Target task queries can be diverse, covering multiple domains 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, and creativity and artistic creation queries. Target task responses are the specific results generated by the target language model for each of these queries. These responses must not only align with the intent of the task but also strictly adhere to constraints to ensure accuracy, coherence, and applicability. For example, for semantic understanding and translation queries, the target language model should generate grammatically correct, semantically accurate, and stylistically appropriate translations. For dialogue management and interaction queries, the target language model should generate logically coherent, polite, and conversationally engaging responses. For knowledge graph queries, the target language model should provide responses that contain correct and complete information. The target language model is capable of handling complex tasks under multiple constraints, providing users with more intelligent and personalized services and improving performance and user experience in real-world applications.

[0059] Based on the above steps S21 to S23, by obtaining the original training set, the data content of the objects to be expanded in the original training set is expanded to generate a target training set, where the objects to be expanded include 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 response, thereby significantly improving the diversity and complexity of the training data set by expanding the task types and constraint types in the original training set, so that the training efficiency and flexibility of the model are significantly improved, thereby solving the technical problem of low model training efficiency and poor flexibility in the training data set provided by the related art when performing model training. By expanding the task type and / or constraint type, the initial language model can be exposed to a wider range and more complex instruction scenarios during the training process, thereby greatly enriching the training material of the model, improving the training efficiency, and further enhancing the model's understanding ability and adaptability, especially when processing multi-level constraints and multi-task scenarios, the performance of the model is significantly improved. Furthermore, the establishment of pre-set data validation conditions ensures the quality of the expanded data and prevents invalid or redundant data from interfering with model training. This allows the target training set to effectively train the initial language model, allowing it to evolve into the target language model. This model can more accurately and flexibly respond to complex target task queries and generate high-quality responses, significantly improving the model's performance and user experience in real-world application scenarios.

[0060] It should be noted that the model training method in the embodiments of the present application can be used, but is not limited to, 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 following is a further introduction to the model training method in the embodiments of the present application.

[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 raw task data mentioned above can be an initial data set containing various task instructions, specifically derived from different scenarios and applications, such as text translation, sentiment analysis, and information extraction. Raw task data, unclassified or unprocessed, serves as the foundation for building complex task datasets. The raw constraint data defines the rules or conditions to be followed when executing the task, such as grammatical structure, vocabulary selection, and logical rules.

[0067] Furthermore, the original task data can be analyzed and divided into different task types based on their functions, goals, and execution contexts. For example, text translation, text summarization, sentiment analysis, etc. can be classified as different tasks to facilitate the subsequent construction of highly targeted datasets. When summarizing the original constraint data, it can be divided into multiple constraint categories based on its type and application scenario, such as format constraints, content constraints, logical constraints, etc. For example, by performing task classification on the original task data, 10 task types are obtained, and by performing constraint classification on the original constraint data, 26 different types of constraints are obtained. After obtaining multiple task types and multiple constraint types, the 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 embodiment, by obtaining 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, using multiple task types and multiple constraint types to quickly construct the original training set, which is used as the basis for data content expansion, thereby improving the acquisition speed of the target training set.

[0069] In an optional embodiment, in step S22, expanding the data content of the objects 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 scenario dimensions to obtain an extended data set, where the multiple interaction scenario dimensions include at least some or all of the following dimensions: interaction scenario type, number of members participating in the interaction, and interaction rounds of members participating in the interaction; the data content of the objects to be expanded in the extended data set is expanded to generate a target training set.

[0071] Specifically, the original training set is expanded across multiple interaction scenario dimensions to create a richer and more comprehensive dataset, enhancing the initial language model's ability to handle complex and changing interaction scenarios. These dimensions can include at least some or all of the following: interaction scenario type, number of participants, and number of interaction turns.

[0072] The aforementioned interaction scenarios can encompass various contexts or domains, such as everyday conversations, business meetings, customer service, medical consultations, and legal discussions. Each scenario type has its own unique task requirements and constraints. For example, in customer service scenarios, the target language model must adhere to the constraints of politeness and problem-solving; whereas in medical consultations, the target language model must adhere to the constraints of accurate terminology and patient privacy.

[0073] The number of participants in the interaction refers to the number of individuals participating in a single conversation. This extends from a single person interacting with the model to multi-party conversations involving two, three, or even more participants. Increasing the number of participants not only introduces more perspectives and information but also increases the complexity and uncertainty of the conversation, helping the model learn to perform tasks and integrate information in group settings.

[0074] The aforementioned interaction turns refer to the number of times information is exchanged between participating members during an interaction. This ranges from simple single-round question-and-answer scenarios to complex scenarios involving multiple rounds of dialogue, information feedback, and iterative corrections. Increasing the number of interaction turns can simulate a more natural conversational flow, allowing the model to learn to maintain context, understand conversation history, and generate appropriate responses in subsequent conversations.

[0075] When expanding the original training set, including but not limited to expanding scenario types, the number of participants, and the number of interaction rounds, additional data covering the aforementioned different interaction scenarios can be collected and generated. This can include acquiring conversation data from multiple channels, such as social media, news reports, and professional forums, or generating simulated conversations through role-playing. This ensures that sufficient data is available for each interaction scenario type to train the initial language model, enabling it to adapt to tasks in various environments.

[0076] When expanding the number of participants, the dataset can be expanded by generating or collecting multi-person conversation data based on the original single- or two-person conversation data. Specifically, conversation generation models, such as large models, can be used to create virtual multi-person conversation scenarios based on the scenario type and task requirements. For example, in a business meeting scenario, conversations between different roles, such as managers, employees, and customers, covering topics such as meeting arrangements, project discussions, and customer feedback can be simulated.

[0077] When expanding the number of interaction rounds, multiple rounds of dialogue content can be added to each conversation 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 and the task requirements. For example, if the task is "customer service," the first round of dialogue can ask the user about the nature of the problem. In subsequent rounds, based on the information provided by the user, more specific questions can be asked or preliminary solutions can be provided.

[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 to obtain a target language model. This promotes the target language model's task execution capability in complex environments, further improves 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 objects 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; expand the task type of the single-task dataset after scene expansion to generate a target multi-task dataset, wherein the target multi-task dataset includes: multiple subtask instructions and / or multiple extended task instructions; expand the constraint type of the target multi-task dataset to generate a target training set.

[0082] These single-task datasets are designed to train an initial language model to perform specific tasks, such as text classification, sentiment analysis, translation, and question-answering. Each data sample typically contains a clear task instruction and corresponding input-output pairs, aiming to enable the initial language model to achieve high specialization and accuracy on a specific task.

[0083] When obtaining a single-task dataset from an extended dataset, you can filter out data that only contains data from a single task type. For example, if the extended dataset covers multiple tasks such as translation, question answering, and sentiment analysis, then you can select data from all translation tasks and remove samples related to other tasks to obtain a single-task dataset. This can be achieved by classifying the data in the extended dataset by task label and then selecting all data under a specific label.

[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 model's multi-task processing capabilities.

[0085] For example, during the task type expansion process, natural language generation techniques or domain expert knowledge can be used to add subtask instructions or extended task instructions related to the original single task to each sample in a single-task dataset, thereby generating a target multi-task dataset. For example, in a translation task, in addition to literal translation, subtask instructions such as contextual interpretation, 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 rephrasing, background information provision, and answer verification can 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 subtasks 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, thereby improving the accuracy and applicability of the output.

[0088] For example, during the constraint expansion process, multiple constraint types can be added to each task instruction based on the target multi-task dataset, such as format constraints, logic constraints, and industry standard constraints. This can be achieved through expert definition, rule-based methods, or intelligent generation using large models, ensuring that each task instruction is accompanied by a clear, specific, and diverse description of the constraints. During training, the initial language model can learn how to complete the task requirements while complying with these constraints.

[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 the 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, 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 the task 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 task-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 expanding the single-task dataset by task types to generate an initial multi-task dataset, the initial multi-task dataset is subjected to task data verification according to the first preset verification condition to ensure that the generated initial multi-task dataset meets the standards of high-quality training data. Task data verification includes but is not limited to source data traceability verification, executable verification, and independence verification.

[0094] For example, source data traceability verification is primarily used to determine whether the task instructions to be verified in the initial multi-task dataset originate from the extended dataset. During source data traceability verification, it is first necessary to confirm whether each task instruction to be verified in the initial multi-task dataset can be directly traced back to one or more source data samples in the extended dataset. This verification process can be implemented through data identification, data labeling, or direct text matching, ensuring that all newly generated task instructions are based on the original data, maintaining the consistency and validity of the dataset.

[0095] Exemplarily, the executable check mainly determines whether the task instruction to be verified is successfully executed based on the execution result of the task instruction to be verified. In the process of executable check, the quality of the task to be verified 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 verified and the output meets expectations, it can be determined that the task instruction to be verified has passed 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, during the independence check, it is necessary to check whether the different task instructions to be checked are independent of each other in terms of implementation function, that is, the completion of one task should not affect the execution or results 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 goals, 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 input format, output format and task objectives.

[0098] Based on the above optional embodiment, 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. This 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 dataset 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 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; based on the execution results of the constraints to be verified, it is determined 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 types 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. 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 duplicate constraints 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] Furthermore, after generating the initial multi-task multi-constraint dataset, constraint data verification is performed on the initial multi-task multi-constraint dataset 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] For example, consistency checking is primarily used to determine the consistency of the constraints to be verified, the task instructions corresponding to the constraints to be verified, and the associated data of the task instructions in the initial multi-task, multi-constraint dataset. The verification process specifically checks whether the constraints are properly applied to the task instructions and whether the associated data conforms to the expected input format of the task instructions and constraints. Consistency checking helps eliminate invalid or erroneous constraints, maintaining the purity and accuracy of the dataset.

[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 embodiment, 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. In this way, a high-quality target training set can be obtained, 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 objects to be expanded in the expanded data set to generate a target training set includes:

[0108] Obtain a scene-expanded single-task dataset from the extended dataset; perform constraint type expansion on the scene-expanded single-task dataset 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 filtered according to a specific task type. A single-task dataset focuses on a specific task, such as text translation, question answering, or text classification, and every piece of data in the single-task dataset is closely related to that 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. 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 "adhering to Chinese grammatical specifications" can be added. The generation of constraints should take into account the actual needs and application scenarios of the task, ensuring that the rules and conditions followed by each task during execution fully cover the possible situations encountered. 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, by obtaining a single-task dataset after scenario expansion from the extended dataset, and then expanding the constraint type of the single-task dataset after scenario expansion, a target training set is generated. 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, expanding the constraint type of the single-task dataset after the scene expansion to generate a target training set includes:

[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, it is determined 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 scenario-expanded single-task dataset, an initial multi-constraint dataset is generated, significantly increasing 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 training, thereby improving its performance and adaptability in practical applications. Expanding the constraint types to cover multiple aspects such as logic, format, style, and legal requirements encourages the initial language model to understand the comprehensive requirements of the task and improves the accuracy and professionalism of its output.

[0115] Furthermore, when the constraint data of the initial multi-constraint dataset is verified 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 dataset 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 constraint data of the initial multi-constraint data set is verified according to the second preset verification condition. The target training set finally generated will be more suitable for training to obtain 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 objects to be expanded in the original training set to generate the target training set includes:

[0118] A single-task dataset is obtained from an original training set; the single-task dataset is expanded with a task type to generate a target multi-task dataset, wherein the target multi-task dataset includes: a plurality of subtask instructions and / or a plurality of extended task instructions; and the target multi-task dataset is expanded with a constraint type to generate a target training set.

[0119] Specifically, a single-task dataset can be obtained from the original training dataset. By leveraging the generative capabilities of the large model, each task instruction in the single-task dataset can be transformed or expanded 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 the target multi-task dataset.

[0120] Furthermore, the constraint types of the target multi-task dataset are expanded to generate a target training set. Utilizing the natural language understanding capabilities of the large model, five to ten constraints are generated for each task instruction. These constraints can cover all important aspects of task execution. The generated constraints need to be verified to ensure their consistency with the task instructions and associated data, their enforceability, and their independence from each other. 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 that enable the model to pay attention to 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 embodiment, 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 aforementioned data validation model can be used to evaluate the correctness and effectiveness of task instructions and constraints. The data validation model can be constructed based on rules such as regular expressions and logical expressions, or it can be a machine learning model such as a classifier or sequence model, used to identify whether task instructions meet constraints and whether the output meets expectations. Each task instruction and constraint in the target training set is input into the data validation model, which outputs a validation result indicating whether the task instruction and constraint meet the preset criteria, including but not limited to whether it is executable, consistent with the constraints, and whether there is any conflict or redundancy with other constraints.

[0124] The aforementioned data validation program is written using a data validation model. This typically involves defining the data validation program's input and output formats, writing code to check the consistency of task instructions and constraints, and implementing validation scripts that address logic rules, formatting requirements, and grammatical correctness. The data validation program can verify the consistency, enforceability, and independence of task instructions and constraints. For example, the data validation program needs to check whether the output of a task instruction complies with the specified constraints, while also ensuring that each constraint does not conflict with other constraints.

[0125] The target training set data is fed 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 data item and generates a validation result, which includes but is not limited to the validation status of each task instruction and constraint.

[0126] Furthermore, based on the verification results, the main issues in the target training set can be summarized, such as unclear task instructions, conflicting constraints, and incorrect data formats. Furthermore, remediation strategies can be developed for the identified issues. For example, in the case of unclear task instructions, the task instructions can be redefined to clarify the input and output formats and objectives; in the case of conflicting constraints, the conflicting constraints need to be adjusted or deleted; and in the case of data format errors, the data format should be corrected to ensure data consistency and standardization. Based on these remediation strategies, specific remediation suggestions can be generated. The remediation suggestions can detail which data needs to be modified, how to modify it, and the expected effects of the modifications. For example, it may be recommended to add example data to help the initial language model better understand the task instructions, or it may be recommended to adjust the task difficulty to ensure that the training data is practical and valuable. The remediation suggestions are applied to the target training set, and the dataset is revised and iterated multiple times until it 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 This is a schematic diagram of a target training set creation process 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. 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 dataset, 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. A single-task dataset after scene expansion is obtained from the extended dataset, and then the task type expansion is performed on the single-task dataset after scene expansion to generate a target multi-task dataset. The target multi-task dataset includes: multiple sub-task instructions and / or multiple extended task instructions. Finally, the constraint type expansion is performed on the target multi-task dataset to generate a target training set. In addition, the preset data verification method can be used to perform task and constraint verification on the target training set to obtain verification results. The preset data verification method includes 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 finally generated can effectively support model training, further improving the efficiency and flexibility of model training.

[0129] Specifically, a classification system is first constructed. Based on the nature of the tasks, the original task data can be categorized into common sense tasks, generation tasks, reasoning tasks, and question-answering tasks. The original constraint data can also be categorized into format constraints, template constraints, and keyword constraints, ensuring that each constraint has a clear definition and scope of application. Furthermore, the original training set is expanded across multiple interaction scenarios, expanding the data source to include long text data and multi-person conversations, increasing the data diversity and complexity. For example, a conversation scenario between family members can be expanded to include discussions about weekend outing arrangements and preparations, as well as role allocation, activity arrangements, and emotional exchanges between family members. This allows for the simulation of more complex conversational scenarios. Subsequently, a target multi-task dataset is constructed and the constraint types are expanded to generate a target training set. Using the large model, the target training set can be directly verified to check the correctness, feasibility, and consistency of each task and constraint. For example, a program can be written for automated verification to detect errors and inconsistencies in the target training set and provide remediation suggestions. Based on the verification results, the complexity and feasibility of each task and constraint are assessed, and the target training set is optimized by adding more diverse example data, adjusting task difficulty, and optimizing the 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 better adapt to the complex and changing 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: Use 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 a target task response. 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. 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 problem of low model training efficiency and poor flexibility of the training data set provided by the related technology when performing model training. By expanding the task type and / or constraint type, the initial language model can be exposed to a wider range and more complex instruction scenarios during the training process, thereby greatly enriching the training materials of the model, improving the training efficiency, and further enhancing the model's understanding ability and adaptability. In particular, when dealing with multi-level constraints and multi-task scenarios, the performance of the model is significantly improved. Furthermore, the establishment of pre-set data validation conditions ensures the quality of the expanded data and prevents invalid or redundant data from interfering with model training. This allows the target training set to effectively train the initial language model, allowing it to evolve into the target language model. This model can more accurately and flexibly respond to complex target task queries and generate high-quality task responses, significantly improving the model's performance and user experience in real-world 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: Use the target language model to perform query analysis on the commodity transaction query to obtain a virtual customer service response; wherein the target language model is generated according to the model training method of any one of the embodiments of the present application.

[0137] Based on the above steps S51 to S52, by obtaining a commodity transaction query, query analysis is performed on the commodity transaction query using a target language model to obtain a virtual customer service response. The target language model uses a 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 objects to be expanded in the original training set. The objects to be expanded include at least one of the following: task type and 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 of low model training efficiency and poor flexibility of the training data set provided by the related art 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 and more complex instruction scenarios during the training process, thereby greatly enriching the training materials of the model, improving training efficiency, and further enhancing the model's understanding ability and adaptability. In particular, when dealing with multi-level constraints and multi-task scenarios, the performance of the model is significantly improved. Furthermore, the use of pre-set data validation conditions ensures the quality of the expanded data and prevents invalid or redundant data from interfering with model training. This allows the target training set to effectively train the initial language model, allowing it to evolve into the target language model. This model can more accurately and flexibly respond to complex commodity transaction queries and generate high-quality virtual customer service responses, significantly improving the model's performance and user experience in virtual customer service scenarios.

[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 the 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.

[0141] Based on the above steps S61 to S62, a data processing request is obtained through the 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 the 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 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: 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 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, thereby greatly enriching the model's training materials, improving training efficiency, and further enhancing the model's understanding ability and adaptability. In particular, when dealing with multi-level constraints and multi-task scenarios, the model's performance has been significantly improved. In addition, the setting of preset data verification conditions ensures the quality of the expanded data and avoids interference with model training by invalid or redundant data. In this way, the target training set can effectively train the initial language model, allowing it to evolve 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 model's performance and user experience in real-world application scenarios.

[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, a data processing dialogue reply is returned, wherein the information carried in the data processing dialogue reply includes: a target task reply, which is generated by processing the target task query using a target language model, where the target language model is generated according to any one of the model training methods of the embodiments of the present application;

[0145] Step S73: Display the target task response in the graphical user interface.

[0146] Based on steps S71 to S73, a currently input data processing dialogue request is obtained, wherein the request data carried in the data processing dialogue request includes a target task query. Then, in response to the data processing dialogue request, a data processing dialogue reply is returned. The data processing dialogue reply includes a target task reply, which is generated by processing the target task query using a target language model. The target task reply is then displayed in a graphical user interface. The target language model is trained on an initial language model using a target training set. The target training set satisfies preset data validation conditions and can be obtained by expanding the data content of an object to be expanded in the original training set. The object to be expanded includes at least one of the following: a task type and a constraint type. By expanding the task types and constraint types in the original training set, the diversity and complexity of the training dataset are significantly increased, thereby significantly improving the training efficiency and flexibility of the model. This addresses the technical issues of low model training efficiency and poor flexibility associated with training datasets provided in related technologies during 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, thereby greatly enriching the model's training materials, improving training efficiency, and further enhancing the model's understanding ability and adaptability. In particular, when dealing with multi-level constraints and multi-task scenarios, the model's performance has been significantly improved. In addition, the setting of preset data verification conditions ensures the quality of the expanded data and avoids interference with model training by invalid or redundant data. In this way, the target training set can effectively train the initial language model, allowing it to evolve 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 model's performance and user experience in real-world application scenarios.

[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 the 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 objects to be expanded in the original training set, and the objects to be expanded include 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 of 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, thereby greatly enriching the model's training materials, improving training efficiency, and further enhancing the model's understanding ability and adaptability. In particular, when dealing with multi-level constraints and multi-task scenarios, the model's performance has been significantly improved. In addition, the setting of preset data verification conditions ensures the quality of the expanded data and avoids interference with model training by invalid or redundant data. In this way, the target training set can effectively train the initial language model, allowing it to evolve 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 model's performance and user experience in real-world application scenarios.

[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 this application is not limited by the order of the actions described, because according to this 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 this application.

[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus the necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of this 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. Figure 9 This is a structural block diagram of a model training device according to an embodiment of the present application. Figure 9 As shown, the device includes:

[0155] An acquisition module 901 is configured to acquire an original training set, wherein the original training set is a single-task dataset, and the single-task dataset includes sample training data of predetermined task types and constraint types;

[0156] An expansion module 902 is configured to expand 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 and 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 conditions 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 dataset after scene expansion from the extended dataset; expand the task type of 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; expand the constraint type of the target multi-task dataset 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 scenario 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 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.

[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 configured to: obtain a scene-expanded single-task dataset from the expanded dataset; and perform constraint type expansion on the scene-expanded single-task dataset 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 scenario 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. The examples and application scenarios implemented by the three 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. The above modules can also be part of the device and can run in the server provided in the above embodiment.

[0168] Figure 10 is a structural block diagram of a data processing device according to an embodiment of the present application, such as Figure 10 As shown, the device includes:

[0169] Acquisition module 1001, used to obtain target task query;

[0170] The processing module 1002 is used to use 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.

[0171] It should be noted that the acquisition module 1001 and processing module 1002 correspond to steps S41 to S42 in the above embodiment. 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. The above modules can also be part of the device and can run in the server provided in the above embodiment.

[0172] Figure 11 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Figure 11As shown, the device includes:

[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 and obtain a virtual customer service response; wherein the target language model is generated according to the model training method of any one of the embodiments of the present application.

[0175] It should be noted that the acquisition module 1101 and analysis module 1102 correspond to steps S51 and S52 in the above embodiment. 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. The above modules can also be part of the device and run on the server provided in the above embodiment.

[0176] Figure 12 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Figure 12 As shown, the device includes:

[0177] The acquisition module 1201 is configured 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, which 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.

[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. 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. The above modules can also be part of the device and run on the server provided in the above embodiment.

[0180] Figure 13 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Figure 13 As shown, the device includes:

[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 configured 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, which is generated by processing the target task query using a target language model, where 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, return module 1302, and display module 1303 correspond to steps S71 to S73 in the above embodiment. The examples and application scenarios implemented by the three 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. The above modules can also be part of the device and run on the server provided in the above embodiment.

[0185] Figure 14 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Figure 14 As shown, the device includes:

[0186] The first display module 1401 is used to respond to input instructions 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 the 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 and S82 in the above embodiment. 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. The above modules can also be part of the device and run on the server provided in the above embodiment.

[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. Figure 15 This is a structural block diagram of a computing device according to an embodiment of the present application. Figure 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 can be pre-installed with the model described in the above-mentioned embodiment of this application.

[0193] Specifically, the computing device can pre-install multiple types of models, including but not limited to models in the fields of natural language processing, visual processing, speech processing, code processing, and multimodal task processing, thereby providing a diverse selection of models. 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 discriminants and genesis), model version control (supporting the control of different model versions), model evaluation (based on model evaluation tools to evaluate the performance and effectiveness of the model), etc. In other product forms, the computing device can also create applications based on the model and provide API calling capabilities. The model can be called into the created application through the API interface, and application management tools are provided to achieve management and monitoring of the application.

[0194] Furthermore, the computing device can also include data management (supporting the creation and management of model tuning data sets), a 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. 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 high-speed random access memory, and may also include 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 located 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] Those skilled in the art will appreciate that the structure shown in the figure is merely illustrative, and the computing device may also be a smartphone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal device. This figure does not limit the structure of the computing device described above. For example, the computing device may include more or fewer components (e.g., a network interface, a display device, etc.) than shown in the figure, or may have a configuration different from that shown in the figure.

[0198] A person skilled in the art will 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, which 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 when the computer program is executed by a processor, the method provided in the embodiment is implemented.

[0203] The embodiments of the present application further 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 that, when executed by a processor, implements the method provided in the embodiments above.

[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 focus. 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. In actual implementation, there may be other division methods, such as 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 separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0208] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or 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 existing technology, 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 and includes a number of instructions for enabling 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, magnetic disk or optical disk, etc. Various media that can store program code.

[0210] The above is only a preferred embodiment 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: Obtaining an original training set, wherein the original training set is a single-task dataset, the single-task dataset comprising sample training data of predetermined task types and constraint types, and the sample training data in the single-task dataset is designed around a single type of task; Performing data content expansion on 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 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, and the preset data verification condition is used to verify whether the data quality of the target training set is suitable for training the initial language model from multiple dimensions, the multiple dimensions including: data integrity, constraint consistency, task diversity, data representativeness, and output quality; The step of 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 based on multiple interaction scenario dimensions to obtain an expanded data set, wherein the multiple interaction scenario dimensions include at least some or all of the following dimensions: interaction scenario type, number of members participating in the interaction, and interaction rounds of the members participating in the interaction; Performing data content expansion on the objects to be expanded in the expanded data set to generate the target training set, wherein the data content expansion includes the following operations: task expansion, constraint addition, and example addition.

2. The model training method according to claim 1, characterized in that Obtaining 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 expanded data set to generate the target training set includes: Acquire a scene-expanded single-task dataset from the extended dataset; Expanding the task type of the single-task dataset after the scenario expansion to generate a target multi-task dataset, wherein the target multi-task dataset includes: a plurality of subtask instructions and / or a plurality of extended task instructions; The target multi-task dataset is subjected to constraint type expansion to generate the target training set.

4. The model training method according to claim 3, 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 scenario expansion to generate an initial multi-task dataset; The initial multi-task data set is subjected to task data verification according to a first preset verification condition to obtain the 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 function.

5. The model training method according to claim 3, characterized in that: Expanding the constraint type of the target multi-task dataset to generate the target training set includes: Expanding the constraint types of the target multi-task dataset to generate an initial multi-task multi-constraint dataset; 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 constraint conditions to be verified in the initial multi-task multi-constraint data set, the task instructions corresponding to the constraint conditions to be verified, and the associated data of the task instructions are consistent; based on the execution results of the constraint conditions to be verified, it is determined whether the constraint conditions to be verified are successfully executed; and whether different constraint conditions to be verified are independent of each other in terms of implementation functions.

6. The model training method according to claim 1, characterized in that Expanding the data content of the object to be expanded in the expanded data set to generate the target training set includes: Acquire a scene-expanded single-task dataset from the extended dataset; The constraint type is expanded on the single-task dataset after the scene expansion to generate the target training set.

7. The model training method according to claim 6, 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 constraint conditions to be verified in the initial multi-constraint data set, the task instructions corresponding to the constraint conditions to be verified, and the associated data of the task instructions are consistent; based on the execution results of the constraint conditions to be verified, it is determined whether the constraint conditions to be verified are successfully executed; and whether different constraint conditions to be verified are independent of each other in terms of implementation functions.

8. 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 subtask instructions and / or a plurality of extended task instructions; The target multi-task dataset is subjected to constraint type expansion to generate the target training set.

9. The model training method according to claim 1, characterized in that The model training method further includes: Performing 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 using a data verification model, and a verification method using a data verification program, wherein the data verification program is written using the data verification model; A repair suggestion is generated based on the verification result.

10. A data processing method, characterized in that: include: Get target task query; Using a target language model to process the target task query and generate a target task response; The target language model is generated according to the model training method described in any one of claims 1 to 9.

11. 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 obtain a virtual customer service response; The target language model is generated according to the model training method described in any one of claims 1 to 9.

12. 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, 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 described in any one of claims 1 to 9.

13. A data processing method, characterized in that: include: Acquire 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 being generated by data processing the target task query using a target language model, the target language model being generated according to the model training method according to any one of claims 1 to 9; The target task response is displayed in a graphical user interface.

14. A data processing method, characterized in that: include: In response to an input instruction acting on an 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 processing the target task query using a target language model, and the target language model is generated according to the model training method according to any one of claims 1 to 9.

15. 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 further configured to output the target task response; The target language model is generated according to the model training method described in any one of claims 1 to 9.

16. An electronic device, characterized in that: include: a memory storing an executable program; A processor for running the program, wherein the program, when running, executes the model training method described in any one of claims 1 to 9 or the data processing method described in any one of claims 10 to 14.

17. 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 9 or the data processing method described in any one of claims 10 to 14.

18. 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 9 or the data processing method described in any one of claims 10 to 14.

Citation Information

Patent Citations

  • Model training method, data processing method, electronic equipment and storage medium

    CN118886519A