Standard problem determination method and device, electronic device and storage medium
Through multi-layer processing and model training of user questions, the problem of accuracy and efficiency in determining standard questions in the question and answer system is solved, accurate matching of head and long-tail questions is achieved, and it can adapt to changes in long-tail questions.
Patent Information
- Application Number
- CN202311503860.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-11-10
AI Technical Summary
It is difficult for the existing question and answer system to accurately and efficiently determine the standard questions corresponding to the questions raised by users. In particular, the semantic similarity between the head standard questions and the long-tail standard questions leads to inconsistent processing processes. The long-tail standard questions change frequently, and the selection strategy needs to be adjusted. .
By performing the first and second processing on user questions, the first indicator and the second indicator are generated respectively, and the matching and classification technology is used to determine the target standard questions according to the preset conditions, including head and long tail standard questions, using the head The standard question classification model and the long-tail standard question matching model are trained, and comparative learning samples are constructed to improve accuracy.
It achieves the ability to accurately determine the target standard problem regardless of whether the user's problem is a head or long-tail problem, improves certainty and efficiency, and avoids the adjustment of classification methods due to changes in long-tail problems.
Smart Images

Figure CN117556006B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, and in particular to a method and device for determining a standard problem, an electronic device, and a storage medium. Background Art
[0002] Standard questions are pre-set questions in the question-answering system. Usually, the question-answering system needs to select the correct standard questions based on the questions raised by the user to start the corresponding processing flow or feedback the corresponding answers to the user.
[0003] Standard questions can be divided into head standard questions and long-tail standard questions. The number of head standard questions is much smaller than that of long-tail standard questions. There may be semantically similar standard questions in the head standard questions. However, the processing procedures for semantically similar head standard questions may not be the same.
[0004] In addition, long-tail standard questions often change, so when selecting standard questions, it is necessary to adjust the selection strategy as the long-tail standard questions change.
[0005] In view of these characteristics of standard questions, there is an urgent need for a method to accurately and efficiently determine standard questions based on the questions raised by users. Summary of the invention
[0006] In view of this, the present disclosure proposes a standard problem determination solution.
[0007] According to one aspect of the present disclosure, a method for determining a standard question is provided, including: performing a first processing on a first question to obtain a first indicator of the first question, the first processing including matching or classification, and the first indicator characterizing a result obtained by the first processing; if the first indicator does not meet a preset condition, performing a second processing on the first question to obtain a second indicator of the first question, and determining the standard question corresponding to the second indicator as a target standard question, the second processing including classification or matching, the first processing being different from the second processing, the second indicator characterizing the result obtained by the second processing, and the target standard question including a head standard question and / or a long-tail standard question.
[0008] In a possible implementation, the first processing is matching, the second processing is classification, the first indicator is a first similarity, the preset condition is that the first similarity is greater than a first similarity threshold, the second indicator is a first category, and the first processing of the first question to obtain the first indicator of the first question includes: determining the first similarity between the first question and at least one candidate standard question, the at least one candidate standard question includes a standard question in a standard question library that matches the first question; when the first indicator does not meet the preset condition, performing a second processing on the first question to obtain a second indicator of the first question, and determining the standard question corresponding to the second indicator as the target standard question, including: when the first similarity with the highest value is not greater than the first similarity threshold, determining the first category of the first question, and determining the head standard question corresponding to the first category in the standard question library as the target standard question.
[0009] In a possible implementation, the first processing is classification, the second processing is matching, the first indicator is a first category, the preset condition is that the first category corresponds to a single head standard question in the standard question library, and the second indicator is a first similarity, and the first processing of the first question to obtain the first indicator of the first question includes: determining the first category of the first question, a single first category corresponds to a single head standard question in the standard question library, or all long-tail questions; when the first indicator does not meet the preset condition, the first question is subjected to a second processing to obtain the second indicator of the first question, and the standard question corresponding to the second indicator is determined as the target standard question, including: when the first category corresponds to all long-tail questions in the standard question library, determining the first similarity between the first question and at least one candidate standard question, and determining the candidate standard question corresponding to the first similarity with the highest value as the target standard question, and the at least one candidate standard question includes a long-tail standard question in the standard question library that matches the first question.
[0010] In a possible implementation manner, it is characterized in that the method further includes: when the first indicator meets a preset condition, determining the standard question corresponding to the first indicator as the target standard question.
[0011] In one possible implementation, the first category of the first question is determined, and the head standard question corresponding to the first category in the standard question library is determined as the target standard question, and is implemented based on a head standard question classification model. The training process of the head standard question classification model includes: determining at least one head standard question in the standard question library, and at least one long-tail standard question, and a first extended question corresponding to each of the head standard questions; determining at least one second question outside the standard question library; using each of the head standard questions, and / or, a first positive sample consisting of each of the first extended questions, and each of the long-tail standard questions, and / or, a first negative sample consisting of each of the second questions, to train the head standard question classification model.
[0012] In one possible implementation, determining at least one head standard question and at least one long-tail standard question in the standard question library includes: counting the usage frequency of each standard question in the standard question library within a preset time period; and determining each of the head standard questions and each of the long-tail standard questions based on the usage frequency.
[0013] In a possible implementation, the determining of the first similarity between the first question and at least one candidate standard question, and determining the candidate standard question corresponding to the first similarity with the highest value as the target standard question is implemented based on a long-tail standard question matching model, and the training process of the long-tail standard question matching model includes: determining at least one long-tail standard question in the standard question library, and a second extended question corresponding to each of the long-tail standard questions; determining at least one question group outside the standard question library, a single question group including two questions; when the second similarity of the two questions in the question group is greater than a preset second similarity threshold, using the question group as a second positive sample; when the second similarity of the two questions in the question group is not greater than a preset second similarity threshold, using the question group as a second negative sample; constructing a comparative learning sample based on the second positive sample, and / or a third positive sample consisting of the long-tail standard question and the second extended question, and / or the second negative sample; and using the comparative learning sample to train the long-tail standard question matching model.
[0014] In one possible implementation, a comparative learning sample is constructed based on the second positive sample, including: deleting a word in a question in a single second positive sample according to a preset first deletion amount to obtain a third negative sample corresponding to the single second positive sample; and constructing the comparative learning sample based on the single second positive sample and its corresponding third negative sample.
[0015] In one possible implementation, a comparative learning sample is constructed based on a third positive sample consisting of the long-tail standard question and the second extended question, including: deleting words in a question in a single third positive sample according to a preset second deletion amount to obtain a fourth negative sample corresponding to the single third positive sample; and constructing the comparative learning sample based on the single third positive sample and its corresponding fourth negative sample.
[0016] In one possible implementation, a comparative learning sample is constructed based on the second negative sample, including: deleting a word in a question in a single second negative sample according to a preset third deletion amount to obtain a fourth positive sample corresponding to the single second negative sample; and constructing the comparative learning sample based on the single second negative sample and its corresponding fourth positive sample.
[0017] According to another aspect of the present disclosure, a standard problem determination device is provided, comprising:
[0018] A first indicator determination unit, configured to perform a first process on the first question to obtain a first indicator of the first question, wherein the first process includes matching or classification, and the first indicator represents a result obtained by the first process;
[0019] A target standard question determination unit is used to perform a second processing on the first question to obtain a second indicator of the first question when the first indicator does not meet a preset condition, and determine the standard question corresponding to the second indicator as the target standard question, the second processing includes classification or matching, the first processing is different from the second processing, the second indicator represents the result obtained by the second processing, and the target standard question includes a head standard question and / or a long-tail standard question.
[0020] In a possible implementation, the first process is matching, the second process is classification, the first indicator is a first similarity, the preset condition is that the first similarity is greater than a first similarity threshold, and the second indicator is a first category.
[0021] The first indicator determination unit includes:
[0022] A first similarity determination unit, configured to determine a first similarity between the first question and at least one candidate standard question, wherein the at least one candidate standard question comprises a standard question in a standard question library that matches the first question;
[0023] The target standard problem determination unit comprises:
[0024] The target question determination subunit A is used to determine the first category of the first question when the first similarity with the highest value is not greater than the first similarity threshold, and determine the head standard question corresponding to the first category in the standard question library as the target standard question.
[0025] In a possible implementation, the first processing is classification, the second processing is matching, the first indicator is a first category, the preset condition is that the first category corresponds to a single head standard question in a standard question library, and the second indicator is a first similarity.
[0026] The first indicator determination unit includes:
[0027] A first category determination unit, used to determine a first category of the first question, wherein a single first category corresponds to a single head standard question in the standard question library, or all long-tail questions;
[0028] The target standard problem determination unit comprises:
[0029] The target question determination subunit B is used to determine the first similarity between the first question and at least one candidate standard question when the first category corresponds to all long-tail questions in the standard question library, and determine the candidate standard question corresponding to the first similarity with the highest value as the target standard question, wherein the at least one candidate standard question includes the long-tail standard question in the standard question library that matches the first question.
[0030] In a possible implementation manner, the device further includes:
[0031] The target question determination subunit C is used to determine the standard question corresponding to the first indicator as the target standard question when the first indicator meets a preset condition.
[0032] In one possible implementation, the target question determination subunit A is implemented based on a head standard question classification model, and the training process of the head standard question classification model includes: determining at least one head standard question in the standard question library, and at least one long-tail standard question, and a first extended question corresponding to each of the head standard questions; determining at least one second question outside the standard question library; using each of the head standard questions, and / or, a first positive sample consisting of each of the first extended questions, and each of the long-tail standard questions, and / or, a first negative sample consisting of each of the second questions, to train the head standard question classification model.
[0033] In one possible implementation, determining at least one head standard question and at least one long-tail standard question in the standard question library includes: counting the usage frequency of each standard question in the standard question library within a preset time period; and determining each of the head standard questions and each of the long-tail standard questions based on the usage frequency.
[0034] In a possible implementation, the target question determination subunit B is implemented based on a long-tail standard question matching model, and the training process of the long-tail standard question matching model includes: determining at least one long-tail standard question in the standard question library, and a second extended question corresponding to each of the long-tail standard questions; determining at least one question group outside the standard question library, a single question group includes two questions; when the second similarity of the two questions in the question group is greater than a preset second similarity threshold, using the question group as a second positive sample; when the second similarity of the two questions in the question group is not greater than a preset second similarity threshold, using the question group as a second negative sample; constructing a comparative learning sample based on the second positive sample, and / or a third positive sample consisting of the long-tail standard question and the second extended question, and / or the second negative sample; and using the comparative learning sample to train the long-tail standard question matching model.
[0035] In one possible implementation, a comparative learning sample is constructed based on the second positive sample, including: deleting a word in a question in a single second positive sample according to a preset first deletion amount to obtain a third negative sample corresponding to the single second positive sample; and constructing the comparative learning sample based on the single second positive sample and its corresponding third negative sample.
[0036] In one possible implementation, a comparative learning sample is constructed based on a third positive sample consisting of the long-tail standard question and the second extended question, including: deleting words in a question in a single third positive sample according to a preset second deletion amount to obtain a fourth negative sample corresponding to the single third positive sample; and constructing the comparative learning sample based on the single third positive sample and its corresponding fourth negative sample.
[0037] In one possible implementation, a comparative learning sample is constructed based on the second negative sample, including: deleting a word in a question in a single second negative sample according to a preset third deletion amount to obtain a fourth positive sample corresponding to the single second negative sample; and constructing the comparative learning sample based on the single second negative sample and its corresponding fourth positive sample.
[0038] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0039] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0040] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0041] In the embodiment of the present disclosure, the first problem is first processed in a first way to obtain a first indicator of the first problem. If the first indicator does not meet the preset condition, the first problem is processed in a second way to obtain a second indicator of the first problem, and the standard problem corresponding to the second indicator is determined as the target standard problem. The first processing is matching or classification, and the second processing is classification or matching, and the first processing and the second processing are different. Using the method of the embodiment of the present disclosure, regardless of whether the first problem is a head problem or a long-tail problem, the target standard problem corresponding to the first problem can be accurately determined, thereby improving the accuracy of determining the target standard problem.
[0042] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0044] Figure 1 A flowchart of a standard problem determination method provided in an embodiment of the present disclosure.
[0045] Figure 2 A schematic diagram of the structure of a standard problem determination device provided in an embodiment of the present disclosure.
[0046] Figure 3 A schematic diagram of the structure of an electronic device for determining standard questions provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0048] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0049] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0050] Question answering systems have been applied in many industries. Usually, the question answering system needs to correctly select the standard questions pre-set in the standard question library according to the question raised by the user (hereinafter referred to as the first question) to start the corresponding processing flow or feedback the corresponding answer to the user.
[0051] According to the frequency of question asking, standard questions can be divided into head standard questions and long-tail standard questions. Correspondingly, the first question can be divided into head questions and long-tail questions. If the first question is a head question, the standard question corresponding to the first question in the standard question library can be a head standard question; if the first question is a long-tail question, the standard question corresponding to the first question in the standard question library can be a long-tail standard question.
[0052] The number of categories of head standard questions is much smaller than that of long-tail standard questions. There may be semantically similar head standard questions in the standard question library. However, the processing procedures for different semantically similar head standard questions may not be the same. Long-tail standard questions often change with changes in business and user needs.
[0053] In view of the respective characteristics of the head standard question and the long-tail standard question, if the first question belongs to the head question, the first question can be classified. Since the number of categories of head standard questions in the standard question library is small, the classification operation is easy to accurately classify the head standard questions. Therefore, the target standard question can be accurately determined among similar head standard questions. In the case that the first question belongs to the head question, if the first question is matched, similar head standard questions will interfere with the matching operation, which greatly reduces the probability of accurately determining the target standard question.
[0054] If the first question is a long-tail question, a matching operation can be performed on the first question to accurately match the target standard question from the standard question library. If a classification operation is performed on the first question, due to the large number of categories of long-tail standard questions in the standard question library, it is difficult to accurately classify the long-tail questions, thereby greatly reducing the probability of accurately determining the target standard question.
[0055] The matching operation here may match the first question with a standard question in the standard question library. The classification operation may be to determine the category of the first question, and a single category may correspond to a single head standard question in the standard question library.
[0056] However, before determining the standard question corresponding to the first question, it is impossible to determine whether the first question is a head question or a long-tail question, and it is also impossible to accurately choose whether to use a classification operation or a matching operation. Therefore, a method is urgently needed to accurately and efficiently determine the standard question based on the first question.
[0057] Figure 1 The following is a flow chart of a method for determining a standard problem provided by an embodiment of the present disclosure. Figure 1 As shown, the method includes:
[0058] S11, performing a first processing on the first question to obtain a first indicator of the first question, wherein the first processing includes matching or classification, and the first indicator represents a result obtained by the first processing.
[0059] In the embodiment of the present disclosure, the first processing may be matching or classification. The first question may be matched or classified. Regardless of matching or classification, a result will be obtained. The result may be characterized by a first indicator. For example, when the first processing is matching, the first indicator may be matching similarity; when the first processing is classification, the first indicator may be the category of the first question.
[0060] S12. When the first indicator does not meet the preset conditions, the first question is subjected to a second processing to obtain a second indicator of the first question, and the standard question corresponding to the second indicator is determined as the target standard question. The second processing includes classification or matching. The first processing is different from the second processing. The second indicator characterizes the result obtained by the second processing. The target standard question includes a head standard question and / or a long-tail standard question.
[0061] In the embodiment of the present disclosure, the preset condition can be used to measure whether the first problem continues to be processed by the second process. If the first indicator does not meet the preset condition, the first problem is processed by the second process. The second process can be classification or matching. The first process is different from the second process. When the first process is matching, the second process is classification; when the first process is classification, the second process is matching. After the first problem is processed by the second process, a result will be obtained. The second indicator can be used to characterize the result obtained after the second process. The second indicator can correspond to a target standard problem.
[0062] In the embodiment of the present disclosure, the first problem is first processed in a first way to obtain a first indicator of the first problem. If the first indicator does not meet the preset condition, the first problem is processed in a second way to obtain a second indicator of the first problem, and the standard problem corresponding to the second indicator is determined as the target standard problem. The first processing is matching or classification, and the second processing is classification or matching, and the first processing and the second processing are different. Using the method of the embodiment of the present disclosure, regardless of whether the first problem is a head problem or a long-tail problem, the target standard problem corresponding to the first problem can be accurately determined, thereby improving the accuracy of determining the target standard problem.
[0063] In a possible implementation, the first processing is matching, the second processing is classification, the first indicator is a first similarity, the preset condition is that the first similarity is greater than a first similarity threshold, the second indicator is a first category, and the first processing of the first question to obtain the first indicator of the first question includes: determining the first similarity between the first question and at least one candidate standard question, the at least one candidate standard question includes a standard question in a standard question library that matches the first question; when the first indicator does not meet the preset condition, performing a second processing on the first question to obtain a second indicator of the first question, and determining the standard question corresponding to the second indicator as the target standard question, including: when the first similarity with the highest value is not greater than the first similarity threshold, determining the first category of the first question, and determining the head standard question corresponding to the first category in the standard question library as the target standard question.
[0064] In the disclosed embodiment, the first question may be first converted into a first vector; and at least one candidate standard question may be retrieved from the standard question library. For example: a retrieval index is constructed using the vector database milvus service to perform vector retrieval. The indexes that may be selected include: Approximate Nearest Neighbors Oh Yeah (ANNOY), Index Flat (Index Flat), Hierarchical Navigable Small World (HNSW), etc. Furthermore, a first similarity between the first question and each candidate standard question is determined. A single candidate standard question may correspond to one first similarity. The larger the first similarity value, the greater the probability that the first question matches the candidate question.
[0065] The first similarity threshold may represent a minimum similarity value when the target standard question and the first question are correctly matched.
[0066] After determining at least one first similarity, the first similarity with the highest value may be determined from the first similarities. If the first similarity with the highest value is greater than the first similarity threshold, it means that the candidate standard question corresponding to the first similarity with the highest value may be determined as the first target standard question. In other words, the candidate standard question corresponding to the first similarity with the highest value may be the target standard question that matches the first question.
[0067] If the first similarity with the highest value is not greater than the first similarity threshold, it means that there is no long-tail standard question in the standard question library that can match the first question. Then the first question may be a head question. Therefore, the category of the first question can be further determined. For the convenience of description, the category of the first question is named the first category. In the standard question library, a single head standard question can correspond to one category. The head standard question of the first category can be determined as the target standard question.
[0068] In the disclosed embodiment, the first similarity between the first question and at least one candidate standard question is first determined. Since there are relatively similar head standard questions in the standard question library, if the first similarity with the highest value is not greater than the preset first similarity threshold, that is, the target standard question cannot be correctly matched, it means that the first question may be a head question. Continue to perform classification operations on the first question. In this way, if the first question is a head question, even if there are relatively similar head standard questions in the standard question library, the target standard question can be accurately determined through the classification operation. If the first similarity with the highest value is greater than the preset first similarity threshold, the first question accurately matches the target standard question from the standard question library, and it means that the first question may be a long-tail question. Therefore, if the first question is a long-tail question, even if there are a large number of long-tail standard questions in the difficult-to-label question library, the target question can be accurately determined through the matching operation.
[0069] Therefore, no matter whether the first question is a head question or a long tail question, the target standard question can be accurately determined based on the first question, thereby improving the accuracy of determining the target standard question. Since the matching operation can filter out the long tail question, there is no need to classify the long tail question. Therefore, there is no need to adjust the classification method as the long tail standard question changes, thereby improving the efficiency of determining the target standard question and improving the universality of the method of the embodiment of the present disclosure.
[0070] In a possible implementation, the first processing is classification, the second processing is matching, the first indicator is a first category, the preset condition is that the first category corresponds to a single head standard question in the standard question library, and the second indicator is a first similarity, and the first processing of the first question to obtain the first indicator of the first question includes: determining the first category of the first question, a single first category corresponds to a single head standard question in the standard question library, or all long-tail questions; when the first indicator does not meet the preset condition, the first question is subjected to a second processing to obtain the second indicator of the first question, and the standard question corresponding to the second indicator is determined as the target standard question, including: when the first category corresponds to all long-tail questions in the standard question library, determining the first similarity between the first question and at least one candidate standard question, and determining the candidate standard question corresponding to the first similarity with the highest value as the target standard question, and the at least one candidate standard question includes a long-tail standard question in the standard question library that matches the first question.
[0071] In the disclosed embodiment, the first category of the first question may be determined first. A single head standard question in the standard question library may correspond to one category, and all long-tail standard questions may correspond to one category. The categories of each head standard question may be different, and the categories of each head standard question and all long-tail standard questions may also be different.
[0072] After determining the first category of the first question, if the first category of the first question corresponds to a head standard question in the standard question library, the head standard question is used as the target standard question. If the first category of the first question corresponds to a long-tail standard question in the standard question library, it means that the first question may be a long-tail question. Then, at least one candidate standard question can be retrieved from the standard question library, and the first similarity between the first question and at least one candidate standard question can be determined, thereby determining the target standard question. Since the method of determining the target standard question through matching operation has been introduced in the previous article, it will not be repeated here.
[0073] In the disclosed embodiment, the first category of the first question is first determined, and in the standard question library, a standard question whose category is the first category is determined. If the standard question is a long-tail standard question, it means that the target standard question cannot be determined through the classification operation, and the first question may be a long-tail question. It is necessary to perform a matching operation on the first question in the standard question library, determine at least one candidate standard question, and determine the first similarity between the first question and at least one candidate standard question. And the candidate standard question corresponding to the first similarity with the highest value is determined as the target standard question. In this way, if the first question is a long-tail question, even if there are a large number of long-tail standard questions in the standard question library, the target question can be accurately determined through the matching operation. If the first question is a head question, even if there are relatively similar head standard questions in the standard question library, the target standard question can be accurately determined through the classification operation.
[0074] Therefore, no matter whether the first question is a head question or a long tail question, the target standard question can be accurately determined based on the first question, thereby improving the accuracy of determining the target standard question. Since there is no need to classify the long tail question, there is no need to adjust the classification method as the long tail standard question changes. Therefore, the efficiency of determining the target standard question can be improved, and the universality of the method of the embodiment of the present disclosure can be improved.
[0075] In a possible implementation manner, the method further includes: when the first indicator meets a preset condition, determining the standard question corresponding to the first indicator as the target standard question.
[0076] If the first indicator meets the preset conditions, there is no need to perform the second processing on the first question. The standard question corresponding to the first indicator is directly determined as the target standard question. For example, when the first processing is classification, the standard head question of the first category obtained by the first processing can be used as the target standard question. When the first processing is matching, the question with the highest first similarity value can be used as the target standard question.
[0077] By using the method of the embodiment of the present disclosure, no matter whether the first question is a head question or a long-tail question, the target standard question corresponding to the first question can be accurately determined, thereby improving the accuracy of determining the target standard question.
[0078] In one possible implementation, the determination of the second target standard question corresponding to the category of the first question is implemented based on a head standard question classification model, and the training process of the head standard question classification model includes: determining at least one head standard question in the standard question library, and at least one long-tail standard question, and a first extended question corresponding to each of the head standard questions; determining at least one second question outside the standard question library; using each of the head standard questions, and / or, a first positive sample consisting of each of the first extended questions, and each of the long-tail standard questions, and / or, a first negative sample consisting of each of the second questions, to train the head standard question classification model.
[0079] When in use, the first question can be input into the head standard question classification model, and the model will predict the classification of the first question, and output the prediction result and the preset threshold. The prediction result may include the first identifier of the target category and the first probability that the first question is the target category. The preset threshold may be the minimum probability that the first question is a head standard question. Then, the first probability may be compared with the preset threshold. If the first probability is greater than the preset threshold, the classification corresponding to the first identifier is determined as the first classification, that is, the head standard question corresponding to the first question may be determined. If the first probability is not greater than the preset threshold, the first question may be determined as a long-tail question. For example, a classification may be preset to characterize long-tail questions, and the first classification may be the preset classification.
[0080] In the disclosed embodiment, a model can be selected from the BERFT model (i.e., Bidirectional Encoder Representations from Transformers model), the ROBERTA model (i.e., A Robustly Optimized BERT Pretraining Approach), and the self-developed PTM model (i.e., Proof Test Model), and after training and adjusting the parameters of the model, a head standard question classification model can be obtained.
[0081] For example, when adjusting parameters, LMCL (Large Margin Cosine Loss) can be used as the loss function. This loss function can increase the inter-class variance, reduce the intra-class variance, make the classification boundary clearer, and improve the classification accuracy of the respective models.
[0082] A single standard question may correspond to a category label. The category label may indicate whether the standard question is a long-tail standard question or a head standard question; the category label may also indicate whether the standard question is a first extended question and the head standard question corresponding to the first extended question.
[0083] The above is only an example of determining the head standard problem, the long tail standard problem, and the first expansion problem, and the embodiments of the present disclosure do not limit this.
[0084] A single first extended question can be a standard question with the same semantics as a head standard question but expressed differently. A single head standard question can correspond to one or more first extended questions. A second question can be data unrelated to the standard question. For example, the second question can be a descriptive text, or a question outside the standard question library.
[0085] As mentioned above, the classification model is mainly used to determine the category of the head question. Therefore, the head standard question can be used as the first positive sample; the first extended question can also be used as the first positive sample; or the head standard question and the first extended question can be mixed as the first positive sample.
[0086] Furthermore, the long-tail standard question may be used as the first negative sample, the second question may be used as the first negative sample, or the long-tail standard question and the second question may be mixed as the first negative sample.
[0087] In the embodiment of the present disclosure, the first negative sample may include the second question to reduce the probability of misidentifying the user's incorrect expression as a standard question. Moreover, the first positive sample may include the first extended question to adapt to the user's various expression habits. Therefore, the method of the embodiment of the present disclosure can improve the accuracy of the classification model.
[0088] In one possible implementation, determining at least one head standard question and at least one long-tail standard question in the standard question library includes: counting the usage frequency of each standard question in the standard question library within a preset time period; and determining each of the head standard questions and each of the long-tail standard questions based on the usage frequency.
[0089] In the disclosed embodiment, the frequency of each standard question in the standard question library being asked by users within a preset time period, that is, the usage frequency, can be first counted. The preset time period can vary depending on the business. The preset time period can be a peak time period for users to ask questions.
[0090] Furthermore, a frequency threshold range may be preset, for example, greater than 50 times. For another example, the median of each usage frequency is determined, and the frequency threshold range may be greater than 1.2 times the median. When a certain usage frequency falls within the frequency threshold range, the standard question corresponding to the usage frequency is determined as the head standard question, and the standard question that does not fall within the usage frequency is determined as the long-tail standard question.
[0091] In the disclosed embodiment, the head standard questions and the long tail standard questions can be determined according to the usage frequency of the standard questions. Therefore, the standard questions in the standard question library can be classified according to the user's question situation, which can be applied to different businesses, thereby improving the accuracy and universality of the standard question classification.
[0092] In a possible implementation, the determining of the first similarity between the first question and at least one candidate standard question is implemented based on a long-tail standard question matching model, and the training process of the long-tail standard question matching model includes: determining at least one long-tail standard question in the standard question library, and a second extended question corresponding to each of the long-tail standard questions; determining at least one question group outside the standard question library, a single question group including two questions; when the second similarity of the two questions in the question group is greater than a preset second similarity threshold, using the question group as a second positive sample; when the second similarity of the two questions in the question group is not greater than a preset second similarity threshold, using the question group as a second negative sample; constructing a comparative learning sample based on the second positive sample, and / or a third positive sample consisting of the long-tail standard question and the second extended question, and / or the second negative sample; and using the comparative learning sample to train the long-tail standard question matching model.
[0093] A single second extended question may be a standard question with the same semantics as a long-tail standard question but expressed differently. A single long-tail standard question may correspond to one or more second extended questions. In an embodiment of the present disclosure, the frequency of use of each standard question in the standard question library within a preset time period is counted; based on the frequency of use, at least one long-tail standard question in the standard question library is determined.
[0094] In a possible implementation, a second similarity between two questions in a single question group is determined. The second similarity may represent a degree of semantic similarity between the two questions in the single question group.
[0095] In a possible implementation, a single question group may be marked, and the mark may indicate whether two questions in the single question group are semantically similar. For example, the mark may indicate the second similarity of two questions in the single question group.
[0096] The second similarity threshold can represent the minimum value of the similarity between the two questions in the question group when the two questions are semantically similar. If the second similarity corresponding to a single question group is greater than the second similarity threshold, it means that the two questions in the single question group are semantically similar, and the single question group can be used as a single second positive sample. If the second similarity corresponding to a single question group is not greater than the second similarity threshold, it means that the two questions in the single question group are semantically dissimilar, and the single question group can be used as a single second negative sample. In addition, a single long-tail standard question and a second extended question corresponding to the single long-tail standard question can constitute a single third positive sample. In the case where a single long-tail standard question corresponds to multiple second extended questions, multiple third positive samples can be constituted.
[0097] In the embodiments of the present disclosure, the second positive sample, the second negative sample, or the third positive sample can be used separately to construct a comparative learning sample; the second positive sample, the second negative sample, and the third positive sample can also be used to construct a comparative learning sample; in addition, any two of the second positive sample, the third positive sample, and the second negative sample can also be used to construct a comparative learning sample.
[0098] A single comparative learning sample may include three questions, two of which may be semantically similar, that is, the similarity of the two questions is greater than a second similarity threshold. One question other than the two questions in the single comparative learning sample may be dissimilar to the two questions, that is, the similarity of one question other than the two questions in the single comparative learning sample to any of the two questions is not greater than the second similarity threshold.
[0099] In the embodiment of the present disclosure, a comparative learning sample is constructed based on the second positive sample, and / or the third positive sample, and / or the second negative sample; the second positive sample can improve the accuracy of the long-tail standard question matching model in matching questions. The third positive sample can improve the accuracy of the long-tail standard question matching model in matching long-tail questions. The second negative sample can improve the overall accuracy of the long-tail standard question matching model. Therefore, using the comparative learning sample in the embodiment of the present disclosure to train the long-tail standard question matching model can improve the accuracy of the long-tail standard question matching model in matching the target standard question for the long-tail question.
[0100] In one possible implementation, a comparative learning sample is constructed based on the second positive sample, including: deleting a word in a question in a single second positive sample according to a preset first deletion amount to obtain a third negative sample corresponding to the single second positive sample; and constructing the comparative learning sample based on the single second positive sample and its corresponding third negative sample.
[0101] In the disclosed embodiment, after deleting the words of one of the questions in the single second positive sample according to the first deletion amount, a third question is obtained, and the similarity between the third question and the other question in the single second positive sample may not be greater than the second similarity threshold, that is, the third question is not similar to the other question in the single second positive sample. The third question and the other question in the single second positive sample can constitute a single third negative sample. In this way, the two questions in the single second sample and the third question together constitute a single comparative learning sample.
[0102] For example, a single second positive sample includes question A and question B. The words in question A are deleted according to the first deletion amount to obtain question C. Question C and question B constitute the third negative sample. In this way, question A, question B, and question C constitute a single comparative learning sample. Among them, the similarity between question A and question B is greater than the second similarity threshold, and the similarity between question C and question A is not greater than the second similarity threshold. The similarity between question C and question B is not greater than the second similarity threshold.
[0103] In this way, negative samples can be constructed based on positive samples, and then comparative learning samples can be constructed to improve the accuracy of comparative learning samples. In addition, the number of comparative learning samples and the accuracy of the long-tail standard problem matching model can be increased. In addition, negative samples that match positive samples can improve the efficiency of the preparation work for training the long-tail standard problem matching model.
[0104] In one possible implementation, a comparative learning sample is constructed based on a third positive sample consisting of the long-tail standard question and the second extended question, including: deleting words in a question in a single third positive sample according to a preset second deletion amount to obtain a fourth negative sample corresponding to the single third positive sample; and constructing the comparative learning sample based on the single third positive sample and its corresponding fourth negative sample.
[0105] In an embodiment of the present disclosure, after deleting the words of one of the questions in the single third positive sample according to the second deletion amount, a fourth question is obtained, and the similarity between the fourth question and another question in the single third positive sample may not be greater than the second similarity threshold, that is, the fourth question is not similar to the other question in the single third positive sample. The fourth question and the other question in the single third positive sample can constitute a single fourth negative sample. In this way, the two questions in the single third positive sample and the fourth question construct a single comparative learning sample. The second deletion amount may be equal to the first deletion amount. For example: the second deletion amount displacement is 50%, that is, 50% of the words in a question in the single third positive sample are deleted.
[0106] For example, a single third positive sample includes question D and question E. The words in question D are deleted according to the second deletion amount to obtain question F. Question F and question E constitute the third negative sample. In this way, question D, question E, and question F constitute a single comparative learning sample. Among them, the similarity between question D and question E is greater than the second similarity threshold, and the similarity between question F and question D is not greater than the second similarity threshold. The similarity between question F and question E is not greater than the second similarity threshold.
[0107] In this way, negative samples can be constructed based on positive samples, and then comparative learning samples can be constructed to improve the accuracy of comparative learning samples. In addition, the number of comparative learning samples and the accuracy of the long-tail standard problem matching model can be increased. In addition, negative samples that match positive samples can improve the efficiency of the preparation work for training the long-tail standard problem matching model.
[0108] In one possible implementation, a comparative learning sample is constructed based on the second negative sample, including: deleting a word in a question in a single second negative sample according to a preset third deletion amount to obtain a fourth positive sample corresponding to the single second negative sample; and constructing the comparative learning sample based on the single second negative sample and its corresponding fourth positive sample.
[0109] In an embodiment of the present disclosure, after deleting the words of one of the questions in the single second negative sample according to the third deletion amount, a fifth question is obtained, and the similarity between the fifth question and the other question in the single second negative sample can be greater than the second similarity threshold, that is, the fifth question is similar to the other question in the single second negative sample. The fifth question and the other question in the single second negative sample can construct a single fourth positive sample. In this way, the two questions in the single second negative sample and the fifth question construct a single comparative learning sample. The third deletion amount can be smaller than the first deletion amount or smaller than the second deletion amount. For example: the third deletion amount displacement is 10%.
[0110] For example, a single second negative sample includes question G and question H. The words in question G are deleted according to the third deletion amount to obtain question J. Question J and question H constitute the fourth positive sample. In this way, question G, question H, and question J constitute a single comparative learning sample. Among them, the similarity between question J and question H is greater than the second similarity threshold, and the similarity between question G and question H is not greater than the second similarity threshold.
[0111] In this way, positive samples can be constructed based on negative samples, and then comparative learning samples can be constructed to improve the accuracy of comparative learning samples. In addition, the number of comparative learning samples and the accuracy of the long-tail standard question matching model can be increased. In addition, there is no need to search for positive samples that match negative samples, which improves the efficiency of the preparation work for training the long-tail standard question matching model.
[0112] Figure 2 This is a schematic diagram of the structure of a standard problem determination device provided by an embodiment of the present disclosure. The device 200 includes:
[0113] A first indicator determination unit 201 is used to perform a first process on a first question to obtain a first indicator of the first question, wherein the first process includes matching or classification, and the first indicator represents a result obtained by the first process;
[0114] The target standard question determination unit 202 is used to perform a second processing on the first question to obtain a second indicator of the first question when the first indicator does not meet the preset conditions, and determine the standard question corresponding to the second indicator as the target standard question, the second processing includes classification or matching, the first processing is different from the second processing, the second indicator represents the result obtained by the second processing, and the target standard question includes a head standard question and / or a long-tail standard question.
[0115] In a possible implementation, the first process is matching, the second process is classification, the first indicator is a first similarity, the preset condition is that the first similarity is greater than a first similarity threshold, and the second indicator is a first category.
[0116] The first indicator determination unit 201 includes:
[0117] A first similarity determination unit, configured to determine a first similarity between the first question and at least one candidate standard question, wherein the at least one candidate standard question comprises a standard question in a standard question library that matches the first question;
[0118] The target standard question determination unit 202 includes:
[0119] The target question determination subunit A is used to determine the first category of the first question when the first similarity with the highest value is not greater than the first similarity threshold, and determine the head standard question corresponding to the first category in the standard question library as the target standard question.
[0120] In a possible implementation, the first processing is classification, the second processing is matching, the first indicator is a first category, the preset condition is that the first category corresponds to a single head standard question in a standard question library, and the second indicator is a first similarity.
[0121] The first indicator determination unit 201 includes:
[0122] A first category determination unit, used to determine a first category of the first question, wherein a single first category corresponds to a single head standard question in the standard question library, or all long-tail questions;
[0123] The target standard question determination unit 202 includes:
[0124] The target question determination subunit B is used to determine the first similarity between the first question and at least one candidate standard question when the first category corresponds to all long-tail questions in the standard question library, and determine the candidate standard question corresponding to the first similarity with the highest value as the target standard question, wherein the at least one candidate standard question includes the long-tail standard question in the standard question library that matches the first question.
[0125] In a possible implementation, the apparatus 200 further includes:
[0126] The target question determination subunit C is used to determine the standard question corresponding to the first indicator as the target standard question when the first indicator meets a preset condition.
[0127] In one possible implementation, the target question determination subunit A is implemented based on a head standard question classification model, and the training process of the head standard question classification model includes: determining at least one head standard question in the standard question library, and at least one long-tail standard question, and a first extended question corresponding to each of the head standard questions; determining at least one second question outside the standard question library; using each of the head standard questions, and / or, a first positive sample consisting of each of the first extended questions, and each of the long-tail standard questions, and / or, a first negative sample consisting of each of the second questions, to train the head standard question classification model.
[0128] In one possible implementation, determining at least one head standard question and at least one long-tail standard question in the standard question library includes: counting the usage frequency of each standard question in the standard question library within a preset time period; and determining each of the head standard questions and each of the long-tail standard questions based on the usage frequency.
[0129] In a possible implementation, the target question determination subunit B is implemented based on a long-tail standard question matching model, and the training process of the long-tail standard question matching model includes: determining at least one long-tail standard question in the standard question library, and a second extended question corresponding to each of the long-tail standard questions; determining at least one question group outside the standard question library, a single question group includes two questions; when the second similarity of the two questions in the question group is greater than a preset second similarity threshold, using the question group as a second positive sample; when the second similarity of the two questions in the question group is not greater than a preset second similarity threshold, using the question group as a second negative sample; constructing a comparative learning sample based on the second positive sample, and / or a third positive sample consisting of the long-tail standard question and the second extended question, and / or the second negative sample; and using the comparative learning sample to train the long-tail standard question matching model.
[0130] In one possible implementation, a comparative learning sample is constructed based on the second positive sample, including: deleting a word in a question in a single second positive sample according to a preset first deletion amount to obtain a third negative sample corresponding to the single second positive sample; and constructing the comparative learning sample based on the single second positive sample and its corresponding third negative sample.
[0131] In one possible implementation, a comparative learning sample is constructed based on a third positive sample consisting of the long-tail standard question and the second extended question, including: deleting words in a question in a single third positive sample according to a preset second deletion amount to obtain a fourth negative sample corresponding to the single third positive sample; and constructing the comparative learning sample based on the single third positive sample and its corresponding fourth negative sample.
[0132] In one possible implementation, a comparative learning sample is constructed based on the second negative sample, including: deleting a word in a question in a single second negative sample according to a preset third deletion amount to obtain a fourth positive sample corresponding to the single second negative sample; and constructing the comparative learning sample based on the single second negative sample and its corresponding fourth positive sample.
[0133] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0134] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0135] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0136] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0137] Figure 3 A schematic diagram of the structure of an electronic device for determining standard questions provided by an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or a terminal device. Figure 3 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0138] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0139] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0140] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0141] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0142] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0143] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0144] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0145] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0146] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0147] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0148] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A standard problem determination method, characterized in that: include: Performing a first processing on the first question to obtain a first indicator of the first question, wherein the first processing includes matching or classification, the first indicator represents a result obtained by the first processing, and the first question is a head question or a long-tail question; In the case that the first indicator does not meet the preset condition, the first question is subjected to a second processing to obtain a second indicator of the first question, and the standard question corresponding to the second indicator is determined as a target standard question, the second processing includes classification or matching, the first processing is different from the second processing, the second indicator represents a result obtained by the second processing, and the target standard question includes a head standard question and / or a long-tail standard question; In the case where the first processing is classification and the second processing is matching, the first indicator is a first category, the second indicator is a first similarity, and the preset condition is that the first category corresponds to a single head standard question in a standard question library; In the case where the first processing is matching and the second processing is classification, the first indicator is a first similarity, the second indicator is a first category, and the preset condition is that the first similarity is greater than a first similarity threshold; The first similarity is obtained by matching the first question with standard questions in the standard question library, and a single first category corresponds to a single head standard question in the standard question library, or all long-tail questions.
2. The method according to claim 1, characterized in that The first process is matching, the second process is classification, the first indicator is a first similarity, the preset condition is that the first similarity is greater than a first similarity threshold, and the second indicator is a first category. The first problem is subjected to a first processing to obtain a first indicator of the first problem, including: determining a first similarity between the first question and at least one candidate standard question, the at least one candidate standard question comprising a standard question in a standard question library that matches the first question; When the first indicator does not meet the preset condition, performing a second process on the first question to obtain a second indicator of the first question, and determining a standard question corresponding to the second indicator as a target standard question, including: When the first similarity with the highest value is not greater than the first similarity threshold, a first category of the first question is determined, and a head standard question corresponding to the first category in the standard question library is determined as the target standard question.
3. The method according to claim 1, characterized in that The first processing is classification, the second processing is matching, the first indicator is a first category, the preset condition is that the first category corresponds to a single head standard question in a standard question library, and the second indicator is a first similarity. The first problem is subjected to a first processing to obtain a first indicator of the first problem, including: determining a first category of said first problem; When the first indicator does not meet the preset condition, performing a second process on the first question to obtain a second indicator of the first question, and determining a standard question corresponding to the second indicator as a target standard question, including: In the case that the first category corresponds to all long-tail questions in the standard question library, a first similarity between the first question and at least one candidate standard question is determined, and the candidate standard question corresponding to the first similarity with the highest value is determined as the target standard question, and the at least one candidate standard question includes a long-tail standard question in the standard question library that matches the first question.
4. The method according to claim 1, characterized in that: The method further comprises: When the first indicator meets a preset condition, the standard question corresponding to the first indicator is determined as the target standard question.
5. The method according to claim 2, characterized in that: The determining of the first category of the first question, determining the head standard question corresponding to the first category in the standard question library as the target standard question, is implemented based on a head standard question classification model, and the training process of the head standard question classification model includes: Determine at least one head standard question and at least one long-tail standard question in the standard question library, and a first extended question corresponding to each of the head standard questions; determining at least one second question outside of the standard question library; The head standard question classification model is trained using the first positive samples formed by each of the head standard questions and / or each of the first extended questions, and the first negative samples formed by each of the long-tail standard questions and / or each of the second questions.
6. The method according to claim 5, characterized in that Determining at least one head standard question and at least one long-tail standard question in the standard question library includes: Counting the usage frequency of each standard question in the standard question library within a preset time period; According to the usage frequency, each of the head standard questions and each of the long-tail standard questions are determined.
7. The method according to claim 3, characterized in that The determining of the first similarity between the first question and at least one candidate standard question, and determining the candidate standard question corresponding to the first similarity with the highest value as the target standard question, is implemented based on a long-tail standard question matching model, and the training process of the long-tail standard question matching model includes: Determine at least one long-tail standard question in the standard question library, and a second extended question corresponding to each of the long-tail standard questions; Determine at least one question group outside the standard question library, wherein each of the question groups includes two questions; When the second similarity between two questions in the question group is greater than a preset second similarity threshold, taking the question group as a second positive sample; When the second similarity between two questions in the question group is not greater than a preset second similarity threshold, taking the question group as a second negative sample; Constructing a comparative learning sample according to the second positive sample, and / or a third positive sample consisting of the long-tail standard question and the second extended question, and / or the second negative sample; The long-tail standard question matching model is trained using the contrast learning samples.
8. The method according to claim 7, characterized in that According to the second positive sample, a comparative learning sample is constructed, including: According to a preset first deletion amount, delete a word in a question in a single second positive sample to obtain a third negative sample corresponding to the single second positive sample; The comparative learning sample is constructed based on the single second positive sample and its corresponding third negative sample.
9. The method according to claim 7, characterized in that: Constructing a comparative learning sample according to a third positive sample consisting of the long-tail standard question and the second extended question, including: Deleting a word in a question in a single third positive sample according to a preset second deletion amount, to obtain a fourth negative sample corresponding to the single third positive sample; The comparative learning sample is constructed based on the single third positive sample and its corresponding fourth negative sample.
10. The method according to claim 7, characterized in that According to the second negative sample, a comparative learning sample is constructed, including: Deleting a word in a question in a single second negative sample according to a preset third deletion amount, to obtain a fourth positive sample corresponding to the single second negative sample; The comparative learning sample is constructed based on the single second negative sample and its corresponding fourth positive sample.
11. A standard problem determining transposition, characterized in that, include: A first indicator determination unit, configured to perform a first process on a first question to obtain a first indicator of the first question, wherein the first process includes matching or classification, the first indicator represents a result obtained by the first process, and the first question is a head question or a long-tail question; a target standard question determining unit, which, when the first indicator does not meet a preset condition, performs a second processing on the first question to obtain a second indicator of the first question, and determines a standard question corresponding to the second indicator as a target standard question, wherein the second processing includes classification or matching, the first processing is different from the second processing, the second indicator represents a result obtained by the second processing, and the target standard question includes a head standard question and / or a long-tail standard question; In the case where the first processing is classification and the second processing is matching, the first indicator is a first category, the second indicator is a first similarity, and the preset condition is that the first category corresponds to a single head standard question in a standard question library; In the case where the first processing is matching and the second processing is classification, the first indicator is a first similarity, the second indicator is a first category, and the preset condition is that the first similarity is greater than a first similarity threshold; The first similarity is obtained by matching the first question with standard questions in the standard question library, and a single first category corresponds to a single head standard question in the standard question library, or all long-tail questions.
12. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 10 when executing the instructions stored in the memory.
13. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.
