Large model fine tuning and data processing method and device and computer equipment

By selecting high-quality sample data and constructing correct triples, the problem of insufficient data quality in traditional large model fine-tuning is solved, thereby improving the accuracy and adaptability of the model.

CN122047384APending Publication Date: 2026-05-15MOORE THREADS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MOORE THREADS TECH CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Traditional large-scale model fine-tuning methods fail to guarantee the data quality of industry-specific sample data, resulting in poor fine-tuning effects and impacting model accuracy.

Method used

By screening high-quality sample data and corresponding response data, the target large model is fine-tuned. Triples containing correct relationships between entities are selected for model training, and a knowledge graph is constructed to improve the model's accuracy and generalization ability.

Benefits of technology

This improves the accuracy and generalization ability of large models after fine-tuning, ensuring the effective adaptability and responsiveness of the model across different data sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122047384A_ABST
    Figure CN122047384A_ABST
Patent Text Reader

Abstract

The invention relates to a large model fine tuning and data processing method and device and computer equipment. The large model fine tuning method comprises the following steps: inputting different sample data into a to-be-fine-tuned target large model to obtain reply data corresponding to each sample data output by the target large model; extracting a sample triple corresponding to each sample combination according to the triple extraction template; wherein each sample combination comprises sample data and reply data corresponding to the sample data, and the sample triad comprises entities extracted from the sample combinations and relationships between the entities; selecting a target triad from the different sample triads; wherein the relation between the entities contained in the target triad is correct; and carrying out fine tuning on the target large model by adopting a sample combination corresponding to the target triple. By adopting the method, the accuracy of the fine-tuned large model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of large model technology, and in particular to a method, apparatus and computer equipment for fine-tuning and data processing of large models. Background Technology

[0002] With the development of AI (Artificial Intelligence) technology, large model technology has emerged. It is an AI model based on deep learning, with a huge number of parameters and massive data pre-training, relying on computing power and algorithm support, and possessing generalization and intelligent emergence capabilities. It is widely used in natural language, computer vision, multimodal fields and other fields.

[0003] In traditional techniques, to adapt large models to industry needs, industry-specific sample data is typically used to fine-tune the large model, such as LoRA (Low-Rank Adaptation) fine-tuning. This leverages the general capabilities generated during the pre-training phase of the large model to improve its response adaptability within the industry.

[0004] However, in the aforementioned traditional techniques, the quality of sample data within the industry cannot be guaranteed, which in turn cannot guarantee the fine-tuning effect on the large model, severely affecting the accuracy of the large model after fine-tuning. Summary of the Invention

[0005] Therefore, it is necessary to provide a method, apparatus, and computer equipment for fine-tuning and data processing of large models to address the aforementioned technical problems and improve the accuracy of the fine-tuned large models.

[0006] Firstly, this application provides a method for fine-tuning large models, including:

[0007] Different sample data are input into the target large model to be fine-tuned, and the response data corresponding to each sample data output by the target large model is obtained. According to the triple extraction template, the sample triples corresponding to each sample combination are extracted. Each sample combination includes a sample data and the response data corresponding to the sample data. The sample triples include the entities extracted from the sample combination and the relationships between the entities. The target triples are selected from different sample triples. The relationships between the entities contained in the target triples are correct. The target large model is fine-tuned using the sample combination corresponding to the target triples.

[0008] In one embodiment, the sample triplet corresponding to each sample combination is extracted according to the triplet extraction template, including: for each sample combination, generating sample extraction text according to the sample combination and the triplet extraction template; inputting the sample extraction text into the first large model to obtain the sample triplet corresponding to the sample combination output by the first large model.

[0009] In one embodiment, selecting a target triplet from different sample triplets includes: for each sample triplet, determining a first classification result based on the sample triplet and the sample combination corresponding to the sample triplet using a classification model; wherein the first classification result is used to characterize whether the relationship between the entities contained in the sample triplet is correct; if the first classification result characterizes the relationship between the entities contained in the sample triplet as correct, the sample triplet is determined as the target triplet.

[0010] In one embodiment, after fine-tuning the target large model using the sample combination corresponding to the target triplet, the large model fine-tuning method further includes: updating the sample data and returning to the operation of inputting different sample data into the target large model to be fine-tuned if the target large model does not meet the preset termination condition; wherein, the preset termination condition includes any one of the following: the current accuracy reaches a preset accuracy threshold, the number of fine-tuning rounds reaches a preset round threshold, and the difference between the current accuracy and the previous accuracy is less than a preset difference threshold.

[0011] In one embodiment, the large model fine-tuning method further includes: for the first fine-tuning round of the target large model, using the target triples selected in the first fine-tuning round to construct an initial knowledge graph as the knowledge graph corresponding to the first fine-tuning round; for each non-first fine-tuning round of the target large model, using the target triples selected in the non-first fine-tuning round to update the knowledge graph corresponding to the previous fine-tuning round; and determining the knowledge graph corresponding to the last fine-tuning round as the target knowledge graph.

[0012] In one embodiment, the sample data is question data, and the corresponding response data is the answer data of the sample data.

[0013] Secondly, this application also provides a data processing method, including:

[0014] Obtain the target data to be processed; input the target data into the target large model to obtain the response data corresponding to the target data output by the target large model; wherein, the target large model is obtained based on the large model fine-tuning method provided in the above-mentioned method embodiments of the first aspect; determine the response result corresponding to the target data according to the response data corresponding to the target data.

[0015] In one embodiment, determining the response result corresponding to the target data based on the response data corresponding to the target data includes: extracting the triplet to be processed corresponding to the target combination according to the triplet extraction template; wherein, the target combination includes the target data and the response data corresponding to the target data, and the triplet to be processed includes the entities extracted from the target combination and the relationships between the entities; and determining the response result corresponding to the target data based on the triplet to be processed.

[0016] In one embodiment, extracting the triplet to be processed corresponding to the target combination according to the triplet extraction template includes: generating target extraction text according to the triplet extraction template and the target combination; inputting the target extraction text into the second large model to obtain the triplet to be processed output by the second large model.

[0017] In one embodiment, determining the response result corresponding to the target data based on the triple to be processed includes: searching for the triple to be processed from the target knowledge graph; wherein the target knowledge graph is constructed based on the target triples selected during the fine-tuning of the target large model; and determining the response result corresponding to the target data based on the search result.

[0018] In one embodiment, determining the response result corresponding to the target data based on the search result includes: if a triple to be processed is found, determining the response data corresponding to the target data as the response result corresponding to the target data; if no triple to be processed is found, determining a second classification result based on the triple to be processed and the target combination using a classification model, and determining the response result corresponding to the target data based on the second classification result; wherein the second classification result is used to characterize whether the relationship between the entities contained in the triple to be processed is correct.

[0019] In one embodiment, determining the response result corresponding to the target data based on the second classification result includes: if the second classification result correctly represents the relationship between the entities contained in the triplet to be processed, determining the response data corresponding to the target data as the response result corresponding to the target data; if the second classification result incorrectly represents the relationship between the entities contained in the triplet to be processed, determining the prompt data as the response result corresponding to the target data; the prompt data represents that the target large model cannot respond to the target data.

[0020] Thirdly, this application also provides a large model fine-tuning device, comprising:

[0021] The first processing module is used to input different sample data into the target large model to be fine-tuned, and obtain the response data corresponding to each sample data output by the target large model.

[0022] The triple extraction module is used to extract sample triples corresponding to each sample combination according to the triple extraction template; wherein, each sample combination includes a sample data and the corresponding response data, and the sample triples include entities extracted from the sample combination and the relationships between entities.

[0023] The triple selection module is used to select target triples from different sample triples; wherein the relationships between the entities contained in the target triples are correct;

[0024] The large model fine-tuning module is used to fine-tune the target large model using sample combinations corresponding to the target triplet.

[0025] Fourthly, this application also provides a data processing apparatus, comprising:

[0026] The data acquisition module is used to acquire the target data to be processed.

[0027] The second processing module is used to input the target data into the target large model and obtain the response data corresponding to the target data output by the target large model; wherein, the target large model is obtained based on the large model fine-tuning method provided in the above-mentioned method embodiments of the first aspect.

[0028] The result determination module is used to determine the response result corresponding to the target data based on the response data corresponding to the target data.

[0029] Fifthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the method embodiments of the first and / or second aspects described above.

[0030] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps in the method embodiments of the first and / or second aspects described above.

[0031] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the method embodiments of the first and / or second aspects described above.

[0032] The aforementioned large-scale model fine-tuning and data processing method, apparatus, and computer equipment, after acquiring different sample data, input the sample data into the target large-scale model to be fine-tuned, obtaining the response data corresponding to each sample data output by the target large-scale model. Each sample data and its corresponding response data are then combined into a sample combination. Based on the triplet extraction template, sample triples corresponding to this sample combination are extracted. These sample triples include entities extracted from the sample combination and the relationships between those entities. Furthermore, a target triplet with correct relationships between the entities is selected from different sample triplets. The sample combination corresponding to the target triplet is then used to fine-tune the target large-scale model. In this way, on the one hand, because the relationships between the entities contained in the target triplet are correct, the data quality of the sample combination corresponding to the target triplet can be improved. Therefore, using a high-quality sample combination to fine-tune the target large-scale model can ensure the effectiveness of the fine-tuning and improve the accuracy of the fine-tuned target large-scale model. On the other hand, since the data source of the sample data is not limited, using sample data from a wider range of sources to fine-tune the target large-scale model can further improve its generalization ability. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 Internal structural diagrams of a computer device provided in some embodiments of this application;

[0035] Figure 2 This is a flowchart illustrating a large model fine-tuning method according to some embodiments of this application;

[0036] Figure 3 This is a schematic diagram of the process for extracting sample triples in some embodiments of this application;

[0037] Figure 4 This is a flowchart illustrating the selection of target triples in some embodiments of this application;

[0038] Figure 5 This is a flowchart illustrating the data processing method of some embodiments of this application;

[0039] Figure 6 This is a flowchart illustrating the process of determining the response result in some embodiments of this application;

[0040] Figure 7This is a flowchart illustrating the process of determining the response result in other embodiments of this application;

[0041] Figure 8 This is a flowchart illustrating a large model fine-tuning method according to other embodiments of this application;

[0042] Figure 9 This is a flowchart illustrating the data processing methods of some other embodiments of this application;

[0043] Figure 10 This is a structural block diagram of a large model fine-tuning device according to some embodiments of this application;

[0044] Figure 11 This is a structural block diagram of a data processing apparatus according to some embodiments of this application. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0046] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments or any combination of multiple embodiments.

[0047] With the development of AI technology, large model technology has emerged. It is an AI model based on deep learning, with a huge number of parameters and massive data pre-training, relying on computing power and algorithm support, and possessing generalization and intelligent emergence capabilities. It is widely used in natural language, computer vision, multimodal and other fields.

[0048] In traditional techniques, to adapt large models to industry needs, industry-specific sample data is typically used to fine-tune the large model, such as LoRA (Low-Rank Adaptation) fine-tuning. This leverages the general capabilities generated during the pre-training phase of the large model to improve its response adaptability within the industry.

[0049] However, in the aforementioned traditional techniques, the quality of sample data within the industry cannot be guaranteed, which in turn cannot guarantee the fine-tuning effect on the large model, severely affecting the accuracy of the large model after fine-tuning.

[0050] Based on this, this application provides a large model fine-tuning method and a data processing method. By screening high-quality sample data and corresponding response data, the target large model is fine-tuned to ensure the fine-tuning effect of the target large model and thus improve the accuracy of the fine-tuned target large model.

[0051] The large model fine-tuning method and data processing method provided in this application can be applied to computer equipment, which can be a terminal or a server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc.; the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Optionally, the computer equipment used in the large model fine-tuning method and the computer equipment used in the data processing method can be the same or different.

[0052] In one exemplary embodiment, taking the large model fine-tuning method and the data processing method as an example, and considering that the computer device is a server, its internal structure can be as follows: Figure 1 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores triple extraction templates, sample data, and other data. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a large model fine-tuning method and a data processing method.

[0053] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0054] Based on the above embodiments, in an exemplary embodiment, such as Figure 2 As shown, a method for fine-tuning large models is provided, including:

[0055] S201, input different sample data into the target large model to be fine-tuned, and obtain the response data corresponding to each sample data output by the target large model.

[0056] Large models are AI models based on deep learning, with extremely large parameter scales and massive amounts of pre-trained data, supported by computing power and algorithms, and possessing generalization and intelligent emergence capabilities. Examples include large language models (LLM), computer vision large models, and multimodal large models. Among them, target large models refer to any large model that needs fine-tuning to improve its accuracy.

[0057] Before fine-tuning the target model, it is necessary to first acquire multiple different sample data sets. These sample data sets can be obtained from the same or different data sources, and can be from the same or different industries. Furthermore, these sample data sets are represented in various formats, such as question data, descriptive text, and tables, and include one or more data types, such as text data, image data, audio data, and video data. Therefore, no restrictions are placed on the source, specific content, or quantity of the sample data.

[0058] For example, sample data can be obtained from publicly available data sources. For instance, general knowledge data can be extracted from general encyclopedic information on the internet; professional data can be extracted from publicly available industry information such as industry forums and publications targeting specific industries; and timely data such as industry trends and current events can be extracted from publicly available news information such as radio, newspapers, and social media. Sample data can also be obtained from internal company data sources, such as company operation manuals, product information, and management systems. Furthermore, human-computer interaction data can be obtained from human-computer interaction systems, or manually labeled or compiled sample data can be used as sample data.

[0059] Optionally, raw data can be obtained from the data source and processed by cleaning, deduplication, and format conversion to obtain sample data.

[0060] After obtaining different sample data, the different sample data can be input into the target large model to be fine-tuned, so that the target large model can generate the corresponding response data for each sample data and output it.

[0061] Optionally, for each sample data, the target large model divides the sample data into multiple minimal semantic processing units (Tokens) and converts each Token into a corresponding number, which is then mapped into a high-dimensional vector (Embeddings) to represent the semantics and position of the Token. Thus, by capturing the contextual relationships between different Tokens, the next Token to be output is predicted, and by repeating the above process, the response data corresponding to the sample data is output.

[0062] In one optional embodiment, the sample data is question data, and the corresponding response data is the answer data. In some cases, question data can be obtained as sample data to obtain the corresponding response data through the target large model, thereby constructing question-answer pairs (a question and its corresponding answer data) as sample combinations to fine-tune the target large model. In this way, the "instruction-response" mapping formed by the question-answer pairs can improve the target large model's understanding and response capabilities to questions. Simultaneously, by using the correct answers in the question pairs as constraints, the illusion phenomenon of the target large model can be suppressed, improving the model's accuracy and standardization.

[0063] S202, based on the triplet extraction template, extract the sample triplet corresponding to each sample combination.

[0064] Each sample combination includes a sample data and the corresponding response data. The sample triples include entities extracted from the sample combination and the relationships between entities.

[0065] A triple is the smallest unit used to represent factual knowledge. It typically includes two entities and the relationship between them, and can be represented as <entity 1, relation, entity 2>. For example, for the text "Mount Everest is the highest peak in the world", the triple <Mount Everest, is, highest peak in the world> can be extracted. Depending on the language pattern or logical rules, different triples can be extracted from the same text. For instance, for the text "In the Records of the Three Kingdoms, who killed Hua Xiong? It was Sun Jian", the triples <Sun Jian, killed, Hua Xiong> or <Sun Jian killed Hua Xiong, source, Records of the Three Kingdoms> can be obtained.

[0066] Based on this, a triple extraction prompt refers to a pre-defined language model or logical rule designed to accurately identify and extract triples from sample combinations. It defines the position, part-of-speech (POS), syntactic dependency relations, keyword matching rules, and other aspects of the entities and relationships within a sample triple in the sample data and corresponding response data. Optionally, the triple extraction prompt can be used to instruct a large model to extract triples. For example, the entities and relationships in a sample triple may form a subject-verb-object structure, such as <electricity, drive, electric vehicle>, <Sun Jian, kill, Hua Xiong>, etc.; another example is that the triple extraction prompt defines the entities and relationships in a sample triple as an attribute description structure, such as <phone case, material, plastic>; yet another example is that the triple extraction prompt defines the relationships between entities in a sample triple as specific relations, such as <patent, include, invention>, etc. No specific limitations are imposed on these.

[0067] After obtaining the response data corresponding to each sample data output by the target large model, each sample data and the response data corresponding to that sample data are combined into a sample combination to obtain multiple sample combinations. Then, according to the triple extraction template, the sample triple corresponding to each sample combination is extracted. The sample triple includes the two entities extracted from the sample combination and the relationship between the two entities.

[0068] Optionally, the triple extraction template and each sample combination are input into the target large model or another large model besides the target large model to obtain the triples output by the target large model or the other large model, which serve as the sample triples corresponding to the sample combination. Alternatively, based on the grammatical structure of entities and relationships between entities defined in the triple extraction template, data that constitutes each structural part of the grammatical structure is extracted from the sample combination and filled into the corresponding positions in the triples to obtain sample triples. For example, in a subject-verb-object structure, data that constitutes the "subject," "verb," ​​and "object" are extracted from the sample combination to obtain the sample triple <subject, verb, object>. Alternatively, based on the target entity attributes and target relationship types between entities defined in the triple extraction template, entity data whose attributes match the target entity attributes and relationship data whose relationship types match the target relationship types are extracted from the sample combination and filled into the corresponding positions in the triple extraction template to obtain sample triples. Based on this, this application does not limit the specific extraction method of the above sample triples. Optionally, the total number of sample triples is not less than the total number of sample data.

[0069] S203, Select the target triplet from different sample triplets.

[0070] The relationships between the entities contained in the target triple are correct.

[0071] In some cases, due to the large amount of entity and relation data included in the sample combination, or misjudgments in the sample triple extraction method, the relationships between the entities included in the extracted sample triples may not reflect the correct relationships between the two entities in the sample triple. This leads to the sample triple being considered an incorrect triple due to an incorrect relationship between the entities it contains. For example, in the sample triple <Yangtze River, Yes, World's Longest River>, since the world's longest river is the Nile River, the relationship "Yes" between the entities "Yangtze River" and "World's Longest River" in the above sample triple is incorrect.

[0072] Therefore, in order to ensure the effectiveness of fine-tuning the target model and improve the accuracy of the fine-tuned target model, it is necessary to select target triples from the obtained sample triples that contain the correct relationships between entities. These target triples can also be referred to as correct triples.

[0073] Optionally, each sample triplet can be scored using a large model other than the target large model, and the sample triplets with scores higher than a first scoring threshold can be identified as target triplets. Alternatively, for each sample triplet, knowledge data containing the entities in the sample triplet can be extracted from a preset knowledge base. If the relationships between entities recorded in the knowledge data are consistent with the relationships between the entities included in the sample triplet, then the sample triplet can be identified as a target triplet. Alternatively, each sample triplet can be manually analyzed to determine if it is a target triplet, and sample triplets with correct relationships between included entities can be correctly labeled. Based on the labeling information of each sample triplet, the correctly labeled sample triplets are selected to obtain the target triplets. Based on this, this application does not limit the specific selection method of the target triplets.

[0074] S204 uses sample combinations corresponding to the target triples to fine-tune the target large model.

[0075] After obtaining the target triplet, the sample combination corresponding to the target triplet can be selected from the above sample combinations to fine-tune the target large model.

[0076] Optionally, the sample data in the sample combination corresponding to the target triplet is used as the training sample, and the response data in the sample combination corresponding to the target triplet is used as the sample label. The sample combination corresponding to the target triplet is then input into the target large model to perform LoRA fine-tuning on the target large model. Optionally, after the number of training iterations of the sample combination corresponding to the target triplet reaches a preset threshold, the fine-tuning of the target large model is stopped. At this point, the current fine-tuning round can be considered complete, i.e., one fine-tuning of the target large model is finished.

[0077] In one optional embodiment, the large model fine-tuning method further includes updating sample data and returning to the operation of inputting different sample data into the target large model to be fine-tuned if the target large model does not meet the preset termination condition; wherein the preset termination condition includes any one of the following: the current accuracy reaches a preset accuracy threshold, the number of fine-tuning rounds reaches a preset round threshold, and the difference between the current accuracy and the previous accuracy is less than a preset difference threshold. After completing one fine-tuning of the target large model, it can be determined whether the target large model meets the preset termination condition, and if the target large model does not meet the preset termination condition, the above-mentioned sample data is updated; optionally, the above-mentioned sample data can be partially or completely updated. After the above-mentioned sample data is updated, S201-S204 is executed again to complete the fine-tuning of the next round of the target large model, and after completing another fine-tuning of the target large model, it is determined whether the target large model meets the preset termination condition again. This process is repeated until one round of fine-tuning of the target model is completed. Once the target model meets the preset termination condition, the loop stops, resulting in the final target model after multiple rounds of fine-tuning. The preset accuracy threshold, preset number of rounds threshold, and preset difference threshold can all be set based on empirical values, experimental values ​​from multiple trials, and the accuracy requirements of the target model in practical applications; no specific limitations are imposed. Optionally, if the target model does not meet the preset termination condition, the process can directly return to inputting different sample data into the target model to be fine-tuned, i.e., using the same batch of sample data to achieve multiple rounds of fine-tuning of the target model. In this way, by fine-tuning the target model through multiple rounds, the parameters of the target model can be continuously adjusted to correct parameter errors, achieve model convergence, and continuously improve the generalization ability and accuracy of the target model, ensuring the effectiveness of the fine-tuning.

[0078] In another optional embodiment, the large model fine-tuning method further includes: for the first fine-tuning round of the target large model, constructing an initial knowledge graph using the target triples selected in the first fine-tuning round, which serves as the knowledge graph corresponding to the first fine-tuning round; for each subsequent fine-tuning round of the target large model, updating the knowledge graph corresponding to the previous fine-tuning round using the target triples selected in the subsequent fine-tuning rounds; and determining the knowledge graph corresponding to the last fine-tuning round as the target knowledge graph. In the multi-round fine-tuning process of the target large model, since there are no target triples before the first fine-tuning round, after selecting the target triples for the first fine-tuning round of the target large model, the aforementioned target triples can be used to construct the knowledge graph, thus obtaining the initial knowledge graph corresponding to the first fine-tuning round. A knowledge graph is a semantic network that describes entities and relationships between entities using a graph structure. Its smallest unit is a triple, where different nodes represent different entities, and the connections between different entities represent the relationships between them. Furthermore, for subsequent fine-tuning rounds of the target model, since a knowledge graph corresponding to the previous fine-tuning round already exists (e.g., for the second fine-tuning round, an initial knowledge graph already exists), after selecting the target triplet, the knowledge graph corresponding to the previous fine-tuning round can be updated using the aforementioned target triplet to obtain the indicator graph corresponding to the current fine-tuning round. For example, a new target triplet can be used to expand the knowledge graph corresponding to the previous fine-tuning round. Then, after obtaining the knowledge graph corresponding to the last fine-tuning round, this knowledge graph can be determined as the target knowledge graph. Optionally, if only one fine-tuning round exists, the initial knowledge graph constructed using the target triplet selected in the first fine-tuning round is the target knowledge graph. In this way, since the target triples used to construct the target knowledge graph are triples with correct relationships between the entities they contain, the correctness of the entities and relationships between entities described in the constructed target knowledge graph can be guaranteed. Consequently, when using the target knowledge graph to perform tasks such as question answering search and entity association query, the accuracy of the task results can be improved.

[0079] In the aforementioned large model fine-tuning, after acquiring different sample data, these sample data are input into the target large model to be fine-tuned. This yields response data corresponding to each sample data output by the target large model. Each sample data and its corresponding response data are then combined into a sample set. Based on the triplet extraction template, sample triples corresponding to this sample set are extracted. These sample triples include the entities extracted from the sample set and the relationships between those entities. Then, target triples with correct relationships between the entities are selected from different sample triples. The target large model is then fine-tuned using the sample sets corresponding to these target triples. This approach has two advantages: First, because the relationships between the entities in the target triples are correct, the data quality of the sample sets corresponding to the target triples is improved. Using high-quality sample sets to fine-tune the target large model ensures effective fine-tuning and improves the accuracy of the fine-tuned model. Second, since the data source of the sample data is not limited, using sample data from a wider range of sources further enhances the generalization ability of the target large model.

[0080] Based on the above embodiments, in an exemplary embodiment, the extraction of sample triples in S202 is further refined; optionally, as... Figure 3 As shown, it includes:

[0081] S301, for each sample combination, extract templates based on the sample combination and triples, and generate sample extraction text.

[0082] As mentioned earlier, a triple extraction prompt is a pre-defined language model or logical rule designed to accurately identify and extract triples from sample combinations. The prompt includes a pre-defined grammatical structure representing the entities and relationships within the sample triples, as well as placeholders for filling in these relationships. For each sample combination, based on the pre-defined logical rules corresponding to the prompt, entity and relational data matching the placeholders in the prompt are extracted and filled into the corresponding placeholder positions, completing the embedding and fusion of the sample combination and the prompt. Based on this embedding and fusion result, sample extraction text is generated. This extracted text maintains the sentence structure reflected in the triple extraction prompt through the grammatical structure representing the entities and relationships, while accurately expressing the data logic between the sample data and the corresponding response data within the sample combination.

[0083] S302, input the extracted sample text into the first large model to obtain the sample triplet corresponding to the sample combination output by the first large model.

[0084] After obtaining the sample extraction text corresponding to each sample combination, the above sample extraction text can be input into the first large model to obtain the sample triplet corresponding to the sample combination output by the first large model.

[0085] Optionally, the first major model segments the received sample extracted text into multiple tokens and converts these tokens into high-dimensional vectors. Then, it uses an attention mechanism to capture the contextual relationships between words in the sample extracted text contained within the high-dimensional vectors, thereby identifying entities and relationships between them. Finally, it structurally integrates the identified entities and their relationships, outputting them as triples in a triplet format. Optionally, the first major model can be the aforementioned target major model or any other major model besides the target major model.

[0086] In this embodiment, the sample combination and triplet extraction template are integrated into the sample extraction text, and the large model is used to extract triples from the sample extraction text, which improves the extraction speed and efficiency of sample triples, thereby improving the fine-tuning speed and efficiency of the target large model.

[0087] Based on the above embodiments, in an exemplary embodiment, the selection of the target triplet in S203 is further refined; optionally, as... Figure 4 As shown, it includes:

[0088] S401, for each sample triplet, the first classification result is determined by the classification model based on the sample triplet and the sample combination corresponding to the sample triplet.

[0089] The first classification result is used to characterize whether the relationships between the entities contained in the sample triples are correct.

[0090] A classification model is a type of machine learning model that automatically categorizes input data into a predefined class based on its features. Examples include logistic regression, support vector machines, decision trees, random forests, convolutional neural networks, and recurrent neural networks. This embodiment does not limit the specific type of classification model used. Optionally, the classification model in this embodiment is a binary classification model.

[0091] The above classification model is trained by using data combinations as training samples and the correct triples corresponding to the data combinations (triples in which the relationships between the entities contained are correct) as sample labels. This model is used to classify whether the triples are correct or not. The data combinations include the input data of the third model and the output data of the third model for the input data.

[0092] Optionally, the third major model mentioned above can be the first major model or the target major model, or it can be any other major model besides the first major model and the target major model. Optionally, the correct triples corresponding to the above data combinations can be manually labeled correct triples.

[0093] Optionally, for each sample triplet, the sample triplet and its corresponding sample combination can be input into the classification model. The classification model then determines whether the sample triplet is correct based on the received sample combination and sample triplet; that is, it determines whether the relationships between the entities contained in the sample triplet are correct, thus obtaining a first classification result. For example, the classification model extracts triples from the above sample combination and compares the extracted triples with the above sample triplet to determine the first classification result based on the comparison result.

[0094] Optionally, for each sample triplet, the sample triplet and its corresponding extracted sample text can be input into the classification model. The classification model then determines whether the sample triplet is correct based on the received extracted sample text and sample triplet, specifically whether the relationships between the entities contained in the sample triplet are correct, thus obtaining a first classification result. For example, the classification model extracts triples from the extracted sample text and compares the extracted triples with the original sample triplet to determine the first classification result based on the comparison result.

[0095] S402, if the first classification result correctly represents the relationship between the entities contained in the sample triplet, then the sample triplet is determined as the target triplet.

[0096] If the first classification result correctly represents the relationship between the entities contained in the sample triplet, then the sample triplet can be identified as the target triplet.

[0097] Optionally, if the first classification result above incorrectly represents the relationship between the entities contained in the sample triplet, and the sample triplet cannot be identified as the target triplet, then the target triplet is deleted.

[0098] In this embodiment, using a classification model to select target triples from sample triples can improve the selection efficiency and accuracy of target triples, thereby improving the data quality of the sample combinations corresponding to the target triples used for fine-tuning the target large model, and thus improving the accuracy of the fine-tuned target large model.

[0099] Based on the above embodiments, in an exemplary embodiment, such as Figure 5 As shown, a data processing method is provided, including:

[0100] S501, Obtain the target data to be processed.

[0101] When processing the target large model obtained by any of the above-mentioned large model fine-tuning methods to obtain the response result, the target data to be processed can be obtained first.

[0102] Optionally, the target data may include at least one of text data, image data, and voice data; and the target data may be represented in any data form, such as question data, descriptive data, etc.

[0103] S502, input the target data into the target large model, and obtain the response data corresponding to the target data output by the target large model.

[0104] The target large model is obtained based on any of the above-mentioned large model fine-tuning methods.

[0105] After obtaining the target data to be processed, it can be input into the target large model. The target large model then segments the target data into multiple tokens, converts each token into a corresponding number, and maps this number to a high-dimensional vector. By capturing the contextual relationships between different tokens contained in the high-dimensional vector, it predicts the next token to be output. By repeating the above process, it outputs the response data corresponding to the target data. Optionally, if the target data is question data, the corresponding response data is the answer data. In this case, the target data and the answer data can form a question-answer pair for subsequent target combinations.

[0106] S503, determine the response result corresponding to the target data based on the response data corresponding to the target data.

[0107] Optionally, the response data corresponding to the target data can be determined as the response result corresponding to the target data.

[0108] Optionally, other large models besides the target large model can be used to score the response data corresponding to the target data, thereby determining the probability of correctness of the response data corresponding to the target data through this score. The higher the score, the higher the probability of correctness of the response data corresponding to the target data; conversely, the lower the score, the lower the probability of correctness of the response data corresponding to the target data. If the obtained score is greater than a second scoring threshold, the response data corresponding to the target data is determined as the response result corresponding to the target data; otherwise, if the score is not greater than the second scoring threshold, it is necessary to further determine whether the response data corresponding to the target data can be considered as the response result corresponding to the target data. The second scoring threshold can be the same as or different from the first scoring threshold.

[0109] Optionally, the target model, while outputting the response data corresponding to the target data, also outputs the confidence level of the response data. This confidence level represents the probability of the response data being correct. A higher confidence level indicates a higher probability of correctness, and vice versa. Therefore, if the confidence level is greater than a first confidence threshold, the response data corresponding to the target data can be directly identified as the response result for the target data. Conversely, if the confidence level is not greater than the first confidence threshold, it is necessary to further determine whether the response data can be considered the response result for the target data.

[0110] The first scoring threshold, the second scoring threshold, and the first confidence threshold can all be set based on empirical values, experimental values ​​from multiple trials, and the accuracy requirements of the target large model in practical applications. No specific limitations are imposed on these settings.

[0111] Optionally, after determining the response result corresponding to the target data, the response result can be output to the outside world through one or more methods such as text display, voice broadcast, and information (such as email, SMS, etc.).

[0112] In the aforementioned data processing method, since the target large model is obtained based on any embodiment of the large model fine-tuning method, and in the large model fine-tuning method, the relationships between entities contained in the target triples used to fine-tune the target large model are correct, the fine-tuning effect of the target large model can be guaranteed, thereby improving the accuracy of the fine-tuned target large model. Furthermore, since the data source of the sample data is not limited, using sample data from a wider range of sources to fine-tune the target large model can further improve the generalization ability of the target large model. Based on this, using a target large model with high accuracy and generalization ability to process the target data to obtain the corresponding response data can greatly improve the accuracy of the response data corresponding to the target data. Furthermore, based on the response data corresponding to the target data, the response result corresponding to the target data can be determined, further improving the accuracy and adaptability of the response result.

[0113] Based on the above embodiments, in an exemplary embodiment, the determination of the response result in S503 is further refined; optionally, as... Figure 6 As shown, it includes:

[0114] S601, based on the triplet extraction template, extract the triplet to be processed corresponding to the target combination.

[0115] The target combination includes the target data and the corresponding response data, and the triples to be processed include the entities extracted from the target combination and the relationships between the entities.

[0116] The triplet extraction template in this embodiment is the same as the triplet extraction template in the above-mentioned large model fine-tuning method. After obtaining the response data corresponding to the target data output by the target large model, the target data and the response data corresponding to the target data are combined into a target combination. According to the triplet extraction template, the triplet corresponding to the target combination is extracted as the triplet to be processed. The triplet to be processed includes the two entities extracted from the target combination and the relationship between the two entities.

[0117] Optionally, the triple extraction template and target combination are input into the target large model or another large model besides the target large model to obtain triples output by the target large model or the other large model, which are then used as triples to be processed. Alternatively, based on the syntactic structure of entities and relationships between entities defined in the triple extraction template, data that constitutes each structural part of the syntactic structure is extracted from the target combination and filled into the corresponding positions in the triples to obtain triples to be processed. Alternatively, based on the target entity attributes and target relationship types between entities defined in the triple extraction template, entity data whose attributes match the target entity attributes and relationship data whose relationship types match the target relationship types are extracted from the target combination and filled into the corresponding positions in the triple extraction template to obtain triples to be processed. Based on this, this application does not limit the specific extraction method of the above-mentioned triples to be processed.

[0118] Optionally, if the confidence level is not greater than the first confidence level threshold, the triplet to be processed corresponding to the target combination is extracted based on the triplet extraction template.

[0119] In one optional embodiment, S601 includes generating target extraction text based on the triple extraction template and the target combination; inputting the target extraction text into a second large model to obtain the triples to be processed output by the second large model. Specifically, for each target combination, according to pre-defined logical rules corresponding to the triple extraction template, entity data and relational data matching the placeholders in the triple extraction template are extracted from the target combination and filled into the corresponding placeholder positions to complete the embedding and fusion of the target combination and the triple extraction template. Then, based on the embedding and fusion result, the target extraction text is generated. This target extraction text maintains the sentence structure reflected by the grammatical structure of the triple extraction template through the relationships between entities, while accurately expressing the data logic between the target data and the corresponding response data in the target combination. After obtaining the target extraction text, it can be input into the second large model to obtain the triples to be processed output by the second large model. Optionally, the second major model segments the received target extraction text into multiple tokens and converts these tokens into high-dimensional vectors. Then, an attention mechanism is used to capture the contextual relationships between words in the target extraction text contained within the high-dimensional vectors, thereby identifying entities and relationships between them. The identified entities and their relationships are then structurally integrated and output as triples to obtain the triples to be processed. Optionally, the second major model can be the first major model or any other major model besides the first. For example, if the first major model is not the target major model, the second major model can be the target major model. In other words, the first, second, and target major models can be the same major model, completely different major models, or two of them can be the same while the other is different. This integrates the target combination and triple extraction template into the target extraction text, and uses the major model to extract triples from the target extraction text, improving the extraction speed and efficiency of the triples to be processed.

[0120] S602, based on the triples to be processed, determine the response result corresponding to the target data.

[0121] After obtaining the above triples to be processed, the response result corresponding to the target data can be determined based on the above triples to be processed.

[0122] Optionally, the response data corresponding to the target data and the triplet to be processed can be determined as the response result corresponding to the target data. Alternatively, the triplet to be processed can be determined as the response result corresponding to the target data.

[0123] Optionally, other large models besides the target large model are used to score the triples to be processed. This score represents the correct probability of the relationships between the entities included in the triples, and thus the correct probability of the response data corresponding to the target data. A higher score indicates a higher probability of correct relationships between the entities included in the triples, and consequently, a higher probability of correct response data corresponding to the target data. Conversely, a lower score indicates a lower probability of correct relationships between the entities included in the triples, and consequently, a lower probability of correct response data corresponding to the target data. If the obtained score is greater than a third scoring threshold, the response data corresponding to the target data is determined as the response result corresponding to the target data, or the response data corresponding to the target data and the triples to be processed are determined as the response result corresponding to the target data. Conversely, if the score is not greater than the third scoring threshold, it is necessary to further determine whether the response data corresponding to the target data can be used as the response result corresponding to the target data. The third scoring threshold can be the same as or different from the first and / or second scoring thresholds.

[0124] Optionally, the second model, while outputting the triples to be processed, also outputs a confidence level for each triple. This confidence level represents the probability of correctly identifying the relationship between the entities included in the triples, and thus the probability of correctly identifying the response data corresponding to the target data. A higher confidence level indicates a higher probability of correctly identifying the relationship between the entities included in the triples, and consequently, a higher probability of correctly identifying the response data corresponding to the target data. Conversely, a lower confidence level indicates a lower probability of correctly identifying the relationship between the entities included in the triples, and consequently, a lower probability of correctly identifying the response data corresponding to the target data. Therefore, if the confidence level is greater than the second confidence threshold, the response data corresponding to the target data can be directly identified as the response result for the target data. Conversely, if the confidence level is not greater than the second confidence threshold, it is necessary to further determine whether the response data corresponding to the target data can be considered the response result for the target data.

[0125] The second confidence threshold and the first confidence threshold may be the same or different. The second confidence threshold can be set based on empirical values, experimental values ​​from multiple trials, and the accuracy requirements of the target large model in practical applications. No specific limitations are imposed on this.

[0126] In the above data processing method, using the triplet to be processed corresponding to the target combination to determine the response result corresponding to the target data can greatly improve the speed and efficiency of determining the response result corresponding to the target data, and improve the accuracy of the response result corresponding to the target data.

[0127] Based on the above embodiments, in an exemplary embodiment, the determination of the response result in S602 is further refined; optionally, as... Figure 7 As shown, it includes:

[0128] S701: Search for the triples to be processed from the target knowledge graph.

[0129] The target knowledge graph is constructed based on the target triples selected during the fine-tuning of the target large model.

[0130] As mentioned earlier, during the fine-tuning of the target large model, a target knowledge graph can be constructed based on the selected target triples. After obtaining the above-mentioned triples to be processed, the above-mentioned triples to be processed can be first extracted from the target knowledge graph. That is, the target knowledge graph can be searched to find whether there are triples in the target knowledge graph that contain entities and relationships that are the same as the entities and relationships contained in the triples to be processed. Based on the search results, the response result corresponding to the target data can be determined.

[0131] S702, Based on the search results, determine the response result corresponding to the target data.

[0132] If a triple exists in the target knowledge graph whose included entities and relationships are identical to those of the triple to be processed, the search result is determined to be that the triple to be processed was found in the target knowledge graph. Conversely, if a triple does not exist in the target knowledge graph whose included entities and relationships are identical to those of the triple to be processed, the search result is determined to be that the triple to be processed was not found in the target knowledge graph. For example, if a triple is found in the target knowledge graph whose included entities are the same as those of the triple to be processed, but whose relationships are different from those of the triple to be processed, the triple to be processed is determined to be found ...

[0133] In one optional embodiment, S702 includes: if a triplet to be processed is found, determining the response data corresponding to the target data as the response result corresponding to the target data; if a triplet to be processed is not found, determining a second classification result based on the triplet to be processed and the target combination using a classification model, and determining the response result corresponding to the target data based on the second classification result; wherein the second classification result is used to characterize whether the relationship between the entities contained in the triplet to be processed is correct.

[0134] In this case, if the triple to be processed is found in the target knowledge graph, it can be determined that the relationships between the entities included in the triple are correct. Therefore, the response data corresponding to the target data can be determined as correct, and the response data corresponding to the target data can be identified as the response result corresponding to the target data. Optionally, if the triple to be processed is found in the target knowledge graph, the response data corresponding to the target data and the triple to be processed are identified as the response result corresponding to the target data.

[0135] Correspondingly, if the triple to be processed is not found in the target knowledge graph, it can be determined that the relationship between the entities included in the triple to be processed may be incorrect. Therefore, it is not possible to directly determine whether the response data corresponding to the target data is correct. It is necessary to further determine whether the relationship between the entities included in the triple to be processed is correct. Then, a classification model can be used to determine the second classification result based on the triple to be processed and the target combination, and the response result corresponding to the target data can be determined based on the second classification result.

[0136] In this embodiment, the classification model is the same as the classification model in the above-mentioned large model fine-tuning method.

[0137] Optionally, the triples to be processed and the target combination are input into the classification model. The classification model then determines whether the triples to be processed are correct, specifically whether the relationships between the entities contained in the triples are correct, to obtain a second classification result. For example, the classification model extracts triples from the target combination and compares the extracted triples with the triples to be processed to determine the second classification result based on the comparison.

[0138] Optionally, the triples to be processed and the target extracted text are input into the classification model. The classification model then determines whether the triples to be processed are correct, specifically whether the relationships between the entities contained in the triples are correct, based on the received target extracted text and the triples to be processed, to obtain a second classification result. For example, the classification model extracts triples from the target extracted text and compares the extracted triples with the triples to be processed to determine the second classification result based on the comparison result.

[0139] In this way, based on the search results of the triplet to be processed in the target knowledge graph, if the triplet to be processed is found, the response data corresponding to the target data is determined as the response result corresponding to the target data. If the triplet to be processed is not found, the response result corresponding to the target data is determined based on the classification result of the triplet to be processed by the classification model. This can improve the accuracy of the response results and avoid misjudgment of the response results caused by directly determining that the target big model cannot respond to the target data when the triplet to be processed is not found.

[0140] In one optional embodiment, determining the response result corresponding to the target data based on the second classification result includes: if the second classification result correctly represents the relationship between the entities contained in the triplet to be processed, determining the response data corresponding to the target data as the response result corresponding to the target data; if the second classification result incorrectly represents the relationship between the entities contained in the triplet to be processed, determining the prompt data as the response result corresponding to the target data; wherein, the prompt data represents that the target large model cannot respond to the target data.

[0141] Specifically, if the second classification result correctly represents the relationship between the entities contained in the triplet to be processed, the response data corresponding to the target data can be determined to be correct. Therefore, the response data corresponding to the target data can be identified as the response result corresponding to the target data. Optionally, if the second classification result correctly represents the relationship between the entities contained in the triplet to be processed, both the response data corresponding to the target data and the triplet to be processed are identified as the response result corresponding to the target data.

[0142] Accordingly, if the second classification result indicates an error in the relationship between the entities contained in the triplet to be processed, it can be determined that the response data corresponding to the target data is incorrect. Therefore, it can be determined that the target model cannot currently provide the correct response data corresponding to the target data, and thus, the response result corresponding to the target data cannot be determined. Therefore, the prompt information indicating that the target model cannot respond to the target data can be determined as the response result corresponding to the target data.

[0143] In this way, by using the classification model to determine the corresponding response result for the target data based on the classification result of the triples to be processed, the accuracy of the final response result can be improved, and the target model can be prevented from outputting incorrect response results, which would interfere with subsequent task processing and other processes.

[0144] In this embodiment, since the target triples used to construct the target knowledge graph are triples with correct relationships between the entities they contain, the correctness of the entities and relationships between entities described in the constructed target knowledge graph can be guaranteed. Therefore, searching for the triples to be processed in the target knowledge graph can ensure the accuracy of the search results, thereby improving the accuracy of the response results corresponding to the target data.

[0145] Based on the above embodiments, in an exemplary embodiment, such as Figure 8 As shown, a method for fine-tuning large models is provided, including:

[0146] S801, input different sample data into the target large model to be fine-tuned, and obtain the response data corresponding to each sample data output by the target large model.

[0147] The sample data consists of question data, and the corresponding response data consists of the answer data for the sample data.

[0148] S802: For each sample combination, extract templates based on the sample combination and triples to generate sample extraction text, and input the sample extraction text into the first large model to obtain the sample triples corresponding to the sample combination output by the first large model. For each sample triple, through the classification model, determine the first classification result based on the sample triple and the sample combination corresponding to the sample triple, and if the first classification result correctly represents the relationship between the entities contained in the sample triple, determine the sample triple as the target triple.

[0149] The first classification result is used to characterize whether the relationships between the entities contained in the sample triples are correct.

[0150] S803: For the first fine-tuning round of the target large model, the target triples selected in the first fine-tuning round are used to construct an initial knowledge graph, which serves as the knowledge graph corresponding to the first fine-tuning round; or for each non-first fine-tuning round of the target large model, the target triples selected in the non-first fine-tuning round are used to update the knowledge graph corresponding to the previous fine-tuning round.

[0151] S804: If the target large model does not meet the preset termination conditions, update the sample data and return to S801.

[0152] The preset termination conditions include any of the following: the current accuracy reaches the preset accuracy threshold, the number of fine-tuning rounds reaches the preset round threshold, and the difference between the current accuracy and the previous accuracy is less than the preset difference threshold.

[0153] S805: If the target large model meets the preset termination conditions, stop the model fine-tuning and determine the knowledge graph corresponding to the last fine-tuning round as the target knowledge graph.

[0154] The specific implementation methods of S801-S805 are the same as those in the above method embodiments, and will not be repeated here.

[0155] Based on the above embodiments, in an exemplary embodiment, such as Figure 9 As shown, a data processing method is provided, including:

[0156] S901, Obtain the target data to be processed.

[0157] S902, input the target data into the target large model, and obtain the response data corresponding to the target data output by the target large model.

[0158] The target large model is obtained based on any of the above-mentioned large model fine-tuning methods.

[0159] S903: Based on the triplet extraction template and target combination, generate target extraction text, and input the target extraction text into the second large model to obtain the triplet to be processed output by the second large model.

[0160] S904: Search for the triples to be processed in the target knowledge graph.

[0161] The target knowledge graph is constructed based on the target triples selected during the fine-tuning of the target large model.

[0162] S905, if a triple to be processed is found, the response data corresponding to the target data is determined as the response result corresponding to the target data.

[0163] S906, in the absence of a triplet to be processed, a second classification result is determined based on the triplet to be processed and the target combination using a classification model.

[0164] S907, if the second classification result correctly represents the relationship between the entities contained in the triplet to be processed, the response data corresponding to the target data is determined as the response result corresponding to the target data.

[0165] S908, if the second classification result incorrectly represents the relationship between the entities contained in the triplet to be processed, the prompt data will be identified as the response result corresponding to the target data.

[0166] The prompt indicates that the large model representing the target data cannot respond to the target data.

[0167] The specific implementation methods of S901-S908 are the same as those in the above method embodiments, and will not be repeated here.

[0168] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0169] Based on the same inventive concept, this application also provides a large model fine-tuning device for implementing the large model fine-tuning method described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more large model fine-tuning device embodiments provided below can be found in the limitations of the large model fine-tuning method above, and will not be repeated here.

[0170] In one exemplary embodiment, such as Figure 10 As shown, a large model fine-tuning device is provided, including: a first processing module 1010, a triplet extraction module 1020, a triplet selection module 1030, and a large model fine-tuning module 1040, wherein:

[0171] The first processing module 1010 is used to input different sample data into the target large model to be fine-tuned, and obtain the response data corresponding to each sample data output by the target large model.

[0172] The triple extraction module 1020 is used to extract sample triples corresponding to each sample combination according to the triple extraction template; wherein, each sample combination includes a sample data and the corresponding response data, and the sample triples include entities extracted from the sample combination and the relationships between entities.

[0173] The triplet selection module 1030 is used to select a target triplet from different sample triplets; wherein the relationships between the entities contained in the target triplet are correct;

[0174] The large model fine-tuning module 1040 is used to fine-tune the target large model using the sample combination corresponding to the target triplet.

[0175] In an exemplary embodiment, the triplet extraction module 1020 is specifically used to: for each sample combination, generate sample extraction text based on the sample combination and the triplet extraction template; input the sample extraction text into the first large model to obtain the sample triplet corresponding to the sample combination output by the first large model.

[0176] In an exemplary embodiment, the triplet selection module 1030 is specifically used to: for each sample triplet, determine a first classification result based on the sample triplet and the sample combination corresponding to the sample triplet using a classification model; wherein, the first classification result is used to characterize whether the relationship between the entities contained in the sample triplet is correct; if the first classification result characterizes the relationship between the entities contained in the sample triplet as correct, determine the sample triplet as the target triplet.

[0177] In an exemplary embodiment, the large model fine-tuning device further includes: a data update module, configured to update sample data and trigger the first processing module 1010 when the target large model does not meet a preset termination condition after fine-tuning the target large model using sample combinations corresponding to the target triplet; wherein the preset termination condition includes any one of the following: the current accuracy reaches a preset accuracy threshold, the number of fine-tuning rounds reaches a preset round threshold, and the difference between the current accuracy and the previous accuracy is less than a preset difference threshold.

[0178] In an exemplary embodiment, the large model fine-tuning device further includes: a knowledge graph generation module, configured to construct an initial knowledge graph for the first fine-tuning round of the target large model using the target triples selected in the first fine-tuning round, as the knowledge graph corresponding to the first fine-tuning round; for each subsequent fine-tuning round of the target large model, update the knowledge graph corresponding to the previous fine-tuning round using the target triples selected in the subsequent fine-tuning round; and determine the knowledge graph corresponding to the last fine-tuning round as the target knowledge graph.

[0179] In one exemplary embodiment, the sample data is question data, and the corresponding response data is the answer data of the sample data.

[0180] Based on the same inventive concept, this application also provides a data processing apparatus for implementing the data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data processing apparatus embodiments provided below can be found in the limitations of the data processing method described above, and will not be repeated here.

[0181] In one exemplary embodiment, such as Figure 11As shown, a data processing apparatus is provided, comprising: a data acquisition module 1110, a second processing module 1120, and a result determination module 1130, wherein:

[0182] Data acquisition module 1110 is used to acquire target data to be processed;

[0183] The second processing module 1120 is used to input the target data into the target large model and obtain the response data corresponding to the target data output by the target large model; wherein, the target large model is obtained based on any of the above-mentioned large model fine-tuning methods.

[0184] The result determination module 1130 is used to determine the response result corresponding to the target data based on the response data corresponding to the target data.

[0185] In an exemplary embodiment, the result determination module 1130 includes a triple extraction submodule and a result determination submodule, wherein: the triple extraction submodule is used to extract the triples to be processed corresponding to the target combination according to the triple extraction template; wherein the target combination includes target data and response data corresponding to the target data, and the triples to be processed include entities extracted from the target combination and the relationships between entities; the result determination submodule is used to determine the response result corresponding to the target data according to the triples to be processed.

[0186] In an exemplary embodiment, the triple extraction submodule is specifically used to: generate target extraction text based on the triple extraction template and the target combination; input the target extraction text into the second large model to obtain the triples to be processed output by the second large model.

[0187] In an exemplary embodiment, the result determination submodule includes a triplet search unit and a result determination unit; wherein: the triplet search unit is used to search for the triplet to be processed from the target knowledge graph; wherein the target knowledge graph is constructed based on the target triplet selected during the fine-tuning of the target large model; the result determination unit is used to determine the response result corresponding to the target data based on the search result.

[0188] In an exemplary embodiment, the result determination unit includes a first determination subunit and a second determination subunit; wherein: the first determination subunit is used to determine the response data corresponding to the target data as the response result corresponding to the target data when the triplet to be processed is found; the second determination subunit is used to determine a second classification result based on the triplet to be processed and the target combination through a classification model when the triplet to be processed is not found, and to determine the response result corresponding to the target data based on the second classification result; wherein the second classification result is used to characterize whether the relationship between the entities contained in the triplet to be processed is correct.

[0189] In an exemplary embodiment, the second determining subunit is specifically configured to: determine the response data corresponding to the target data as the response result corresponding to the target data when the second classification result correctly represents the relationship between the entities contained in the triplet to be processed; and determine the prompt data as the response result corresponding to the target data when the second classification result incorrectly represents the relationship between the entities contained in the triplet to be processed; wherein the prompt data represents that the target model cannot respond to the target data.

[0190] Each module in the aforementioned large-scale model fine-tuning device and data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0191] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: inputting different sample data into a target large model to be fine-tuned, and obtaining response data corresponding to each sample data output by the target large model; extracting sample triples corresponding to each sample combination according to a triple extraction template; wherein each sample combination includes a sample data and the response data corresponding to the sample data, and the sample triple includes entities extracted from the sample combination and relationships between entities; selecting a target triple from different sample triples; wherein the relationships between entities contained in the target triple are correct; and fine-tuning the target large model using the sample combination corresponding to the target triple.

[0192] In one embodiment, when the processor executes the computer program, it further performs the following steps: for each sample combination, extracting templates based on the sample combination and triplet to generate sample extraction text; inputting the sample extraction text into the first large model to obtain the sample triplet corresponding to the sample combination output by the first large model.

[0193] In one embodiment, when the processor executes the computer program, it further performs the following steps: for each sample triplet, using a classification model, determining a first classification result based on the sample triplet and the sample combination corresponding to the sample triplet; wherein the first classification result is used to characterize whether the relationship between the entities contained in the sample triplet is correct; if the first classification result characterizes the relationship between the entities contained in the sample triplet as correct, the sample triplet is determined to be a target triplet.

[0194] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the target large model does not meet the preset termination condition, update the sample data and return to perform the operation of inputting different sample data into the target large model to be fine-tuned; wherein the preset termination condition includes any one of the following: the current accuracy reaches a preset accuracy threshold, the number of fine-tuning rounds reaches a preset round threshold, and the difference between the current accuracy and the previous accuracy is less than a preset difference threshold.

[0195] In one embodiment, when the processor executes the computer program, it further performs the following steps: for the first fine-tuning round of the target large model, using the target triples selected in the first fine-tuning round, constructs an initial knowledge graph as the knowledge graph corresponding to the first fine-tuning round; for each non-first fine-tuning round of the target large model, using the target triples selected in the non-first fine-tuning round, updates the knowledge graph corresponding to the previous fine-tuning round; and determines the knowledge graph corresponding to the last fine-tuning round as the target knowledge graph.

[0196] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring target data to be processed; inputting the target data into a target large model to obtain response data corresponding to the target data output by the target large model; wherein the target large model is obtained based on any of the above-described large model fine-tuning methods; and determining the response result corresponding to the target data based on the response data corresponding to the target data.

[0197] In one embodiment, when the processor executes the computer program, it further performs the following steps: extracting the triplet to be processed corresponding to the target combination according to the triplet extraction template; wherein the target combination includes target data and response data corresponding to the target data, and the triplet to be processed includes entities extracted from the target combination and the relationship between entities; and determining the response result corresponding to the target data according to the triplet to be processed.

[0198] In one embodiment, when the processor executes the computer program, it further performs the following steps: generating target extraction text based on the triple extraction template and target combination; inputting the target extraction text into the second large model to obtain the triple to be processed output by the second large model.

[0199] In one embodiment, when the processor executes the computer program, it further performs the following steps: searching for a triple to be processed from the target knowledge graph; wherein the target knowledge graph is constructed based on the target triples selected during the fine-tuning of the target large model; and determining the response result corresponding to the target data based on the search result.

[0200] In one embodiment, when the processor executes the computer program, it further performs the following steps: if a triplet to be processed is found, the response data corresponding to the target data is determined as the response result corresponding to the target data; if a triplet to be processed is not found, a second classification result is determined based on the triplet to be processed and the target combination using a classification model, and the response result corresponding to the target data is determined based on the second classification result; the second classification result is used to characterize whether the relationship between the entities contained in the triplet to be processed is correct.

[0201] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the second classification result correctly represents the relationship between the entities contained in the triplet to be processed, the response data corresponding to the target data is determined as the response result corresponding to the target data; if the second classification result incorrectly represents the relationship between the entities contained in the triplet to be processed, the prompt data is determined as the response result corresponding to the target data; wherein, the prompt data represents that the target model cannot respond to the target data.

[0202] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon. When executed by a processor, the computer program performs the following steps: inputting different sample data into a target large model to be fine-tuned, obtaining response data corresponding to each sample data output by the target large model; extracting sample triples corresponding to each sample combination according to a triple extraction template; wherein each sample combination includes a sample data and the response data corresponding to the sample data, and the sample triple includes entities extracted from the sample combination and relationships between entities; selecting a target triple from different sample triples; ensuring that the relationships between entities contained in the target triple are correct; and fine-tuning the target large model using the sample combination corresponding to the target triple.

[0203] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each sample combination, extracting a template based on the sample combination and triplet to generate sample extraction text; inputting the sample extraction text into the first large model to obtain the sample triplet corresponding to the sample combination output by the first large model.

[0204] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each sample triplet, using a classification model, determining a first classification result based on the sample triplet and the sample combination corresponding to the sample triplet; wherein the first classification result is used to characterize whether the relationship between the entities contained in the sample triplet is correct; if the first classification result characterizes the relationship between the entities contained in the sample triplet as correct, the sample triplet is determined to be a target triplet.

[0205] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the target large model does not meet the preset termination condition, update the sample data and return to perform the operation of inputting different sample data into the target large model to be fine-tuned; wherein the preset termination condition includes any one of the following: the current accuracy reaches a preset accuracy threshold, the number of fine-tuning rounds reaches a preset round threshold, and the difference between the current accuracy and the previous accuracy is less than a preset difference threshold.

[0206] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for the first fine-tuning round of the target large model, using the target triples selected in the first fine-tuning round, constructs an initial knowledge graph as the knowledge graph corresponding to the first fine-tuning round; for each non-first fine-tuning round of the target large model, using the target triples selected in the non-first fine-tuning round, updates the knowledge graph corresponding to the previous fine-tuning round; and determines the knowledge graph corresponding to the last fine-tuning round as the target knowledge graph.

[0207] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: acquiring target data to be processed; inputting the target data into a target large model to obtain response data corresponding to the target data output by the target large model; wherein the target large model is obtained based on any embodiment of the large model fine-tuning method described above; and determining the response result corresponding to the target data based on the response data corresponding to the target data.

[0208] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: extracting the triplet to be processed corresponding to the target combination according to the triplet extraction template; wherein the target combination includes target data and response data corresponding to the target data, and the triplet to be processed includes entities extracted from the target combination and the relationship between entities; and determining the response result corresponding to the target data according to the triplet to be processed.

[0209] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: generating target extraction text based on the triple extraction template and target combination; inputting the target extraction text into the second large model to obtain the triple to be processed output by the second large model.

[0210] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: searching for a triple to be processed from the target knowledge graph; wherein the target knowledge graph is constructed based on the target triples selected during the fine-tuning of the target large model; and determining the response result corresponding to the target data based on the search result.

[0211] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if a triplet to be processed is found, the response data corresponding to the target data is determined as the response result corresponding to the target data; if a triplet to be processed is not found, a second classification result is determined based on the triplet to be processed and the target combination using a classification model, and the response result corresponding to the target data is determined based on the second classification result; the second classification result is used to characterize whether the relationship between the entities contained in the triplet to be processed is correct.

[0212] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the second classification result correctly represents the relationship between the entities contained in the triplet to be processed, the response data corresponding to the target data is determined as the response result corresponding to the target data; if the second classification result incorrectly represents the relationship between the entities contained in the triplet to be processed, the prompt data is determined as the response result corresponding to the target data; wherein, the prompt data represents that the target model cannot respond to the target data.

[0213] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: inputting different sample data into a target large model to be fine-tuned, obtaining response data corresponding to each sample data output by the target large model; extracting sample triples corresponding to each sample combination according to a triple extraction template; wherein each sample combination includes a sample data and the response data corresponding to the sample data, and the sample triple includes entities extracted from the sample combination and relationships between entities; selecting a target triple from different sample triples; wherein the relationships between entities contained in the target triple are correct; and fine-tuning the target large model using the sample combination corresponding to the target triple.

[0214] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each sample combination, extracting a template based on the sample combination and triplet to generate sample extraction text; inputting the sample extraction text into the first large model to obtain the sample triplet corresponding to the sample combination output by the first large model.

[0215] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each sample triplet, using a classification model, determining a first classification result based on the sample triplet and the sample combination corresponding to the sample triplet; wherein the first classification result is used to characterize whether the relationship between the entities contained in the sample triplet is correct; if the first classification result characterizes the relationship between the entities contained in the sample triplet as correct, the sample triplet is determined to be a target triplet.

[0216] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the target large model does not meet the preset termination condition, update the sample data and return to perform the operation of inputting different sample data into the target large model to be fine-tuned; wherein the preset termination condition includes any one of the following: the current accuracy reaches a preset accuracy threshold, the number of fine-tuning rounds reaches a preset round threshold, and the difference between the current accuracy and the previous accuracy is less than a preset difference threshold.

[0217] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for the first fine-tuning round of the target large model, using the target triples selected in the first fine-tuning round, constructs an initial knowledge graph as the knowledge graph corresponding to the first fine-tuning round; for each non-first fine-tuning round of the target large model, using the target triples selected in the non-first fine-tuning round, updates the knowledge graph corresponding to the previous fine-tuning round; and determines the knowledge graph corresponding to the last fine-tuning round as the target knowledge graph.

[0218] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring target data to be processed; inputting the target data into a target large model to obtain response data corresponding to the target data output by the target large model; wherein the target large model is obtained based on any embodiment of the large model fine-tuning method described above; and determining the response result corresponding to the target data based on the response data corresponding to the target data.

[0219] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: extracting the triplet to be processed corresponding to the target combination according to the triplet extraction template; wherein the target combination includes target data and response data corresponding to the target data, and the triplet to be processed includes entities extracted from the target combination and the relationship between entities; and determining the response result corresponding to the target data according to the triplet to be processed.

[0220] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: generating target extraction text based on the triple extraction template and target combination; inputting the target extraction text into the second large model to obtain the triple to be processed output by the second large model.

[0221] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: searching for a triple to be processed from the target knowledge graph; wherein the target knowledge graph is constructed based on the target triples selected during the fine-tuning of the target large model; and determining the response result corresponding to the target data based on the search result.

[0222] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if a triplet to be processed is found, the response data corresponding to the target data is determined as the response result corresponding to the target data; if a triplet to be processed is not found, a second classification result is determined based on the triplet to be processed and the target combination using a classification model, and the response result corresponding to the target data is determined based on the second classification result; the second classification result is used to characterize whether the relationship between the entities contained in the triplet to be processed is correct.

[0223] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the second classification result correctly represents the relationship between the entities contained in the triplet to be processed, the response data corresponding to the target data is determined as the response result corresponding to the target data; if the second classification result incorrectly represents the relationship between the entities contained in the triplet to be processed, the prompt data is determined as the response result corresponding to the target data; wherein, the prompt data represents that the target model cannot respond to the target data.

[0224] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0225] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0226] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0227] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for fine-tuning a large model, characterized in that, The method includes: Different sample data are input into the target large model to be fine-tuned, and the response data corresponding to each sample data output by the target large model is obtained. Based on the triple extraction template, extract the sample triples corresponding to each sample combination; wherein, each sample combination includes a sample data and the response data corresponding to the sample data, and the sample triples include entities extracted from the sample combination and the relationships between entities; Select a target triple from different sample triples; wherein the relationships between the entities contained in the target triple are correct; The target large model is fine-tuned using the sample combination corresponding to the target triplet.

2. The method according to claim 1, characterized in that, The step of extracting sample triplets corresponding to each sample combination based on the triplet extraction template includes: For each sample combination, a sample extraction text is generated based on the sample combination and the triplet extraction template. The extracted text of the sample is input into the first large model to obtain the sample triplet corresponding to the sample combination output by the first large model.

3. The method according to claim 1, characterized in that, The selection of target triples from different sample triples includes: For each sample triplet, a classification model is used to determine a first classification result based on the sample triplet and the sample combination corresponding to the sample triplet; wherein, the first classification result is used to characterize whether the relationship between the entities contained in the sample triplet is correct. If the first classification result correctly characterizes the relationship between the entities contained in the sample triplet, the sample triplet is determined to be the target triplet.

4. The method according to any one of claims 1-3, characterized in that, After fine-tuning the target large model using the sample combination corresponding to the target triplet, the method further includes: If the target large model does not meet the preset termination condition, update the sample data and return to the operation of inputting different sample data into the target large model to be fine-tuned; The preset termination condition includes any one of the following: the current accuracy rate reaches a preset accuracy rate threshold, the number of fine-tuning rounds reaches a preset round threshold, and the difference between the current accuracy rate and the previous accuracy rate is less than a preset difference threshold.

5. The method according to claim 4, characterized in that, The method further includes: For the first fine-tuning round of the target large model, the target triples selected in the first fine-tuning round are used to construct an initial knowledge graph, which serves as the knowledge graph corresponding to the first fine-tuning round. For each non-first fine-tuning round of the target large model, the target triple selected in the non-first fine-tuning round is used to update the knowledge graph corresponding to the previous fine-tuning round. The knowledge graph corresponding to the last fine-tuning round is identified as the target knowledge graph.

6. The method according to any one of claims 1-3, characterized in that, The sample data is question data, and the corresponding response data is the answer data of the sample data.

7. A data processing method, characterized in that, The method includes: Obtain the target data to be processed; The target data is input into the target large model to obtain the response data corresponding to the target data output by the target large model; wherein, the target large model is obtained based on the large model fine-tuning method according to any one of claims 1-6; Based on the response data corresponding to the target data, determine the response result corresponding to the target data.

8. The method according to claim 7, characterized in that, The step of determining the response result corresponding to the target data based on the response data corresponding to the target data includes: Based on the triple extraction template, extract the triples to be processed corresponding to the target combination; wherein, the target combination includes the target data and the response data corresponding to the target data, and the triples to be processed include entities extracted from the target combination and the relationships between entities; Based on the triples to be processed, determine the response result corresponding to the target data.

9. The method according to claim 8, characterized in that, The step of extracting the target triplet corresponding to the triplet extraction template includes: Based on the triplet extraction template and target combination, the target extraction text is generated; The target extracted text is input into the second large model to obtain the triplet to be processed output by the second large model.

10. The method according to claim 8, characterized in that, The step of determining the response result corresponding to the target data based on the triples to be processed includes: The target knowledge graph is used to search for the triples to be processed; wherein the target knowledge graph is constructed based on the target triples selected during the fine-tuning of the target large model; Based on the search results, determine the response result corresponding to the target data.

11. The method according to claim 10, characterized in that, The step of determining the response result corresponding to the target data based on the search results includes: If the triplet to be processed is found, the response data corresponding to the target data is determined as the response result corresponding to the target data; If the triple to be processed is not found, a second classification result is determined based on the triple to be processed and the target combination using a classification model, and the response result corresponding to the target data is determined based on the second classification result; wherein, the second classification result is used to characterize whether the relationship between the entities contained in the triple to be processed is correct.

12. The method according to claim 11, characterized in that, The step of determining the response result corresponding to the target data based on the second classification result includes: If the second classification result correctly characterizes the relationship between the entities contained in the triplet to be processed, the response data corresponding to the target data is determined as the response result corresponding to the target data. If the second classification result indicates an error in the relationship between the entities contained in the triplet to be processed, the prompt data will be determined as the response result corresponding to the target data; wherein, the prompt data indicates that the target large model cannot respond to the target data.

13. A large model fine-tuning device, characterized in that, The device includes: The first processing module is used to input different sample data into the target large model to be fine-tuned, and obtain the response data corresponding to each sample data output by the target large model. The triple extraction module is used to extract sample triples corresponding to each sample combination according to the triple extraction template; wherein, each sample combination includes a sample data and the response data corresponding to the sample data, and the sample triples include entities extracted from the sample combination and the relationships between entities. The triple selection module is used to select a target triple from different sample triples; wherein the relationships between the entities contained in the target triple are correct; The large model fine-tuning module is used to fine-tune the target large model using the sample combination corresponding to the target triplet.

14. A data processing apparatus, characterized in that, The device includes: The data acquisition module is used to acquire the target data to be processed. The second processing module is used to input the target data into the target large model and obtain the response data corresponding to the target data output by the target large model; wherein, the target large model is obtained based on the large model fine-tuning method according to any one of claims 1-6; The result determination module is used to determine the response result corresponding to the target data based on the response data corresponding to the target data.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.

17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.