Conversational question answering method and apparatus
By combining initial screening and fine screening methods, the dialogue Q&A process is optimized, solving the problem of balancing efficiency and accuracy in existing systems. This achieves efficient and accurate Q&A results, making it suitable for scenarios such as intelligent customer service and educational tutoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GREAT WALL MOTOR CO LTD
- Filing Date
- 2026-04-10
- Publication Date
- 2026-07-21
AI Technical Summary
Existing dialogue question-and-answer systems cannot simultaneously achieve both efficiency and accuracy in answering questions. Especially in large-scale knowledge bases, high-accuracy models take too long, while high-speed models lack sufficient accuracy, making it difficult to meet actual business needs.
The method combines initial screening and fine screening. Candidate standard questions are obtained through intent recognition, and accurate matching is performed using a pre-set question-and-answer knowledge base and fine screening model. Combined with multi-turn dialogue management and manual transfer modules, the question-and-answer process is optimized.
It improves the response efficiency and accuracy of the question-answering system, reduces computational load and response latency, mitigates the impact of sample imbalance, and enhances the user interaction experience.
Smart Images

Figure CN122432281A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, specifically to a dialogue question-and-answer method and device. Background Technology
[0002] With the rapid development of artificial intelligence technology, intelligent question-answering systems (also known as dialogue question-answering systems) have gradually emerged. These systems combine the technological advantages of retrieval and generative models, aiming to provide users with natural and convenient dialogue question-answering services. They are suitable for interactive scenarios or fields such as intelligent customer service, virtual assistants, and educational tutoring.
[0003] Existing dialogue question-answering systems typically use knowledge bases for question answering. However, due to the large scale of these knowledge bases, often reaching thousands or more questions and answers, it's difficult to simultaneously achieve both efficient and accurate question-answering. Specifically, if a knowledge base uses a high-accuracy question-answering model for intelligent question answering, the large size of the knowledge base leads to excessively long retrieval times, impacting the system's response efficiency. Conversely, if a knowledge base uses a high-speed question-answering model for intelligent question answering, the accuracy of the intelligent question answering cannot be guaranteed, making it difficult to meet the actual business question-answering requirements.
[0004] Therefore, there is an urgent need to propose a better dialogue and question-and-answer scheme. Summary of the Invention
[0005] In view of this, the embodiments of this application aim to provide a dialogue question-and-answer method and device that can solve the technical problem in the prior art that it is impossible to simultaneously achieve both question-and-answer efficiency and question-and-answer accuracy.
[0006] Firstly, this application provides a dialogue question-and-answer method, the method comprising: Obtain dialogue input information, which includes dialogue input questions and historical dialogue records; When the dialogue intent identified based on the dialogue input information is a question-and-answer intent, a preliminary screening is performed based on the dialogue input information to obtain M candidate standard questions that match the dialogue input question, where M is a positive integer; Based on the M candidate standard questions, a fine-grained selection process is performed, and based on the N target standard questions obtained from the fine-grained selection, questions are answered to obtain the corresponding question-and-answer results, where N is a positive integer less than M, and the target standard questions are the questions among the M candidate standard questions.
[0007] In some embodiments, before performing the initial screening based on the dialogue input information, the method includes: Intent recognition is performed based on the dialogue input questions and historical dialogue records in the dialogue input information to obtain the dialogue intent, which includes at least one of question-and-answer intent, business intent, and unknown intent. The initial screening based on the dialogue input information includes: Based on the dialogue input information and the preset question-and-answer knowledge base, an initial screening is performed to obtain M candidate standard questions. The M candidate standard questions are question-and-answer standard questions in the preset question-and-answer knowledge base that match the dialogue input information and / or the dialogue intent. The preset question-and-answer knowledge base includes multiple pre-configured question-and-answer standard questions and question-and-answer intent tags pre-labeled for the question-and-answer standard questions.
[0008] In some embodiments, the initial screening based on the dialogue input information and a preset question-and-answer knowledge base to obtain M candidate standard questions includes: Based on the dialogue input information and all the standard questions in the preset question-and-answer knowledge base, preprocessing is performed to obtain the corresponding preprocessed dialogue information and preprocessed standard questions. Based on the preprocessed dialogue information and each preprocessed standard question, a correlation calculation is performed to obtain a correlation score between the preprocessed dialogue information and each preprocessed standard question. The correlation score is used to reflect the magnitude of the correlation between the dialogue input information and the corresponding question-and-answer standard question in the preset question-and-answer knowledge base. Based on the relevance score between the preprocessed dialogue information and each preprocessed standard question, M candidate standard questions are determined from the preset question-and-answer knowledge base; wherein, the M candidate standard questions are all question-and-answer standard questions in the preset question-and-answer knowledge base whose relevance scores exceed a preset score threshold, and / or, the M candidate standard questions are the first M question-and-answer standard questions in the preset question-and-answer knowledge base whose relevance scores are arranged in descending order.
[0009] In some embodiments, the fine-grained selection based on the M candidate standard questions includes: A preset ranking model is invoked to calculate the similarity between the dialogue input information and the M candidate standard questions, thereby obtaining the similarity between the dialogue input information and each candidate standard question. The similarity is used to reflect the magnitude of the similarity between the dialogue input information and the corresponding candidate standard question. Based on the similarity between the dialogue input information and each of the candidate standard questions, N target standard questions are determined from the M candidate standard questions, where N is a positive integer less than or equal to M. The N target standard questions are all candidate standard questions whose similarity exceeds a preset similarity threshold among the M candidate standard questions, and / or, the N target standard questions are the candidate standard questions whose similarity is arranged in descending order to the top N.
[0010] In some embodiments, the step of calling a preset ranking model to calculate the similarity between the dialogue input information and the M candidate standard questions, and obtaining the similarity between the dialogue input information and each of the candidate standard questions, includes: A preset fine-ranking model is invoked to extract semantic features from the dialogue input information and the M candidate standard questions, respectively, to obtain corresponding dialogue input features and M candidate question features. The dialogue input features are used to reflect the semantic features of the dialogue input information, and the candidate question features are used to reflect the semantic features of the corresponding candidate standard questions. Similarity is calculated based on the dialogue input features and the M candidate question features to obtain the similarity between the dialogue input features and each candidate question feature, which is then used as the similarity between the dialogue input information and each candidate standard question.
[0011] In some embodiments, the step of invoking a preset ranking model to extract semantic features from the dialogue input information and the M candidate standard questions, respectively, to obtain the corresponding dialogue input features and M candidate question features, includes: Based on the dialogue input information and the M candidate standard questions, a fixed format is constructed and concatenated to obtain M concatenated information, each of which includes the dialogue input information and a corresponding candidate standard question; The M concatenated information pieces are respectively input into the preset fine-ranking model for semantic feature extraction, thereby obtaining the corresponding dialogue input features and the M candidate question features.
[0012] In some embodiments, the method further includes: If the candidate standard question is not output during the initial screening, the dialogue intent corresponding to the dialogue input information is reset to the business intent, and the multi-round dialogue management and response indicated by the business intent are executed.
[0013] In some embodiments, the method further includes: If the dialogue intent identified based on the dialogue input information is a business intent, then execute the multi-turn dialogue management and response indicated by the business intent; or... If the dialogue intent identified based on the dialogue input information is an unknown intent, the dialogue input information will be redirected to manual processing.
[0014] In some embodiments, the method further includes: If the dialogue intent reset fails, or the multi-round dialogue management and response fails, the dialogue input information will be redirected to manual processing.
[0015] Secondly, this application provides a dialogue question-and-answer device, including: The acquisition module is used to acquire dialogue input information, which includes dialogue input questions and historical dialogue records; The processing module is used to perform preliminary screening based on the dialogue input information when the dialogue intent identified based on the dialogue input information is a question-and-answer intent, and to obtain M candidate standard questions that match the dialogue input question, where M is a positive integer; The processing module is further configured to perform fine-grained selection based on the M candidate standard questions, and to answer questions based on the N target standard questions obtained from the fine-grained selection, thereby obtaining the corresponding question-and-answer results, where N is a positive integer less than M, and the target standard questions are questions among the M candidate standard questions.
[0016] For any content not introduced or described in the embodiments of this application, please refer to the relevant descriptions in the foregoing method embodiments; they will not be repeated here.
[0017] Thirdly, this application provides a computer device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the steps of the above-described dialogue question-and-answer method.
[0018] Fourthly, this application provides a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the steps of the above-described dialogue question-and-answer method.
[0019] The technical solution provided in this application can include the following beneficial effects: When the dialogue intent identified based on the dialogue input information is a question-and-answer intent, this application can adopt a combination of initial screening and fine-tuning for intelligent dialogue question-and-answer. Initial screening can quickly filter out M candidate standard questions, significantly compressing / reducing the number of question-and-answer questions in the massive knowledge base of traditional dialogue question-and-answer schemes, and significantly reducing the computational load and question-and-answer time in the subsequent fine-tuning stage. This is beneficial to improving the efficiency of intelligent dialogue question-and-answer and ensuring the response efficiency of dialogue question-and-answer. After ensuring efficient question retrieval in the initial screening stage, fine-tuning further refines the matching and reliable filtering to accurately and reliably select a smaller number of N target standard questions from the M candidate standard questions obtained in the initial screening for intelligent answers. This is beneficial to improving the accuracy and reliability of dialogue question-and-answer and enhancing the question-and-answer effect. It also solves the technical problem in the prior art that it is impossible to simultaneously achieve both question-and-answer efficiency and accuracy.
[0020] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0021] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings.
[0022] Figure 1 This is a schematic diagram of the framework of a dialogue question-and-answer system provided in an embodiment of this application.
[0023] Figure 2 This is a flowchart illustrating a dialogue question-and-answer method provided in an embodiment of this application.
[0024] Figure 3 This is a schematic diagram of a preliminary screening process provided in an embodiment of this application.
[0025] Figure 4 This is a schematic diagram of a fine-sorting and screening process provided in an embodiment of this application.
[0026] Figure 5 This is a schematic diagram of the structure of a dialogue question-and-answer device provided in an embodiment of this application.
[0027] Figure 6 This is a schematic diagram of another dialogue question-and-answer device provided in an embodiment of this application.
[0028] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0030] Unless otherwise defined, the technical or scientific terms used in the embodiments of this specification shall have the ordinary meaning understood by one of ordinary skill in the art to which this specification pertains. The terms "first," "second," and similar terms used in the embodiments of this specification do not indicate any order, quantity, or importance, but are merely used to avoid confusion of constituent elements.
[0031] Unless the context otherwise requires, throughout this specification, "a plurality of" means "at least two," and "including" is interpreted as open-ended or encompassing, that is, "including, but not limited to." In the description of this specification, terms such as "one embodiment," "some embodiments," "exemplary embodiment," "example," "specific example," or "some examples" are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this specification. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example.
[0032] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.
[0033] In the process of submitting this application, the applicant also discovered that existing dialogue question-answering systems cannot efficiently coordinate multi-turn dialogues and knowledge base question-answering, struggle to balance response speed and interaction accuracy, and suffer from low accuracy in intent recognition, easily affected by sample imbalance. Specifically, it is difficult to accurately distinguish between the user's natural language input question and the question statements in the question-answering knowledge base. Existing technologies typically use binary classifiers / models to differentiate between these two types of statements. However, these two types of statements are highly related in topic and have a high degree of similarity. The binary classifier cannot capture the subtle differences between the two statements, easily leading to recognition bias and low accuracy in intent recognition, thus affecting the accuracy of dialogue question-answering. In addition, dialogue question-answering systems are also susceptible to the influence of sample imbalance. For example, when there is a large difference in the number of samples between the user's input statement and the question statements in the question-answering knowledge base, the system training process (e.g., the aforementioned binary classifier) will tend to use the classification with the larger sample size as the judgment result, which will reduce / affect the classification accuracy, thereby affecting the overall interaction effect and the accuracy of dialogue question-answering. Furthermore, there is a trade-off between response efficiency and accuracy in dialogue question-answering systems; they cannot be simultaneously balanced. Specifically, the question-answering knowledge base is typically large, with thousands or more question statements. Using a high-accuracy model, such as a pre-trained language (Bidirectional Encoder Representations from Transformers, BERT) model, results in long processing times, impacting response time. Conversely, using a high-speed model, such as a best-matching 25 (BM25) model, cannot guarantee accuracy, making it difficult to meet practical business needs. To address these issues, this application proposes a dialogue question-answering method, apparatus, device, and medium.
[0034] Please see Figure 1 This is a schematic diagram of the framework of a dialogue question system provided in an embodiment of this application. Figure 1 The framework diagram 10 shown may include: an input module 101, an intent recognition module 102, a question-and-answer module 103, a multi-turn dialogue module 104, and a human transfer module 105; wherein, the question-and-answer module 103 may specifically include an initial ranking sub-module 1031 and a fine ranking sub-module 1032.
[0035] The input module 101 is responsible for collecting / acquiring dialogue input information, such as natural language statements entered by the user, the current dialogue context, and historical dialogue records. This application does not impose further limitations on this information. The intent recognition module 102 is responsible for performing intent recognition on the dialogue input information acquired by the input module 101, accurately analyzing the user's true intent in this dialogue. The intent recognition module 102 can be linked with the question-and-answer module 103 and the multi-turn dialogue module 104. The question-and-answer module 103 is responsible for rapid retrieval and question-and-answer, and specifically may include a preliminary ranking submodule 1031 and a fine ranking submodule 1032. The preliminary ranking submodule 1031 is responsible for rapid retrieval. Specifically, after the intent recognition module 102 identifies the question-and-answer intent, it can directly guide the user to the preliminary ranking submodule 1031. Through the preliminary ranking submodule 1031, multiple candidate standard questions matching the dialogue input information are quickly retrieved from a preset question-and-answer knowledge base, significantly reducing the scope of subsequent searches. Then, this application further refines the multiple candidate standard questions through the fine-ranking submodule 1032, selecting several target standard questions with higher accuracy for answering, thereby obtaining the corresponding question-and-answer results. The specific implementation details of the aforementioned initial ranking submodule 1031 and fine-ranking submodule 1032 will be detailed below in this application and will not be elaborated upon here. In practical applications, when the intent recognition module 102 identifies the dialogue intent corresponding to the aforementioned dialogue input information as a business intent, it can guide the multi-turn dialogue module 104 to manage the multi-turn dialogue indicated by the business intent and answer questions. When the intent recognition module 102 identifies the dialogue intent corresponding to the aforementioned dialogue input information as an unknown intent, it can directly guide the manual transfer module 105; or, if the multi-turn dialogue module 104 fails to process or cannot process the dialogue, it can automatically jump to the manual transfer module 105 to transfer the dialogue to manual processing. The specific implementation details of the aforementioned multi-turn dialogue module 104 and the aforementioned manual transfer module 105 will be detailed below in this application and will not be elaborated upon here.
[0036] Please see Figure 2 This is a flowchart illustrating a dialogue question-and-answer method provided in an embodiment of this application. Figure 2 The method shown can be applied to computer devices, and the method includes the following implementation steps: S201. Obtain dialogue input information, which includes dialogue input questions and historical dialogue records.
[0037] The aforementioned dialogue input information in this application can refer to relevant question information used to influence responses in intelligent dialogue question answering. This information may include, but is not limited to, dialogue input questions, historical dialogue records, or other input information used to influence dialogue question answering. This application does not limit the specific form of the aforementioned dialogue input information. For example, it may include, but is not limited to, natural language statements / text entered by the user, dialogue context information, historical dialogue information, and other input information used to influence dialogue question answering. This application will not impose further limitations or details on these aspects.
[0038] S202. When the dialogue intent identified based on the dialogue input information is a question-and-answer intent, a preliminary screening is performed based on the dialogue input information to obtain M candidate standard questions that match the dialogue input question, where M is a positive integer.
[0039] This application can first perform intent recognition based on the aforementioned dialogue input information to obtain the corresponding dialogue intent. If the aforementioned dialogue intent is a question-and-answer intent, this application then performs preliminary screening based on the aforementioned dialogue input information to reduce the amount of question-and-answer data and improve question-and-answer efficiency. Specifically, the intent recognition mentioned above in this application can refer to identifying the user's true intent from the aforementioned dialogue input information. The intents involved in this application can include, but are not limited to, any one or more combinations of the following categories of intents: for example, question-and-answer intent, business intent, unknown intent (otherIntent), or other custom-defined intent categories.
[0040] S203. Based on the M candidate standard questions, perform fine-grained selection and screening, and based on the N target standard questions obtained from the fine-grained selection, answer the questions to obtain the corresponding question-and-answer results, where N is a positive integer less than M, and the target standard questions are the questions among the M candidate standard questions.
[0041] The question-and-answer results mentioned above in this application may refer to the question-and-answer results output by intelligent dialogue based on the above dialogue input information. This application does not limit the number of such question-and-answer results, and they can be customized according to the actual situation. For example, this application can display multiple question-and-answer results for user reference, etc. This application does not impose any restrictions on this.
[0042] By implementing the embodiments of this application, this application obtains dialogue input information, which includes dialogue input questions and historical dialogue records. When the dialogue intent identified based on the dialogue input information is a question-and-answer intent, an initial screening is performed based on the dialogue input information to obtain M candidate standard questions matching the dialogue input question, where M is a positive integer. A fine-tuning is then performed based on the M candidate standard questions, and a question answer is given based on the N target standard questions obtained from the fine-tuning, resulting in the corresponding question-and-answer result, where N is a positive integer less than M, and the target standard questions are the questions among the M candidate standard questions. Thus, when the dialogue intent identified based on the dialogue input information is a question-and-answer intent, this application can use a combination of initial screening and fine-tuning for intelligent dialogue question-and-answer. The initial screening can quickly select M candidate standard questions, significantly compressing / reducing the number of question-and-answer questions in the massive knowledge base of traditional dialogue question-and-answer schemes, significantly reducing the computational load and question-and-answer time in the subsequent fine-tuning stage, which is beneficial to improving the efficiency of intelligent dialogue question-and-answer and ensuring the response efficiency of dialogue question-and-answer. After ensuring efficient question retrieval in the initial screening stage, a more in-depth and granular fine-grained screening process is used to accurately match and reliably filter questions. This allows for the precise and reliable selection of a smaller number of target standard questions from the M candidate standard questions obtained in the initial screening, enabling intelligent responses. This improves the accuracy and reliability of the dialogue question-and-answer session, thus enhancing the overall effectiveness. It also addresses the technical challenge of simultaneously achieving high efficiency and accuracy in question-and-answer sessions in existing technologies.
[0043] The following describes some specific and optional embodiments related to this application.
[0044] In step S201, this application does not limit the implementation method of obtaining the above-mentioned dialogue input information. For example, it can be obtained from other devices (such as terminals or servers) through the network; or it can be obtained by receiving natural language sentences input by the user and extracting dialogue input information such as dialogue context, filled slots, and dialogue status from the natural language sentences. This application will not limit or elaborate on this.
[0045] Before step S202, the present application may first perform intent recognition based on the dialogue input question and the historical dialogue record in the above-mentioned dialogue input information, and identify the user's true dialogue intent therefrom. The dialogue intent may include, but is not limited to, any one or more combinations of the following: question-and-answer intent, business intent, unknown intent, or other custom classification intents. When it is recognized that the above-mentioned dialogue intent includes a question-and-answer intent, the present application may continue to execute step S202 to perform a preliminary screening based on the above-mentioned dialogue input information and a preset question-and-answer knowledge base, and screen out M candidate standard questions that match the above-mentioned dialogue intent / above-mentioned dialogue input information from the above-mentioned preset question-and-answer knowledge base. The above-mentioned preset question-and-answer knowledge base is a knowledge base custom-set by the system according to the actual situation, and it may include at least one question-and-answer standard question. Generally, the more standard questions there are, the more accurate and reliable the knowledge base is. In practical applications, based on the original intent set, the present application adds a question-and-answer intent, and labels all standard questions in the preset question-and-answer knowledge base as question-and-answer intents, so as to replace the original binary classification method, which can alleviate the problem of unbalanced classification samples from the root cause, thereby improving the accuracy of intent recognition.
[0046] In step S202, the present application does not limit the specific implementation manner of the above-mentioned preliminary screening. For example, the present application may use a preset preliminary screening model to perform a preliminary quick retrieval on the above-mentioned dialogue input information and the preset question-and-answer knowledge base, and determine the above-mentioned M candidate standard questions from the preset question-and-answer knowledge base. The above-mentioned preliminary screening model is a question screening model custom-set by the system according to the actual situation, and it may include, but is not limited to, for example, the BM25 model, or other custom question screening models, etc. The present application does not make too many limitations on this. For another example, please refer to Figure 3 is a schematic flowchart of a specific process of preliminary screening provided by an embodiment of the present application. As Figure 3 The process shown may include the following implementation steps: S301. Respectively perform preprocessing on the dialogue input information and all question-and-answer standard questions in the preset question-and-answer knowledge base to obtain corresponding preprocessed dialogue information and preprocessed standard questions.
[0047] The present application may first perform preprocessing such as word segmentation, stop word removal, and normalization on the above-mentioned dialogue input information and all question-and-answer standard questions in the preset question-and-answer knowledge base, so as to obtain the corresponding preprocessed dialogue information and the corresponding preprocessed standard questions in the preset question-and-answer knowledge base. The above-mentioned stop words may include, but are not limited to, for example, "de", "le", "shi", "ma", or other words or phrases without actual semantics, etc. The present application does not make too many limitations and details on this. The above-mentioned normalization process may refer to, for example, full-width to half-width conversion, case conversion, or other custom format processing, etc., to unify the text format and eliminate the interference of inconsistent formats, etc. The present application also does not make too many limitations and details on this.
[0048] S302. Based on the preprocessed dialogue information and each preprocessed standard question, a correlation calculation is performed to obtain a correlation score between the preprocessed dialogue information and each preprocessed standard question. The correlation score is used to reflect the magnitude of the correlation between the dialogue input information and the corresponding question-and-answer standard question in the preset question-and-answer knowledge base.
[0049] This application can use a preset correlation algorithm to calculate the correlation between the preset processed dialogue information and each preprocessed standard question, thereby obtaining a correlation score between the preset processed dialogue information and each preprocessed standard question. The preset correlation algorithm is an algorithm pre-defined by the system for calculating the correlation score, which may include, but is not limited to, the BM25 algorithm. This application does not limit the specific implementation method for calculating the correlation score, for example, the corresponding correlation score can be calculated using the following formula (1): Formula (1) Where Q represents the preprocessed dialogue information corresponding to the above dialogue input information. d represents the preprocessed standard question corresponding to any standard question in the above preset question-answering knowledge base. sore(Q,d) represents the relevance score between the above preprocessed dialogue information Q and any preprocessed standard question d. N represents the total number of standard questions in the above preset question-answering knowledge base. IDF(q i ) represents the word q i Word weights; n(q) i ) indicates that it contains the word q i The number of standard questions in the question-and-answer system, which is used to measure the number of words q. i The degree of discrimination. i dl represents the combined word frequency. dl represents the document length, which can specifically be the length of the preprocessed dialogue information mentioned above. avgdl represents the average document length, which can be pre-defined by the system based on actual conditions. k and b both represent adjustment factors, which can be pre-defined by the system based on actual conditions, for example, k is usually 1.5 and b is 0.75, etc. b is used to characterize the non-linear correlation between words and documents, which will not be further limited or detailed in this application.
[0050] S303. Based on the relevance score between the preprocessed dialogue information and each preprocessed standard question, determine M candidate standard questions from the preset question-and-answer knowledge base; wherein, the M candidate standard questions are all question-and-answer standard questions in the preset question-and-answer knowledge base whose relevance scores exceed a preset score threshold, and / or, the M candidate standard questions are the first M question-and-answer standard questions in the preset question-and-answer knowledge base whose relevance scores are arranged in descending order.
[0051] After traversing the aforementioned preset question-and-answer knowledge base and calculating the correlation score between the preprocessed dialogue information and each preprocessed standard question in the preset question-and-answer knowledge base, this application can select and determine a corresponding set of candidate questions from the aforementioned preset question-and-answer knowledge base based on the correlation score between the preprocessed dialogue information and each preprocessed standard question in the preset question-and-answer knowledge base. The set of candidate questions may include M candidate standard questions, where M is a positive integer that is predefined according to the actual situation. For example, M is usually greater than or equal to 50 and less than or equal to 200, etc. This application does not impose further limitations or details on this.
[0052] This application does not limit the specific implementation method for determining the aforementioned candidate question set. For example, this application can select M standard questions from the aforementioned preset question-and-answer knowledge base whose relevance scores exceed a preset score threshold, as the M candidate standard questions in the aforementioned candidate question set. And / or, this application can sort the questions according to their relevance scores from high to low, selecting the top M questions from the aforementioned preset question-and-answer knowledge base based on their relevance scores, as the M candidate standard questions in the aforementioned candidate question set, etc. The aforementioned preset score threshold is a score threshold pre-defined by the system based on actual conditions. It can be an empirical value customized based on user experience, or a statistical value calculated based on a series of experimental data, etc.; for example, the aforementioned preset score threshold is usually a value between 0.3 and 0.5, and this application does not impose further limitations on this.
[0053] In step S203, this application does not limit the specific implementation of the fine-tuning and screening and question answering involved in step S203 above. For example, please refer to [link to relevant documentation]. Figure 4 This is a flowchart illustrating a fine-grained filtering and question-answering process provided in an embodiment of this application. For example... Figure 4 The process shown may include the following implementation steps: S401. Call the preset fine ranking model to calculate the similarity between the dialogue input information and the M candidate standard questions, and obtain the similarity between the dialogue input information and each candidate standard question. The similarity is used to reflect the magnitude of the similarity between the dialogue input information and the corresponding candidate standard question.
[0054] This application can utilize a pre-defined ranking model to calculate the similarity between the aforementioned dialogue input information and M candidate standard questions in the candidate question set, thereby obtaining the similarity between the aforementioned dialogue input information and each candidate standard question. The aforementioned pre-defined ranking model can refer to a model used for further filtering of standard questions, which may include, but is not limited to, models such as BERT, pre-trained BERT-base-chinese models, or other models that support question re-filtering, etc., which this application does not limit or elaborate on further.
[0055] This application does not limit the specific implementation of the above similarity calculation. For example, this application can use the above-mentioned preset ranking model to first extract semantic features from the above-mentioned dialogue input information and the M candidate standard questions in the candidate question set, thereby obtaining the corresponding dialogue input features and M candidate question features. The above-mentioned dialogue input features can be used to indicate / reflect the semantic features of the above-mentioned dialogue input information, and the above-mentioned candidate question features can be used to indicate / reflect the semantic features of the corresponding above-mentioned candidate standard questions. Then, based on the above-mentioned dialogue input features and M candidate question features, similarity calculation is performed to obtain the similarity between the above-mentioned dialogue input features and each candidate question feature, and this is used as the similarity between the above-mentioned dialogue input information and each candidate standard question.
[0056] In specific implementation, this application can first construct and concatenate M candidate standard questions from the aforementioned dialogue input information and candidate question set in a fixed format to obtain M concatenated information. This concatenated information can include any one of the candidate standard questions from the aforementioned dialogue input information and candidate question set. For example, this application can construct and concatenate the aforementioned dialogue input information Q' and any candidate standard question d in the following fixed format: [CLS] Q' [SEP]d [SEP], where [CLS] is used to aggregate global semantic features, and [SEP] is used to separate two statements, such as separating the dialogue input information and the candidate standard question. Next, this application can input the concatenated M concatenated information into the aforementioned preset fine-ranking model for semantic feature extraction, thereby obtaining the aforementioned dialogue input features and M candidate question features. In practical applications, the aforementioned dialogue input features, the aforementioned candidate question features, or other semantic features involved in this application can all be represented in vector form, which this application can also refer to as corresponding feature vectors. This application does not impose any further limitations on this. Specifically, for example, this application can select the output semantic vector at the [CLS] position as the semantic feature vector of the entire concatenated information, and obtain the dialogue input feature vectors corresponding to the above-mentioned dialogue input information respectively. and a corresponding candidate problem feature vector .
[0057] This application does not limit the specific implementation of the above similarity calculation. For example, the cosine similarity calculation formula shown in the following formula (2) can be used to calculate the similarity between the above dialogue input features and the above candidate question features: Formula (2) in, This represents the input characteristics of the above dialogue. This represents any of the above candidate problem features. cosine_similarity represents the similarity, which is usually a value between 0 and 1. The higher the value, the higher the semantic similarity. This application will not make any further restrictions or details on this.
[0058] S402. Based on the similarity between the dialogue input information and each of the candidate standard questions, determine N target standard questions from the M candidate standard questions, where N is a positive integer less than M, and the N target standard questions are all candidate standard questions whose similarity exceeds a preset similarity threshold among the M candidate standard questions, and / or, the N target standard questions are the candidate standard questions whose similarity is arranged in descending order to the top N.
[0059] This application does not limit the specific implementation method for determining the aforementioned N target standard questions. For example, this application can select N candidate standard questions whose similarity exceeds a preset similarity threshold from the M candidate standard questions in the aforementioned candidate question set, and use these as the aforementioned N target standard questions. And / or, this application can sort the similarity between the aforementioned dialogue input information and each of the M candidate standard questions in descending order, and select the top N candidate standard questions from the M candidate standard questions in the aforementioned candidate question set, and use these as the aforementioned N target standard questions, etc. This application does not impose further limitations on these aspects. The aforementioned preset similarity threshold is a score threshold pre-defined by the system based on actual conditions. It can be an empirical value customized based on user experience, or a statistical value calculated based on a series of experimental data, etc. N is a positive integer pre-defined by the system based on actual conditions; for example, N can usually be 5, etc. This application does not impose further limitations or details on this aspect.
[0060] S403. Based on the N target standard questions, answer the questions to obtain the corresponding question and answer results.
[0061] After selecting the aforementioned N target standard questions through careful ranking, this application can provide answers based on these N target standard questions to obtain corresponding question-and-answer results. Specifically, for example, it can directly answer the aforementioned N target standard questions and output the question-and-answer results for each of the N target standard questions for users to view or refer to; or, it can display the aforementioned N target standard questions on a corresponding interactive interface, allowing users to customize and select the standard questions to be answered from the aforementioned N target standard questions according to their actual needs. Then, in response to the user's selection confirmation command, it can answer the standard questions to be answered from the aforementioned N target standard questions, thereby outputting the corresponding question-and-answer results, etc. This application does not impose further limitations or details on these aspects.
[0062] In practical applications, this application can significantly narrow the search scope in the subsequent fine-ranking stage by rapidly screening the initial results, while ensuring search efficiency. Based on the initial screening, fine-ranking matching is used to perform semantic high-level matching on the candidate standard questions within a small range, and outputs the N target standard questions that best match the dialogue input information for answering. The initial screening and fine-ranking matching work together to ensure both the system response speed or response efficiency and improve the accuracy of dialogue question answering, which effectively solves the problem that the system response efficiency and accuracy cannot be balanced in the prior art.
[0063] In some optional embodiments, when the dialogue intent obtained by intent recognition based on the above dialogue input information is a business intent, this application can input the above dialogue input information into a multi-turn dialogue module to execute the multi-turn dialogue management and response indicated by the above business intent. Specifically, for example, slot filling and dialogue management according to the business process are performed in the multi-turn dialogue module, and the final question and answer result is output.
[0064] In some alternative embodiments, when the intent obtained by intent recognition based on the above-mentioned dialogue input information is an unknown intent, this application can input the above-mentioned dialogue input information into the manual transfer module, for example, automatically triggering the manual transfer module to manually process the above-mentioned dialogue input information; specifically, the above-mentioned dialogue input information can be displayed in the corresponding manual interaction interface so that customer service personnel can actively intervene to answer the corresponding questions, etc. This application will not make too many limitations or details in this regard.
[0065] In some alternative embodiments, when the above-mentioned initial screening does not output the above-mentioned candidate standard questions, that is, when the set of candidate questions output by the above-mentioned initial screening is empty, this application can actively reset the dialogue intent obtained by the above-mentioned dialogue input information through intent recognition to the business intent, and then execute the multi-turn dialogue management and response indicated by the above-mentioned business intent. For example, input the above-mentioned dialogue input information into the multi-turn dialogue module to perform slot filling, perform multi-turn dialogue management according to the business process, and output the final question and answer results, etc. This application will not impose too many limitations or details on this.
[0066] In some alternative embodiments, when the above-mentioned dialogue intent reset fails, or when the above-mentioned multi-turn dialogue management and response in the multi-turn dialogue module fails, this application can automatically trigger the manual transfer module, input the above-mentioned dialogue input information into the manual transfer module for manual processing, for example, the above-mentioned dialogue input information can be displayed in the corresponding manual interaction interface so that customer service personnel can actively intervene to answer the corresponding questions, etc. This application will not make too many limitations or details in this regard.
[0067] As can be seen, this application significantly improves the accuracy of intent recognition by adding new question-and-answer intents and uniformly labeling samples in the preset question-and-answer knowledge base. This mitigates the impact of sample imbalance on dialogue question-and-answer performance and ensures accurate differentiation between dialogue input information and the preset question-and-answer knowledge base. The dual-stage retrieval mechanism, combining initial and fine-tuning, guarantees both the retrieval speed and accuracy of dialogue question-and-answer, reducing system response latency. Furthermore, a multi-branch processing mechanism is designed, including branch processing flows for business intents, unknown intents, intent reset failures, and multi-round dialogue management failures. These can be referenced in the aforementioned embodiments, enabling seamless integration of business processing and question-and-answer knowledge base, improving interaction fluency. The manual transfer module covers scenarios such as unknown intents and unmatched results in the question-and-answer knowledge base, preventing unresponsiveness to user dialogue question-and-answer requests and improving the integrity of system interaction and user experience. This application eliminates the need for additional deployment of binary classifiers and other models, reducing model deployment costs and improving system stability. In addition, this application is applicable to scenarios with various dialogue and question-and-answer needs, such as medical pre-diagnosis, government consultation, and ticket booking. This application will not impose further limitations or details on these scenarios.
[0068] By implementing the embodiments of this application, this application obtains dialogue input information, including dialogue input questions and historical dialogue records; based on the dialogue input information, it performs intent recognition and initial screening to obtain M candidate standard questions matching the dialogue input questions, where M is a positive integer, and the intent recognition includes at least the recognition of question-and-answer intent; based on the M candidate standard questions, it performs fine-tuning and question answering to obtain the corresponding question-and-answer results. In this way, this application can replace the original binary classifier discrimination method by adding the recognition of question-and-answer intent, fundamentally mitigating the impact of sample imbalance and improving the accuracy of intent recognition. Simultaneously, the combination of initial screening and fine-tuning for intelligent dialogue question-and-answer improves the accuracy and reliability of dialogue question-and-answer, enhancing the question-and-answer effect. It also solves technical problems affecting the accuracy of dialogue question-and-answer in the prior art. In practical implementation, when the dialogue intent identified based on the dialogue input information is a question-and-answer intent, this application can employ a combination of initial screening and fine-tuning for intelligent dialogue question-and-answer. Initial screening can quickly identify M candidate standard questions, significantly compressing / reducing the number of question-and-answer questions in the massive knowledge base of traditional dialogue question-and-answer schemes. This significantly reduces the computational load and question-and-answer time in the subsequent fine-tuning stage, improving the efficiency of intelligent dialogue question-and-answer and ensuring response efficiency. After ensuring efficient question retrieval in the initial screening stage, fine-tuning further refines the matching and screening, accurately and reliably selecting a smaller number of N target standard questions from the M candidate standard questions obtained in the initial screening for intelligent answers. This improves the accuracy and reliability of dialogue question-and-answer, enhancing the question-and-answer effect. It also solves the technical problem in existing technologies that cannot simultaneously achieve both answering efficiency and question-and-answer accuracy.
[0069] Please see Figure 5 This is a schematic diagram of the structure of a dialogue question-and-answer device provided in an embodiment of this application. Figure 5 The illustrated device 500 can be applied to a computer device, and the device may include an acquisition module 501 and a processing module 502, wherein: The acquisition module 501 is used to acquire dialogue input information, which includes dialogue input questions and historical dialogue records; The processing module 502 is used to perform preliminary screening based on the dialogue input information when the dialogue intent identified based on the dialogue input information is a question-and-answer intent, and to obtain M candidate standard questions that match the dialogue input question, where M is a positive integer; The processing module 502 is further configured to perform fine-grained selection based on the M candidate standard questions, and to answer questions based on the N target standard questions obtained from the fine-grained selection, thereby obtaining the corresponding question-and-answer results.
[0070] In some embodiments, before performing the initial screening based on the dialogue input information, the processing module 502 is further configured to: Intent recognition is performed based on the dialogue input questions and historical dialogue records in the dialogue input information to obtain the dialogue intent, which includes at least one of question-and-answer intent, business intent, and unknown intent. The processing module 502 is specifically used for: Based on the dialogue input information and the preset question-and-answer knowledge base, an initial screening is performed to obtain M candidate standard questions. The M candidate standard questions are question-and-answer standard questions in the preset question-and-answer knowledge base that match the dialogue input information and / or the dialogue intent. The preset question-and-answer knowledge base includes multiple pre-configured question-and-answer standard questions and question-and-answer intent tags pre-labeled for the question-and-answer standard questions.
[0071] In some embodiments, the processing module 502 is specifically used for: Based on the dialogue input information and all the standard questions in the preset question-and-answer knowledge base, preprocessing is performed to obtain the corresponding preprocessed dialogue information and preprocessed standard questions. Based on the preprocessed dialogue information and each preprocessed standard question, a correlation calculation is performed to obtain a correlation score between the preprocessed dialogue information and each preprocessed standard question. The correlation score is used to reflect the magnitude of the correlation between the dialogue input information and the corresponding question-and-answer standard question in the preset question-and-answer knowledge base. Based on the relevance score between the preprocessed dialogue information and each preprocessed standard question, M candidate standard questions are determined from the preset question-and-answer knowledge base; wherein, the M candidate standard questions are all question-and-answer standard questions in the preset question-and-answer knowledge base whose relevance scores exceed a preset score threshold, and / or, the M candidate standard questions are the first M question-and-answer standard questions in the preset question-and-answer knowledge base whose relevance scores are arranged in descending order.
[0072] In some embodiments, the processing module 502 is specifically used for: A preset ranking model is invoked to calculate the similarity between the dialogue input information and the M candidate standard questions, thereby obtaining the similarity between the dialogue input information and each candidate standard question. The similarity is used to reflect the magnitude of the similarity between the dialogue input information and the corresponding candidate standard question. Based on the similarity between the dialogue input information and each of the candidate standard questions, N target standard questions are determined from the M candidate standard questions, where N is a positive integer less than or equal to M. The N target standard questions are all candidate standard questions whose similarity exceeds a preset similarity threshold among the M candidate standard questions, and / or, the N target standard questions are the candidate standard questions whose similarity is arranged in descending order to the top N.
[0073] In some embodiments, the processing module 502 is specifically used for: A preset fine-ranking model is invoked to extract semantic features from the dialogue input information and the M candidate standard questions, respectively, to obtain corresponding dialogue input features and M candidate question features. The dialogue input features are used to reflect the semantic features of the dialogue input information, and the candidate question features are used to reflect the semantic features of the corresponding candidate standard questions. Similarity is calculated based on the dialogue input features and the M candidate question features to obtain the similarity between the dialogue input features and each candidate question feature, which is then used as the similarity between the dialogue input information and each candidate standard question.
[0074] In some embodiments, the processing module 502 is specifically used for: Based on the dialogue input information and the M candidate standard questions, a fixed format is constructed and concatenated to obtain M concatenated information, each of which includes the dialogue input information and a corresponding candidate standard question; The M concatenated information pieces are respectively input into the preset fine-ranking model for semantic feature extraction, thereby obtaining the corresponding dialogue input features and the M candidate question features.
[0075] In some embodiments, the processing module 502 is further configured to: If the candidate standard question is not output during the initial screening, the dialogue intent obtained by intent recognition based on the dialogue input information is reset to the business intent, and the multi-turn dialogue management and response indicated by the business intent are executed.
[0076] In some embodiments, the processing module 502 is further configured to: If the dialogue intent identified based on the dialogue input information is a business intent, then execute the multi-turn dialogue management and response indicated by the business intent; or... If the dialogue intent identified based on the dialogue input information is an unknown intent, the dialogue input information will be redirected to manual processing.
[0077] In some embodiments, the processing module 502 is further configured to: If the dialogue intent reset fails, or the multi-round dialogue management and response fails, the dialogue input information will be redirected to manual processing.
[0078] By implementing the embodiments of this application, the aforementioned device can acquire dialogue input information, including dialogue input questions and historical dialogue records; perform intent recognition and initial screening based on the dialogue input information to obtain M candidate standard questions matching the dialogue input questions, where M is a positive integer, and the intent recognition includes at least the recognition of question-and-answer intent; and perform fine-tuning and question answering based on the M candidate standard questions to obtain the corresponding question-and-answer results. In this way, this application can replace the original binary classifier discrimination method with the addition of question-and-answer intent recognition, fundamentally mitigating the impact of sample imbalance and improving the accuracy of intent recognition. Simultaneously, the combination of initial screening and fine-tuning for intelligent dialogue question-and-answer improves the accuracy and reliability of dialogue question-and-answer, enhancing the question-and-answer effect. It also solves technical problems in the prior art that affect the accuracy of dialogue question-and-answer.
[0079] Please see Figure 6 This is a schematic diagram of another dialogue question-and-answer device provided in an embodiment of this application. For example... Figure 6 The device shown can be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc. This device can be applied to various vehicles or computer equipment.
[0080] Reference Figure 6 The device 600 may include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output interface 612, a sensor component 614, and a communication component 616.
[0081] Processing component 602 typically controls the overall operation of device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the aforementioned dialogue question-and-answer method. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0082] Memory 604 is configured to store various types of data to support the operation of device 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0083] Power supply component 606 provides power to the various components of device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 600.
[0084] Multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0085] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0086] Input / output interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, start buttons, and lock buttons.
[0087] Sensor assembly 614 includes one or more sensors for providing status assessments of various aspects of device 600. For example, sensor assembly 614 may detect the on / off state of device 600, the relative positioning of components such as the display and keypad of device 600, changes in the position of device 600 or a component of device 600, the presence or absence of user contact with device 600, the orientation or acceleration / deceleration of device 600, and temperature changes of device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0088] Communication component 616 is configured to facilitate wired or wireless communication between device 600 and other devices. Device 600 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0089] In an exemplary embodiment, device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described dialogue question-and-answer method.
[0090] Understandably, the processor 620 in this embodiment can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiment can be completed by integrated logic circuits in the processor's hardware or by software instructions. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0091] Understandably, the memory 604 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0092] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by the processor 620 of the device 600 to complete the above-described upper-level dialogue question-and-answer method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0093] The aforementioned device can be a standalone electronic device or a part of a standalone electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be a single IC or a collection of multiple ICs. The chip can include, but is not limited to, the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), and SoC (System on Chip). The aforementioned integrated circuit or chip can be used to execute executable instructions (or code) to implement the aforementioned dialogue question-and-answer method. The executable instructions can be stored in the integrated circuit or chip or obtained from other devices or equipment. For example, the integrated circuit or chip includes a processor, memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, it implements the above-mentioned dialogue question and answer method; or, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution to implement the above-mentioned dialogue question and answer method.
[0094] Please see Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. For example, as shown... Figure 7 As shown, the computer device 700 includes a memory 701 and a processor 702. The memory 701 stores executable program code 7011, and the processor 702 is used to call and execute the executable program code 7011 to perform a dialogue question and answer method.
[0095] This application embodiment can divide the device into functional modules according to the above method embodiment. For example, each function can be assigned to a separate module, or two or more functions can be integrated into a processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. When dividing each functional module according to its corresponding function, the device may include: a processing module and a communication module, etc.
[0096] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here. The device provided in this embodiment is used to execute the above-described dialogue question-and-answer method, and therefore can achieve the same effect as the above-described implementation method.
[0097] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the above-described dialogue question-and-answer method when executed by the programmable device.
[0098] It should be noted that the descriptions of the above embodiments of storage media, devices, and equipment are similar to the descriptions of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the embodiments of storage media, devices, and equipment of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0099] Other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of this application. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed in this application.
[0100] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications or equivalent substitutions made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A dialogue question-and-answer method, characterized in that, include: Obtain dialogue input information, which includes dialogue input questions and historical dialogue records; When the dialogue intent identified based on the dialogue input information is a question-and-answer intent, a preliminary screening is performed based on the dialogue input information to obtain M candidate standard questions that match the dialogue input question, where M is a positive integer; Based on the M candidate standard questions, a fine-grained selection process is performed, and based on the N target standard questions obtained from the fine-grained selection, questions are answered to obtain the corresponding question-and-answer results, where N is a positive integer less than M, and the target standard questions are the questions among the M candidate standard questions.
2. The method according to claim 1, characterized in that, Before performing the initial screening based on the dialogue input information, the method includes: Intent recognition is performed based on the dialogue input questions and historical dialogue records in the dialogue input information to obtain the dialogue intent, which includes at least one of question-and-answer intent, business intent, and unknown intent. The initial screening based on the dialogue input information includes: Based on the dialogue input information and the preset question-and-answer knowledge base, an initial screening is performed to obtain M candidate standard questions. The M candidate standard questions are question-and-answer standard questions in the preset question-and-answer knowledge base that match the dialogue input information and / or the dialogue intent. The preset question-and-answer knowledge base includes multiple pre-configured question-and-answer standard questions and question-and-answer intent tags pre-labeled for the question-and-answer standard questions.
3. The method according to claim 2, characterized in that, The initial screening based on the dialogue input information and the preset question-answering knowledge base yields M candidate standard questions, including: Based on the dialogue input information and all the standard questions in the preset question-and-answer knowledge base, preprocessing is performed to obtain the corresponding preprocessed dialogue information and preprocessed standard questions. Based on the preprocessed dialogue information and each preprocessed standard question, a correlation calculation is performed to obtain a correlation score between the preprocessed dialogue information and each preprocessed standard question. The correlation score is used to reflect the magnitude of the correlation between the dialogue input information and the corresponding question-and-answer standard question in the preset question-and-answer knowledge base. Based on the relevance score between the preprocessed dialogue information and each preprocessed standard question, M candidate standard questions are determined from the preset question-and-answer knowledge base; wherein, the M candidate standard questions are all question-and-answer standard questions in the preset question-and-answer knowledge base whose relevance scores exceed a preset score threshold, and / or, the M candidate standard questions are the first M question-and-answer standard questions in the preset question-and-answer knowledge base whose relevance scores are arranged in descending order.
4. The method according to claim 1, characterized in that, The fine-grained selection based on the M candidate standard questions includes: A preset ranking model is invoked to calculate the similarity between the dialogue input information and the M candidate standard questions, thereby obtaining the similarity between the dialogue input information and each candidate standard question. The similarity is used to reflect the magnitude of the similarity between the dialogue input information and the corresponding candidate standard question. Based on the similarity between the dialogue input information and each of the candidate standard questions, N target standard questions are determined from the M candidate standard questions, where N is a positive integer less than M. The N target standard questions are all candidate standard questions whose similarity exceeds a preset similarity threshold among the M candidate standard questions, and / or, the N target standard questions are the candidate standard questions whose similarity is arranged in descending order to the top N.
5. The method according to claim 4, characterized in that, The step of calling a preset ranking model to calculate the similarity between the dialogue input information and the M candidate standard questions, and obtaining the similarity between the dialogue input information and each candidate standard question, includes: A preset fine-ranking model is invoked to extract semantic features from the dialogue input information and the M candidate standard questions, respectively, to obtain corresponding dialogue input features and M candidate question features. The dialogue input features are used to reflect the semantic features of the dialogue input information, and the candidate question features are used to reflect the semantic features of the corresponding candidate standard questions. Similarity is calculated based on the dialogue input features and the M candidate question features to obtain the similarity between the dialogue input features and each candidate question feature, which is then used as the similarity between the dialogue input information and each candidate standard question.
6. The method according to claim 5, characterized in that, The step of calling a preset fine-ranking model to extract semantic features from the dialogue input information and the M candidate standard questions, respectively, to obtain the corresponding dialogue input features and M candidate question features, including: Based on the dialogue input information and the M candidate standard questions, a fixed format is constructed and concatenated to obtain M concatenated information, each of which includes the dialogue input information and a corresponding candidate standard question; The M concatenated information pieces are respectively input into the preset fine-ranking model for semantic feature extraction, thereby obtaining the corresponding dialogue input features and the M candidate question features.
7. The method according to any one of claims 1-6, characterized in that, The method further includes: If the candidate standard question is not output during the initial screening, the dialogue intent corresponding to the dialogue input information is reset to the business intent, and the multi-round dialogue management and response indicated by the business intent are executed.
8. The method according to claim 7, characterized in that, The method further includes: If the dialogue intent identified based on the dialogue input information is a business intent, then execute the multi-turn dialogue management and response indicated by the business intent; or... If the dialogue intent identified based on the dialogue input information is an unknown intent, the dialogue input information will be redirected to manual processing.
9. The method according to claim 8, characterized in that, The method further includes: If the dialogue intent reset fails, or the multi-round dialogue management and response fails, the dialogue input information will be redirected to manual processing.
10. A computer device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the steps of the method according to any one of claims 1 to 9.