WO2022126987A1 - Test method and apparatus for question-and-answer intention classification model, device and medium - Google Patents

Test method and apparatus for question-and-answer intention classification model, device and medium Download PDF

Info

Publication number
WO2022126987A1
WO2022126987A1 PCT/CN2021/091718 CN2021091718W WO2022126987A1 WO 2022126987 A1 WO2022126987 A1 WO 2022126987A1 CN 2021091718 W CN2021091718 W CN 2021091718W WO 2022126987 A1 WO2022126987 A1 WO 2022126987A1
Authority
WO
WIPO (PCT)
Prior art keywords
intent
test
question
target
data
Prior art date
Application number
PCT/CN2021/091718
Other languages
French (fr)
Chinese (zh)
Inventor
宫雪
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022126987A1 publication Critical patent/WO2022126987A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques

Definitions

  • the present application relates to the field of artificial intelligence technology, and in particular, to a testing method, apparatus, device and medium for a question-and-answer intent classification model.
  • the model test of the classification model needs to be based on sample data.
  • some testers will use tools such as Excel to perform manual calculation and statistics.
  • the inventor realizes that when the number of sample data is large, manual calculation takes a long time and does not precise.
  • the model is continuously iteratively optimized, resulting in a very large number of calculations, which further increases the workload of the calculation.
  • the purpose is to solve the technical problem that manual calculation is time-consuming and inaccurate after the classification model of the prior art is trained and the model is tested by manual calculation and statistics through Excel.
  • the main purpose of this application is to provide a test method, device, equipment and medium for a question-and-answer intent classification model, which aims to solve the problem that the prior art classification model is trained by manual calculation and statistics through Excel to perform model testing, resulting in manual calculation consumption. Long and inaccurate technical issues.
  • the present application proposes a method for testing a question-and-answer intent classification model, the method comprising:
  • test sample set includes a plurality of test samples
  • test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data
  • the report is generated according to the respective corresponding test sample subsets of the product identifiers and the accurate intent prediction result set, to obtain the target question answering intent classification model test report.
  • the target question answering intent classification model test report includes: the respective product identifiers corresponding to The precision data, recall data and total number of positive samples for each intent value of .
  • the present application also proposes a test device for a question-and-answer intent classification model, the device comprising:
  • test sample acquisition module configured to acquire a test sample set, the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question question sentence intent identification data, and test question intent identification data;
  • test sample dividing module configured to divide the plurality of test samples by using the product identifier, and obtain a test sample subset corresponding to each of the product identifiers
  • an intent prediction module configured to respectively input the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtain an intent prediction result set corresponding to each of the product identifiers;
  • Intent prediction accurate judgment module used for each of the product identifiers corresponding to the intent prediction result set, the test question question sentence intent determination data and the test question of the test sample subset corresponding to each of the product identifiers respectively Whether the intention identification data is used to accurately judge the intention prediction of each of the test samples, and obtain a set of accurate intention prediction results corresponding to each of the product identifications;
  • the report generation module is configured to generate a report according to the respective corresponding test sample subsets and the accurate intent prediction result set of each of the product identifiers, and obtain a test report of the target question answering intent classification model, where the target question answering intent classification model test report includes: each Accuracy data, recall data and total number of positive samples of each intent value corresponding to the product identifiers.
  • the present application also proposes a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the following method steps when executing the computer program:
  • test sample set includes a plurality of test samples
  • test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data
  • the report is generated according to the respective corresponding test sample subsets of the product identifiers and the accurate intent prediction result set, to obtain the target question answering intent classification model test report.
  • the target question answering intent classification model test report includes: the respective product identifiers corresponding to The precision data, recall data and total number of positive samples for each intent value of .
  • the present application also proposes a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following method steps are implemented:
  • test sample set includes a plurality of test samples
  • test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data
  • the report is generated according to the respective corresponding test sample subsets of the product identifiers and the accurate intent prediction result set, to obtain the target question answering intent classification model test report.
  • the target question answering intent classification model test report includes: the respective product identifiers corresponding to The precision data, recall data and total number of positive samples for each intent value of .
  • test sample set includes a plurality of test samples
  • the test samples include: product identification, test question sample data, and test question questions Intention-specific data and whether the test questions are intention-specific data; use product identifiers to divide multiple test samples to obtain test sample subsets corresponding to each product identifier; input the test sample subsets corresponding to each product identifier into their corresponding
  • the question-and-answer intent classification model to be tested performs intent prediction, and obtains the corresponding intent prediction result set for each product identifier; according to the respective intent prediction result set corresponding to each product identifier and the test sample subset corresponding to each product identifier, the test question asks.
  • Sentence intent rating data and whether the test question is intent rating data Accurately judge the intent prediction of each test sample, and obtain an accurate result set of intent prediction corresponding to each product identifier; according to each product identifier, the corresponding test sample subset and intent prediction are accurate
  • the result set is used for report generation, and the target question answering intent classification model test report is obtained.
  • the target question answering intent classification model test report includes: accuracy data, recall data and total number of positive samples of each intent value corresponding to each product identifier, thus realizing the adoption of the test.
  • the sample set is used to test the question-and-answer intent classification model to be tested and automatically generate the target question-and-answer intent classification model test report, which avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculation, and improves the accuracy of the question-and-answer intent classification model.
  • FIG. 1 is a schematic flowchart of a method for testing a question-and-answer intent classification model according to an embodiment of the present application
  • FIG. 2 is a schematic block diagram of a structure of a testing device for a question-and-answer intent classification model according to an embodiment of the present application
  • FIG. 3 is a schematic structural block diagram of a computer device according to an embodiment of the present application.
  • the test method for the question-answer intent classification model uses a test sample set to test the question-and-answer intent classification model to be tested and automatically generates a test report of the target question-answer intent classification model, which avoids manual model testing and avoids the problem of long and inaccurate manual calculation. , which improves the accuracy of the question answering intent classification model.
  • an embodiment of the present application provides a method for testing a question-and-answer intent classification model.
  • the method includes:
  • test sample set includes a plurality of test samples
  • test samples include: product identification, test question sample data, test question question sentence intent identification data, and test question intent identification data;
  • S4 Perform each step according to the intent prediction result set corresponding to each of the product identifiers, the test question question sentence intent determination data and the test question intent determination data of the test sample subsets corresponding to each of the product identifiers respectively. Accurately judge the intention prediction of each of the test samples, and obtain a set of accurate intention prediction results corresponding to each of the product identifiers;
  • S5 Generate a report according to the respective test sample subsets corresponding to each of the product identifiers and a set of accurate intent prediction results, and obtain a target question answering intent classification model test report, where the target question answering intent classification model test report includes: each of the product identifiers Accuracy data, recall data, and total number of positive samples corresponding to each intent value.
  • a test sample set is obtained, and the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data; the product identification to many Divide the test samples to obtain the corresponding test sample subsets for each product identifier; input the test sample subsets corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested for intent prediction, and obtain the respective product identifiers.
  • Corresponding intent prediction result set carry out each test sample according to the respective intent prediction result set corresponding to each product identifier, the test question question intent rating data and the test question intent rating data corresponding to each product identifier respective test sample subset.
  • the report is generated, and the target question answering intent classification model test report is obtained, the target
  • the question and answer intent classification model test report includes: accuracy data, recall rate data and total number of positive samples of each intent value corresponding to each product identifier, so that the question and answer intent classification model to be tested is tested using the test sample set and the target question and answer is automatically generated.
  • the intent classification model test report avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculations, and improves the accuracy of the question answering intent classification model.
  • test sample set input by the user may be obtained, or the test sample set sent by the third-party application system.
  • test sample product identification, test question sample data, test question question intent identification data, and test question intent identification data are in one-to-one correspondence.
  • the test sample further includes a sample identification.
  • the sample identifier may be an identifier that uniquely identifies a test sample, such as a sample name, a sample ID, or the like.
  • the product identifier may be an identifier that uniquely identifies a product, such as a product name, a product ID, or the like.
  • test question sample data refers to the text data of the questions raised by the user.
  • Each test question sample data corresponds to the text data of a question posed by a user in a round of dialogue.
  • the test question question sentence intent calibration data refers to the question sentence intent calibration data corresponding to the test question sample data.
  • Question intent includes multiple intent values.
  • the intent value of the question intent under the product identifier aries includes: the previous application failed, there is a problem with the credit report, and how do I know my phone number, which is not specifically limited in this example.
  • test question means the specified data as "The previous application failed", and when the sample data of the test question is "Product A1" Guess, product A2 has been tried without success", the test question question means the specified data is "the previous application failed", when the test question sample data is "the company G1 applied for a credit yesterday and said it is not qualified", The test question question means the specified data is "Failed to apply before”, when the test question sample data is "That credit report is not very good”, the test question question means the specified data is "There is a problem with the credit report”, when the test question sample data is "The credit report is not good” When the test question is "I haven't done credit investigation”, the test question question means the specified data is "There is a problem with the credit investigation”, and when the test question sample data is "Where did you get the phone number”, the test question question means the specified data is "How do you know me?" telephone
  • Whether the test question is intended to be calibrated data refers to the calibration data of whether the test question sample data is intended or not.
  • the intent includes two intent values, the two intent values are yes and no. For example, when the sample data of the test question is "true”, whether the test question intends to define the data as "yes” is not specifically limited in this example.
  • the step of obtaining the test sample set includes:
  • the model test request may be sent by the user, or may be actively triggered by the program file of the present application.
  • a model test request refers to a request to test the question-and-answer intent classification model to be tested.
  • the data is read row by row starting from the first row, and each row of data is taken as a test sample; all the test samples are taken as the test sample set.
  • table headers in the target Excel file include but are not limited to: sample identification, product identification, test question sample data, test question question intent identification data, and test question intent identification data.
  • test samples with the same product identification are put into a subset, and the subset is taken as the test sample subset corresponding to the product identification. That is, each product identifier corresponds to a test sample subset, and all test samples in each test sample subset have the same product identifier.
  • each test sample in the test sample subset corresponding to each product identifier is sequentially input into the question-and-answer intent classification model to be tested corresponding to the product identifier to perform intent prediction, and the corresponding product identifier is obtained.
  • the intent prediction result of the test sample subset, and all the obtained intent prediction results are taken as the intent prediction result set corresponding to the product identifier corresponding to the test sample subset. That is, each product identifier corresponds to an intent prediction result set.
  • each test sample corresponds to an intent prediction result.
  • the intent prediction result has only one value, and the intent prediction result is: question intent or intent.
  • the question and answer intent classification model to be tested that is, the question and answer intent classification model that has been trained and needs further testing.
  • the question and answer intent classification model is a model that predicts the intent of a question sentence and whether it is intended for text data.
  • each test sample is accurately judged on the intent prediction result set corresponding to the same product identifier, the test question question intent determination data and the test question intent determination data of the test sample subset, An accurate result set of intent prediction corresponding to the product identifier is obtained. That is, each product identifier corresponds to a set of accurate results for intent prediction.
  • test samples S1 in the test sample subset of the product identifier C1 there are 3 test samples S1 in the test sample subset of the product identifier C1 (the test question is intended to indicate that the data is empty, and the test question is to indicate that the data is yes), S2 (the test question is intended to be defined as the data) SF2, whether the test question means the specified data is empty), S3 (the test question means the specified data is SF2, whether the test question means the specified data is empty), the intent prediction corresponding to the test sample S1 in the intent prediction result set of the product identifier C1
  • the result is question intent SF1, the intent prediction result corresponding to test sample S2 is question intent SF2, and the intent prediction result corresponding to test sample S3 is question intent SF1, then the accurate result of intent prediction corresponding to test sample S1 is wrong (test question The question intent is defined data is empty, the test question is intended to define the data is yes, the intent prediction result is question intent SF1, the test question question intent is not the same as the intent prediction result
  • Preset report generation rules include but are not limited to: report templates.
  • a positive sample is the number of test samples in which the calibration data (that is, the test question is intended to be calibrated and the test question is intended to be calibrated) is the same as the intended value to be calculated.
  • the positive samples refer to the test samples whose calibration data is Y1, and the test samples whose calibration data is not Y1 are negative samples, which are not specifically limited in this example. .
  • test sample subset corresponding to each product identifier is input into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and a set of intent prediction results corresponding to each product identifier is obtained. steps, including:
  • S31 Extract a test sample subset from the test sample subsets corresponding to each of the product identifiers by using the product identifiers to be predicted, and obtain a target test sample subset, where the product identifiers to be predicted are among the respective product identifiers any of the;
  • the intent prediction result set corresponding to each of the product identifiers is determined, which provides a basis for the subsequent determination of the accuracy and recall rate of the question-and-answer intent classification model to be tested.
  • test sample subset corresponding to the product identifier found in the test sample subset corresponding to each product identifier is used as the target test sample subset.
  • step 32 the product identifier to be predicted is searched from the model library to be tested, and the question answer intent classification model to be tested corresponding to the product identifier found in the model library to be tested is used as the target question answer intent classification model to be tested.
  • the model library to be tested includes: a correspondence table between product identifiers and model identifiers, and data of the question-and-answer intent classification model to be tested.
  • the product identification and model identification correspondence table includes: product identification, model identification, and each product identification corresponds to a model identification.
  • the model identifier may be an identifier that uniquely identifies a question-answer intent classification model to be tested, such as a model name, a model ID, or the like.
  • step 33 input each test sample in the target test sample subset into the target question-and-answer intent classification model to be tested to perform intent prediction, and obtain a plurality of the intent prediction results corresponding to the product identifier to be predicted ; Take all the intent prediction results corresponding to the product identifier to be predicted as the intent prediction result set corresponding to the product identifier to be predicted. That is to say, the target question-and-answer intent classification model to be tested only performs intent prediction on one test sample at a time.
  • steps S31 to S34 are repeatedly performed until the intent prediction result sets corresponding to all the product identifiers are determined.
  • the above-mentioned intent prediction result set corresponding to each of the product identifiers, the test question question sentence intent determination data and the test question whether the test sample subset corresponding to each of the product identifiers are respectively
  • the intention identification data is used to accurately judge the intention prediction of each of the test samples, and the steps of obtaining an accurate intention prediction result set corresponding to each of the product identifications include:
  • S41 respectively process the test question question sentence intent determination data and the test question intent determination data of each of the test samples in the test sample set according to the intent priority, to obtain a test sample set after the intent priority processing;
  • This embodiment realizes the accurate judgment of the intention prediction of each test sample, which provides a basis for the subsequent judgment of the accuracy and recall rate of the question-and-answer intention classification model to be tested; and the test samples are processed according to the intention priority.
  • the intent priority is satisfied, it is ensured that the calibration data of each test sample has a unique intent value, which is conducive to improving the accuracy of model testing and making the optimization of the model conform to the intent priority.
  • the test question question intent rating data and the test question intent rating data of the same test sample are processed according to intent priority, and a processed test sample with intent priority corresponding to the test sample is obtained after processing. Therefore, when the test question of the same test sample asks whether the intent calibration data and the test question whether the intent calibration data exists, the calibration data with the highest intent priority is determined according to the intent priority as the test sample after the intent priority processing. Calibration data. That is to say, the calibration data of the test sample after intent priority processing has only one intent value.
  • step 42 extract an intent prediction result from the intent prediction result set corresponding to each product identifier according to a preset extraction rule, and use the extracted intent prediction result as a target intent prediction result.
  • the preset extraction rules include but are not limited to: extracting in sequence according to the sequence of the sample identifiers.
  • the target intention prediction result is whether it is intention or not, it means that it is necessary to compare it with the test question whether it is intended or not; the sample identifier of the test sample corresponding to the target intention prediction result is in the intention priority Extract the test samples after the intention priority processing from the processed test sample set, extract whether the test question is intentional or not from the extracted test sample after the intention priority processing, and determine whether the extracted test question is Intention calibration data as the test question to be judged is the intention calibration data; when the target intention prediction result and the to-be-judged test question whether the intention calibration data are the same, it means that the target intention prediction result is correct, then determine The accurate result of the intention prediction corresponding to the target intention prediction result is correct; when the target intention prediction result and the test question to be judged whether the intention specification data are different, it means that the target intention prediction result is wrong , at this time, it is determined that the accurate result of the intention prediction corresponding to the target intention prediction result is an error.
  • the target intent prediction result is the question intent, it means that it needs to be compared with the test question question intent identification data; the sample identifier of the test sample corresponding to the target intent prediction result is in the intent Extracting the test sample after the intention priority processing from the test sample set after the priority processing, extracting the test question question sentence intention determination data from the extracted test sample after the intention priority processing, and using the extracted The test question question intent determination data is used as the test question intent determination data to be judged; when the target intent prediction result is the same as the test question intent determination data to be determined, it means the target intent prediction result To be correct, at this time, it is determined that the accurate result of the intent prediction corresponding to the target intent prediction result is correct; when the target intent prediction result and the to-be-determined question sentence intent determination data are different, it means that the target intent prediction result is not the same. If the target intention prediction result is wrong, at this time, it is determined that the intention prediction accurate result corresponding to the target intention prediction result is wrong.
  • steps S42 to S45 are repeatedly executed until the accurate results of the intention prediction of all the intention prediction results are determined.
  • the accurate results are predicted according to all the intentions as a set of accurate prediction results of the intention corresponding to each of the product identifiers.
  • the above-mentioned processing of the test question question intention identification data and the test question intention identification data of each of the test samples in the test sample set are carried out according to the intention priority, and the intention priority processing is obtained.
  • the steps to test the sample collection include:
  • S412 Delete the test question question intent calibration data of the test sample when both the test question question intent calibration data and the test question intent calibration data of the test sample exist. Processing, get the test sample after intent priority processing;
  • S413 Determine the set of test samples after the intention priority processing according to all the test samples processed by the intention priority.
  • test samples are processed according to the intent priority, and when the intent priority is satisfied, it is ensured that the calibration data of each test sample has a unique intent value, which is beneficial to improve the accuracy of the model test and make the The optimization of the model conforms to the intent priority.
  • test question question intent rating data and the test question intent rating data of the same test sample are compared each time.
  • step 412 when there are both the test question question intention calibration data and the test question intention calibration data of the test sample, it means that the test sample has two calibration data, because the intention is given priority
  • the level is whether the intent is higher than the OA intent.
  • delete processing is performed on the test question question intent determination data of the test sample, so as to retain the intent determination data corresponding to the test question with high intent priority.
  • the test sample with only one calibration data after deletion processing is regarded as the test sample after intent priority processing.
  • the above-mentioned steps of generating a report according to the respective corresponding test sample subsets and intent prediction accurate result sets of the product identifiers to obtain the test report of the target question answering intent classification model include:
  • S51 Use the target product identifier to extract data from the test sample subset and the intent prediction accurate result set corresponding to each of the product identifiers, and obtain the test sample subset to be calculated and the intent prediction accurate result set to be calculated.
  • the product identification is any of the respective said product identifications;
  • S52 Calculate the accuracy rate and recall rate of each intent value according to the test sample subset to be calculated and the intent prediction accurate result set to be calculated, and obtain each of the intent values corresponding to the target product identifier. the precision data, the recall data, and the total number of positive samples;
  • target product identification is any one of the product identifications, until the accuracy data, the recall data and the positive samples of each of the intention values corresponding to all the product identifications are determined total;
  • S54 Generate a report according to the accuracy rate data, the recall rate data, and the total number of positive samples of the respective intent values corresponding to the respective product identifiers, to obtain the target question answering intent classification model test report.
  • This embodiment automatically generates reports according to the respective test sample subsets corresponding to each of the product identifiers and the accurate result set of intention prediction, which avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculation, and improves the classification of question-and-answer intentions. accuracy of the model.
  • any product identification from each of the product identifications as the target product identification; search the target product identification in the test sample subset corresponding to each of the product identifications, and use the corresponding product identification in each of the product identifications.
  • the test sample subset corresponding to the product identifier found in the test sample subset is taken as the test sample subset to be calculated; the target product identifier is searched in the respective corresponding intent prediction accurate result sets of the product identifiers, and the target product identifier will be searched in each
  • the set of accurate intention prediction results corresponding to each of the product identifiers is used as the set of accurate intention prediction results to be calculated.
  • step 52 extracting intent values according to the subset of test samples to be calculated and the set of accurate intent prediction results to be calculated, to obtain a target intent value set, wherein each intent value in the target intent value set is unique .
  • step S51 to step S53 are repeatedly performed until the accuracy rate data, the recall rate data, and the total number of positive samples of each of the intention values corresponding to all the product identifiers are determined.
  • step 54 generate a report according to the preset report generation rule according to the accuracy rate data, the recall rate data, and the total number of positive samples of the respective intent values corresponding to the respective product identifiers, and use the generated report as The target question answering intent classification model test report.
  • the accuracy calculation and recall calculation of each intention value are performed, and each target product identifier corresponding to the target product identifier is obtained.
  • the steps of the accuracy rate data, the recall rate data and the total number of positive samples of the intent value include:
  • S521 Calculate the total number of test samples according to the subset of test samples to be calculated, to obtain the total number of test samples corresponding to the target product identifier;
  • S522 Calculate the number of positive sample correct predictions for each of the intent values according to the test sample subset to be calculated and the to-be-calculated set of accurate intent prediction results, to obtain each of the intents corresponding to the target product identifiers The number of correct predictions for positive samples of the value;
  • S523 Calculate the number of negative sample correct predictions for each of the intent values according to the subset of test samples to be calculated and the set of accurate intent prediction results to be calculated, to obtain each of the intents corresponding to the target product identifiers The number of correct predictions for negative samples of the value;
  • S524 Perform an accuracy calculation according to the total number of test samples corresponding to the target product identifier, the number of positive sample correct predictions of each of the intent values, and the correct number of negative samples of each of the intent values, to obtain the corresponding target product identifier. the accuracy data for each of the intent values;
  • S525 Calculate the total number of the test samples for each of the intent values according to the subset of test samples to be calculated, to obtain the total number of positive samples for each of the intent values corresponding to the target product identifier;
  • S526 Calculate the recall rate according to the total number of positive samples of each of the intent values corresponding to the target product identifiers and the correct predicted number of positive samples of each of the intent values, to obtain each of the intents corresponding to the target product identifiers value of the recall data.
  • This embodiment realizes the automatic calculation of the accuracy rate and recall rate of each intent value according to the subset of test samples to be calculated and the set of accurate results of intent prediction to be calculated, which provides a basis for subsequent report generation.
  • the number of correct predictions for positive samples means that the specified data is the intent value to be calculated, and the intent prediction result is also the intent value to be calculated.
  • extract the intent value from the target intent value set to obtain the intent value to be calculated extract the intent value from the target intent value set to obtain the intent value to be calculated; extract the intent value from the target intent value set to obtain the intent value to be calculated; according to the test sample subset to be calculated and The set of accurate results of intent prediction to be calculated is performed to calculate the correct number of negative samples of the intent value to be calculated, and the correct number of negative samples of the intent value to be calculated corresponding to the target product identifier is obtained; The step of extracting the intent value from the value set, and obtaining the intent value to be calculated, until the correct prediction number of negative samples of each of the intent values corresponding to the target product identifier is determined.
  • the number of correct predictions for negative samples means that the specified data is not the intent value to be calculated, and the intent prediction result is not the intent value to be calculated.
  • step 524 the intent value is extracted from the target intent value set, and the intent value to be calculated is obtained; the positive sample correct prediction number and the negative sample correct prediction number of the intent value to be calculated corresponding to the target product identifier are added, Obtain the total number of correct predictions of the intention values to be calculated corresponding to the target product identification; divide the total number of correct predictions of the intention values to be calculated corresponding to the target product identification by the total number of test samples corresponding to the target product identification to obtain the total number of correct predictions. the accuracy data of the intent value to be calculated corresponding to the target product identifier; repeat the steps of extracting the intent value from the target intent value set to obtain the intent value to be calculated, until the target product identifier corresponding to each the accuracy data for the intent value.
  • extract the intent value from the target intent value set to obtain the intent value to be calculated ; perform the calculation of the total number of the test samples corresponding to the intent value to be calculated on the subset of test samples to be calculated to obtain the The total number of positive samples of the intent value to be calculated corresponding to the target product identifier, repeat the steps of extracting the intent value from the target intent value set to obtain the intent value to be calculated, until it is determined that the target product identifier corresponds to the total number of positive samples for each of the intent values.
  • the above-mentioned report is generated according to the accuracy data, the recall data and the total number of positive samples of each of the intention values corresponding to each of the product identifiers, to obtain the target question answering intention classification Steps for model test reporting, including:
  • S61 Generate an Excel document according to the accuracy rate data, the recall rate data, and the total number of positive samples of the respective intent values corresponding to the respective product identifiers, to obtain the target question answering intent classification model test report;
  • S63 Send the target question answering intent classification model test report according to the download method data.
  • This embodiment realizes the generation of the test report of the target question answering intent classification model in the Excel document format, thereby facilitating the secondary processing of the data and satisfying the personalized needs of the user.
  • step 61 according to the accuracy data, the recall data, and the total number of positive samples of each of the intention values corresponding to each of the product identifiers, generate an Excel document according to a preset chart rule, and obtain the target question and answer Intent classification model test report;
  • the report download request sent by the user is obtained.
  • the report download request is a request to download the test report of the target question answering intent classification model.
  • the download method data includes but is not limited to: sending to a preset mailbox, sending it to a third-party software system according to a preset transmission method, and storing it in a local folder according to a preset path.
  • the download mode data when the download mode data is to be sent to the preset mailbox, send the target question answering intent classification model test report to the preset mailbox; when the download mode data is to be sent to the third-party software system by the preset transmission mode, send the The target question answering intent classification model test report is sent to the third-party software system in a preset transmission mode; when the download mode data is stored in a local folder according to a preset path, the target question answering intent classification model test report is stored in the preset. Set the local folder corresponding to the path.
  • the present application also proposes a test device for a question-and-answer intent classification model, the device includes:
  • the test sample acquisition module 100 is configured to acquire a test sample set, the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question question sentence intent identification data, and test question intent calibration data;
  • a test sample dividing module 200 configured to divide the plurality of test samples by using the product identifiers to obtain a test sample subset corresponding to each of the product identifiers;
  • the intent prediction module 300 is configured to respectively input the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtain an intent prediction result set corresponding to each of the product identifiers;
  • the intention prediction accuracy judgment module 400 is configured to use the test question question sentence intention identification data and the test according to the intention prediction result set corresponding to each of the product identifiers and the test sample subset corresponding to each of the product identifiers respectively. Whether the question is intended to identify the data to accurately judge the intent prediction of each of the test samples, and obtain an accurate result set of intent prediction corresponding to each of the product identifiers;
  • the report generation module 500 is configured to generate a report according to the respective test sample subsets corresponding to each of the product identifiers and a set of accurate intention prediction results to obtain a test report of the target question answering intent classification model, where the target question answering intent classification model test report includes: Accuracy data, recall data, and total number of positive samples of each intent value corresponding to each of the product identifiers.
  • a test sample set is obtained, and the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data; the product identification to many Divide the test samples to obtain the corresponding test sample subsets for each product identifier; input the test sample subsets corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested for intent prediction, and obtain the respective product identifiers.
  • Corresponding intent prediction result set carry out each test sample according to the respective intent prediction result set corresponding to each product identifier, the test question question intent rating data and the test question intent rating data corresponding to each product identifier respective test sample subset.
  • the report is generated, and the target question answering intent classification model test report is obtained, the target
  • the question and answer intent classification model test report includes: accuracy data, recall rate data and total number of positive samples of each intent value corresponding to each product identifier, so that the question and answer intent classification model to be tested is tested using the test sample set and the target question and answer is automatically generated.
  • the intent classification model test report avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculations, and improves the accuracy of the question answering intent classification model.
  • an embodiment of the present application further provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in FIG. 3 .
  • the computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, an internal memory.
  • the nonvolatile storage medium stores an operating system, a computer program, and a database.
  • the memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used for storing data such as the testing method of the question-answering intent classification model.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program when executed by a processor, implements a method for testing a question answering intent classification model.
  • the test method for the question-answer intent classification model includes: acquiring a test sample set, the test sample set including a plurality of test samples, the test samples including: product identification, test question sample data, test question question sentence intent identification data and Whether the test question is intended to denote data; use the product identifier to divide the multiple test samples to obtain a test sample subset corresponding to each product identifier; separate the test sample subset corresponding to each product identifier Input the respective corresponding question-and-answer intent classification models to be tested to perform intent prediction, and obtain a set of intent prediction results corresponding to each of the product identifiers;
  • the corresponding test sample sub-set of the test question question is intended to determine the data and whether the test question is intended to determine the data to accurately determine the intention prediction of each of the test samples, and obtain the
  • Result set generate a report according to the corresponding test sample subsets of each of the product identifiers and the accurate result set of intention prediction, and obtain a test report of the target question answering intent classification model, and the target question answering intent classification model test report includes: each of the products Identify the precision data, recall data, and total number of positive samples corresponding to each intent value.
  • a test sample set is obtained, and the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data; the product identification to many Divide the test samples to obtain the corresponding test sample subsets for each product identifier; input the test sample subsets corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested for intent prediction, and obtain the respective product identifiers.
  • Corresponding intent prediction result set carry out each test sample according to the respective intent prediction result set corresponding to each product identifier, the test question question intent rating data and the test question intent rating data corresponding to each product identifier respective test sample subset.
  • the report is generated, and the target question answering intent classification model test report is obtained, the target
  • the question and answer intent classification model test report includes: accuracy data, recall rate data and total number of positive samples of each intent value corresponding to each product identifier, so that the question and answer intent classification model to be tested is tested using the test sample set and the target question and answer is automatically generated.
  • the intent classification model test report avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculations, and improves the accuracy of the question answering intent classification model.
  • An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored.
  • a method for testing a question-and-answer intent classification model is implemented, including the steps of: acquiring a test sample set, the The test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data; using the product identification to identify the plurality of test samples Divide and obtain the respective test sample subsets corresponding to each of the product identifiers; respectively input the test sample subsets corresponding to each of the product identifiers into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtain each of the said product identifiers.
  • the test question intends to identify the data to accurately judge the intent prediction of each of the test samples, and obtain an accurate result set of intent prediction corresponding to each of the product identifiers; according to the respective corresponding test sample subsets and intent predictions of each of the product identifiers
  • a report is generated on the accurate result set, and a target question answering intent classification model test report is obtained.
  • the target question answering intent classification model test report includes: accuracy data, recall data and total number of positive samples of each intent value corresponding to each of the product identifiers.
  • the test method of the above-mentioned question and answer intent classification model is obtained by obtaining a test sample set, the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question question sentence intent identification data, and test question intention Calibration data; use product identifiers to divide multiple test samples to obtain test sample subsets corresponding to each product identifier; respectively input the test sample subsets corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested.
  • Intent prediction obtain the corresponding set of intention prediction results for each product identifier; according to the corresponding intent prediction result set of each product identifier and the test sample subset corresponding to each product identifier
  • the intent prediction data is used to accurately judge the intent prediction of each test sample, and the corresponding intent prediction accurate result set corresponding to each product identifier is obtained; the report is generated according to the corresponding test sample subset and intent prediction accurate result set corresponding to each product identifier, and the target is obtained.
  • the target question answer intent classification model test report includes: accuracy data, recall rate data and total number of positive samples of each intent value corresponding to each product identifier, thus realizing the question and answer intent classification to be tested by using the test sample set
  • the model is tested and the target question answering intent classification model test report is automatically generated, which avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculation, and improves the accuracy of the question answering intent classification model.
  • the computer storage medium can be non-volatile or volatile.
  • Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Abstract

The present application relates to the technical field of artificial intelligence, and discloses a test method and apparatus for a question-and-answer intention classification model, a device and a medium. The method comprises: inputting a test sample subset corresponding to each product identifier into a corresponding question-and-answer intention classification model to be tested for intention prediction to obtain an intention prediction result set corresponding to each product identifier; accurately determining the intention prediction of each test sample according to the intention prediction result sets corresponding to each product identifier, question intention calibration data of test questions of the test sample subsets corresponding to each product identifier, and whether the test questions are intended for data calibration so as to obtain an intention prediction accurate result set corresponding to each product identifier; and generating a report according to the test sample subsets intention prediction accurate result set corresponding to each product identifier to obtain a target question-and-answer intention classification model test report. The method avoids the problem of manual calculation being time consuming and inaccurate.

Description

问答意图分类模型的测试方法、装置、设备及介质Test method, device, equipment and medium for question answering intent classification model
本申请要求于2020年12月15日提交中国专利局、申请号为2020114798351,发明名称为“问答意图分类模型的测试方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 2020114798351 and the invention titled "Testing method, device, equipment and medium for the question-and-answer intent classification model" filed with the China Patent Office on December 15, 2020, the entire content of which is approved by Reference is incorporated in this application.
技术领域technical field
本申请涉及到人工智能技术领域,特别是涉及到一种问答意图分类模型的测试方法、装置、设备及介质。The present application relates to the field of artificial intelligence technology, and in particular, to a testing method, apparatus, device and medium for a question-and-answer intent classification model.
背景技术Background technique
分类模型的模型测试需要基于样本数据,样本数据的数量少时,部分测试人员会采取借用Excel等工具进行人工计算统计的方式,发明人意识到但当样本数据的数量多时,人工计算耗时长且不准确。而且模型在不断的迭代优化,导致需要计算的次数非常多,从而导致进一步增加计算的工作量。The model test of the classification model needs to be based on sample data. When the number of sample data is small, some testers will use tools such as Excel to perform manual calculation and statistics. The inventor realizes that when the number of sample data is large, manual calculation takes a long time and does not precise. Moreover, the model is continuously iteratively optimized, resulting in a very large number of calculations, which further increases the workload of the calculation.
技术问题technical problem
旨在解决现有技术的分类模型训练后通过Excel进行人工计算统计的方式进行模型测试,导致人工计算耗时长且不准确的技术问题。The purpose is to solve the technical problem that manual calculation is time-consuming and inaccurate after the classification model of the prior art is trained and the model is tested by manual calculation and statistics through Excel.
技术解决方案technical solutions
本申请的主要目的为提供一种问答意图分类模型的测试方法、装置、设备及介质,旨在解决现有技术的分类模型训练后通过Excel进行人工计算统计的方式进行模型测试,导致人工计算耗时长且不准确的技术问题。The main purpose of this application is to provide a test method, device, equipment and medium for a question-and-answer intent classification model, which aims to solve the problem that the prior art classification model is trained by manual calculation and statistics through Excel to perform model testing, resulting in manual calculation consumption. Long and inaccurate technical issues.
为了实现上述发明目的,本申请提出一种问答意图分类模型的测试方法,所述方法包括:In order to achieve the above purpose of the invention, the present application proposes a method for testing a question-and-answer intent classification model, the method comprising:
获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;acquiring a test sample set, where the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data;
采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;Divide the plurality of test samples by using the product identifiers to obtain a subset of test samples corresponding to each of the product identifiers;
分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;Inputting the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtaining the respective intent prediction result set corresponding to each of the product identifiers;
分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;Carry out each test according to the intent prediction result set corresponding to each of the product identifiers, the test question question intent determination data and the test question intent determination data of the test sample subsets corresponding to each of the product identifiers respectively. Accurately judge the intention prediction of the test sample, and obtain a set of accurate intention prediction results corresponding to each of the product identifiers;
根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。The report is generated according to the respective corresponding test sample subsets of the product identifiers and the accurate intent prediction result set, to obtain the target question answering intent classification model test report. The target question answering intent classification model test report includes: the respective product identifiers corresponding to The precision data, recall data and total number of positive samples for each intent value of .
本申请还提出了一种问答意图分类模型的测试装置,所述装置包括:The present application also proposes a test device for a question-and-answer intent classification model, the device comprising:
测试样本获取模块,用于获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;A test sample acquisition module, configured to acquire a test sample set, the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question question sentence intent identification data, and test question intent identification data;
测试样本划分模块,用于采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;a test sample dividing module, configured to divide the plurality of test samples by using the product identifier, and obtain a test sample subset corresponding to each of the product identifiers;
意图预测模块,用于分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;an intent prediction module, configured to respectively input the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtain an intent prediction result set corresponding to each of the product identifiers;
意图预测准确判断模块,用于分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;Intent prediction accurate judgment module, used for each of the product identifiers corresponding to the intent prediction result set, the test question question sentence intent determination data and the test question of the test sample subset corresponding to each of the product identifiers respectively Whether the intention identification data is used to accurately judge the intention prediction of each of the test samples, and obtain a set of accurate intention prediction results corresponding to each of the product identifications;
报告生成模块,用于根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。The report generation module is configured to generate a report according to the respective corresponding test sample subsets and the accurate intent prediction result set of each of the product identifiers, and obtain a test report of the target question answering intent classification model, where the target question answering intent classification model test report includes: each Accuracy data, recall data and total number of positive samples of each intent value corresponding to the product identifiers.
本申请还提出了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现如下方法步骤:The present application also proposes a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the following method steps when executing the computer program:
获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;acquiring a test sample set, where the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data;
采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;Divide the plurality of test samples by using the product identifiers to obtain a subset of test samples corresponding to each of the product identifiers;
分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;Inputting the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtaining the respective intent prediction result set corresponding to each of the product identifiers;
分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;Carry out each test according to the intent prediction result set corresponding to each of the product identifiers, the test question question intent determination data and the test question intent determination data of the test sample subsets corresponding to each of the product identifiers respectively. Accurately judge the intention prediction of the test sample, and obtain a set of accurate intention prediction results corresponding to each of the product identifiers;
根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。The report is generated according to the respective corresponding test sample subsets of the product identifiers and the accurate intent prediction result set, to obtain the target question answering intent classification model test report. The target question answering intent classification model test report includes: the respective product identifiers corresponding to The precision data, recall data and total number of positive samples for each intent value of .
本申请还提出了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下方法步骤:The present application also proposes a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following method steps are implemented:
获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;acquiring a test sample set, where the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data;
采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;Divide the plurality of test samples by using the product identifiers to obtain a subset of test samples corresponding to each of the product identifiers;
分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;Inputting the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtaining the respective intent prediction result set corresponding to each of the product identifiers;
分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;Carry out each test according to the intent prediction result set corresponding to each of the product identifiers, the test question question intent determination data and the test question intent determination data of the test sample subsets corresponding to each of the product identifiers respectively. Accurately judge the intention prediction of the test sample, and obtain a set of accurate intention prediction results corresponding to each of the product identifiers;
根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集 合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。The report is generated according to the respective corresponding test sample subsets of the product identifiers and the accurate intent prediction result set, to obtain the target question answering intent classification model test report. The target question answering intent classification model test report includes: the respective product identifiers corresponding to The precision data, recall data and total number of positive samples for each intent value of .
有益效果beneficial effect
本申请的一种问答意图分类模型的测试方法、装置、设备及介质,通过获取测试样本集合,测试样本集合包括多个测试样本,测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;采用产品标识对多个测试样本进行划分,得到各个产品标识各自对应的测试样本子集合;分别将每个产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个产品标识各自对应的意图预测结果集合;分别根据各个产品标识各自对应的意图预测结果集合、各个产品标识各自对应的测试样本子集合的测试问题问句意图标定数据和测试问题是否意图标定数据进行每个测试样本的意图预测准确判断,得到各个产品标识各自对应的意图预测准确结果集合;根据各个产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,目标问答意图分类模型测试报告包括:各个产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数,从而实现了采用测试样本集合对待测试的问答意图分类模型进行测试并自动生成目标问答意图分类模型测试报告,避免了人工进行模型测试,避免人工计算耗时长且不准确的问题,提高了问答意图分类模型的准确性。A test method, device, equipment and medium for a question-and-answer intent classification model of the present application, by acquiring a test sample set, the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, and test question questions Intention-specific data and whether the test questions are intention-specific data; use product identifiers to divide multiple test samples to obtain test sample subsets corresponding to each product identifier; input the test sample subsets corresponding to each product identifier into their corresponding The question-and-answer intent classification model to be tested performs intent prediction, and obtains the corresponding intent prediction result set for each product identifier; according to the respective intent prediction result set corresponding to each product identifier and the test sample subset corresponding to each product identifier, the test question asks. Sentence intent rating data and whether the test question is intent rating data. Accurately judge the intent prediction of each test sample, and obtain an accurate result set of intent prediction corresponding to each product identifier; according to each product identifier, the corresponding test sample subset and intent prediction are accurate The result set is used for report generation, and the target question answering intent classification model test report is obtained. The target question answering intent classification model test report includes: accuracy data, recall data and total number of positive samples of each intent value corresponding to each product identifier, thus realizing the adoption of the test. The sample set is used to test the question-and-answer intent classification model to be tested and automatically generate the target question-and-answer intent classification model test report, which avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculation, and improves the accuracy of the question-and-answer intent classification model.
附图说明Description of drawings
图1为本申请一实施例的问答意图分类模型的测试方法的流程示意图;1 is a schematic flowchart of a method for testing a question-and-answer intent classification model according to an embodiment of the present application;
图2为本申请一实施例的问答意图分类模型的测试装置的结构示意框图;FIG. 2 is a schematic block diagram of a structure of a testing device for a question-and-answer intent classification model according to an embodiment of the present application;
图3为本申请一实施例的计算机设备的结构示意框图。FIG. 3 is a schematic structural block diagram of a computer device according to an embodiment of the present application.
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
本发明的实施方式Embodiments of the present invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
为了解决现有技术的分类模型训练后通过Excel进行人工计算统计的方式进行模型测试,导致人工计算耗时长且不准确的技术问题,本申请提出了一种问答意图分类模型的测试方法,所述方法应用于人工智能技术领域。所述问答意图分类模型的测试方法采用测试样本集合对待测试的问答意图分类模型进行测试并自动生成目标问答意图分类模型测试报告,避免了人工进行模型测试,避免人工计算耗时长且不准确的问题,提高了问答意图分类模型的准确性。In order to solve the technical problem that manual calculation is time-consuming and inaccurate after the classification model is trained in the prior art, the model is tested by means of manual calculation and statistics in Excel. The method is applied in the field of artificial intelligence technology. The test method for the question-answer intent classification model uses a test sample set to test the question-and-answer intent classification model to be tested and automatically generates a test report of the target question-answer intent classification model, which avoids manual model testing and avoids the problem of long and inaccurate manual calculation. , which improves the accuracy of the question answering intent classification model.
参照图1,本申请实施例中提供一种问答意图分类模型的测试方法,所述方法包括:Referring to FIG. 1 , an embodiment of the present application provides a method for testing a question-and-answer intent classification model. The method includes:
S1:获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;S1: Obtain a test sample set, where the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question question sentence intent identification data, and test question intent identification data;
S2:采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;S2: dividing the plurality of test samples by using the product identifiers to obtain a test sample subset corresponding to each of the product identifiers;
S3:分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;S3: Input the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtain an intent prediction result set corresponding to each of the product identifiers;
S4:分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;S4: Perform each step according to the intent prediction result set corresponding to each of the product identifiers, the test question question sentence intent determination data and the test question intent determination data of the test sample subsets corresponding to each of the product identifiers respectively. Accurately judge the intention prediction of each of the test samples, and obtain a set of accurate intention prediction results corresponding to each of the product identifiers;
S5:根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。S5: Generate a report according to the respective test sample subsets corresponding to each of the product identifiers and a set of accurate intent prediction results, and obtain a target question answering intent classification model test report, where the target question answering intent classification model test report includes: each of the product identifiers Accuracy data, recall data, and total number of positive samples corresponding to each intent value.
本实施例通过获取测试样本集合,测试样本集合包括多个测试样本,测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;采用产品标识对多个测试样本进行划分,得到各个产品标识各自对应的测试样本子集合;分别将每个产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个产品标识各自对应的意图预测结果集合;分别根据各个产品标识各自对应的意图预测结果集合、各个产品标识各自对应的测试样本子集合的测试问题问句意图标定数据和测试问题是否意图标定数据进行每个测试样本的意图预测准确判断,得到各个产品标识各自对应的意图预测准确结果集合;根据各个产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,目标问答意图分类模型测试报告包括:各个产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数,从而实现了采用测试样本集合对待测试的问答意图分类模型进行测试并自动生成目标问答意图分类模型测试报告,避免了人工进行模型测试,避免人工计算耗时长且不准确的问题,提高了问答意图分类模型的准确性。In this embodiment, a test sample set is obtained, and the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data; the product identification to many Divide the test samples to obtain the corresponding test sample subsets for each product identifier; input the test sample subsets corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested for intent prediction, and obtain the respective product identifiers. Corresponding intent prediction result set; carry out each test sample according to the respective intent prediction result set corresponding to each product identifier, the test question question intent rating data and the test question intent rating data corresponding to each product identifier respective test sample subset. According to each product identifier corresponding to the corresponding test sample subset and intent prediction accurate result set, the report is generated, and the target question answering intent classification model test report is obtained, the target The question and answer intent classification model test report includes: accuracy data, recall rate data and total number of positive samples of each intent value corresponding to each product identifier, so that the question and answer intent classification model to be tested is tested using the test sample set and the target question and answer is automatically generated. The intent classification model test report avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculations, and improves the accuracy of the question answering intent classification model.
对于S1,其中,可以获取用户输入的测试样本集合,也可以是第三方应用系统发送的测试样本集合。For S1, the test sample set input by the user may be obtained, or the test sample set sent by the third-party application system.
可以理解的是,所述测试样本中,产品标识、测试问题样本数据、测试问题问句意图标定数据、测试问题是否意图标定数据一一对应。It can be understood that, in the test sample, product identification, test question sample data, test question question intent identification data, and test question intent identification data are in one-to-one correspondence.
可选的,测试样本还包括样本标识。样本标识可以是样本名称、样本ID等唯一标识一个测试样本的标识。Optionally, the test sample further includes a sample identification. The sample identifier may be an identifier that uniquely identifies a test sample, such as a sample name, a sample ID, or the like.
产品标识可以是产品名称、产品ID等唯一标识一个产品的标识。The product identifier may be an identifier that uniquely identifies a product, such as a product name, a product ID, or the like.
测试问题样本数据,是指用户提出的问题的文本数据。每个测试问题样本数据对应一个用户在一轮对话中提出的问题的文本数据。The test question sample data refers to the text data of the questions raised by the user. Each test question sample data corresponds to the text data of a question posed by a user in a round of dialogue.
测试问题问句意图标定数据,是指测试问题样本数据对应的问句意图的标定数据。问句意图包括多个意图值。比如,问句意图在产品标识aries下的意图值包括:之前申请失败、征信有问题、怎么知道我的电话,在此举例不做具体限定。又比如,当测试问题样本数据为“上个月没办下来,现在不知道能不能通过呀”时,测试问题问句意图标定数据为“之前申请失败”,当测试问题样本数据为“产品A1呀,产品A2都试过都没有成功”时,测试问题问句意图标定数据为“之前申请失败”,当测试问题样本数据为“在公司G1昨天前天才办理一个的信用说没有资格”时,测试问题问句意图标定数据为“之前申请失败”,当测试问题样本数据为“那个征信不是太好”时,测试问题问句意图标定数据为“征信有问题”,当测试问题样本数据为“征信没有过”时,测试问题问句意图标定数据为“征信有问题”,当测试问题样本数据为“哪来的电话”时,测试问题问句意图标定数据为“怎么知道我的电话”,在此举例不做具体。The test question question sentence intent calibration data refers to the question sentence intent calibration data corresponding to the test question sample data. Question intent includes multiple intent values. For example, the intent value of the question intent under the product identifier aries includes: the previous application failed, there is a problem with the credit report, and how do I know my phone number, which is not specifically limited in this example. For another example, when the sample data of the test question is "I haven't done it last month, and I don't know if I can pass it now", the test question means the specified data as "The previous application failed", and when the sample data of the test question is "Product A1" Yeah, product A2 has been tried without success", the test question question means the specified data is "the previous application failed", when the test question sample data is "the company G1 applied for a credit yesterday and said it is not qualified", The test question question means the specified data is "Failed to apply before", when the test question sample data is "That credit report is not very good", the test question question means the specified data is "There is a problem with the credit report", when the test question sample data is "The credit report is not good" When the test question is "I haven't done credit investigation", the test question question means the specified data is "There is a problem with the credit investigation", and when the test question sample data is "Where did you get the phone number", the test question question means the specified data is "How do you know me?" telephone", which will not be specific in this example.
测试问题是否意图标定数据,是指测试问题样本数据对应的是否意图的标定数据。是否意图包括两个意图值,两个意图值为是和否。比如,当测试问题样本数据为“对的”时,测试问题是否意图标定数据为“是”,在此举例不做具体限定。Whether the test question is intended to be calibrated data refers to the calibration data of whether the test question sample data is intended or not. Whether the intent includes two intent values, the two intent values are yes and no. For example, when the sample data of the test question is "true", whether the test question intends to define the data as "yes" is not specifically limited in this example.
可选的,所述获取测试样本集合的步骤,包括:Optionally, the step of obtaining the test sample set includes:
S11:获取模型测试请求,所述模型测试请求携带有Excel文件的存储地址及Excel文件名称;S11: Obtain a model test request, where the model test request carries the storage address of the Excel file and the name of the Excel file;
其中,模型测试请求可以是用户发送的,也可以是本申请的程序文件主动触发的。Wherein, the model test request may be sent by the user, or may be actively triggered by the program file of the present application.
模型测试请求,是指对待测试的问答意图分类模型进行测试的请求。A model test request refers to a request to test the question-and-answer intent classification model to be tested.
S12:根据所述模型测试请求携带的所述Excel文件的存储地址及所述Excel文件名称获取Excel文件,得到目标Excel文件;S12: Obtain the Excel file according to the storage address of the Excel file and the name of the Excel file carried by the model test request, and obtain the target Excel file;
其中,在所述Excel文件的存储地址的目录下,获取文件名称与Excel文件名称相同的文件,将获取的文件作为目标Excel文件。Wherein, under the directory of the storage address of the Excel file, a file with the same file name as the Excel file name is obtained, and the obtained file is used as the target Excel file.
S13:从所述目标Excel文件中读取数据,得到所述测试样本集合。S13: Read data from the target Excel file to obtain the test sample set.
从所述目标Excel文件中从第一行开始按行依次读取数据,将每一行数据作为一个测试样本;将所有测试样本作为所述测试样本集合。From the target Excel file, the data is read row by row starting from the first row, and each row of data is taken as a test sample; all the test samples are taken as the test sample set.
可以理解的是,所述目标Excel文件中的表头包括但不限于:样本标识、产品标识、测试问题样本数据、测试问题问句意图标定数据、测试问题是否意图标定数据。It can be understood that the table headers in the target Excel file include but are not limited to: sample identification, product identification, test question sample data, test question question intent identification data, and test question intent identification data.
对于S2,将所述产品标识相同的测试样本放入一个子集合,将该子集合作为该产品标识对应的测试样本子集合。也就是说,每个产品标识对应一个测试样本子集合,每个测试样本子集合中的所有测试样本的产品标识都相同。For S2, the test samples with the same product identification are put into a subset, and the subset is taken as the test sample subset corresponding to the product identification. That is, each product identifier corresponds to a test sample subset, and all test samples in each test sample subset have the same product identifier.
对于S3,分别将每个所述产品标识对应的测试样本子集合中的每个测试样本依次输入该所述产品标识对应的待测试的问答意图分类模型进行意图预测,得到该所述产品标识对应的测试样本子集合的意图预测结果,将得到的所有意图预测结果作为该测试样本子集合对应的所述产品标识对应的意图预测结果集合。也就是说,每个所述产品标识对应一个意图预测结果集合。通过使测试待测试的问答意图分类模型的测试样本的产品标识与待测试的问答意图分类模型对应的产品标识相同,从而有利于提高测试的准确性。For S3, each test sample in the test sample subset corresponding to each product identifier is sequentially input into the question-and-answer intent classification model to be tested corresponding to the product identifier to perform intent prediction, and the corresponding product identifier is obtained. The intent prediction result of the test sample subset, and all the obtained intent prediction results are taken as the intent prediction result set corresponding to the product identifier corresponding to the test sample subset. That is, each product identifier corresponds to an intent prediction result set. By making the product identification of the test sample for testing the question-and-answer intent classification model to be tested be the same as the product identification corresponding to the question-and-answer intent classification model to be tested, it is beneficial to improve the accuracy of the test.
可以理解的是,每个测试样本对应一个意图预测结果。意图预测结果只有一个值,意图预测结果为:问句意图或者是否意图。Understandably, each test sample corresponds to an intent prediction result. The intent prediction result has only one value, and the intent prediction result is: question intent or intent.
待测试的问答意图分类模型,也就是已经完成训练需要进一步测试的问答意图分类模型。The question and answer intent classification model to be tested, that is, the question and answer intent classification model that has been trained and needs further testing.
问答意图分类模型是对文本数据进行问句意图和是否意图进行预测的模型。The question and answer intent classification model is a model that predicts the intent of a question sentence and whether it is intended for text data.
对于S4,对同一所述产品标识对应的意图预测结果集合、测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个测试样本的意图预测准确判断,得到该所述产品标识对应的意图预测准确结果集合。也就是说,每个产品标识对应一个意图预测准确结果集合。For S4, the intent prediction of each test sample is accurately judged on the intent prediction result set corresponding to the same product identifier, the test question question intent determination data and the test question intent determination data of the test sample subset, An accurate result set of intent prediction corresponding to the product identifier is obtained. That is, each product identifier corresponds to a set of accurate results for intent prediction.
比如,所述产品标识C1的测试样本子集合中有3个测试样本S1(测试问题问句意图标定数据为空,测试问题是否意图标定数据为是)、S2(测试问题问句意图标定数据为SF2,测试问题是否意图标定数据为空)、S3(测试问题问句意图标定数据为SF2,测试问题是否意图标定数据为空),产品标识C1的意图预测结果集合中测试样本S1对应的意图预测结果为问句意图SF1、测试样本S2对应的意图预 测结果为问句意图SF2、测试样本S3对应的意图预测结果为问句意图SF1,则测试样本S1对应的意图预测准确结果为错误(测试问题问句意图标定数据为空,测试问题是否意图标定数据为是,意图预测结果为问句意图SF1,测试问题问句意图标定数据与意图预测结果不相同),测试样本S2对应的意图预测准确结果为正确(测试问题问句意图标定数据为SF2,测试问题是否意图标定数据为空,意图预测结果为问句意图SF2,测试问题问句意图标定数据与意图预测结果相同),测试样本S3对应的意图预测准确结果为错误(测试问题问句意图标定数据为SF2,测试问题是否意图标定数据为空,意图预测结果为问句意图SF1,测试问题问句意图标定数据与意图预测结果不相同),在此举例不做具体限定。For example, there are 3 test samples S1 in the test sample subset of the product identifier C1 (the test question is intended to indicate that the data is empty, and the test question is to indicate that the data is yes), S2 (the test question is intended to be defined as the data) SF2, whether the test question means the specified data is empty), S3 (the test question means the specified data is SF2, whether the test question means the specified data is empty), the intent prediction corresponding to the test sample S1 in the intent prediction result set of the product identifier C1 The result is question intent SF1, the intent prediction result corresponding to test sample S2 is question intent SF2, and the intent prediction result corresponding to test sample S3 is question intent SF1, then the accurate result of intent prediction corresponding to test sample S1 is wrong (test question The question intent is defined data is empty, the test question is intended to define the data is yes, the intent prediction result is question intent SF1, the test question question intent is not the same as the intent prediction result), the intent prediction corresponding to the test sample S2 is accurate result It is correct (the test question means the intended data is SF2, the test question means that the intended data is empty, the intent prediction result is the question intent SF2, the test question is the same as the intent prediction result), the corresponding test sample S3 If the intent prediction is accurate, the result is an error (the test question asks the intent-specific data to be SF2, the test question does the intent-specific data to be empty, the intent prediction result is the question intent SF1, and the test-question intent-specific data is not the same as the intent prediction result), This example is not specifically limited.
对于S5,根据同一所述产品标识对应的测试样本子集合和意图预测准确结果集合进行各个意图值的统计计算,得到该所述产品标识对应的各个意图值的准确率数据、召回率数据和正样本总数;根据所有所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数按预设报告生成规则进行报告生成,得到目标问答意图分类模型测试报告。For S5, perform statistical calculation of each intent value according to the test sample subset corresponding to the same product identifier and the intent prediction accurate result set, and obtain the accuracy data, recall rate data and positive samples of each intent value corresponding to the product identifier The total number; according to the accuracy rate data, recall rate data and the total number of positive samples corresponding to all the product identifiers, the report is generated according to the preset report generation rule, and the test report of the target question answering intent classification model is obtained.
预设报告生成规则包括但不限于:报告模板。Preset report generation rules include but are not limited to: report templates.
正样本,是标定数据(也就是测试问题问句意图标定数据和测试问题是否意图标定数据)与待计算的意图值相同的测试样本数量。A positive sample is the number of test samples in which the calibration data (that is, the test question is intended to be calibrated and the test question is intended to be calibrated) is the same as the intended value to be calculated.
比如,计算意图值Y1的准确率数据、召回率数据和正样本总数时,正样本是指标定数据为Y1的测试样本,标定数据不为Y1的测试样本为负样本,在此举例不做具体限定。For example, when calculating the accuracy data, recall data and the total number of positive samples of the intent value Y1, the positive samples refer to the test samples whose calibration data is Y1, and the test samples whose calibration data is not Y1 are negative samples, which are not specifically limited in this example. .
准确率,是指有在所有的判断中有多少判断正确的,即把正样本的判断为正的,还有把负样本的判断为负的;总共有TP(正样本被预测为正的数量)+FN(正样本被预测为负的数量)+FP(负样本被预测为正的数量)+TN(负样本被预测为负的数量)个,所以准确率:Acc=(TP+TN)/(TP+TN+FN+FP)。The accuracy rate refers to how many of the judgments are correct, that is, the positive samples are judged as positive, and the negative samples are judged as negative; there is a total of TP (the number of positive samples that are predicted to be positive) )+FN (the number of positive samples predicted to be negative)+FP (the number of negative samples predicted to be positive)+TN (the number of negative samples predicted to be negative), so the accuracy rate: Acc=(TP+TN) /(TP+TN+FN+FP).
召回率,是相对于样本而言的,即样本中有多少正样本被预测正确了,这样的有TP个,所有的正样本有两个去向,一个是被判为正的,另一个是错判为负的,因此总共有TP+FN个,所以,召回率R=TP/(TP+FN)。The recall rate is relative to the sample, that is, how many positive samples in the sample are predicted correctly, there are TP, all positive samples have two directions, one is judged to be positive, the other is wrong The judgment is negative, so there are a total of TP+FN, so the recall rate R=TP/(TP+FN).
在一个实施例中,上述分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合的步骤,包括:In one embodiment, the test sample subset corresponding to each product identifier is input into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and a set of intent prediction results corresponding to each product identifier is obtained. steps, including:
S31:采用待预测的产品标识从各个所述产品标识各自对应的测试样本子集合中提取出测试样本子集合,得到目标测试样本子集合,所述待预测的产品标识是各个所述产品标识中的任一个;S31: Extract a test sample subset from the test sample subsets corresponding to each of the product identifiers by using the product identifiers to be predicted, and obtain a target test sample subset, where the product identifiers to be predicted are among the respective product identifiers any of the;
S32:根据所述待预测的产品标识从待测试模型库中查找,得到目标待测试的问答意图分类模型;S32: Search from the model library to be tested according to the product identifier to be predicted, to obtain the target question-and-answer intent classification model to be tested;
S33:分别将所述目标测试样本子集合中每个所述测试样本输入所述目标待测试的问答意图分类模型进行意图预测,得到所述待预测的产品标识对应的所述意图预测结果集合;S33: Input each of the test samples in the target test sample subset into the target question-and-answer intent classification model to be tested to perform intent prediction, and obtain the intent prediction result set corresponding to the product identifier to be predicted;
S34:重复所述采用待预测的产品标识从各个所述产品标识各自对应的测试样本子集合中提取出测试样本子集合,得到目标测试样本子集合的步骤,直至确定所有所述产品标识对应的所述意图预测结果集合。S34: Repeat the step of using the product identifiers to be predicted to extract the test sample subsets from the test sample subsets corresponding to the respective product identifiers to obtain the target test sample subsets, until all the product identifiers corresponding to the product identifiers are determined. The intent prediction result set.
本实施例实现了确定各个所述产品标识各自对应的意图预测结果集合,为后续判断待测试的问答意图分类模型的准确率和召回率提供了基础。In this embodiment, the intent prediction result set corresponding to each of the product identifiers is determined, which provides a basis for the subsequent determination of the accuracy and recall rate of the question-and-answer intent classification model to be tested.
对于31,将各个所述产品标识中的任一个产品标识作为待预测的产品标识; 将待预测的产品标识在各个所述产品标识各自对应的测试样本子集合中进行查找,将在各个所述产品标识各自对应的测试样本子集合中查找到的产品标识对应的测试样本子集合作为目标测试样本子集合。For 31, use any one of the product identifiers as the product identifier to be predicted; search the product identifier to be predicted in the test sample subset corresponding to each of the product identifiers, and use the product identifier to be predicted in each of the product identifiers The test sample subset corresponding to the product identifier found in the test sample subset corresponding to each product identifier is used as the target test sample subset.
对于32,将所述待预测的产品标识从待测试模型库中查找,将在待测试模型库中查找到的产品标识对应的待测试的问答意图分类模型作为目标待测试的问答意图分类模型。In step 32, the product identifier to be predicted is searched from the model library to be tested, and the question answer intent classification model to be tested corresponding to the product identifier found in the model library to be tested is used as the target question answer intent classification model to be tested.
待测试模型库包括:产品标识与模型标识对应表、待测试的问答意图分类模型数据。产品标识与模型标识对应表包括:产品标识、模型标识,每个产品标识对应一个模型标识。The model library to be tested includes: a correspondence table between product identifiers and model identifiers, and data of the question-and-answer intent classification model to be tested. The product identification and model identification correspondence table includes: product identification, model identification, and each product identification corresponds to a model identification.
模型标识可以是模型名称、模型ID等唯一标识一个待测试的问答意图分类模型的标识。The model identifier may be an identifier that uniquely identifies a question-answer intent classification model to be tested, such as a model name, a model ID, or the like.
对于33,将所述目标测试样本子集合中每个所述测试样本输入所述目标待测试的问答意图分类模型进行意图预测,得到所述待预测的产品标识对应的多个所述意图预测结果;将所述待预测的产品标识对应的所有所述意图预测结果作为所述待预测的产品标识对应的所述意图预测结果集合。也就是说,所述目标待测试的问答意图分类模型每次只对一个测试样本进行意图预测。In step 33, input each test sample in the target test sample subset into the target question-and-answer intent classification model to be tested to perform intent prediction, and obtain a plurality of the intent prediction results corresponding to the product identifier to be predicted ; Take all the intent prediction results corresponding to the product identifier to be predicted as the intent prediction result set corresponding to the product identifier to be predicted. That is to say, the target question-and-answer intent classification model to be tested only performs intent prediction on one test sample at a time.
对于34,重复执行步骤S31至步骤S34,直至确定所有所述产品标识对应的所述意图预测结果集合。For step 34, steps S31 to S34 are repeatedly performed until the intent prediction result sets corresponding to all the product identifiers are determined.
在一个实施例中,上述分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合的步骤,包括:In one embodiment, the above-mentioned intent prediction result set corresponding to each of the product identifiers, the test question question sentence intent determination data and the test question whether the test sample subset corresponding to each of the product identifiers are respectively The intention identification data is used to accurately judge the intention prediction of each of the test samples, and the steps of obtaining an accurate intention prediction result set corresponding to each of the product identifications include:
S41:分别对所述测试样本集合中每个所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据按意图优先级进行处理,得到意图优先级处理后的测试样本集合;S41 : respectively process the test question question sentence intent determination data and the test question intent determination data of each of the test samples in the test sample set according to the intent priority, to obtain a test sample set after the intent priority processing;
S42:分别从每个所述产品标识对应的所述意图预测结果集合中依次提取出意图预测结果,得到目标意图预测结果;S42: Extracting the intention prediction results in turn from the intention prediction result set corresponding to each product identifier, respectively, to obtain the target intention prediction result;
S43:当所述目标意图预测结果为是否意图时,根据所述目标意图预测结果从所述意图优先级处理后的测试样本集合中提取所述测试问题是否意图标定数据,得到待判断的测试问题是否意图标定数据,当所述目标意图预测结果和所述待判断的测试问题是否意图标定数据相同时,确定所述目标意图预测结果对应的所述意图预测准确结果为正确,否则确定所述目标意图预测结果对应的所述意图预测准确结果为错误;S43: When the target intention prediction result is whether the target intention is intended or not, extract whether the test question is intended to determine the data from the test sample set after the intention priority processing according to the target intention prediction result, and obtain the test question to be determined Whether the target intent prediction result is the same as whether the target intent prediction result and the to-be-determined test question are intended to delineate the data, determine whether the intent prediction result corresponding to the target intent prediction result is correct, otherwise determine the target The accurate result of the intent prediction corresponding to the intent prediction result is an error;
S44:当所述目标意图预测结果为问句意图时,根据所述目标意图预测结果从所述意图优先级处理后的测试样本集合提取所述测试问题问句意图标定数据,得到待判断的测试问题问句意图标定数据,当所述目标意图预测结果和所述待判断的测试问题问句意图标定数据相同时,确定所述目标意图预测结果对应的所述意图预测准确结果为正确,否则确定所述目标意图预测结果对应的所述意图预测准确结果为错误;S44: When the target intent prediction result is a question sentence intent, extract the test question question sentence intent determination data from the test sample set after the intent priority processing according to the target intent prediction result, to obtain the test to be judged Question question intent identification data, when the target intent prediction result and the test question question intent identification data to be judged are the same, determine that the target intent prediction result corresponds to the intent prediction accurate result is correct, otherwise determine The accurate result of the intention prediction corresponding to the target intention prediction result is an error;
S45:重复执行所述分别从每个所述产品标识对应的所述意图预测结果集合中依次提取出意图预测结果,得到目标意图预测结果的步骤,直至确定所有所述意图预测结果的所述意图预测准确结果;S45: Repeat the step of sequentially extracting the intent prediction results from the intent prediction result set corresponding to each product identifier to obtain the target intent prediction result, until the intent of all the intent prediction results is determined predict accurate results;
S46:根据所有所述意图预测准确结果,确定各个所述产品标识各自对应的意图预测准确结果集合。S46: Determine a set of accurate intention prediction results corresponding to each of the product identifiers according to all the accurate intention prediction results.
本实施例实现了进行每个所述测试样本的意图预测准确判断,为后续判断待测试的问答意图分类模型的准确率和召回率提供了基础;而且对测试样本按意图优先级进行处理,在满足意图优先级的情况下,确保每个测试样本的标定数据具有唯一意图值,从而有利于提高模型测试的准确性,有利于使模型的优化符合意图优先级。This embodiment realizes the accurate judgment of the intention prediction of each test sample, which provides a basis for the subsequent judgment of the accuracy and recall rate of the question-and-answer intention classification model to be tested; and the test samples are processed according to the intention priority. When the intent priority is satisfied, it is ensured that the calibration data of each test sample has a unique intent value, which is conducive to improving the accuracy of model testing and making the optimization of the model conform to the intent priority.
对于41,对同一所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据按意图优先级进行处理,处理后得到该所述测试样本对应的意图优先级处理后的测试样本。从而实现在同一所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据都存在数据时,按意图优先级确定意图优先级最高的标定数据作为意图优先级处理后的测试样本的标定数据。也就是说,意图优先级处理后的测试样本的标定数据只有一个意图值。For step 41 , the test question question intent rating data and the test question intent rating data of the same test sample are processed according to intent priority, and a processed test sample with intent priority corresponding to the test sample is obtained after processing. Therefore, when the test question of the same test sample asks whether the intent calibration data and the test question whether the intent calibration data exists, the calibration data with the highest intent priority is determined according to the intent priority as the test sample after the intent priority processing. Calibration data. That is to say, the calibration data of the test sample after intent priority processing has only one intent value.
对于42,按预设提取规则从每个所述产品标识对应的所述意图预测结果集合中提取出意图预测结果,将提取得到的意图预测结果作为目标意图预测结果。预设提取规则包括但不限于:按样本标识排列顺序依次提取。For step 42, extract an intent prediction result from the intent prediction result set corresponding to each product identifier according to a preset extraction rule, and use the extracted intent prediction result as a target intent prediction result. The preset extraction rules include but are not limited to: extracting in sequence according to the sequence of the sample identifiers.
对于43,当所述目标意图预测结果为是否意图时,意味着此时需要与测试问题是否意图标定数据进行对比;根据所述目标意图预测结果对应的测试样本的样本标识在所述意图优先级处理后的测试样本集合中提取意图优先级处理后的测试样本,从提取得到的意图优先级处理后的测试样本中提取出所述测试问题是否意图标定数据,将提取得到的所述测试问题是否意图标定数据作为待判断的测试问题是否意图标定数据;当所述目标意图预测结果和所述待判断的测试问题是否意图标定数据相同时,意味着所述目标意图预测结果为正确,此时确定所述目标意图预测结果对应的所述意图预测准确结果为正确;当所述目标意图预测结果和所述待判断的测试问题是否意图标定数据不相同时,意味着所述目标意图预测结果为错误,此时确定所述目标意图预测结果对应的所述意图预测准确结果为错误。For 43, when the target intention prediction result is whether it is intention or not, it means that it is necessary to compare it with the test question whether it is intended or not; the sample identifier of the test sample corresponding to the target intention prediction result is in the intention priority Extract the test samples after the intention priority processing from the processed test sample set, extract whether the test question is intentional or not from the extracted test sample after the intention priority processing, and determine whether the extracted test question is Intention calibration data as the test question to be judged is the intention calibration data; when the target intention prediction result and the to-be-judged test question whether the intention calibration data are the same, it means that the target intention prediction result is correct, then determine The accurate result of the intention prediction corresponding to the target intention prediction result is correct; when the target intention prediction result and the test question to be judged whether the intention specification data are different, it means that the target intention prediction result is wrong , at this time, it is determined that the accurate result of the intention prediction corresponding to the target intention prediction result is an error.
对于44,当所述目标意图预测结果为问句意图时,意味着此时需要跟测试问题问句意图标定数据进行对比;根据所述目标意图预测结果对应的测试样本的样本标识在所述意图优先级处理后的测试样本集合中提取意图优先级处理后的测试样本,从提取得到的意图优先级处理后的测试样本中提取出所述测试问题问句意图标定数据,将提取得到的所述测试问题问句意图标定数据作为待判断的测试问题问句意图标定数据;当所述目标意图预测结果和所述待判断的测试问题问句意图标定数据相同时,意味着所述目标意图预测结果为正确,此时确定所述目标意图预测结果对应的所述意图预测准确结果为正确;当所述目标意图预测结果和所述待判断的测试问题问句意图标定数据不相同时,意味着所述目标意图预测结果为错误,此时确定所述目标意图预测结果对应的所述意图预测准确结果为错误。For 44, when the target intent prediction result is the question intent, it means that it needs to be compared with the test question question intent identification data; the sample identifier of the test sample corresponding to the target intent prediction result is in the intent Extracting the test sample after the intention priority processing from the test sample set after the priority processing, extracting the test question question sentence intention determination data from the extracted test sample after the intention priority processing, and using the extracted The test question question intent determination data is used as the test question intent determination data to be judged; when the target intent prediction result is the same as the test question intent determination data to be determined, it means the target intent prediction result To be correct, at this time, it is determined that the accurate result of the intent prediction corresponding to the target intent prediction result is correct; when the target intent prediction result and the to-be-determined question sentence intent determination data are different, it means that the target intent prediction result is not the same. If the target intention prediction result is wrong, at this time, it is determined that the intention prediction accurate result corresponding to the target intention prediction result is wrong.
对于45,重复执行步骤S42至步骤S45,直至确定所有所述意图预测结果的所述意图预测准确结果.For step 45, steps S42 to S45 are repeatedly executed until the accurate results of the intention prediction of all the intention prediction results are determined.
对于46,根据所有所述意图预测准确结果,作为各个所述产品标识各自对应的意图预测准确结果集合。For 46, the accurate results are predicted according to all the intentions as a set of accurate prediction results of the intention corresponding to each of the product identifiers.
在一个实施例中,上述分别对所述测试样本集合中每个所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据按意图优先级进行处理,得到意图优先级处理后的测试样本集合的步骤,包括:In one embodiment, the above-mentioned processing of the test question question intention identification data and the test question intention identification data of each of the test samples in the test sample set are carried out according to the intention priority, and the intention priority processing is obtained. The steps to test the sample collection include:
S411:分别对所述测试样本集合中每个所述测试样本的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行对比;S411 : respectively comparing the test question question intent rating data and the test question intent rating data of each of the test samples in the test sample set;
S412:当存在所述测试样本的所述测试问题问句意图标定数据和所述测试问 题是否意图标定数据都存在标定数据时,对所述测试样本的所述测试问题问句意图标定数据进行删除处理,得到意图优先级处理后的测试样本;S412: Delete the test question question intent calibration data of the test sample when both the test question question intent calibration data and the test question intent calibration data of the test sample exist. Processing, get the test sample after intent priority processing;
S413:根据所有所述意图优先级处理后的测试样本,确定所述意图优先级处理后的测试样本集合。S413: Determine the set of test samples after the intention priority processing according to all the test samples processed by the intention priority.
本实施例实现了对测试样本按意图优先级进行处理,在满足意图优先级的情况下,确保每个测试样本的标定数据具有唯一意图值,从而有利于提高模型测试的准确性,有利于使模型的优化符合意图优先级。In this embodiment, the test samples are processed according to the intent priority, and when the intent priority is satisfied, it is ensured that the calibration data of each test sample has a unique intent value, which is beneficial to improve the accuracy of the model test and make the The optimization of the model conforms to the intent priority.
对于411,每次将同一个所述测试样本的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行对比。For 411 , the test question question intent rating data and the test question intent rating data of the same test sample are compared each time.
对于412,当存在所述测试样本的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据都存在标定数据时,意味着该所述测试样本存在两个标定数据,因意图优先级为是否意图比OA意图高,此时对所述测试样本的所述测试问题问句意图标定数据进行删除处理以用于保留意图优先级高的是否意图对应的所述测试问题是否意图标定数据,将删除处理后只有一个标定数据的测试样本作为意图优先级处理后的测试样本。For step 412, when there are both the test question question intention calibration data and the test question intention calibration data of the test sample, it means that the test sample has two calibration data, because the intention is given priority The level is whether the intent is higher than the OA intent. At this time, delete processing is performed on the test question question intent determination data of the test sample, so as to retain the intent determination data corresponding to the test question with high intent priority. , the test sample with only one calibration data after deletion processing is regarded as the test sample after intent priority processing.
对于413,将所有所述意图优先级处理后的测试样本,作为所述意图优先级处理后的测试样本集合。For 413, use all the test samples after the intention priority processing as the set of test samples after the intention priority processing.
在一个实施例中,上述根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告的步骤,包括:In one embodiment, the above-mentioned steps of generating a report according to the respective corresponding test sample subsets and intent prediction accurate result sets of the product identifiers to obtain the test report of the target question answering intent classification model include:
S51:采用目标产品标识从各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合中提取数据,得到待计算的测试样本子集合和待计算的意图预测准确结果集合,所述目标产品标识是各个所述产品标识中的任一个;S51: Use the target product identifier to extract data from the test sample subset and the intent prediction accurate result set corresponding to each of the product identifiers, and obtain the test sample subset to be calculated and the intent prediction accurate result set to be calculated. The product identification is any of the respective said product identifications;
S52:根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个意图值的准确率计算和召回率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数;S52: Calculate the accuracy rate and recall rate of each intent value according to the test sample subset to be calculated and the intent prediction accurate result set to be calculated, and obtain each of the intent values corresponding to the target product identifier. the precision data, the recall data, and the total number of positive samples;
S53:重复执行所述采用目标产品标识从各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合中提取数据,得到待计算的测试样本子集合和待计算的意图预测准确结果集合,所述目标产品标识是各个所述产品标识中的任一个的步骤,直至确定所有所述产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数;S53: Repeatedly executing the use of target product identifiers to extract data from the respective corresponding test sample subsets and intent prediction accurate result sets to obtain the test sample subsets to be calculated and the intent prediction accurate result sets to be calculated , the target product identification is any one of the product identifications, until the accuracy data, the recall data and the positive samples of each of the intention values corresponding to all the product identifications are determined total;
S54:根据各个所述产品标识各自对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数进行报告生成,得到所述目标问答意图分类模型测试报告。S54: Generate a report according to the accuracy rate data, the recall rate data, and the total number of positive samples of the respective intent values corresponding to the respective product identifiers, to obtain the target question answering intent classification model test report.
本实施例自动根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,避免了人工进行模型测试,避免人工计算耗时长且不准确的问题,提高了问答意图分类模型的准确性。This embodiment automatically generates reports according to the respective test sample subsets corresponding to each of the product identifiers and the accurate result set of intention prediction, which avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculation, and improves the classification of question-and-answer intentions. accuracy of the model.
对于51,从各个所述产品标识中提取出任一个产品标识作为目标产品标识;将目标产品标识在各个所述产品标识各自对应的测试样本子集合中进行查找,将在各个所述产品标识各自对应的测试样本子集合查找到的产品标识对应的测试样本子集合作为待计算的测试样本子集合;将目标产品标识在各个所述产品标识各自对应的意图预测准确结果集合中进行查找,将在各个所述产品标识各自对应的意图预测准确结果集合查找到的产品标识对应的意图预测准确结果集合作为待计算的意图预测准确结果集合。For 51, extract any product identification from each of the product identifications as the target product identification; search the target product identification in the test sample subset corresponding to each of the product identifications, and use the corresponding product identification in each of the product identifications. The test sample subset corresponding to the product identifier found in the test sample subset is taken as the test sample subset to be calculated; the target product identifier is searched in the respective corresponding intent prediction accurate result sets of the product identifiers, and the target product identifier will be searched in each The set of accurate intention prediction results corresponding to each of the product identifiers is used as the set of accurate intention prediction results to be calculated.
对于52,根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行意图值提取,得到目标意图值集合,其中,在目标意图值集合中每个意图值具有唯一性。At step 52 , extracting intent values according to the subset of test samples to be calculated and the set of accurate intent prediction results to be calculated, to obtain a target intent value set, wherein each intent value in the target intent value set is unique .
依次从目标意图值集合中提取出意图值,得到待计算的意图值;根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行所述待计算的意图值的准确率计算和召回率计算,得到所述目标产品标识对应的所述待计算的意图值的所述准确率数据、所述待计算的意图值的召回率数据和所述待计算的意图值的所述正样本总数;重复所述依次从目标意图值集合中提取出意图值,得到待计算的意图值的步骤,直至确定所述目标产品标识对应的所有所述意图值的所述准确率数据、所述召回率数据和所述正样本总数。Extracting the intent values from the target intent value set in turn to obtain the intent value to be calculated; according to the test sample subset to be calculated and the intent prediction accurate result set to be calculated, the accuracy of the intent value to be calculated is performed. rate calculation and recall rate calculation, and obtain the accuracy rate data of the intent value to be calculated corresponding to the target product identifier, the recall rate data of the intent value to be calculated, and the total value of the intent value to be calculated. Describe the total number of positive samples; repeat the steps of sequentially extracting intent values from the target intent value set to obtain the intent value to be calculated, until the accuracy data, the recall data and the total number of positive samples.
对于53,重复执行S51至步骤S53,直至确定所有所述产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数。For step 53, step S51 to step S53 are repeatedly performed until the accuracy rate data, the recall rate data, and the total number of positive samples of each of the intention values corresponding to all the product identifiers are determined.
对于54,根据各个所述产品标识各自对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数按预设报告生成规则进行报告生成,将生成的报告作为所述目标问答意图分类模型测试报告。For step 54, generate a report according to the preset report generation rule according to the accuracy rate data, the recall rate data, and the total number of positive samples of the respective intent values corresponding to the respective product identifiers, and use the generated report as The target question answering intent classification model test report.
在一个实施例中,上述根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个意图值的准确率计算和召回率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数的步骤,包括:In one embodiment, according to the test sample subset to be calculated and the intention prediction accurate result set to be calculated, the accuracy calculation and recall calculation of each intention value are performed, and each target product identifier corresponding to the target product identifier is obtained. The steps of the accuracy rate data, the recall rate data and the total number of positive samples of the intent value include:
S521:根据所述待计算的测试样本子集合进行所述测试样本的总数计算,得到所述目标产品标识对应的测试样本总数;S521: Calculate the total number of test samples according to the subset of test samples to be calculated, to obtain the total number of test samples corresponding to the target product identifier;
S522:根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个所述意图值的正样本正确预测数的计算,得到所述目标产品标识对应的各个所述意图值的正样本正确预测数;S522: Calculate the number of positive sample correct predictions for each of the intent values according to the test sample subset to be calculated and the to-be-calculated set of accurate intent prediction results, to obtain each of the intents corresponding to the target product identifiers The number of correct predictions for positive samples of the value;
S523:根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个所述意图值的负样本正确预测数的计算,得到所述目标产品标识对应的各个所述意图值的负样本正确预测数;S523: Calculate the number of negative sample correct predictions for each of the intent values according to the subset of test samples to be calculated and the set of accurate intent prediction results to be calculated, to obtain each of the intents corresponding to the target product identifiers The number of correct predictions for negative samples of the value;
S524:根据所述目标产品标识对应的测试样本总数、各个所述意图值的正样本正确预测数和各个所述意图值的负样本正确预测数进行准确率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据;S524: Perform an accuracy calculation according to the total number of test samples corresponding to the target product identifier, the number of positive sample correct predictions of each of the intent values, and the correct number of negative samples of each of the intent values, to obtain the corresponding target product identifier. the accuracy data for each of the intent values;
S525:根据所述待计算的测试样本子集合进行各个所述意图值各自的所述测试样本的总数计算,得到所述目标产品标识对应的各个所述意图值的所述正样本总数;S525: Calculate the total number of the test samples for each of the intent values according to the subset of test samples to be calculated, to obtain the total number of positive samples for each of the intent values corresponding to the target product identifier;
S526:根据所述目标产品标识对应的各个所述意图值的所述正样本总数、各个所述意图值的正样本正确预测数进行召回率计算,得到所述目标产品标识对应的各个所述意图值的所述召回率数据。S526: Calculate the recall rate according to the total number of positive samples of each of the intent values corresponding to the target product identifiers and the correct predicted number of positive samples of each of the intent values, to obtain each of the intents corresponding to the target product identifiers value of the recall data.
本实施例实现了自动化根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个意图值的准确率计算和召回率计算,为后续生成报告提供了基础。This embodiment realizes the automatic calculation of the accuracy rate and recall rate of each intent value according to the subset of test samples to be calculated and the set of accurate results of intent prediction to be calculated, which provides a basis for subsequent report generation.
对于521,对所述待计算的测试样本子集合中的所述测试样本的进行总数计算,得到所述目标产品标识对应的测试样本总数。For 521, perform a total number calculation on the test samples in the to-be-calculated test sample subset to obtain the total number of test samples corresponding to the target product identifier.
对于522,根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合中提取出意图值,得到待去重的意图值集合;对待去重的意图值集合进行去重处理,得到目标意图值集合;从目标意图值集合中提取出意图值,得到待 计算的意图值;根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行待计算的意图值的正样本正确预测数的计算,得到所述目标产品标识对应的待计算的意图值的正样本正确预测数;重复执行从目标意图值集合中提取出意图值,得到待计算的意图值的步骤,直至确定所述目标产品标识对应的各个所述意图值的正样本正确预测数。For 522, extract the intent value according to the test sample subset to be calculated and the intent prediction accurate result set to be calculated to obtain the intent value set to be deduplicated; perform deduplication processing on the intent value set to be deduplicated , obtain the target intent value set; extract the intent value from the target intent value set, and obtain the intent value to be calculated; perform the to-be-calculated test sample subset and the to-be-calculated intent prediction accurate result set. The calculation of the number of correct predictions of positive samples of the intent value, to obtain the number of correct predictions of positive samples of the intent value to be calculated corresponding to the target product identifier; repeated execution to extract the intent value from the target intent value set to obtain the intent value to be calculated until the positive sample correct prediction number of each of the intention values corresponding to the target product identifier is determined.
正样本正确预测数,是指标定数据是待计算的意图值,意图预测结果也是待计算的意图值。The number of correct predictions for positive samples means that the specified data is the intent value to be calculated, and the intent prediction result is also the intent value to be calculated.
对于523,从目标意图值集合中提取出意图值,得到待计算的意图值;从目标意图值集合中提取出意图值,得到待计算的意图值;根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行待计算的意图值的负样本正确预测数的计算,得到所述目标产品标识对应的待计算的意图值的负样本正确预测数;重复执行从目标意图值集合中提取出意图值,得到待计算的意图值的步骤,直至确定所述目标产品标识对应的各个所述意图值的负样本正确预测数。For 523, extract the intent value from the target intent value set to obtain the intent value to be calculated; extract the intent value from the target intent value set to obtain the intent value to be calculated; according to the test sample subset to be calculated and The set of accurate results of intent prediction to be calculated is performed to calculate the correct number of negative samples of the intent value to be calculated, and the correct number of negative samples of the intent value to be calculated corresponding to the target product identifier is obtained; The step of extracting the intent value from the value set, and obtaining the intent value to be calculated, until the correct prediction number of negative samples of each of the intent values corresponding to the target product identifier is determined.
负样本正确预测数,是指标定数据不是待计算的意图值,意图预测结果也不是待计算的意图值。The number of correct predictions for negative samples means that the specified data is not the intent value to be calculated, and the intent prediction result is not the intent value to be calculated.
对于524,从目标意图值集合中提取出意图值,得到待计算的意图值;将所述目标产品标识对应的待计算的意图值的正样本正确预测数和负样本正确预测数进行相加,得到所述目标产品标识对应的待计算的意图值的正确预测总数;将所述目标产品标识对应的待计算的意图值的正确预测总数除以所述目标产品标识对应的测试样本总数,得到所述目标产品标识对应的待计算的意图值的所述准确率数据;重复执行从目标意图值集合中提取出意图值,得到待计算的意图值的步骤,直至确定所述目标产品标识对应的各个所述意图值的所述准确率数据。In step 524, the intent value is extracted from the target intent value set, and the intent value to be calculated is obtained; the positive sample correct prediction number and the negative sample correct prediction number of the intent value to be calculated corresponding to the target product identifier are added, Obtain the total number of correct predictions of the intention values to be calculated corresponding to the target product identification; divide the total number of correct predictions of the intention values to be calculated corresponding to the target product identification by the total number of test samples corresponding to the target product identification to obtain the total number of correct predictions. the accuracy data of the intent value to be calculated corresponding to the target product identifier; repeat the steps of extracting the intent value from the target intent value set to obtain the intent value to be calculated, until the target product identifier corresponding to each the accuracy data for the intent value.
对于525,从目标意图值集合中提取出意图值,得到待计算的意图值;对所述待计算的测试样本子集合进行待计算的意图值对应的所述测试样本的总数计算,得到所述目标产品标识对应的待计算的意图值的所述正样本总数,重复执行所述从目标意图值集合中提取出意图值,得到待计算的意图值的步骤,直至确定所述目标产品标识对应的各个所述意图值的所述正样本总数。For 525, extract the intent value from the target intent value set to obtain the intent value to be calculated; perform the calculation of the total number of the test samples corresponding to the intent value to be calculated on the subset of test samples to be calculated to obtain the The total number of positive samples of the intent value to be calculated corresponding to the target product identifier, repeat the steps of extracting the intent value from the target intent value set to obtain the intent value to be calculated, until it is determined that the target product identifier corresponds to the total number of positive samples for each of the intent values.
对于526,从目标意图值集合中提取出意图值,得到待计算的意图值;根据所述目标产品标识对应的待计算的意图值的正样本正确预测数除以所述目标产品标识对应的待计算的意图值的所述正样本总数,得到所述目标产品标识对应的待计算的意图值的所述召回率数据;重复执行所述从目标意图值集合中提取出意图值,得到待计算的意图值的步骤,直至确定所述目标产品标识对应的各个所述意图值的所述召回率数据。For 526, extract the intent value from the target intent value set to obtain the intent value to be calculated; divide the positive sample correct prediction number of the intent value to be calculated corresponding to the target product identifier by the to-be-calculated intent value corresponding to the target product identifier The total number of positive samples of the calculated intent values is obtained to obtain the recall rate data of the intent values to be calculated corresponding to the target product identifiers; repeating the extraction of intent values from the target intent value set is performed to obtain the to-be-calculated intent values. The step of intent value is until the recall rate data of each of the intent values corresponding to the target product identifier is determined.
在一个实施例中,上述根据各个所述产品标识各自对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数进行报告生成,得到所述目标问答意图分类模型测试报告的步骤,包括:In an embodiment, the above-mentioned report is generated according to the accuracy data, the recall data and the total number of positive samples of each of the intention values corresponding to each of the product identifiers, to obtain the target question answering intention classification Steps for model test reporting, including:
S61:根据各个所述产品标识各自对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数进行Excel文档生成,得到所述目标问答意图分类模型测试报告;S61: Generate an Excel document according to the accuracy rate data, the recall rate data, and the total number of positive samples of the respective intent values corresponding to the respective product identifiers, to obtain the target question answering intent classification model test report;
S62:获取报告下载请求,所述报告下载请求携带有下载方式数据;S62: Obtain a report download request, where the report download request carries download mode data;
S63:根据所述下载方式数据发送所述目标问答意图分类模型测试报告。S63: Send the target question answering intent classification model test report according to the download method data.
本实施例实现了生成Excel文档格式的所述目标问答意图分类模型测试报告,从而有利于数据的二次处理,满足了用户个性化的需求。This embodiment realizes the generation of the test report of the target question answering intent classification model in the Excel document format, thereby facilitating the secondary processing of the data and satisfying the personalized needs of the user.
对于61,根据各个所述产品标识各自对应的各个所述意图值的所述准确率数 据、所述召回率数据和所述正样本总数按预设图表规则进行Excel文档生成,得到所述目标问答意图分类模型测试报告;For step 61, according to the accuracy data, the recall data, and the total number of positive samples of each of the intention values corresponding to each of the product identifiers, generate an Excel document according to a preset chart rule, and obtain the target question and answer Intent classification model test report;
对于62,获取用户发送的报告下载请求。For 62, the report download request sent by the user is obtained.
报告下载请求,是将所述目标问答意图分类模型测试报告进行下载的请求。The report download request is a request to download the test report of the target question answering intent classification model.
下载方式数据包括但不限于:发送到预设邮箱、按预设传输方式发送给第三方软件系统、按预设路径存在在本地文件夹。The download method data includes but is not limited to: sending to a preset mailbox, sending it to a third-party software system according to a preset transmission method, and storing it in a local folder according to a preset path.
对于63,当下载方式数据为发送到预设邮箱时,将所述目标问答意图分类模型测试报告发送到预设邮箱;当下载方式数据为按预设传输方式发送给第三方软件系统时,将所述目标问答意图分类模型测试报告按预设传输方式发送给第三方软件系统;当下载方式数据为按预设路径存储在本地文件夹时,将所述目标问答意图分类模型测试报告存储在预设路径对应的本地文件夹。For 63, when the download mode data is to be sent to the preset mailbox, send the target question answering intent classification model test report to the preset mailbox; when the download mode data is to be sent to the third-party software system by the preset transmission mode, send the The target question answering intent classification model test report is sent to the third-party software system in a preset transmission mode; when the download mode data is stored in a local folder according to a preset path, the target question answering intent classification model test report is stored in the preset. Set the local folder corresponding to the path.
参照图2,本申请还提出了一种问答意图分类模型的测试装置,所述装置包括:Referring to FIG. 2, the present application also proposes a test device for a question-and-answer intent classification model, the device includes:
测试样本获取模块100,用于获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;The test sample acquisition module 100 is configured to acquire a test sample set, the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question question sentence intent identification data, and test question intent calibration data;
测试样本划分模块200,用于采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;A test sample dividing module 200, configured to divide the plurality of test samples by using the product identifiers to obtain a test sample subset corresponding to each of the product identifiers;
意图预测模块300,用于分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;The intent prediction module 300 is configured to respectively input the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtain an intent prediction result set corresponding to each of the product identifiers;
意图预测准确判断模块400,用于分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;The intention prediction accuracy judgment module 400 is configured to use the test question question sentence intention identification data and the test according to the intention prediction result set corresponding to each of the product identifiers and the test sample subset corresponding to each of the product identifiers respectively. Whether the question is intended to identify the data to accurately judge the intent prediction of each of the test samples, and obtain an accurate result set of intent prediction corresponding to each of the product identifiers;
报告生成模块500,用于根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。The report generation module 500 is configured to generate a report according to the respective test sample subsets corresponding to each of the product identifiers and a set of accurate intention prediction results to obtain a test report of the target question answering intent classification model, where the target question answering intent classification model test report includes: Accuracy data, recall data, and total number of positive samples of each intent value corresponding to each of the product identifiers.
本实施例通过获取测试样本集合,测试样本集合包括多个测试样本,测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;采用产品标识对多个测试样本进行划分,得到各个产品标识各自对应的测试样本子集合;分别将每个产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个产品标识各自对应的意图预测结果集合;分别根据各个产品标识各自对应的意图预测结果集合、各个产品标识各自对应的测试样本子集合的测试问题问句意图标定数据和测试问题是否意图标定数据进行每个测试样本的意图预测准确判断,得到各个产品标识各自对应的意图预测准确结果集合;根据各个产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,目标问答意图分类模型测试报告包括:各个产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数,从而实现了采用测试样本集合对待测试的问答意图分类模型进行测试并自动生成目标问答意图分类模型测试报告,避免了人工进行模型测试,避免人工计算耗时长且不准确的问题,提高了问答意图分类模型的准确性。In this embodiment, a test sample set is obtained, and the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data; the product identification to many Divide the test samples to obtain the corresponding test sample subsets for each product identifier; input the test sample subsets corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested for intent prediction, and obtain the respective product identifiers. Corresponding intent prediction result set; carry out each test sample according to the respective intent prediction result set corresponding to each product identifier, the test question question intent rating data and the test question intent rating data corresponding to each product identifier respective test sample subset. According to each product identifier corresponding to the corresponding test sample subset and intent prediction accurate result set, the report is generated, and the target question answering intent classification model test report is obtained, the target The question and answer intent classification model test report includes: accuracy data, recall rate data and total number of positive samples of each intent value corresponding to each product identifier, so that the question and answer intent classification model to be tested is tested using the test sample set and the target question and answer is automatically generated. The intent classification model test report avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculations, and improves the accuracy of the question answering intent classification model.
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于储存问答意图分类模型的测试方法等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种问答意图分类模型的测试方法。所述问答意图分类模型的测试方法,包括:获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。Referring to FIG. 3 , an embodiment of the present application further provides a computer device. The computer device may be a server, and its internal structure may be as shown in FIG. 3 . The computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data such as the testing method of the question-answering intent classification model. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by a processor, implements a method for testing a question answering intent classification model. The test method for the question-answer intent classification model includes: acquiring a test sample set, the test sample set including a plurality of test samples, the test samples including: product identification, test question sample data, test question question sentence intent identification data and Whether the test question is intended to denote data; use the product identifier to divide the multiple test samples to obtain a test sample subset corresponding to each product identifier; separate the test sample subset corresponding to each product identifier Input the respective corresponding question-and-answer intent classification models to be tested to perform intent prediction, and obtain a set of intent prediction results corresponding to each of the product identifiers; The corresponding test sample sub-set of the test question question is intended to determine the data and whether the test question is intended to determine the data to accurately determine the intention prediction of each of the test samples, and obtain the corresponding intention prediction of each of the product identifiers is accurate. Result set; generate a report according to the corresponding test sample subsets of each of the product identifiers and the accurate result set of intention prediction, and obtain a test report of the target question answering intent classification model, and the target question answering intent classification model test report includes: each of the products Identify the precision data, recall data, and total number of positive samples corresponding to each intent value.
本实施例通过获取测试样本集合,测试样本集合包括多个测试样本,测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;采用产品标识对多个测试样本进行划分,得到各个产品标识各自对应的测试样本子集合;分别将每个产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个产品标识各自对应的意图预测结果集合;分别根据各个产品标识各自对应的意图预测结果集合、各个产品标识各自对应的测试样本子集合的测试问题问句意图标定数据和测试问题是否意图标定数据进行每个测试样本的意图预测准确判断,得到各个产品标识各自对应的意图预测准确结果集合;根据各个产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,目标问答意图分类模型测试报告包括:各个产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数,从而实现了采用测试样本集合对待测试的问答意图分类模型进行测试并自动生成目标问答意图分类模型测试报告,避免了人工进行模型测试,避免人工计算耗时长且不准确的问题,提高了问答意图分类模型的准确性。In this embodiment, a test sample set is obtained, and the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data; the product identification to many Divide the test samples to obtain the corresponding test sample subsets for each product identifier; input the test sample subsets corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested for intent prediction, and obtain the respective product identifiers. Corresponding intent prediction result set; carry out each test sample according to the respective intent prediction result set corresponding to each product identifier, the test question question intent rating data and the test question intent rating data corresponding to each product identifier respective test sample subset. According to each product identifier corresponding to the corresponding test sample subset and intent prediction accurate result set, the report is generated, and the target question answering intent classification model test report is obtained, the target The question and answer intent classification model test report includes: accuracy data, recall rate data and total number of positive samples of each intent value corresponding to each product identifier, so that the question and answer intent classification model to be tested is tested using the test sample set and the target question and answer is automatically generated. The intent classification model test report avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculations, and improves the accuracy of the question answering intent classification model.
本申请一实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现一种问答意图分类模型的测试方法,包括步骤:获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;分别根据各个所述产品标识各自对应的意图 预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a method for testing a question-and-answer intent classification model is implemented, including the steps of: acquiring a test sample set, the The test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data; using the product identification to identify the plurality of test samples Divide and obtain the respective test sample subsets corresponding to each of the product identifiers; respectively input the test sample subsets corresponding to each of the product identifiers into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtain each of the said product identifiers. The intent prediction result set corresponding to each product identifier; the intent prediction result set corresponding to each product identifier, the test question question sentence intent determination data and the test sample subset corresponding to each product identifier respectively. Whether the test question intends to identify the data to accurately judge the intent prediction of each of the test samples, and obtain an accurate result set of intent prediction corresponding to each of the product identifiers; according to the respective corresponding test sample subsets and intent predictions of each of the product identifiers A report is generated on the accurate result set, and a target question answering intent classification model test report is obtained. The target question answering intent classification model test report includes: accuracy data, recall data and total number of positive samples of each intent value corresponding to each of the product identifiers.
上述执行的问答意图分类模型的测试方法,通过获取测试样本集合,测试样本集合包括多个测试样本,测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;采用产品标识对多个测试样本进行划分,得到各个产品标识各自对应的测试样本子集合;分别将每个产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个产品标识各自对应的意图预测结果集合;分别根据各个产品标识各自对应的意图预测结果集合、各个产品标识各自对应的测试样本子集合的测试问题问句意图标定数据和测试问题是否意图标定数据进行每个测试样本的意图预测准确判断,得到各个产品标识各自对应的意图预测准确结果集合;根据各个产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,目标问答意图分类模型测试报告包括:各个产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数,从而实现了采用测试样本集合对待测试的问答意图分类模型进行测试并自动生成目标问答意图分类模型测试报告,避免了人工进行模型测试,避免人工计算耗时长且不准确的问题,提高了问答意图分类模型的准确性。The test method of the above-mentioned question and answer intent classification model is obtained by obtaining a test sample set, the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question question sentence intent identification data, and test question intention Calibration data; use product identifiers to divide multiple test samples to obtain test sample subsets corresponding to each product identifier; respectively input the test sample subsets corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested. Intent prediction, obtain the corresponding set of intention prediction results for each product identifier; according to the corresponding intent prediction result set of each product identifier and the test sample subset corresponding to each product identifier The intent prediction data is used to accurately judge the intent prediction of each test sample, and the corresponding intent prediction accurate result set corresponding to each product identifier is obtained; the report is generated according to the corresponding test sample subset and intent prediction accurate result set corresponding to each product identifier, and the target is obtained. Question and answer intent classification model test report, the target question answer intent classification model test report includes: accuracy data, recall rate data and total number of positive samples of each intent value corresponding to each product identifier, thus realizing the question and answer intent classification to be tested by using the test sample set The model is tested and the target question answering intent classification model test report is automatically generated, which avoids manual model testing, avoids the problem of time-consuming and inaccurate manual calculation, and improves the accuracy of the question answering intent classification model.
所述计算机存储介质可以是非易失性,也可以是易失性。The computer storage medium can be non-volatile or volatile.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other medium provided in this application and used in the embodiments may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, device, article or method comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, apparatus, article or method. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, apparatus, article, or method that includes the element.
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the present application, and are not intended to limit the scope of the patent of the present application. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present application, or directly or indirectly applied to other related The technical field is similarly included in the scope of patent protection of this application.

Claims (20)

  1. 一种问答意图分类模型的测试方法,其中,所述方法包括:A method for testing a question-and-answer intent classification model, wherein the method includes:
    获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;acquiring a test sample set, where the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data;
    采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;Divide the plurality of test samples by using the product identifiers to obtain a subset of test samples corresponding to each of the product identifiers;
    分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;Inputting the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtaining the respective intent prediction result set corresponding to each of the product identifiers;
    分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;Carry out each test according to the intent prediction result set corresponding to each of the product identifiers, the test question question intent determination data and the test question intent determination data of the test sample subsets corresponding to each of the product identifiers respectively. Accurately judge the intention prediction of the test sample, and obtain a set of accurate intention prediction results corresponding to each of the product identifiers;
    根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。The report is generated according to the respective corresponding test sample subsets of the product identifiers and the accurate intent prediction result set, to obtain the target question answering intent classification model test report. The target question answering intent classification model test report includes: the respective product identifiers corresponding to The precision data, recall data and total number of positive samples for each intent value of .
  2. 根据权利要求1所述的问答意图分类模型的测试方法,其中,所述分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合的步骤,包括:The method for testing a question-and-answer intent classification model according to claim 1 , wherein the test sample subset corresponding to each product identifier is input into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtain each The steps of the respective corresponding intent prediction result sets of the product identifiers include:
    采用待预测的产品标识从各个所述产品标识各自对应的测试样本子集合中提取出测试样本子集合,得到目标测试样本子集合,所述待预测的产品标识是各个所述产品标识中的任一个;The test sample subset is extracted from the test sample subset corresponding to each of the product identifiers by using the product identifier to be predicted, and the target test sample subset is obtained, and the product identifier to be predicted is any one of the product identifiers. One;
    根据所述待预测的产品标识从待测试模型库中查找,得到目标待测试的问答意图分类模型;Search from the model library to be tested according to the product identifier to be predicted, and obtain the question-answer intent classification model of the target to be tested;
    分别将所述目标测试样本子集合中每个所述测试样本输入所述目标待测试的问答意图分类模型进行意图预测,得到所述待预测的产品标识对应的所述意图预测结果集合;Inputting each of the test samples in the target test sample subset into the target question-and-answer intent classification model to be tested for intent prediction, and obtaining the intent prediction result set corresponding to the product identifier to be predicted;
    重复所述采用待预测的产品标识从各个所述产品标识各自对应的测试样本子集合中提取出测试样本子集合,得到目标测试样本子集合的步骤,直至确定所有所述产品标识对应的所述意图预测结果集合。Repeat the steps of using the product identifiers to be predicted to extract the test sample subsets from the test sample subsets corresponding to the respective product identifiers, and obtain the target test sample subsets, until it is determined that all the product identifiers corresponding to the test sample subsets are determined. A collection of intent prediction results.
  3. 根据权利要求1所述的问答意图分类模型的测试方法,其中,所述分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合的步骤,包括:The method for testing a question-and-answer intent classification model according to claim 1, wherein the test is based on the respective intent prediction result sets corresponding to each of the product identifiers, and the test sample subsets corresponding to each of the product identifiers. The steps of performing an accurate judgment on the intention prediction of each of the test samples, and obtaining the set of accurate intention prediction results corresponding to each of the product identifiers, include:
    分别对所述测试样本集合中每个所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据按意图优先级进行处理,得到意图优先级处理后的测试样本集合;respectively process the test question question sentence intent rating data and the test question intent rating data of each of the test samples in the test sample set according to the intent priority, and obtain the test sample set after the intent priority processing;
    分别从每个所述产品标识对应的所述意图预测结果集合中依次提取出意图预测结果,得到目标意图预测结果;Extracting intention prediction results from the intention prediction result set corresponding to each product identifier in turn, to obtain a target intention prediction result;
    当所述目标意图预测结果为是否意图时,根据所述目标意图预测结果从所述意图优先级处理后的测试样本集合中提取所述测试问题是否意图标定数据,得到待判断的测试问题是否意图标定数据,当所述目标意图预测结果和所述待判断的测试问题是否意图标定数据相同时,确定所述目标意图预测结果对应的所述意图预测准确结果为正确,否则确定所述目标意图预测结果对应的所述意图预测准确结果为错误;When the target intention prediction result is whether the target intention is intended or not, extract the test question intention determination data from the test sample set after the intention priority processing according to the target intention prediction result, and obtain whether the test question to be judged is intended or not Calibration data, when the target intention prediction result and the test question to be judged whether the intention calibration data is the same, determine that the target intention prediction result corresponding to the target intention prediction result is correct, otherwise determine the target intention prediction The accurate result of the intention prediction corresponding to the result is an error;
    当所述目标意图预测结果为问句意图时,根据所述目标意图预测结果从所述意图优先级处理后的测试样本集合提取所述测试问题问句意图标定数据,得到待判断的测试问题问句意图标定数据,当所述目标意图预测结果和所述待判断的测试问题问句意图标定数据相同时,确定所述目标意图预测结果对应的所述意图预测准确结果为正确,否则确定所述目标意图预测结果对应的所述意图预测准确结果为错误;When the target intent prediction result is the question intent, extract the test question question intent determination data from the test sample set after the intent priority processing according to the target intent prediction result, and obtain the test question question to be determined. Sentence intent determination data, when the target intent prediction result and the to-be-determined question sentence intent determination data are the same, it is determined that the intent prediction accurate result corresponding to the target intent prediction result is correct, otherwise it is determined that the intent prediction result is correct. The accurate result of the intention prediction corresponding to the target intention prediction result is an error;
    重复执行所述分别从每个所述产品标识对应的所述意图预测结果集合中依次提取出意图预测结果,得到目标意图预测结果的步骤,直至确定所有所述意图预测结果的所述意图预测准确结果;Repeat the step of sequentially extracting the intent prediction results from the intent prediction result set corresponding to each product identifier to obtain the target intent prediction result, until it is determined that the intent predictions of all the intent prediction results are accurate result;
    根据所有所述意图预测准确结果,确定各个所述产品标识各自对应的意图预测准确结果集合。According to all the accurate intention prediction results, a set of accurate intention prediction results corresponding to each of the product identifiers is determined.
  4. 根据权利要求3所述的问答意图分类模型的测试方法,其中,所述分别对所述测试样本集合中每个所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据按意图优先级进行处理,得到意图优先级处理后的测试样本集合的步骤,包括:The method for testing a question-and-answer intent classification model according to claim 3, wherein the test question question sentence intent rating data and the test question intent rating data of each of the test samples in the test sample set are determined by intent The steps of processing the priority and obtaining the set of test samples after the priority processing of the intent include:
    分别对所述测试样本集合中每个所述测试样本的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行对比;respectively comparing the test question question intent rating data and the test question intent rating data of each of the test samples in the test sample set;
    当存在所述测试样本的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据都存在标定数据时,对所述测试样本的所述测试问题问句意图标定数据进行删除处理,得到意图优先级处理后的测试样本;When both the test question question intent calibration data and the test question intent calibration data of the test sample exist, delete the test question question intent calibration data of the test sample, Get the test sample after intent priority processing;
    根据所有所述意图优先级处理后的测试样本,确定所述意图优先级处理后的测试样本集合。According to all the test samples processed by the intent priority, the set of test samples processed by the intent priority is determined.
  5. 根据权利要求1所述的问答意图分类模型的测试方法,其中,所述根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告的步骤,包括:The method for testing a question-and-answer intent classification model according to claim 1, wherein the report is generated according to the respective corresponding test sample subsets and the intent prediction accurate result set of each of the product identifiers, to obtain a test report of the target question-and-answer intent classification model steps, including:
    采用目标产品标识从各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合中提取数据,得到待计算的测试样本子集合和待计算的意图预测准确结果集合,所述目标产品标识是各个所述产品标识中的任一个;The target product identifier is used to extract data from the test sample subset and the intent prediction accurate result set corresponding to each of the product identifiers to obtain the test sample subset to be calculated and the intent prediction accurate result set to be calculated. The target product identifier is any of the respective said product identifications;
    根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个意图值的准确率计算和召回率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数;Accuracy calculation and recall calculation of each intent value are performed according to the test sample subset to be calculated and the intent prediction accurate result set to be calculated, to obtain the said intent value corresponding to the target product identifier. precision data, the recall data and the total number of positive samples;
    重复执行所述采用目标产品标识从各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合中提取数据,得到待计算的测试样本子集合和待计算的意图预测准确结果集合,所述目标产品标识是各个所述产品标识中的任一个的步骤,直至确定所有所述产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数;Repeatedly executing the use of target product identifiers to extract data from the respective test sample subsets and intent prediction accurate result sets corresponding to each of the product identifiers, to obtain the test sample subsets to be calculated and the intent prediction accurate result sets to be calculated, so The target product identification is any one of the product identifications, until the accuracy data, the recall data and the total number of positive samples of each of the intention values corresponding to all the product identifications are determined;
    根据各个所述产品标识各自对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数进行报告生成,得到所述目标问答意图分类模型测 试报告。Generate a report according to the accuracy data, the recall data and the total number of positive samples of each of the intention values corresponding to each of the product identifiers, to obtain the target question answering intention classification model test report.
  6. 根据权利要求5所述的问答意图分类模型的测试方法,其中,所述根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个意图值的准确率计算和召回率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数的步骤,包括:The method for testing a question-and-answer intent classification model according to claim 5, wherein the accuracy calculation and recall of each intent value are performed according to the to-be-calculated test sample subset and the to-be-calculated intent prediction accurate result set The steps of obtaining the accuracy rate data, the recall rate data and the total number of positive samples of each of the intention values corresponding to the target product identifier include:
    根据所述待计算的测试样本子集合进行所述测试样本的总数计算,得到所述目标产品标识对应的测试样本总数;Calculate the total number of test samples according to the subset of test samples to be calculated, to obtain the total number of test samples corresponding to the target product identifier;
    根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个所述意图值的正样本正确预测数的计算,得到所述目标产品标识对应的各个所述意图值的正样本正确预测数;According to the test sample subset to be calculated and the accurate intention prediction result set to be calculated, the positive sample correct prediction number of each of the intention values is calculated, and the number of each of the intention values corresponding to the target product identifier is obtained. Number of correct predictions for positive samples;
    根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个所述意图值的负样本正确预测数的计算,得到所述目标产品标识对应的各个所述意图值的负样本正确预测数;According to the test sample subset to be calculated and the accurate intention prediction result set to be calculated, the correct prediction number of negative samples of each of the intention values is calculated, and the number of each of the intention values corresponding to the target product identifier is obtained. The number of correct predictions for negative samples;
    根据所述目标产品标识对应的测试样本总数、各个所述意图值的正样本正确预测数和各个所述意图值的负样本正确预测数进行准确率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据;Accuracy calculation is performed according to the total number of test samples corresponding to the target product identifier, the number of positive samples correctly predicted for each of the intent values, and the number of negative samples correctly predicted for each of the intent values, to obtain the respective data corresponding to the target product identifier. the accuracy data of the intended value;
    根据所述待计算的测试样本子集合进行各个所述意图值各自的所述测试样本的总数计算,得到所述目标产品标识对应的各个所述意图值的所述正样本总数;Calculate the total number of the respective test samples for each of the intent values according to the subset of test samples to be calculated, to obtain the total number of positive samples for each of the intent values corresponding to the target product identifier;
    根据所述目标产品标识对应的各个所述意图值的所述正样本总数、各个所述意图值的正样本正确预测数进行召回率计算,得到所述目标产品标识对应的各个所述意图值的所述召回率数据。Calculate the recall rate according to the total number of positive samples of each of the intention values corresponding to the target product identifier and the correct predicted number of positive samples of each of the intention values, to obtain the total number of the intention values corresponding to the target product identifier. the recall data.
  7. 根据权利要求5所述的问答意图分类模型的测试方法,其中,所述根据各个所述产品标识各自对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数进行报告生成,得到所述目标问答意图分类模型测试报告的步骤,包括:The method for testing a question-and-answer intent classification model according to claim 5, wherein the accuracy data, the recall data and the positive samples of the respective intent values corresponding to the respective product identifiers The total number of reports is generated, and the steps of obtaining the test report of the target question answering intent classification model include:
    根据各个所述产品标识各自对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数进行Excel文档生成,得到所述目标问答意图分类模型测试报告;According to the accuracy rate data, the recall rate data and the total number of positive samples of the respective intent values corresponding to the respective product identifiers, an Excel document is generated to obtain the target question answering intent classification model test report;
    获取报告下载请求,所述报告下载请求携带有下载方式数据;obtaining a report download request, where the report download request carries download mode data;
    根据所述下载方式数据发送所述目标问答意图分类模型测试报告。Send the target question answering intent classification model test report according to the download method data.
  8. 一种问答意图分类模型的测试装置,其中,所述装置包括:A test device for a question-and-answer intent classification model, wherein the device includes:
    测试样本获取模块,用于获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;A test sample acquisition module, configured to acquire a test sample set, the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question question sentence intent identification data, and test question intent identification data;
    测试样本划分模块,用于采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;a test sample dividing module, configured to divide the plurality of test samples by using the product identifier, and obtain a test sample subset corresponding to each of the product identifiers;
    意图预测模块,用于分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;an intent prediction module, configured to respectively input the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtain an intent prediction result set corresponding to each of the product identifiers;
    意图预测准确判断模块,用于分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;Intent prediction accurate judgment module, used for each of the product identifiers corresponding to the intent prediction result set, the test question question sentence intent determination data and the test question of the test sample subset corresponding to each of the product identifiers respectively Whether the intention identification data is used to accurately judge the intention prediction of each of the test samples, and obtain a set of accurate intention prediction results corresponding to each of the product identifications;
    报告生成模块,用于根据各个所述产品标识各自对应的测试样本子集合和意 图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。The report generation module is configured to generate a report according to the respective corresponding test sample subsets and the accurate intent prediction result set of each of the product identifiers, and obtain a test report of the target question answering intent classification model, where the target question answering intent classification model test report includes: each Accuracy data, recall data and total number of positive samples of each intent value corresponding to the product identifiers.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所述处理器执行所述计算机程序时实现如下方法步骤:A computer device includes a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the following method steps when executing the computer program:
    获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;acquiring a test sample set, where the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data;
    采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;Divide the plurality of test samples by using the product identifiers to obtain a subset of test samples corresponding to each of the product identifiers;
    分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;Inputting the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtaining the respective intent prediction result set corresponding to each of the product identifiers;
    分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;Carry out each test according to the intent prediction result set corresponding to each of the product identifiers, the test question question intent determination data and the test question intent determination data of the test sample subsets corresponding to each of the product identifiers respectively. Accurately judge the intention prediction of the test sample, and obtain a set of accurate intention prediction results corresponding to each of the product identifiers;
    根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。The report is generated according to the respective corresponding test sample subsets of the product identifiers and the accurate intent prediction result set, to obtain the target question answering intent classification model test report. The target question answering intent classification model test report includes: the respective product identifiers corresponding to The precision data, recall data and total number of positive samples for each intent value of .
  10. 根据权利要求9所述的计算机设备,其中,所述分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合的步骤,包括:The computer device according to claim 9, wherein the test sample subset corresponding to each product identifier is input into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and each product identifier is obtained. The steps of the corresponding intent prediction result set include:
    采用待预测的产品标识从各个所述产品标识各自对应的测试样本子集合中提取出测试样本子集合,得到目标测试样本子集合,所述待预测的产品标识是各个所述产品标识中的任一个;The test sample subset is extracted from the test sample subset corresponding to each of the product identifiers by using the product identifier to be predicted, and the target test sample subset is obtained, and the product identifier to be predicted is any one of the product identifiers. One;
    根据所述待预测的产品标识从待测试模型库中查找,得到目标待测试的问答意图分类模型;Search from the model library to be tested according to the product identifier to be predicted, to obtain the target question-and-answer intent classification model to be tested;
    分别将所述目标测试样本子集合中每个所述测试样本输入所述目标待测试的问答意图分类模型进行意图预测,得到所述待预测的产品标识对应的所述意图预测结果集合;Inputting each of the test samples in the target test sample subset into the target question-and-answer intent classification model to be tested for intent prediction, and obtaining the intent prediction result set corresponding to the product identifier to be predicted;
    重复所述采用待预测的产品标识从各个所述产品标识各自对应的测试样本子集合中提取出测试样本子集合,得到目标测试样本子集合的步骤,直至确定所有所述产品标识对应的所述意图预测结果集合。Repeat the steps of using the product identifiers to be predicted to extract the test sample subsets from the test sample subsets corresponding to the respective product identifiers, and obtain the target test sample subsets, until it is determined that all the product identifiers corresponding to the test sample subsets are determined. A collection of intent prediction results.
  11. 根据权利要求9所述的计算机设备,其中,所述分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合的步骤,包括:The computer device according to claim 9, wherein the intent prediction result set of each of the product identifiers corresponding to each of the product identifiers and the test question question sentence intent identifiers of the respective sub-sets of test samples corresponding to each of the product identifiers Whether the data and the test question are intended to designate the data to accurately judge the intention prediction of each of the test samples, and obtain the corresponding set of accurate intention prediction results for each of the product identifiers, the steps include:
    分别对所述测试样本集合中每个所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据按意图优先级进行处理,得到意图优先级处理后的测试样本集合;respectively process the test question question sentence intent rating data and the test question intent rating data of each of the test samples in the test sample set according to the intent priority, and obtain the test sample set after the intent priority processing;
    分别从每个所述产品标识对应的所述意图预测结果集合中依次提取出意图 预测结果,得到目标意图预测结果;The intention prediction results are sequentially extracted from the intention prediction result set corresponding to each of the product identifiers, and the target intention prediction results are obtained;
    当所述目标意图预测结果为是否意图时,根据所述目标意图预测结果从所述意图优先级处理后的测试样本集合中提取所述测试问题是否意图标定数据,得到待判断的测试问题是否意图标定数据,当所述目标意图预测结果和所述待判断的测试问题是否意图标定数据相同时,确定所述目标意图预测结果对应的所述意图预测准确结果为正确,否则确定所述目标意图预测结果对应的所述意图预测准确结果为错误;When the target intention prediction result is whether the target intention is intended or not, extract the test question intention determination data from the test sample set after the intention priority processing according to the target intention prediction result, and obtain whether the test question to be judged is intended or not Calibration data, when the target intention prediction result and the test question to be judged whether the intention calibration data is the same, determine that the target intention prediction result corresponding to the target intention prediction result is correct, otherwise determine the target intention prediction The accurate result of the intention prediction corresponding to the result is an error;
    当所述目标意图预测结果为问句意图时,根据所述目标意图预测结果从所述意图优先级处理后的测试样本集合提取所述测试问题问句意图标定数据,得到待判断的测试问题问句意图标定数据,当所述目标意图预测结果和所述待判断的测试问题问句意图标定数据相同时,确定所述目标意图预测结果对应的所述意图预测准确结果为正确,否则确定所述目标意图预测结果对应的所述意图预测准确结果为错误;When the target intent prediction result is the question intent, extract the test question question intent determination data from the test sample set after the intent priority processing according to the target intent prediction result, and obtain the test question question to be determined. Sentence intent determination data, when the target intent prediction result and the to-be-determined question sentence intent determination data are the same, it is determined that the intent prediction accurate result corresponding to the target intent prediction result is correct, otherwise it is determined that the intent prediction result is correct. The accurate result of the intention prediction corresponding to the target intention prediction result is an error;
    重复执行所述分别从每个所述产品标识对应的所述意图预测结果集合中依次提取出意图预测结果,得到目标意图预测结果的步骤,直至确定所有所述意图预测结果的所述意图预测准确结果;Repeat the step of sequentially extracting the intent prediction results from the intent prediction result set corresponding to each product identifier to obtain the target intent prediction result, until it is determined that the intent predictions of all the intent prediction results are accurate result;
    根据所有所述意图预测准确结果,确定各个所述产品标识各自对应的意图预测准确结果集合。According to all the accurate intention prediction results, a set of accurate intention prediction results corresponding to each of the product identifiers is determined.
  12. 根据权利要求11所述的计算机设备,其中,所述分别对所述测试样本集合中每个所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据按意图优先级进行处理,得到意图优先级处理后的测试样本集合的步骤,包括:The computer device according to claim 11 , wherein, the test question question sentence intent determination data and the test question intent determination data of each of the test samples in the test sample set are processed according to intent priority, The steps to obtain a set of test samples after intent priority processing include:
    分别对所述测试样本集合中每个所述测试样本的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行对比;respectively comparing the test question question sentence intent rating data and the test question intent rating data of each of the test samples in the test sample set;
    当存在所述测试样本的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据都存在标定数据时,对所述测试样本的所述测试问题问句意图标定数据进行删除处理,得到意图优先级处理后的测试样本;When both the test question question intent calibration data and the test question intent calibration data of the test sample exist, delete the test question question intent calibration data of the test sample, Get the test sample after intent priority processing;
    根据所有所述意图优先级处理后的测试样本,确定所述意图优先级处理后的测试样本集合。According to all the test samples processed by the intent priority, the set of test samples processed by the intent priority is determined.
  13. 根据权利要求9所述的计算机设备,其中,所述根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告的步骤,包括:The computer device according to claim 9, wherein the step of generating a report according to the respective corresponding test sample subsets and the intent prediction accurate result set according to each of the product identifiers, and obtaining the test report of the target question answering intent classification model, comprises:
    采用目标产品标识从各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合中提取数据,得到待计算的测试样本子集合和待计算的意图预测准确结果集合,所述目标产品标识是各个所述产品标识中的任一个;The target product identifier is used to extract data from the test sample subset and the intent prediction accurate result set corresponding to each of the product identifiers to obtain the test sample subset to be calculated and the intent prediction accurate result set to be calculated. The target product identifier is any of the respective said product identifications;
    根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个意图值的准确率计算和召回率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数;Accuracy calculation and recall calculation of each intent value are performed according to the test sample subset to be calculated and the intent prediction accurate result set to be calculated, to obtain the said intent value corresponding to the target product identifier. precision data, the recall data and the total number of positive samples;
    重复执行所述采用目标产品标识从各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合中提取数据,得到待计算的测试样本子集合和待计算的意图预测准确结果集合,所述目标产品标识是各个所述产品标识中的任一个的步骤,直至确定所有所述产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数;Repeatedly executing the use of target product identifiers to extract data from the test sample subsets and intent prediction accurate result sets corresponding to each of the product identifiers to obtain the test sample subsets to be calculated and the intent prediction accurate result sets to be calculated. The target product identification is any one of the product identifications, until the accuracy data, the recall data and the total number of positive samples of each of the intention values corresponding to all the product identifications are determined;
    根据各个所述产品标识各自对应的各个所述意图值的所述准确率数据、所述 召回率数据和所述正样本总数进行报告生成,得到所述目标问答意图分类模型测试报告。The report is generated according to the accuracy data, the recall data and the total number of positive samples of the respective intent values corresponding to the respective product identifiers to obtain the target question answering intent classification model test report.
  14. 根据权利要求13所述的计算机设备,其中,所述根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个意图值的准确率计算和召回率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数的步骤,包括:The computer device according to claim 13, wherein the accuracy calculation and recall calculation of each intention value are performed according to the test sample subset to be calculated and the intention prediction accurate result set to be calculated to obtain the obtained The steps of the accuracy rate data, the recall rate data and the total number of positive samples of each of the intention values corresponding to the target product identifiers include:
    根据所述待计算的测试样本子集合进行所述测试样本的总数计算,得到所述目标产品标识对应的测试样本总数;Calculate the total number of test samples according to the subset of test samples to be calculated, to obtain the total number of test samples corresponding to the target product identifier;
    根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个所述意图值的正样本正确预测数的计算,得到所述目标产品标识对应的各个所述意图值的正样本正确预测数;According to the test sample subset to be calculated and the accurate intention prediction result set to be calculated, the positive sample correct prediction number of each of the intention values is calculated, and the number of each of the intention values corresponding to the target product identifier is obtained. Number of correct predictions for positive samples;
    根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个所述意图值的负样本正确预测数的计算,得到所述目标产品标识对应的各个所述意图值的负样本正确预测数;According to the test sample subset to be calculated and the accurate intention prediction result set to be calculated, calculate the number of negative sample correct predictions of each of the intention values, and obtain the target product identifier corresponding to each of the intention values. Number of correct predictions for negative samples;
    根据所述目标产品标识对应的测试样本总数、各个所述意图值的正样本正确预测数和各个所述意图值的负样本正确预测数进行准确率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据;Accuracy calculation is performed according to the total number of test samples corresponding to the target product identifier, the number of positive samples correctly predicted for each of the intent values, and the number of correct negative samples for each of the intent values, to obtain each the accuracy data of the intended value;
    根据所述待计算的测试样本子集合进行各个所述意图值各自的所述测试样本的总数计算,得到所述目标产品标识对应的各个所述意图值的所述正样本总数;Calculate the total number of the respective test samples for each of the intent values according to the subset of test samples to be calculated, to obtain the total number of positive samples for each of the intent values corresponding to the target product identifier;
    根据所述目标产品标识对应的各个所述意图值的所述正样本总数、各个所述意图值的正样本正确预测数进行召回率计算,得到所述目标产品标识对应的各个所述意图值的所述召回率数据。Calculate the recall rate according to the total number of positive samples of each of the intention values corresponding to the target product identifier and the correct predicted number of positive samples of each of the intention values, to obtain the total number of the intention values corresponding to the target product identifier. the recall data.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下方法步骤:A computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the following method steps are implemented:
    获取测试样本集合,所述测试样本集合包括多个测试样本,所述测试样本包括:产品标识、测试问题样本数据、测试问题问句意图标定数据和测试问题是否意图标定数据;acquiring a test sample set, where the test sample set includes a plurality of test samples, and the test samples include: product identification, test question sample data, test question sentence intent identification data, and test question intent identification data;
    采用所述产品标识对所述多个测试样本进行划分,得到各个所述产品标识各自对应的测试样本子集合;Dividing the plurality of test samples by using the product identifiers to obtain a subset of test samples corresponding to each of the product identifiers;
    分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合;Inputting the test sample subset corresponding to each product identifier into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, and obtaining the respective intent prediction result set corresponding to each of the product identifiers;
    分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合;Carry out each test according to the intent prediction result set corresponding to each of the product identifiers, the test question question intent determination data and the test question intent determination data of the test sample subsets corresponding to each of the product identifiers respectively. Accurately judge the intention prediction of the test sample, and obtain a set of accurate intention prediction results corresponding to each of the product identifiers;
    根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告,所述目标问答意图分类模型测试报告包括:各个所述产品标识各自对应的各个意图值的准确率数据、召回率数据和正样本总数。The report is generated according to the corresponding test sample subsets and the accurate intent prediction result set for each of the product identifiers, to obtain a target question answering intent classification model test report, where the target question answering intent classification model test report includes: each of the product identifiers corresponds to The precision data, recall data, and total number of positive samples for each intent value of .
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述分别将每个所述产品标识对应的测试样本子集合输入各自对应的待测试的问答意图分类模型进行意图预测,得到各个所述产品标识各自对应的意图预测结果集合的步骤,包括:The computer-readable storage medium according to claim 15, wherein the test sample subset corresponding to each of the product identifiers is respectively input into the corresponding question-and-answer intent classification model to be tested to perform intent prediction, to obtain each of the The steps of each corresponding set of intent prediction results for the product identifiers include:
    采用待预测的产品标识从各个所述产品标识各自对应的测试样本子集合中提取出测试样本子集合,得到目标测试样本子集合,所述待预测的产品标识是各个所述产品标识中的任一个;The test sample subset is extracted from the test sample subset corresponding to each of the product identifiers by using the product identifier to be predicted, and the target test sample subset is obtained, and the product identifier to be predicted is any one of the product identifiers. One;
    根据所述待预测的产品标识从待测试模型库中查找,得到目标待测试的问答意图分类模型;Search from the model library to be tested according to the product identifier to be predicted, to obtain the target question-and-answer intent classification model to be tested;
    分别将所述目标测试样本子集合中每个所述测试样本输入所述目标待测试的问答意图分类模型进行意图预测,得到所述待预测的产品标识对应的所述意图预测结果集合;Inputting each of the test samples in the target test sample subset into the target question-and-answer intent classification model to be tested for intent prediction, and obtaining the intent prediction result set corresponding to the product identifier to be predicted;
    重复所述采用待预测的产品标识从各个所述产品标识各自对应的测试样本子集合中提取出测试样本子集合,得到目标测试样本子集合的步骤,直至确定所有所述产品标识对应的所述意图预测结果集合。Repeat the steps of using the product identifiers to be predicted to extract the test sample subsets from the test sample subsets corresponding to the respective product identifiers, and obtain the target test sample subsets, until it is determined that all the product identifiers corresponding to the test sample subsets are determined. A collection of intent prediction results.
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述分别根据各个所述产品标识各自对应的意图预测结果集合、各个所述产品标识各自对应的测试样本子集合的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行每个所述测试样本的意图预测准确判断,得到各个所述产品标识各自对应的意图预测准确结果集合的步骤,包括:The computer-readable storage medium according to claim 15, wherein the test questions are asked according to the set of intention prediction results corresponding to each of the product identifiers and the test sample subsets corresponding to each of the product identifiers respectively. The steps of performing an accurate judgment on the intention prediction of each of the test samples and obtaining the set of accurate intention prediction results corresponding to each of the product identifiers, including:
    分别对所述测试样本集合中每个所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据按意图优先级进行处理,得到意图优先级处理后的测试样本集合;respectively processing the test question question sentence intent rating data and the test question intent rating data of each of the test samples in the test sample set according to the intent priority, to obtain a test sample set after the intent priority processing;
    分别从每个所述产品标识对应的所述意图预测结果集合中依次提取出意图预测结果,得到目标意图预测结果;Extracting intention prediction results from the intention prediction result set corresponding to each product identifier in turn, to obtain a target intention prediction result;
    当所述目标意图预测结果为是否意图时,根据所述目标意图预测结果从所述意图优先级处理后的测试样本集合中提取所述测试问题是否意图标定数据,得到待判断的测试问题是否意图标定数据,当所述目标意图预测结果和所述待判断的测试问题是否意图标定数据相同时,确定所述目标意图预测结果对应的所述意图预测准确结果为正确,否则确定所述目标意图预测结果对应的所述意图预测准确结果为错误;When the target intention prediction result is whether the target intention is intended, extract the test question intention determination data from the test sample set after the intention priority processing according to the target intention prediction result, and obtain whether the test question to be judged is intended or not Calibration data, when the target intention prediction result and the test question to be judged whether the intention calibration data are the same, determine that the target intention prediction result corresponding to the target intention prediction result is correct, otherwise, determine the target intention prediction The accurate result of the intention prediction corresponding to the result is an error;
    当所述目标意图预测结果为问句意图时,根据所述目标意图预测结果从所述意图优先级处理后的测试样本集合提取所述测试问题问句意图标定数据,得到待判断的测试问题问句意图标定数据,当所述目标意图预测结果和所述待判断的测试问题问句意图标定数据相同时,确定所述目标意图预测结果对应的所述意图预测准确结果为正确,否则确定所述目标意图预测结果对应的所述意图预测准确结果为错误;When the target intent prediction result is the question sentence intent, extract the test question question sentence intent determination data from the test sample set after the intent priority processing according to the target intent prediction result, and obtain the test question question to be determined. Sentence intent determination data, when the target intent prediction result is the same as the to-be-determined question sentence intent determination data, it is determined that the intent prediction accurate result corresponding to the target intent prediction result is correct, otherwise it is determined that the intent prediction result is correct. The accurate result of the intention prediction corresponding to the target intention prediction result is an error;
    重复执行所述分别从每个所述产品标识对应的所述意图预测结果集合中依次提取出意图预测结果,得到目标意图预测结果的步骤,直至确定所有所述意图预测结果的所述意图预测准确结果;Repeat the step of sequentially extracting the intent prediction results from the intent prediction result set corresponding to each product identifier to obtain the target intent prediction result, until it is determined that the intent predictions of all the intent prediction results are accurate result;
    根据所有所述意图预测准确结果,确定各个所述产品标识各自对应的意图预测准确结果集合。According to all the accurate intention prediction results, a set of accurate intention prediction results corresponding to each of the product identifiers is determined.
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述分别对所述测试样本集合中每个所述测试样本的测试问题问句意图标定数据和测试问题是否意图标定数据按意图优先级进行处理,得到意图优先级处理后的测试样本集合的步骤,包括:18. The computer-readable storage medium of claim 17, wherein the test question question sentence intent determination data and the test question intent determination data for each of the test samples in the test sample set, respectively, are prioritized by intent The steps of processing to obtain a set of test samples after intent priority processing include:
    分别对所述测试样本集合中每个所述测试样本的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据进行对比;respectively comparing the test question question sentence intent rating data and the test question intent rating data of each of the test samples in the test sample set;
    当存在所述测试样本的所述测试问题问句意图标定数据和所述测试问题是否意图标定数据都存在标定数据时,对所述测试样本的所述测试问题问句意图标定数据进行删除处理,得到意图优先级处理后的测试样本;When both the test question question intent calibration data and the test question intent calibration data of the test sample exist, delete the test question question intent calibration data of the test sample, Get the test sample after intent priority processing;
    根据所有所述意图优先级处理后的测试样本,确定所述意图优先级处理后的测试样本集合。According to all the test samples processed by the intent priority, the set of test samples processed by the intent priority is determined.
  19. 根据权利要求15所述的计算机可读存储介质,其中,所述根据各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合进行报告生成,得到目标问答意图分类模型测试报告的步骤,包括:The computer-readable storage medium according to claim 15, wherein the step of generating a report according to the respective corresponding test sample subsets and the intent prediction accurate result set of each of the product identifiers to obtain a test report of the target question answering intent classification model ,include:
    采用目标产品标识从各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合中提取数据,得到待计算的测试样本子集合和待计算的意图预测准确结果集合,所述目标产品标识是各个所述产品标识中的任一个;The target product identifier is used to extract data from the test sample subset and the intent prediction accurate result set corresponding to each of the product identifiers to obtain the test sample subset to be calculated and the intent prediction accurate result set to be calculated. The target product identifier is any of the respective said product identifications;
    根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个意图值的准确率计算和召回率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数;Accuracy calculation and recall calculation of each intent value are performed according to the test sample subset to be calculated and the intent prediction accurate result set to be calculated, to obtain the said intent value corresponding to the target product identifier. precision data, the recall data and the total number of positive samples;
    重复执行所述采用目标产品标识从各个所述产品标识各自对应的测试样本子集合和意图预测准确结果集合中提取数据,得到待计算的测试样本子集合和待计算的意图预测准确结果集合,所述目标产品标识是各个所述产品标识中的任一个的步骤,直至确定所有所述产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数;Repeatedly executing the use of target product identifiers to extract data from the test sample subsets and intent prediction accurate result sets corresponding to each of the product identifiers to obtain the test sample subsets to be calculated and the intent prediction accurate result sets to be calculated. The step in which the target product identification is any one of the product identifications, until the accuracy data, the recall data and the total number of positive samples of each of the intention values corresponding to all the product identifications are determined;
    根据各个所述产品标识各自对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数进行报告生成,得到所述目标问答意图分类模型测试报告。A report is generated according to the accuracy rate data, the recall rate data and the total number of positive samples of the respective intent values corresponding to the respective product identifiers, to obtain the target question answering intent classification model test report.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个意图值的准确率计算和召回率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据、所述召回率数据和所述正样本总数的步骤,包括:The computer-readable storage medium according to claim 19, wherein the accuracy calculation and recall calculation of each intention value are performed according to the test sample subset to be calculated and the intention prediction accurate result set to be calculated. , the steps of obtaining the accuracy rate data, the recall rate data and the total number of positive samples of each of the intention values corresponding to the target product identifiers include:
    根据所述待计算的测试样本子集合进行所述测试样本的总数计算,得到所述目标产品标识对应的测试样本总数;Calculate the total number of test samples according to the subset of test samples to be calculated, to obtain the total number of test samples corresponding to the target product identifier;
    根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个所述意图值的正样本正确预测数的计算,得到所述目标产品标识对应的各个所述意图值的正样本正确预测数;According to the test sample subset to be calculated and the accurate intention prediction result set to be calculated, the positive sample correct prediction number of each of the intention values is calculated, and the number of each of the intention values corresponding to the target product identifier is obtained. Number of correct predictions for positive samples;
    根据所述待计算的测试样本子集合和所述待计算的意图预测准确结果集合进行各个所述意图值的负样本正确预测数的计算,得到所述目标产品标识对应的各个所述意图值的负样本正确预测数;According to the test sample subset to be calculated and the accurate intention prediction result set to be calculated, the correct prediction number of negative samples of each of the intention values is calculated, and the number of each of the intention values corresponding to the target product identifier is obtained. Number of correct predictions for negative samples;
    根据所述目标产品标识对应的测试样本总数、各个所述意图值的正样本正确预测数和各个所述意图值的负样本正确预测数进行准确率计算,得到所述目标产品标识对应的各个所述意图值的所述准确率数据;Accuracy calculation is performed according to the total number of test samples corresponding to the target product identifier, the number of positive samples correctly predicted for each of the intent values, and the number of negative samples correctly predicted for each of the intent values, to obtain the respective data corresponding to the target product identifier. the accuracy data of the intended value;
    根据所述待计算的测试样本子集合进行各个所述意图值各自的所述测试样本的总数计算,得到所述目标产品标识对应的各个所述意图值的所述正样本总数;Calculate the total number of the respective test samples for each of the intent values according to the subset of test samples to be calculated, to obtain the total number of positive samples for each of the intent values corresponding to the target product identifier;
    根据所述目标产品标识对应的各个所述意图值的所述正样本总数、各个所述意图值的正样本正确预测数进行召回率计算,得到所述目标产品标识对应的各个所述意图值的所述召回率数据。The recall rate is calculated according to the total number of positive samples of each of the intent values corresponding to the target product identifier, and the number of correct predictions of positive samples of each of the intent values, to obtain the total number of the intent values corresponding to the target product identifier. the recall data.
PCT/CN2021/091718 2020-12-15 2021-04-30 Test method and apparatus for question-and-answer intention classification model, device and medium WO2022126987A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011479835.1A CN112541739B (en) 2020-12-15 2020-12-15 Method, device, equipment and medium for testing question-answer intention classification model
CN202011479835.1 2020-12-15

Publications (1)

Publication Number Publication Date
WO2022126987A1 true WO2022126987A1 (en) 2022-06-23

Family

ID=75018809

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/091718 WO2022126987A1 (en) 2020-12-15 2021-04-30 Test method and apparatus for question-and-answer intention classification model, device and medium

Country Status (2)

Country Link
CN (1) CN112541739B (en)
WO (1) WO2022126987A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115329063A (en) * 2022-10-18 2022-11-11 江西电信信息产业有限公司 User intention identification method and system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112541739B (en) * 2020-12-15 2022-04-15 平安科技(深圳)有限公司 Method, device, equipment and medium for testing question-answer intention classification model

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020069079A1 (en) * 2001-07-13 2002-06-06 Vega Lilly Mae Method and system for facilitating service transactions
CN110728313A (en) * 2019-09-29 2020-01-24 北京声智科技有限公司 Classification model training method and device for intention classification recognition
CN111680517A (en) * 2020-06-10 2020-09-18 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for training a model
CN112541739A (en) * 2020-12-15 2021-03-23 平安科技(深圳)有限公司 Method, device, equipment and medium for testing question-answer intention classification model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150004588A1 (en) * 2013-06-28 2015-01-01 William Marsh Rice University Test Size Reduction via Sparse Factor Analysis
CN108446286B (en) * 2017-02-16 2023-04-25 阿里巴巴集团控股有限公司 Method, device and server for generating natural language question answers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020069079A1 (en) * 2001-07-13 2002-06-06 Vega Lilly Mae Method and system for facilitating service transactions
CN110728313A (en) * 2019-09-29 2020-01-24 北京声智科技有限公司 Classification model training method and device for intention classification recognition
CN111680517A (en) * 2020-06-10 2020-09-18 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for training a model
CN112541739A (en) * 2020-12-15 2021-03-23 平安科技(深圳)有限公司 Method, device, equipment and medium for testing question-answer intention classification model

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115329063A (en) * 2022-10-18 2022-11-11 江西电信信息产业有限公司 User intention identification method and system

Also Published As

Publication number Publication date
CN112541739A (en) 2021-03-23
CN112541739B (en) 2022-04-15

Similar Documents

Publication Publication Date Title
WO2022126987A1 (en) Test method and apparatus for question-and-answer intention classification model, device and medium
WO2020181808A1 (en) Text punctuation prediction method and apparatus, and computer device and storage medium
WO2021000555A1 (en) Knowledge graph-based question answering method and apparatus, computer device and storage medium
US20140308650A1 (en) Evaluation control
CN109614627B (en) Text punctuation prediction method and device, computer equipment and storage medium
CN111563051B (en) Crawler-based data verification method and device, computer equipment and storage medium
CN109783604B (en) Information extraction method and device based on small amount of samples and computer equipment
CN109783785B (en) Method and device for generating experiment detection report and computer equipment
WO2020119419A1 (en) Image recognition-based testing and apparatus, and computer device and storage medium
WO2020006878A1 (en) Voice recognition test method and apparatus, computer device and storage medium
CN109473093B (en) Speech recognition method, device, computer equipment and storage medium
CN111460155B (en) Knowledge graph-based information credibility assessment method and device
WO2022142043A1 (en) Course recommendation method and apparatus, device, and storage medium
CN111079429A (en) Entity disambiguation method and device based on intention recognition model and computer equipment
CN114595158A (en) Test case generation method, device, equipment and medium based on artificial intelligence
CN112559526A (en) Data table export method and device, computer equipment and storage medium
CN113642652A (en) Method, device and equipment for generating fusion model
CN111552810B (en) Entity extraction and classification method, entity extraction and classification device, computer equipment and storage medium
CN113010671A (en) App classification system
CN108986786B (en) Voice interaction equipment rating method, system, computer equipment and storage medium
RU2393536C2 (en) Method of unified semantic processing of information, which provides for, within limits of single formal model, presentation, control of semantic accuracy, search and identification of objects description
CN112396539A (en) Implementation method of administrative law enforcement self-adaptive auxiliary system based on artificial intelligence
CN114238768A (en) Information pushing method and device, computer equipment and storage medium
CN115345166A (en) Method, device, equipment and storage medium for identifying disease diagnosis name of medical text
CN114547059A (en) Platform data updating method and device and computer equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21904926

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21904926

Country of ref document: EP

Kind code of ref document: A1