Data processing method and system and electronic equipment

By using the preset matching model to screen and compare similar questions in the intelligent question answering system, the problem of inaccurate answers caused by the low accuracy of the discriminant model in the existing technology is solved, and the answer accuracy and user experience of the intelligent question answering system are improved.

CN118733731APending Publication Date: 2024-10-01阳光保险集团股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410834494.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the existing intelligent question answering system, the accuracy of the method of determining question similarity through the maximum similarity score depends on the discriminant model. When the accuracy of the discriminant model is low, it will reduce the accuracy of the answers output by the intelligent question answering system and affect the user experience. .

Method used

Similar questions are screened out from the preset knowledge base through the preset matching model, and the answers to similar question groups are determined based on the pre-trained ES summoning model and the similarity judgment model to improve the accuracy of the answers.

Benefits of technology

It improves the accuracy of the answers output by the intelligent question and answer system and improves the user experience. It uses a preset matching model to determine the similarity between the question information and the knowledge base questions, and selects the most appropriate answer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733731A_ABST
    Figure CN118733731A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and system and electronic equipment, and the method comprises the steps: judging whether a preset knowledge base comprises question information or not when the question information inputted by a user is received; if not, screening a preset number of similar questions of question information from a preset knowledge base according to a preset matching model; determining similar questions corresponding to the same standard questions as a similar question group; comparing each similar question with the question information based on a preset matching model, and determining a similar judgment result corresponding to each similar question; based on the number of similar questions with similar judgment results in each similar question group and a standard question-similar question-answer corresponding relation, outputting an answer corresponding to the similar question group with the most similar questions to the user. In the mode, whether the question information and the knowledge base question are similar or not is judged through the preset matching model, and the answer is selected according to the result, so that the accuracy of the answer output by the intelligent question-answering system is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a data processing method, system and electronic device. Background Art

[0002] An intelligent question-answering system is a system that can find the most appropriate answer from a large knowledge base and answer the questions raised by the user. With the continuous development of artificial intelligence technology, intelligent question-answering systems have been widely used in various fields, such as voice assistants, intelligent customer service, etc. At present, the mainstream solution for intelligent question-answering is to first roughly recall n (n>1) questions through ES; then calculate the similarity score between the user's question and the recalled question through the discriminant model; finally, select the one with the largest score as the answer and return it to the user. However, the accuracy of the method of determining the similarity of questions by the maximum similarity score only depends on the discriminant model itself. When the discriminant model has low accuracy, it will reduce the accuracy of the answer output by the intelligent question-answering system, thereby affecting the user experience. Summary of the invention

[0003] In view of this, an object of the present invention is to provide a data processing method, system and electronic device, so as to improve the accuracy of answers output by the intelligent question and answer system, thereby improving the user experience.

[0004] In a first aspect, an embodiment of the present invention provides a data processing method, including: when receiving question information input by a user, determining whether the preset knowledge base includes the question information; storing a plurality of standard question-similar question-answer correspondences in the preset knowledge base; if the preset knowledge base does not include the question information, screening out a preset number of similar questions of the question information from the preset knowledge base according to a preset matching model; wherein the similar questions are standard questions or similar questions, and each similar question corresponds to a standard question; determining similar questions corresponding to the same standard question as a similar question group; comparing each similar question with the question information based on the preset matching model, and determining a similarity judgment result corresponding to each similar question; the similarity judgment result is similar or dissimilar; based on the number of similar questions with similar similarity judgment results in each similar question group and the standard question-similar question-answer correspondence, outputting the answer corresponding to the similar question group with the largest number of similar questions to the user.

[0005] Furthermore, the preset matching model includes a pre-trained ES summoning model; the step of screening out similar questions of a preset number of question information from a preset knowledge base according to the preset matching model includes: processing the question information according to a preset preprocessing rule to obtain a replacement question corresponding to the question information; determining the ES score corresponding to each knowledge base question in the preset knowledge base through the ES summoning model; the knowledge base questions include standard questions and similar questions; sorting each knowledge base question according to the ES score to obtain the corresponding question sorting result; and confirming, based on the question sorting result, that a preset number of knowledge base questions with the highest ES scores are similar questions.

[0006] Furthermore, the preset matching model also includes a pre-trained similarity judgment model; based on the preset matching model, each similar question is compared with the question information to determine the similarity judgment result corresponding to each similar question, including: according to a preset input template, the similar question and the question information are converted into multiple similarity judgment texts; each similarity judgment text includes a question information and a similar question; each similarity judgment text is input into the similarity judgment model, and the similarity judgment result corresponding to each similar question is output.

[0007] Furthermore, the preset matching model also includes a pre-trained evaluation model; the similarity judgment model is trained in the following manner: S1: historical chat data is sorted based on a preset input template to obtain target chat data; S2: the target chat data is used as input to train the large language model until the preset training conditions are met to obtain an initial similarity judgment model; S3: the initial similarity judgment model is evaluated based on the evaluation model to obtain model indicators corresponding to the initial similarity judgment model; S4: whether the model indicators meet the preset indicator standards; S5: if the model indicators meet the preset indicator standards, the initial similarity judgment model is determined to be the similarity judgment model; S6: if the model indicators do not meet the preset indicator standards, the initial similarity judgment model is adjusted according to the preset model adjustment method, and the adjusted initial similarity judgment model is determined to be the initial similarity judgment model; repeat steps S3-S4 until the model indicators meet the preset indicator standards.

[0008] Furthermore, the preset matching model includes a pre-trained evaluation model; the step of outputting the answer corresponding to the similar question group with the largest number of similar questions to the user includes: determining whether there is one similar question group with the largest number of similar questions; if so, determining the similar question group as the target similar question group; if not, obtaining the ES score corresponding to each similar question in each similar question group with the largest number of similar questions, and calculating the ES average score corresponding to each similar question group; determining whether there is one similar question group with the highest ES average score; if so, determining the similar question group as the target similar question group; if not, selecting a similar question group with the highest ES average score as the target similar question group according to a preset selection strategy; and outputting the answer corresponding to the target similar question group to the user.

[0009] Furthermore, after the step of determining whether the preset knowledge base includes question information, the method further includes: if the preset knowledge base includes question information, outputting an answer corresponding to the question information to the user based on the standard question-similar question-answer correspondence relationship.

[0010] Furthermore, before the step of screening out similar questions of a preset number of question information from a preset knowledge base according to a preset matching model, the method also includes: determining whether the question information satisfies a preset rejection identification rule; if so, refusing to reply to the user.

[0011] In a second aspect, an embodiment of the present invention provides a data processing system, including: a question information judgment module, which is used to judge whether the preset knowledge base includes the question information when receiving the question information input by the user; the preset knowledge base stores multiple standard question-similar question-answer correspondences; a similar question selection module, which is used to filter out similar questions of a preset number of question information from the preset knowledge base according to a preset matching model if the preset knowledge base does not include the question information; wherein the similar questions are standard questions or similar questions, and each similar question corresponds to a standard question; a similar question group determination module, which is used to determine similar questions corresponding to the same standard question as a similar question group; a similarity judgment module, which is used to compare each similar question with the question information based on the preset matching model to determine the similarity judgment result corresponding to each similar question; the similarity judgment result is similar or dissimilar; an answer output module, which is used to output the answer corresponding to the similar question group with the largest number of similar questions to the user based on the number of similar questions with similar similar judgment results in each similar question group and the standard question-similar question-answer correspondence.

[0012] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method described above when executing the computer program.

[0013] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and the program code enables the processor to execute the method as described above.

[0014] The embodiment of the present invention provides a data processing method, system and electronic device, including: when receiving question information input by a user, determining whether the preset knowledge base includes the question information; the preset knowledge base stores a plurality of standard questions-similar questions-answer correspondences; if the preset knowledge base does not include the question information, screening out similar questions of a preset number of question information from the preset knowledge base according to a preset matching model; wherein the similar questions are standard questions or similar questions, and each similar question corresponds to a standard question; determining similar questions corresponding to the same standard question as a similar question group; comparing each similar question with the question information based on the preset matching model, determining the similarity judgment result corresponding to each similar question; the similarity judgment result is similar or dissimilar; based on the number of similar questions with similar similarity judgment results in each similar question group and the standard question-similar question-answer correspondence, outputting the answer corresponding to the similar question group with the largest number of similar questions to the user. In this method, the preset matching model is used to determine whether the question information and the knowledge base questions are similar, and the answer is selected according to the result, thereby improving the accuracy of the answer output by the intelligent question-answering system and improving the user experience.

[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 A flow chart of a data processing method provided in Embodiment 1 of the present invention;

[0019] Figure 2 A flowchart of the steps of selecting similar questions of a preset number of question information from a preset knowledge base according to a preset matching model provided in the first embodiment of the present invention;

[0020] Figure 3 A flow chart of a similarity judgment model training method provided in Embodiment 1 of the present invention;

[0021] Figure 4 A flowchart of the steps of determining a similarity judgment result corresponding to each similar question provided in the first embodiment of the present invention;

[0022] Figure 5 A flowchart of the steps of outputting answers corresponding to the similar question group with the largest number of similar questions to the user provided in the first embodiment of the present invention;

[0023] Figure 6 A schematic diagram of a data processing system provided in Embodiment 2 of the present invention.

[0024] Icons: 1-question information judgment module; 2-similar question selection module; 3-similar question group determination module; 4-similar judgment module; 5-answer output module. DETAILED DESCRIPTION

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

[0026] To facilitate understanding of this embodiment, the embodiment of the present invention is described in detail below.

[0027] Embodiment 1:

[0028] Figure 1 This is a flow chart of a data processing method provided in Embodiment 1 of the present invention.

[0029] Reference Figure 1 , data processing methods, including:

[0030] Step S101, when receiving question information input by the user, determine whether the preset knowledge base includes the question information; the preset knowledge base stores a plurality of standard question-similar question-answer correspondences.

[0031] Here, the user is the consulting customer. The question information is the question entered by the consulting customer through communication software (such as WeChat and QQ, etc.) or a web chat box.

[0032] The preset knowledge base is a dataset of frequently asked questions that is pre-organized based on questions asked by users in real chat data. The dataset contains standard questions of question-and-answer knowledge, similar questions of the standard questions (similar extended questions) and answers.

[0033] Among them, one standard question corresponds to at least two similar questions, and one standard question and the corresponding similar question correspond to one answer. Similar questions corresponding to the same standard question are separated by preset characters (such as |_|). The answer includes at least one of text and picture, and the text and picture are separated by |_|.

[0034] The storage format of the preset knowledge base is shown in Table 1:

[0035] Table 1 Knowledge base

[0036]

[0037]

[0038] When receiving question information input by the user, the pre-trained ES (Elasti csearch) summoning model is used to determine whether the preset knowledge base includes the question information.

[0039] Specifically, the knowledge base questions (including standard questions and similar questions) in the knowledge base are imported into the ES summon model to build an index. When the question information sent by the user is received, a complete match is performed in the ES summon model. The full-text search function of ES is used to retrieve the knowledge base questions that completely match it by querying the question information. If a matching knowledge base question is found, it is determined that the preset knowledge base includes the question information.

[0040] In one embodiment, after the step of determining whether the preset knowledge base includes question information in step 101, the method further includes:

[0041] If the preset knowledge base includes question information, the answer corresponding to the question information is output to the user based on the correspondence relationship between standard questions, similar questions and answers.

[0042] Here, if it is determined that the preset knowledge base includes question information, an answer corresponding to the knowledge base information corresponding to the question information is output to the user.

[0043] Step S102: If the preset knowledge base does not include question information, a preset number of similar questions of question information are screened out from the preset knowledge base according to a preset matching model; wherein the similar questions are standard questions or questions of the same type, and each similar question corresponds to a standard question.

[0044] In one embodiment, in step S102, before the step of selecting similar questions of a preset number of question information from a preset knowledge base according to a preset matching model, the method further includes:

[0045] Determine whether the problem information meets the preset rejection identification rules.

[0046] If yes, refuse to respond to the user.

[0047] Here, the rejection identification rule is preset according to the actual situation, and may be that the sentence length cannot be less than or equal to 2 characters, that the sentence includes a preset rejection keyword, or that the sentence is semantically incomplete (e.g., lacks a subject), etc. When the question information meets the preset rejection identification rule, no answer is returned to the user.

[0048] Specifically, if the question information input by the user is "Thank you", which meets the rejection recognition rule of "the sentence length cannot be less than or equal to 2 characters", no answer will be returned to the user.

[0049] In one embodiment, referring to Figure 2 In step S102, the steps of selecting similar questions of a preset number of question information from a preset knowledge base according to a preset matching model include:

[0050] Step S201, processing the question information according to a preset preprocessing rule to obtain a replacement question corresponding to the question information.

[0051] Here, the preprocessing rules are pre-set according to the actual situation, and may include text processing and replacement methods such as punctuation removal, ji eba (stammering) word segmentation, word weight allocation, and synonym replacement. The question information is preprocessed based on the preprocessing rules to obtain a replacement question corresponding to the question information.

[0052] Specifically, remove punctuation: use regular expressions or string processing functions to remove punctuation marks in user questions for subsequent word segmentation. Word segmentation: use Chinese word segmentation tools (such as ji eba) to segment user questions and decompose sentences into sequences of words. Word weight assignment: assign weights to each word, which can be based on word frequency, TF-IDF and other methods. Synonym replacement: replace synonyms in sentences with unified vocabulary based on predefined synonym dictionaries to improve matching accuracy.

[0053] Suppose the user asks: "How is the coverage of vehicle damage insurance determined?"

[0054] The result after pre-processing is: "How to determine the amount of vehicle damage insurance."

[0055] After preprocessing, the question was segmented and punctuation marks were removed to obtain the preprocessing result.

[0056] Step S202, determining the ES score corresponding to each knowledge base question in the preset knowledge base through the ES summoning model; the knowledge base questions include standard questions and similar questions.

[0057] Here, the ES score is calculated by the TF / IDF (term frequency–inverse document frequency) algorithm or the BM25 (Best Matching 25) algorithm built into the ES summoning model.

[0058] Step S203, sort each knowledge base question according to the ES score to obtain a corresponding question sorting result.

[0059] Here, each knowledge base question is sorted in descending order according to the ES score to obtain the sorting result.

[0060] Step S204: according to the question sorting result, confirm a preset number of knowledge base questions with the highest ES scores as similar questions.

[0061] Here, the preset number is pre-set according to the actual situation, and here it can be 30.

[0062] The top 30 knowledge base questions with the largest ES scores are selected as similar questions.

[0063] Specifically, suppose the user asks: "How is the coverage of vehicle damage insurance determined?"

[0064] The result after pre-processing is: "How to determine the amount of vehicle damage insurance."

[0065] By sorting by ES scores, we can get the following similar questions:

[0066] 1. "What is the basis for determining the amount of vehicle damage insurance?"

[0067] 2. “How is the coverage of vehicle damage insurance calculated?”

[0068] 3. “What factors should be considered when deciding the amount of vehicle damage insurance?”

[0069] Step S103: determine similar questions corresponding to the same standard question as a similar question group.

[0070] Here, the selected similar questions are grouped, and similar questions corresponding to the same standard questions are determined as a similar question group.

[0071] Step S104, comparing each similar question with the question information based on a preset matching model, and determining a similarity judgment result corresponding to each similar question; the similarity judgment result is similar or dissimilar.

[0072] The preset matching model also includes a pre-trained similarity judgment model and a pre-trained evaluation model.

[0073] In one implementation, referring to Figure 3 , the similarity judgment model is trained in the following way:

[0074] Step S1: sorting historical chat data based on a preset input template to obtain target chat data.

[0075] Here, historical chat data can come from open source data sets on the market, or from chat data between customer service and users in real scenarios within the company.

[0076] The historical chat data is sorted and the questions in the historical chat data are converted into multiple sentence pairs. Each pair includes two questions: query_a (question a) and query_b (question b) and label (label) of whether the pair of sentences are similar. The format is shown in Table 2 below:

[0077] Table 2 Sentence pairs and labels

[0078] query_a query_b label Can you send me an electronic copy of the insurance policy? Send me an electronic insurance policy resemblance Why do I need a mobile number for a quote? I don't have a driving license, can I get a quote? Not similar

[0079] The label corresponding to each sentence pair may be manually annotated. The label is either similar or dissimilar.

[0080] The preset input template is pre-set according to the actual situation, and the above-arranged historical chat data is converted into target chat data according to the preset input template. The preset input template is as follows:

[0081] Input: query_a:{query_a}\n query_b:{query_b}\n

[0082] Output: {l abe l}\n.

[0083] For example, the data in Table 2 can be transformed into:

[0084] query_a:Can you send me an electronic insurance policy?

[0085] query_b: Send me an electronic insurance policy

[0086] l abe l: similar

[0087] query_a: Why does a mobile phone number need to be provided for a quotation?

[0088] query_b: Can I get a quote if I don't have a driving license?

[0089] l abe l: not similar

[0090] Step S2: Take the target chat data as input and train the large language model until the preset training conditions are met to obtain an initial similarity judgment model.

[0091] Here, the large language model is a large generative model suitable for text similarity tasks, such as the GPT series model or BERT.

[0092] Step S3: Evaluate the initial similarity judgment model based on the evaluation model to obtain model indicators corresponding to the initial similarity judgment model.

[0093] Here, a set of real online user question data is prepared as evaluation data, including standard questions and sentence pairs of similar questions, as well as corresponding labels (similar / dissimilar). The data is manually labeled to ensure the accuracy and consistency of the labels. The performance of the model is evaluated using indicators such as accuracy, precision, recall, and F1-Measure. Define whether the sentence pair is correctly judged as similar or dissimilar by the model, and measure the performance of the model on the similarity task based on the evaluation indicators.

[0094] Specifically, the evaluation data is input into the model, and the model is asked to judge the similarity of each sentence pair to obtain the model's prediction results. The model's prediction results are compared with the manually annotated labels to calculate the value of the evaluation index.

[0095] Assume that there is a set of evaluation data as follows:

[0096] query_a:Can you send me an electronic insurance policy?

[0097] query_b: Please send me a copy of the electronic insurance policy.

[0098] l abe l: similar

[0099] query_a: Why does a mobile phone number need to be provided for a quotation?

[0100] query_b: Can I get a quote if I don't have a driving license?

[0101] l abe l: not similar

[0102] The evaluation model makes a similarity judgment on each sentence pair and obtains a prediction result. For example, the model judges the first sentence pair as similar and the second sentence pair as dissimilar. The model's prediction result is compared with the manually annotated labels to calculate the values ​​of indicators such as accuracy, precision, recall, and F1-Measure.

[0103] Among them, the higher the accuracy, precision, recall and F1-Measure values ​​are, the more accurate the judgment results of the similarity judgment model are.

[0104] Step S4: Determine whether the model index meets the preset index standard.

[0105] Here, the preset indicator standards are the accuracy standard, precision standard, recall standard and F1-Measure standard which are pre-set according to the actual situation.

[0106] Step S5: If the model index meets the preset index standard, the initial similarity judgment model is determined to be the similarity judgment model.

[0107] Here, if the accuracy, precision, recall and F1-Measure of the similarity judgment model meet the accuracy standard, precision standard, recall standard and F1-Measure standard respectively, the initial similarity judgment model is determined to be the similarity judgment model.

[0108] Step S6: If the model index does not meet the preset index standard, the initial similarity judgment model is adjusted according to the preset model adjustment method, and the adjusted initial similarity judgment model is determined as the initial similarity judgment model; steps S3-S4 are repeated until the model index meets the preset index standard.

[0109] Here, the preset model adjustment method may be P-tuning (large language model parameter fine-tuning method) or LoRA (Learning to Rank for Data Augmentation, a data enhancement method based on learning to rank).

[0110] The initial similarity judgment model adjusted by the preset model adjustment method is re-judged through the evaluation model to obtain a similarity judgment model whose model indicators meet the preset indicator standards.

[0111] In one embodiment, referring to Figure 4 In step S104, each similar question is compared with the question information based on a preset matching model to determine a similarity judgment result corresponding to each similar question, including:

[0112] Step S401: convert similar questions and question information into a plurality of similarity judgment texts according to a preset input template; each similarity judgment text includes a question information and a similar question.

[0113] Here, based on the preset input model, it is determined that query_a is question information, query_b is a similar sentence, and when there are 30 similar sentences, 30 similar judgment texts can be obtained according to the question information and the similar sentences.

[0114] Step S402: input each similarity judgment text into a similarity judgment model, and output a similarity judgment result corresponding to each similar question.

[0115] Here, each question information and similar sentence corresponds to a similarity judgment result.

[0116] Step S105: Based on the number of similar questions with similar judgment results in each similar question group and the corresponding relationship between standard questions, similar questions and answers, the answer corresponding to the similar question group with the largest number of similar questions is output to the user.

[0117] In one embodiment, referring to Figure 5 In step S105, the step of outputting the answers corresponding to the similar question group with the largest number of similar questions to the user includes:

[0118] Step S501: determine whether the similar question group with the largest number of similar questions is one.

[0119] Here, the number of similar questions with similarity determination results being similar in each similar question group is obtained, and it is determined whether there is only one similar question group with the largest number of similar questions.

[0120] Step S502: if yes, determine the similar question group as the target similar question group.

[0121] Here, the similar question group with the largest number of similar questions is the target similar question group.

[0122] Step S503: if not, obtain the ES score corresponding to each similar question in each similar question group with the largest number of similar questions, and calculate the ES average score corresponding to each similar question group; determine whether there is one similar question group with the highest ES average score; if so, determine the similar question group as the target similar question group; if not, select a similar question group with the highest ES average score as the target similar question group according to a preset selection strategy.

[0123] Here, if there is more than one similar question group with the largest number of similar questions, the ES average score corresponding to the similar question group with the largest number of similar questions is obtained. The ES average score is the average ES score of the similar questions with similar similarity judgment results in the similar question group.

[0124] Determine whether there is one similar question group with the largest number of similar questions and the highest average ES score.

[0125] If so, determine the similarity question group with the largest number of similar questions and the highest average ES score as the target similarity question group.

[0126] If not, a similar question group with the largest number of similar questions and the highest average ES score is selected as the target similar question group according to the preset selection strategy.

[0127] Among them, the preset selection strategy can be set according to actual conditions and can be randomly selected.

[0128] Step S504: output the answers corresponding to the target similar question group to the user.

[0129] Here, based on the standard question-similar question-answer correspondence stored in the knowledge base, the answers corresponding to the standard questions corresponding to the target similar question group are output to the user.

[0130] The embodiment of the present invention provides a data processing method, including: when receiving question information input by a user, determining whether the preset knowledge base includes the question information; the preset knowledge base stores a plurality of standard question-similar question-answer correspondences; if the preset knowledge base does not include the question information, screening out similar questions of a preset number of question information from the preset knowledge base according to a preset matching model; wherein the similar questions are standard questions or similar questions, and each similar question corresponds to a standard question; determining similar questions corresponding to the same standard question as a similar question group; comparing each similar question with the question information based on the preset matching model, determining the similarity judgment result corresponding to each similar question; the similarity judgment result is similar or dissimilar; based on the number of similar questions with similar similarity judgment results in each similar question group and the standard question-similar question-answer correspondence, outputting the answer corresponding to the similar question group with the largest number of similar questions to the user. In this method, the preset matching model is used to determine whether the question information and the knowledge base question are similar, and the answer is selected according to the result, thereby improving the accuracy of the answer output by the intelligent question-answering system and improving the user experience.

[0131] Embodiment 2:

[0132] Figure 6 A schematic diagram of a data processing system provided in Embodiment 2 of the present invention.

[0133] Reference Figure 6 , the data processing system includes:

[0134] The question information judgment module 1 is used to judge whether the question information is included in the preset knowledge base when receiving the question information input by the user; the preset knowledge base stores a plurality of standard question-similar question-answer correspondences.

[0135] The similar question selection module 2 is used to select similar questions of a preset number of question information from the preset knowledge base according to a preset matching model if the preset knowledge base does not include question information; wherein the similar questions are standard questions or similar questions, and each similar question corresponds to a standard question.

[0136] The similar question group determination module 3 is used to determine similar questions corresponding to the same standard question as a similar question group.

[0137] The similarity judgment module 4 is used to compare each similar question with the question information based on a preset matching model to determine the similarity judgment result corresponding to each similar question; the similarity judgment result is similar or dissimilar.

[0138] The answer output module 5 is used to output the answer corresponding to the similar question group with the largest number of similar questions to the user based on the number of similar questions with similar judgment results in each similar question group and the corresponding relationship between standard questions, similar questions and answers.

[0139] Furthermore, the problem information determination module 1 is also used for:

[0140] If the preset knowledge base includes question information, the answer corresponding to the question information is output to the user based on the correspondence relationship between standard questions, similar questions and answers.

[0141] Furthermore, the similar question selection module 2 is also used for:

[0142] Determine whether the problem information meets the preset rejection identification rules.

[0143] If yes, refuse to respond to the user.

[0144] Furthermore, the similar question selection module 2 is also used for:

[0145] The question information is processed according to a preset preprocessing rule to obtain a replacement question corresponding to the question information.

[0146] The ES summoning model is used to determine the ES score corresponding to each knowledge base question in the preset knowledge base; the knowledge base questions include standard questions and similar questions.

[0147] Sort each knowledge base question according to the ES score to obtain the corresponding question sorting result.

[0148] According to the question sorting results, a preset number of knowledge base questions with the highest ES scores are confirmed as similar questions.

[0149] Furthermore, the similarity judgment module 4 is also used for:

[0150] According to the preset input template, similar questions and question information are converted into multiple similarity judgment texts; each similarity judgment text includes a question information and a similar question.

[0151] Input each similarity judgment text into the similarity judgment model, and output the similarity judgment result corresponding to each similar question.

[0152] Furthermore, the answer output module 5 is also used for:

[0153] Determine whether the similar question group with the largest number of similar questions is one.

[0154] If yes, determine the similar question group as the target similar question group.

[0155] If not, obtain the ES score corresponding to each similar question in each similar question group with the largest number of similar questions, and calculate the ES average score corresponding to each similar question group; determine whether there is one similar question group with the highest ES average score; if so, determine the similar question group as the target similar question group; if not, select a similar question group with the highest ES average score as the target similar question group according to the preset selection strategy.

[0156] Output the answers corresponding to the target similarity question group to the user.

[0157] The embodiment of the present invention provides a data processing system. In this method, a preset matching model is used to determine whether question information and knowledge base questions are similar, and an answer is selected based on the result, thereby improving the accuracy of the answer output by the intelligent question-answering system and improving the user experience.

[0158] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the data processing method provided in the above embodiment are implemented.

[0159] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. The computer-readable medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method of the above embodiment are executed.

[0160] The computer program product provided in the embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.

[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0162] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0163] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0164] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0165] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A data processing method, characterized in that: include: When receiving question information input by the user, determining whether the preset knowledge base includes the question information; The preset knowledge base stores a plurality of standard question-similar question-answer correspondences; If the preset knowledge base does not include the question information, a preset number of similar questions of the question information are screened out from the preset knowledge base according to a preset matching model; wherein the similar questions are standard questions or questions of the same type, and each similar question corresponds to a standard question; Determine the similar questions corresponding to the same standard question as a similar question group; Comparing each of the similar questions with the question information based on the preset matching model, and determining a similarity judgment result corresponding to each of the similar questions; the similarity judgment result is similar or dissimilar; Based on the number of similar questions with similar judgment results being similar in each similar question group and the corresponding relationship between the standard question, the same type of question and the answer, the answer corresponding to the similar question group with the largest number of similar questions is output to the user.

2. The data processing method according to claim 1, characterized in that: The preset matching model includes a pre-trained ES summoning model; The step of selecting a preset number of similar questions of the question information from the preset knowledge base according to the preset matching model comprises: Processing the question information according to a preset preprocessing rule to obtain a replacement question corresponding to the question information; Determine the ES score corresponding to each knowledge base question in the preset knowledge base through the ES summoning model; the knowledge base questions include the standard questions and the similar questions; Sort each of the knowledge base questions according to the ES score to obtain a corresponding question sorting result; According to the question sorting result, the preset number of knowledge base questions with the highest ES scores are confirmed as the similar questions.

3. The data processing method according to claim 2, characterized in that: The preset matching model also includes a pre-trained similarity judgment model; The step of comparing each of the similar questions with the question information based on the preset matching model to determine a similarity judgment result corresponding to each of the similar questions includes: According to a preset input template, the similar questions and the question information are converted into a plurality of similarity judgment texts; each of the similarity judgment texts includes one of the question information and one of the similar questions; Each of the similarity judgment texts is input into the similarity judgment model, and a similarity judgment result corresponding to each of the similar questions is output.

4. The data processing method according to claim 3, characterized in that: The preset matching model also includes a pre-trained evaluation model; The similarity judgment model is trained in the following way: S1: sorting historical chat data based on the preset input template to obtain target chat data; S2: using the target chat data as input, training the large language model until the preset training conditions are met, and obtaining an initial similarity judgment model; S3: Evaluate the initial similarity judgment model based on the evaluation model to obtain a model index corresponding to the initial similarity judgment model; S4: Determine whether the model indicator meets the preset indicator standard; S5: If the model indicator meets the preset indicator standard, determine that the initial similarity judgment model is the similarity judgment model; S6: If the model indicator does not meet the preset indicator standard, adjust the initial similarity judgment model according to the preset model adjustment method, and determine the adjusted initial similarity judgment model as the initial similarity judgment model; repeat steps S3-S4 until the model indicator meets the preset indicator standard.

5. The data processing method according to claim 2, characterized in that: The preset matching model includes a pre-trained evaluation model; The step of outputting the answers corresponding to the similar question group with the largest number of similar questions to the user comprises: Determine whether the similar question group with the largest number of similar questions is one; If yes, determining the similar question group as a target similar question group; If not, obtain the ES score corresponding to each similar question in each similar question group with the largest number of similar questions, and calculate the ES average score corresponding to each similar question group; determine whether there is one similar question group with the highest ES average score; if so, determine that the similar question group is the target similar question group; if not, select one similar question group with the highest ES average score as the target similar question group according to a preset selection strategy; Output the answers corresponding to the target similar question group to the user.

6. The data processing method according to claim 1, characterized in that: After the step of determining whether the preset knowledge base includes the question information, the method further includes: If the preset knowledge base includes the question information, the answer corresponding to the question information is output to the user based on the standard question-similar question-answer correspondence relationship.

7. The data processing method according to claim 1, characterized in that: Before the step of selecting a preset number of similar questions of the question information from the preset knowledge base according to the preset matching model, the method further includes: Determine whether the problem information meets the preset rejection identification rules; If so, refuse to respond to said user.

8. A data processing system, characterized in that: include: A question information determination module, used to determine whether the question information is included in the preset knowledge base when receiving the question information input by the user; The preset knowledge base stores a plurality of standard question-similar question-answer correspondences; A similar question selection module is used to select a preset number of similar questions of the question information from the preset knowledge base according to a preset matching model if the preset knowledge base does not include the question information; wherein the similar questions are standard questions or questions of the same type, and each similar question corresponds to a standard question; A similar question group determination module, used for determining the similar questions corresponding to the same standard question as a similar question group; A similarity judgment module, used to compare each of the similar questions with the question information based on the preset matching model, and determine a similarity judgment result corresponding to each of the similar questions; the similarity judgment result is similar or dissimilar; The answer output module is used to output the answer corresponding to the similar question group with the largest number of similar questions to the user based on the number of similar questions with similar judgment results in each similar question group and the corresponding relationship between standard questions, similar questions and answers.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and is characterized in that the processor implements the data processing method described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the data processing method according to any one of claims 1 to 7 is implemented.