Multi-task data screening method and device based on large model, equipment and medium

By constructing test sets, screening sets and splicing sets, and using large models to calculate data scores, the problem of data imbalance in large models is solved, data balance and training cost reduction are achieved, and the performance balance of the model on multiple tasks is improved. .

CN118657214AActive Publication Date: 2024-09-17镁佳(北京)科技有限公司
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410624985.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-09-17
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

In multi-task applications of large models, the difficulty and cost of obtaining data for different tasks lead to data imbalance, which affects the balanced performance of the model on different tasks.

Method used

By constructing test sets, screening sets and splicing sets, use the preset large model to calculate the test score of each piece of data, compare the first test score and the second test score, filter out the data that meets the preset conditions as available data, and balance different tasks data quality and quantity.

Benefits of technology

Effectively filter junk data, reduce the amount of training data, save training costs, and improve the balanced performance of large models on different tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657214A
    Figure CN118657214A
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a multi-task data screening method and device based on a large model, equipment and a medium, a data set corresponding to each task in multiple tasks is obtained, and the data set comprises a plurality of pieces of data; dividing the data set into a test set and a screening set, and obtaining a splicing set based on the test set and the screening set; determining a first test score of each piece of data in the test set and a second test score of each piece of data in the splicing set by adopting a preset large model; and when the relationship between the second test score of any piece of data in the splicing set and the first test score of the corresponding data in the test set meets a preset condition, taking the corresponding data in the splicing set as available data. According to the method, the data of different tasks are balanced by filtering and screening the data of the different tasks, so that the data volume required by training can be greatly reduced, and the cost of training a large model is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a multi-task data screening method, device, equipment and medium based on a large model. Background Art

[0002] With the rapid development of big model technology, big models have very good performance in various tasks in dialogue systems, such as intent recognition, invalid dialogue recognition, emotion recognition, multi-round dialogue rewriting, etc. When big models are applied to multiple tasks, due to the differences in the difficulty and cost of obtaining data for different tasks, the quality and quantity of available data for different tasks are very unbalanced, which affects the balanced performance of big models on different tasks. This problem will become more and more serious, especially during the data iteration process. Summary of the invention

[0003] In view of this, the present invention provides a multi-task data screening method, device, equipment and medium based on a large model to solve the problem of imbalance in available data for different tasks of the large model, which affects the balanced performance of the large model on different tasks.

[0004] In the first aspect, the present invention provides a multi-task data screening method based on a large model, obtaining a data set corresponding to each task in the multi-task, the data set including a plurality of data; dividing the data set into a test set and a screening set, and obtaining a spliced ​​set based on the test set and the screening set; using a preset large model to determine a first test score for each data in the test set and a second test score for each data in the spliced ​​set; when the relationship between the second test score of any data in the spliced ​​set and the first test score of the corresponding data in the test set meets a preset condition, the corresponding data in the spliced ​​set is used as available data.

[0005] The multi-task data screening method based on a large model provided in this embodiment constructs a test set, a screening set, and a splicing set, and calculates the second test score of the splicing set data and the first test score of the test set data corresponding to the screening set. By comparing the second test score with the first test score, excellent training data is screened out and junk data is filtered out, thereby solving the problem that different tasks have more or less data, the difference in quantity is too large, and the data imbalance seriously affects the performance of tasks with a small number of tasks.

[0006] In an optional embodiment, the plurality of data includes a plurality of dialogue data, each dialogue data includes a question word and an answer, and the question word and the answer each include a plurality of word materials, and a preset large model is used to determine a first test score for each data in a test set, including: inputting each dialogue data in the test set into the preset large model to obtain an output vector of each word material included in the answer of each dialogue data; summing the negative logarithmic probabilities of the output vectors of each word material included in the answer and dividing the sum by the number of word materials included in the answer to obtain a first test score for the dialogue data.

[0007] The multi-task data screening method based on a large model provided in this embodiment calculates the first test score of the dialogue data of the test set, providing a data basis for subsequent determination of available data.

[0008] In an optional implementation, the negative logarithmic probability of the output vector of each word is calculated using the following formula:

[0009] logP_t=-log(softmax(logits_t));

[0010] Among them, logits_t is the output vector of the t-th word, logP_t is the negative logarithmic probability of the t-th word, and softmax is the softmax function used to calculate the probability of the output vector.

[0011] The multi-task data screening method based on a large model provided in this embodiment provides a method formula for calculating the first test score and the second test score by calculating the negative logarithmic probability of the output vector.

[0012] In an optional implementation, the plurality of data include a plurality of conversation data, and a spliced ​​set is obtained based on a test set and a screening set, including: one-to-one splicing any conversation data in the test set with any conversation data in the screening set to obtain spliced ​​conversation data, the spliced ​​conversation data including spliced ​​question words and answers, the spliced ​​question words including question words of any conversation data in the screening set and the conversation data in the test set, and the answer to the spliced ​​conversation data is the answer to the conversation data in the test set; and determining the spliced ​​set based on the spliced ​​conversation data.

[0013] The multi-task data screening method based on a large model provided in this embodiment obtains a spliced ​​set by splicing the test set data with the screening set, thereby providing a data basis for subsequent screening of available data.

[0014] In an optional embodiment, a preset large model is used to determine the second test score of each data in the spliced ​​set, including: inputting any spliced ​​conversation data in the spliced ​​set into the preset large model to obtain an output vector for each word material included in the answer of the spliced ​​conversation data; summing the negative logarithmic probabilities of the output vectors of each word material included in the answer and dividing the sum by the number of words included in the answer to obtain the second test score of the spliced ​​conversation data.

[0015] The large model-based multi-task data screening method provided in this embodiment calculates a first test score of the test set dialogue data and a second test score of the spliced ​​dialogue data of the spliced ​​set corresponding to the test set dialogue data, and by comparing the first test score and the second test score, determines whether the screening set data corresponding to the spliced ​​dialogue data can be used as usable data, provides a method for determining whether the data is good training data, and improves the efficiency and accuracy of screening available data.

[0016] In an optional embodiment, taking the corresponding data in the spliced ​​set as available data includes: taking the corresponding conversation data in the screening set corresponding to the corresponding spliced ​​conversation data in the spliced ​​set as available data; when the relationship between the second test score of any data in the spliced ​​set and the first test score of the corresponding data in the test set meets a preset condition, after taking the corresponding data in the spliced ​​set as available data, the method also includes: a process of cyclically determining whether the spliced ​​conversation data in the spliced ​​set can be used as available data until each spliced ​​conversation data in the spliced ​​set is determined to be complete, and then the screening ends; repeating the process of screening the spliced ​​set for each task to obtain available data for each task.

[0017] The multi-task data screening method based on a large model provided in this embodiment improves the efficiency of screening available data, reduces the differences in difficulty and cost of acquiring data for different tasks, balances the available data for different tasks, and enables the large model to perform evenly on different tasks.

[0018] In a second aspect, the present invention provides a data screening device, the device comprising:

[0019] A data processing module is used to obtain a data set corresponding to each task in the multi-task, where the data set includes several pieces of data; divide the data set into a test set and a screening set, and obtain a spliced ​​set based on the test set and the screening set;

[0020] A score calculation module uses a preset large model to determine a first test score for each piece of data in the test set and a second test score for each piece of data in the concatenated set;

[0021] The judgment module is used to use the corresponding data in the spliced ​​set as available data when the relationship between the second test score of any data in the spliced ​​set and the first test score of the corresponding data in the test set meets a preset condition.

[0022] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the multi-task data screening method based on a large model according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0023] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the large model-based multi-task data screening method of the first aspect or any corresponding embodiment thereof.

[0024] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the large model-based multi-task data screening method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0026] Figure 1 is a flowchart of a multi-task data screening method based on a large model according to an embodiment of the present invention;

[0027] Figure 2 is a flow chart of another multi-task data screening method based on a large model according to an embodiment of the present invention;

[0028] Figure 3 is a flowchart of another multi-task data screening method based on a large model according to an embodiment of the present invention;

[0029] Figure 4 is a flowchart of another multi-task data screening method based on a large model according to an embodiment of the present invention;

[0030] Figure 5 is a flowchart of another multi-task data screening method based on a large model according to an embodiment of the present invention;

[0031] Figure 6 is a structural block diagram of a data screening device according to an embodiment of the present invention;

[0032] Figure 7It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0034] With the rapid development of big model technology, big models have very good performance in various tasks in dialogue systems, such as intent recognition, invalid dialogue recognition, emotion recognition, multi-round dialogue rewriting, etc. When a big model is applied to multiple different tasks, due to the differences in the difficulty and cost of acquiring data for different tasks, the available data for different tasks is very unbalanced, which affects the balanced performance of the big model on different tasks, especially during the data iteration process. This problem will become more and more serious. The present invention proposes a multi-task data screening method based on a big model, which solves the above-mentioned problems by filtering and screening the data of different tasks and balancing the data of different tasks. It can greatly reduce the amount of data required for training and save the cost of training big models.

[0035] According to an embodiment of the present invention, an embodiment of a multi-task data screening method based on a large model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] In this embodiment, a multi-task data screening method based on a large model is provided, which can be used for mobile terminals such as mobile phones, tablet computers, etc. Figure 1 is a flowchart of a multi-task data screening method based on a large model according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0037] Step S101, obtaining a data set corresponding to each task in multiple tasks, where the data set includes a plurality of data items.

[0038] The big model has multiple tasks, such as intent recognition, invalid dialogue recognition, emotion recognition, multi-round dialogue rewriting, etc. Each task contains a corresponding data set, and each data set contains several pieces of data. The data sets of different tasks are used to train the performance of the big model in different tasks. It should be noted that when performing data screening, corresponding screening can be performed for the data set of each task, that is, the following steps S102 to S104 are the processing process of the data set of a single task.

[0039] Step S102, dividing the data set into a test set and a screening set, and obtaining a spliced ​​set based on the test set and the screening set.

[0040] The acquired data set is divided into a test set and a screening set in proportion, which can be a 5:5 ratio or other ratio. The spliced ​​set is obtained by splicing the test set and the screening set, providing a data basis for the subsequent calculation of the second test score. The spliced ​​set contains multiple spliced ​​data, each of which contains one piece of data from the screening set and one piece of data from the test set.

[0041] Step S103, using a preset large model to determine a first test score for each piece of data in the test set and a second test score for each piece of data in the concatenated set.

[0042] You can choose any open source big model for the big model, such as LLAMA, QWEN, etc. LLAMA is an open source big model on the Meta side, and QWEN is an open source big model on the Alibaba side. Input the test set into the big model to get the first test score for each data; input the concatenated set into the big model to get the second test score for each data.

[0043] Step S104, when the relationship between the second test score of any piece of data in the spliced ​​set and the first test score of the corresponding data in the test set meets a preset condition, the corresponding data in the spliced ​​set is used as available data.

[0044] The difference between the first test score and the second test score reflects the change in the recognition performance of the large model on the test set data after the test set data is spliced ​​with the filtered set data. When the second test score of any data in the spliced ​​set exceeds the first test score of the test set data it contains, and the part of the second test score that exceeds the first test score meets the preset conditions, it means that the filtered set data can change the performance of the large model, then the data in the filtered set contained in any data in the spliced ​​set is available data, and the available data is excellent training data.

[0045] The multi-task data screening method based on a large model provided in this embodiment constructs a test set, a screening set, and a splicing set, and calculates the second test score of the splicing set data and the first test score of the test set data corresponding to the screening set. By comparing the second test score with the first test score, excellent training data is screened out and junk data is filtered out, thereby solving the problem that different tasks have more or less data, the difference in quantity is too large, and the data imbalance seriously affects the performance of tasks with a small number of tasks.

[0046] In this embodiment, a multi-task data screening method based on a large model is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 2 is a flowchart of a multi-task data screening method based on a large model according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0047] Step S201, obtaining a data set corresponding to each task in multiple tasks, where the data set includes a plurality of data items.

[0048] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0049] Step S202, the data set is divided into a test set and a screening set, and a spliced ​​set is obtained based on the test set and the screening set. The plurality of data in the data set includes a plurality of conversation data.

[0050] Specifically, the above step S202 includes:

[0051] Step S2021, one-to-one splicing any conversation data in the test set with any conversation data in the screening set to obtain spliced ​​conversation data, wherein the spliced ​​conversation data includes spliced ​​question words and answers, and the spliced ​​question words include question words of any conversation data in the screening set and the conversation data in the test set, and the answer to the spliced ​​conversation data is the answer to the conversation data in the test set.

[0052] Any conversation data in the test set and any conversation data in the filter set include question words and answers. For example, any conversation data in the filter set is:

[0053] Question words: [“Based on the following conversation {user: What’s fun in Beijing?; system: Recommend the following attractions to you; user: What about Hangzhou?}, determine the user’s intention. The user’s intention is:”];

[0054] Answer: [“Recommend attractions in Hangzhou”].

[0055] Any dialogue data of the test set is:

[0056] Question words: [“Based on the following conversation {user: How is the weather today? System: Today is sunny, the temperature is 23-24 degrees Celsius; User: What about tomorrow?}, determine the user’s intention. The user’s intention is:”];

[0057] Answer: [“Check tomorrow’s weather”].

[0058] The concatenated conversation data of the concatenated set consisting of any conversation data in the above screening set and any conversation data in the test set is as follows:

[0059] Question words: [“Answer the question based on the example. The example is: Based on the following conversation {user: What’s fun in Beijing?; system: Recommend the following attractions to you; user: What about Hangzhou?}, judge the user’s intention. The user’s intention is: recommend attractions in Hangzhou. The question is: Based on the following conversation {user: How’s the weather today?; system: It’s sunny today, with a temperature of 23-24 degrees Celsius; user: What about tomorrow?}, judge the user’s intention. The user’s intention is:”];

[0060] The answer is: [“Check tomorrow’s weather”].

[0061] Step S2022, determining a splicing set according to the splicing conversation data.

[0062] By splicing any data set in the screening set and any data set in the test set to obtain a spliced ​​conversation data, the process of obtaining a spliced ​​conversation data is repeated to obtain a plurality of spliced ​​conversation data, and the plurality of spliced ​​conversation data constitute a spliced ​​set. It should be noted that in the splicing process, each data in the data set is used only once and is not reused. For example, if data A in the screening set and data B in the test set are spliced ​​into spliced ​​conversation data C, data A in the screening set and data B in the test set will not be spliced ​​again.

[0063] Step S203: Use the preset large model to determine the first test score of each piece of data in the test set and the second test score of each piece of data in the spliced ​​set. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0064] Step S204: When the relationship between the second test score of any piece of data in the spliced ​​set and the first test score of the corresponding data in the test set meets the preset condition, the corresponding data in the spliced ​​set is used as available data. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0065] The multi-task data screening method based on a large model provided in this embodiment provides a data basis for subsequent screening of available data by splicing the test set data with the screening set.

[0066] In this embodiment, a multi-task data screening method based on a large model is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablets, etc. Figure 3 It is a flowchart of the multi-task data screening method based on a large model according to an embodiment of the present invention, as Figure 3 shown, and this process includes the following steps:

[0067] Step S301, obtain the data set corresponding to each task in the multi-task, and the data set includes several pieces of data. For details, please refer to Figure 1 step S101 of the embodiment shown, which will not be elaborated here.

[0068] Step S302, divide the data set into a test set and a screening set, and obtain a splicing set based on the test set and the screening set. For details, please refer to Figure 1 step S102 of the embodiment shown, which will not be elaborated here.

[0069] Step S303, use a preset large model to determine the first test score of each piece of data in the test set and the second test score of each piece of data in the splicing set. The several pieces of data include several pieces of dialogue data, and each piece of dialogue data includes a question word and an answer, and both the question word and the answer include several word materials.

[0070] Specifically, the above step S303 includes:

[0071] Step S3031, use a preset large model to determine the first test score of each piece of data in the test set.

[0072] In some optional implementation manners, the above step S3031 includes:

[0073] Step a1, input each piece of dialogue data in the test set into the preset large model to obtain the output vector of each word material included in the answer of each piece of dialogue data.

[0074] Both the question word and the answer include several word materials. For example:

[0075] Answer: ["Query tomorrow's weather"], divide the answer into 6 word materials with each single character as a unit. The first word material corresponding to the answer is "查", and the last word material corresponding to the answer is "气".

[0076] Input each dialogue data of the test set into the preset big model, and you will get the output vector of each word in the dialogue data, including the output vector of the question word and the output vector of the answer word. You only need to select the output vector of the answer word and the number of words corresponding to the answer for subsequent calculations. The output vector corresponding to the word reflects the ability of the big model to predict the word.

[0077] Step a2, summing up the negative logarithmic probabilities of the output vectors of each word material included in the answer and dividing the sum by the number of words material included in the answer to obtain a first test score for the dialogue data.

[0078] The negative logarithmic probability of the output vector of each word is calculated using the following formula:

[0079] logP_t=-log(softmax(logits_t));

[0080] Among them, logits_t is the output vector of the t-th word, logP_t is the negative logarithmic probability of the t-th word, and softmax is the softmax function used to calculate the probability of the output vector.

[0081] The softmax function is used to calculate the probability of the output vector of each word corresponding to the answer, and the negative logarithmic probability of the output vector of each word is further calculated. The negative logarithmic probability of each word is summed up and divided by the number of words corresponding to the answer to get the first test score. The first test score reflects the gap between the recognition result of the large model for the dialogue data of the test set and the answer.

[0082] Step S3032: Use the preset large model to determine the second test score of each piece of data in the spliced ​​set.

[0083] In some optional implementations, the above step S3032 includes:

[0084] Step b1, input any piece of spliced ​​dialogue data in the splicing set into the preset large model to obtain the output vector of each word material included in the answer of the spliced ​​dialogue data.

[0085] Input any piece of spliced ​​conversation data in the spliced ​​set into the preset big model, aiming to use the conversation data of the filtered set contained in the spliced ​​conversation data as an example, so that the big model recognizes the mapping relationship between the question words and the answers of the learning example, and based on this mapping relationship, identifies and predicts the answers to the question words of the conversation data of the test set contained in the spliced ​​conversation data. At this time, the output vector corresponding to the word material included in the answer to the spliced ​​conversation data reflects the ability of the big model to predict the word material under the condition of using the filtered set logarithmic data as an example.

[0086] Step b2, summing up the negative logarithmic probabilities of the output vectors of each word material included in the answer and dividing the sum by the number of words material included in the answer to obtain a second test score for the concatenated dialogue data.

[0087] The calculation steps for obtaining the second test score are the same as those for the first test score. The softmax function is used to calculate the probability of the output vector of each word corresponding to the answer of the concatenated set dialogue data, and the negative logarithmic probability of the probability of the output vector of each word is further calculated. The negative logarithmic probability of each word is summed and divided by the number of words corresponding to the answer to obtain the second test score. The second test score reflects the gap between the recognition results of the large model for the test set dialogue data under the condition that the screening set dialogue data is used as an example and the answer.

[0088] Step S304: When the relationship between the second test score of any piece of data in the spliced ​​set and the first test score of the corresponding data in the test set meets the preset condition, the corresponding data in the spliced ​​set is used as available data. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0089] The large model-based multi-task data screening method provided in this embodiment calculates a first test score of the test set dialogue data and a second test score of the spliced ​​dialogue data of the spliced ​​set corresponding to the test set dialogue data, and by comparing the first test score and the second test score, determines whether the screening set data corresponding to the spliced ​​dialogue data can be used as usable data, provides a method for determining whether the data is good training data, and improves the efficiency and accuracy of screening available data.

[0090] In this embodiment, a multi-task data screening method based on a large model is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 4 is a flowchart of a multi-task data screening method based on a large model according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0091] Step S401, obtain a data set corresponding to each task in the multi-task, the data set includes a number of data. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0092] Step S402: divide the data set into a test set and a screening set, and obtain a concatenated set based on the test set and the screening set. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0093] Step S403: Use the preset large model to determine the first test score of each piece of data in the test set and the second test score of each piece of data in the spliced ​​set. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0094] Step S404: when the relationship between the second test score of any piece of data in the spliced ​​set and the first test score of the corresponding data in the test set meets a preset condition, the corresponding data in the spliced ​​set is used as available data.

[0095] Specifically, the above step S404 includes:

[0096] Step S4041, corresponding the corresponding concatenated conversation data in the concatenated set to the corresponding conversation data in the filtered set as available data.

[0097] By constructing a spliced ​​set, we obtain the first test score of the large model without adding the filtered set data as an example, and the second test score of the large model after adding the filtered set data as an example. By comparing whether there is a gap between the first test score and the second test score, we determine whether the filtered set data as an example can affect the recognition and prediction capabilities of the large model. If there is a gap between the first test score and the second test score, it means that the filtered set data can affect the large model. When the difference between the first test score and the second test score meets the preset conditions, the filtered set data corresponding to the spliced ​​dialogue data is used as available data.

[0098] The large-model-based multi-task data screening method provided in this embodiment screens out the available data in the screening set by comparing the second test score of the concatenated set conversation data with the first test score of the conversation data of the corresponding test set. The method is simple and easy to operate, thereby improving the efficiency of screening the available data.

[0099] In this embodiment, a multi-task data screening method based on a large model is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 5 is a flowchart of a multi-task data screening method based on a large model according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0100] Step S501, obtain a data set corresponding to each task in the multi-task, the data set includes a number of data. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0101] Step S502: divide the data set into a test set and a screening set, and obtain a concatenated set based on the test set and the screening set. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0102] Step S503: Use the preset large model to determine the first test score of each piece of data in the test set and the second test score of each piece of data in the spliced ​​set. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0103] Step S504: When the relationship between the second test score of any piece of data in the spliced ​​set and the first test score of the corresponding data in the test set meets the preset condition, the corresponding data in the spliced ​​set is used as available data. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0104] Step S505, looping the process of judging whether the splicing conversation data of the splicing set can be used as available data, until every splicing conversation data of the splicing set is judged to be complete, and then the screening is finished.

[0105] The process of determining whether the filtered set data corresponding to the dialogue data of the filtered set can be used as available data is repeated until all the concatenated set dialogue data are determined and available data for a task is obtained through screening.

[0106] Step S506, repeating the process of screening the splicing set of each task to obtain available data for each task.

[0107] The process of filtering to obtain available data for a task is repeated to obtain available data for each task.

[0108] The multi-task data screening method based on a large model provided in this embodiment improves the efficiency of screening available data, reduces the differences in difficulty and cost of acquiring data for different tasks, balances the available data for different tasks, and enables the large model to perform evenly on different tasks.

[0109] As one or more specific application embodiments of the embodiments of the present invention, the multi-task data screening method based on a large model includes the following steps:

[0110] 1. Obtain the data set corresponding to each task in the multi-task, and the data set includes several pieces of data.

[0111] Get the data set corresponding to each task. The data set includes several pieces of data. The data includes several pieces of dialogue data. The dialogue data consists of question words and answers. The answers are the correct answers corresponding to the question words. Both the question words and the answers include several words.

[0112] 2. Divide the data set into a test set and a screening set, and obtain a spliced ​​set based on the test set and the screening set.

[0113] The data set is divided into a test set and a screening set in equal proportions. The test set and the screening set contain the same amount of dialogue data. Any dialogue data in the test set is concatenated with any dialogue data in the screening set to obtain a concatenated set. The dialogue data in the concatenated set includes question words and answers. The question words and answers of the concatenated dialogue data both include a number of word materials.

[0114] 3. Use the preset large model to determine the first test score of each data in the test set and the second test score of each data in the spliced ​​set.

[0115] The test set dialogue data is input into the preset large model to obtain the output vector of each word material included in the answer of the dialogue data, and the negative logarithmic probability of each output vector is calculated using the softmax function. The sum of the negative logarithmic probability of each output vector is divided by the number of words included in the answer to obtain the first test score.

[0116] Based on the method steps for obtaining the first test score, the concatenated set dialogue data is input into a preset large model to obtain an output vector for each word included in the answer to the concatenated set dialogue data, a softmax function is used to calculate the negative logarithmic probability of each output vector, and the sum of the negative logarithmic probability of each output vector is divided by the number of words included in the answer to obtain a second test score.

[0117] 4. When the relationship between the second test score of any data in the spliced ​​set and the first test score of the corresponding data in the test set meets the preset condition, the corresponding data in the spliced ​​set is used as available data.

[0118] According to the requirements for available data, a corresponding preset condition is set. The preset condition has the same data type as the first test score and the second test score and can be set to a real value. When the ratio of the second test score to the first test score exceeds the real value, the filtered set conversation data corresponding to the spliced ​​set conversation data is available data.

[0119] 5. The process of cyclically judging whether the splicing conversation data of the splicing set can be used as available data is completed until each splicing conversation data of the splicing set is judged to be complete, and the screening is completed.

[0120] The process of cyclically judging whether the filter set dialogue data corresponding to the splicing dialogue data of the splicing set can be used as available data, until all the splicing dialogue data of the splicing set are judged to be complete, and all available data of a task are obtained.

[0121] 6. Repeat the process of filtering the spliced ​​set for each task to obtain the available data for each task.

[0122] Repeat the process of obtaining all available data for one task to obtain available data for other tasks of the large model.

[0123] In the present embodiment, a data screening device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0124] This embodiment provides a data screening device, such as Figure 6 As shown, including:

[0125] The data processing module 601 is used to obtain a data set corresponding to each task in the multi-task, wherein the data set includes a plurality of data items; divide the data set into a test set and a screening set, and obtain a spliced ​​set based on the test set and the screening set;

[0126] A score calculation module 602, which uses a preset large model to determine a first test score for each piece of data in the test set and a second test score for each piece of data in the concatenated set;

[0127] The judgment module 603 is used to use the corresponding data in the spliced ​​set as available data when the relationship between the second test score of any data in the spliced ​​set and the first test score of the corresponding data in the test set meets a preset condition.

[0128] In some optional implementations, the data processing module 601 includes:

[0129] A splicing unit is used to splice any conversation data in the test set with any conversation data in the screening set one-to-one to obtain spliced ​​conversation data, wherein the spliced ​​conversation data includes spliced ​​question words and answers, and the spliced ​​question words include question words of any conversation data in the screening set and the conversation data in the test set, and the answer to the spliced ​​conversation data is the answer to the conversation data in the test set; and a spliced ​​set is determined based on the spliced ​​conversation data.

[0130] In some optional implementations, the determination module 602 includes:

[0131] The first test scoring unit uses a preset large model to determine the first test score of each data in the test set.

[0132] The second test scoring unit uses a preset large model to determine the second test score of each data in the splicing set.

[0133] In some optional implementations, the first test scoring unit includes:

[0134] The first output vector calculation subunit is used to input each dialogue data of the test set into a preset large model to obtain an output vector of each word material included in the answer of each dialogue data.

[0135] The first probability summing subunit is used to sum the negative logarithmic probability of the output vector of each word material included in the answer and divide it by the number of words included in the answer to obtain the first test score of the dialogue data; the negative logarithmic probability of the output vector of each word material is calculated using the following formula:

[0136] logP_t=-log(softmax(logits_t));

[0137] Among them, logits_t is the output vector of the t-th word, logP_t is the negative logarithmic probability of the t-th word, and softmax is the softmax function used to calculate the probability of the output vector.

[0138] In some optional implementations, the second test scoring unit includes:

[0139] The second output vector calculation subunit is used to input any piece of spliced ​​dialogue data in the spliced ​​set into a preset large model to obtain an output vector of each word material included in the answer of the spliced ​​dialogue data.

[0140] The second probability summing subunit is used to sum the negative logarithmic probabilities of the output vectors of each word material included in the answer and divide the sum by the number of words included in the answer to obtain a second test score for the concatenated dialogue data.

[0141] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0142] The data screening device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0143] The embodiment of the present invention also provides a computer device having the above Figure 6 The data filtering device shown.

[0144] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0145] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0146] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

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

[0148] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0149] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0150] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0151] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0152] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0153] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A multi-task data screening method based on a large model, characterized in that: The method comprises: Obtain a data set corresponding to each task in the multi-task, wherein the data set includes a plurality of data items; Dividing the data set into a test set and a screening set, and obtaining a concatenated set based on the test set and the screening set; A preset large model is used to determine a first test score for each piece of data in the test set and a second test score for each piece of data in the concatenated set; When the relationship between the second test score of any piece of data in the spliced ​​set and the first test score of the corresponding data in the test set meets a preset condition, the corresponding data in the spliced ​​set is used as available data.

2. The method according to claim 1, characterized in that The plurality of pieces of data include a plurality of dialogue data, each piece of dialogue data includes a question word and an answer, and the question word and the answer each include a plurality of word materials, and a first test score of each piece of data in the test set is determined by using a preset large model, including: Input each dialogue data of the test set into the preset large model to obtain the output vector of each word material included in the answer of each dialogue data; The negative logarithmic probability of the output vector of each word material included in the answer is summed and divided by the number of words included in the answer to obtain the first test score of the dialogue data.

3. The method according to claim 2, characterized in that The negative logarithmic probability of the output vector of each word is calculated using the following formula: logP_t=-log(softmax(logits_t)); Among them, logits_t is the output vector of the t-th word, logP_t is the negative logarithmic probability of the t-th word, and softmax is the softmax function used to calculate the probability of the output vector.

4. The method according to claim 1, characterized in that: The plurality of pieces of data include a plurality of pieces of conversation data, and a concatenated set is obtained based on a test set and a screening set, including: splicing any dialogue data in the test set with any dialogue data in the screening set one-to-one to obtain spliced ​​dialogue data, wherein the spliced ​​dialogue data includes spliced ​​question words and answers, the spliced ​​question words include any dialogue data in the screening set and the question words of the dialogue data in the test set, and the answer to the spliced ​​dialogue data is the answer to the dialogue data in the test set; A splicing set is determined according to the splicing conversation data.

5. The method according to claim 4, characterized in that The preset large model is used to determine the second test score of each data in the splicing set, including: Input any piece of concatenated dialogue data in the concatenated set into the preset large model to obtain the output vector of each word material included in the answer of the concatenated dialogue data; The negative logarithmic probability of the output vector of each word material included in the answer is summed and divided by the number of words included in the answer to obtain the second test score of the concatenated dialogue data.

6. The method according to claim 4, characterized in that The corresponding data in the mosaic set is included as available data: Corresponding the corresponding concatenated conversation data in the concatenated set to the corresponding conversation data in the filtered set is used as available data; When the relationship between the second test score of any piece of data in the spliced ​​set and the first test score of the corresponding data in the test set meets a preset condition, after taking the corresponding data in the spliced ​​set as available data, the method further includes: The process of cyclically judging whether the splicing conversation data of the splicing set can be used as available data, until each splicing conversation data of the splicing set is judged to be complete, and then the screening ends; The process of filtering the concatenated set for each task is repeated to obtain the available data for each task respectively.

7. A data screening device, characterized in that: The device comprises: A data processing module is used to obtain a data set corresponding to each task in the multi-task, wherein the data set includes a plurality of data items; divide the data set into a test set and a screening set, and obtain a spliced ​​set based on the test set and the screening set; A score calculation module uses a preset large model to determine a first test score for each piece of data in the test set and a second test score for each piece of data in the concatenated set; The judgment module is used to use the corresponding data in the spliced ​​set as available data when the relationship between the second test score of any data in the spliced ​​set and the first test score of the corresponding data in the test set meets a preset condition.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the large model-based multi-task data screening method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the large model-based multi-task data screening method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the large model-based multi-task data screening method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data screening method and device, equipment and computer readable storage medium

    CN110929524A

  • Dialogue intention recognition method and recognition system based on multi-task learning

    CN112417894A

  • High-dimensional data abnormal subspace detection method based on auto-encoder and genetic algorithm

    CN114036992A

  • Man-machine conversation-based intention recognition method and system, terminal and medium

    CN114564968A

  • Conversation processing method and system, storage medium and terminal

    CN116303949A