CN110909141A - Dialog retrieval method and device based on context of question-answering system - Google Patents

Dialog retrieval method and device based on context of question-answering system Download PDF

Info

Publication number
CN110909141A
CN110909141A CN201911112818.1A CN201911112818A CN110909141A CN 110909141 A CN110909141 A CN 110909141A CN 201911112818 A CN201911112818 A CN 201911112818A CN 110909141 A CN110909141 A CN 110909141A
Authority
CN
China
Prior art keywords
question
answer
candidate
chat
last
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911112818.1A
Other languages
Chinese (zh)
Inventor
刘尧
舒畅
李竹桥
李先云
郑思璇
朱婷婷
祁丽华
张洪晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Semantic Intelligent Technology Guangzhou Co ltd
Original Assignee
Semantic Intelligent Technology Guangzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Semantic Intelligent Technology Guangzhou Co ltd filed Critical Semantic Intelligent Technology Guangzhou Co ltd
Priority to CN201911112818.1A priority Critical patent/CN110909141A/en
Publication of CN110909141A publication Critical patent/CN110909141A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation
    • G06F16/3334Selection or weighting of terms from queries, including natural language queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The method and the device have the advantages that a large number of context-associated question-answer pairs do not need to be manufactured, manufacturing cost of the context-associated question-answer pairs is saved, relevant answer retrieval is carried out in the context of the existing question-answer system only through a retrieval object determined based on the current chat question, the last chat question and the corresponding answer, so that the answer of the current chat question is screened out more quickly and accurately, the requirements on the data quality of the searched context of the question-answer system and the cost for manufacturing the context data of the question-answer system are lowered when the current chat question is searched, and cost is further saved.

Description

Dialog retrieval method and device based on context of question-answering system
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for dialogue retrieval based on a context of a question-answering system.
Background
In the prior art, in the search of the question-answering system, the current common way in the industry is to expand the question-answer pairs in the question-answer database or the search engine as much as possible, and search the corresponding answers in the database or the search engine according to the questions asked by the user. This approach requires a large amount of data in the database or search engine in order to more likely match to the user's question. If context-dependent questions and answers are involved, the question-answer pairs need to be increased geometrically to identify the context, so the quality and cost of the data generation involved are more demanding. The existing solution is to make a large number of context-related question-answer pairs, but the problem of context-related question is difficult to complete and the making cost is very high.
Therefore, how to reduce the quality requirements for data and the cost of producing data for contextually relevant queries in databases or search engines is a direction that those skilled in the art need to continue to research.
Disclosure of Invention
An object of the present application is to provide a method and an apparatus for dialogue retrieval based on the context of a question-and-answer system, so as to solve the problem in the prior art of how to quickly and accurately obtain answers corresponding to problems in the chat process, and at the same time, reduce the quality requirement and cost of a database.
According to an aspect of the present application, there is provided a dialogue retrieval method based on a context of a question-answering system, including:
obtaining a current chat problem;
obtaining the question of the last chat conversation related to the current chat question and the answer corresponding to the question of the last chat conversation from the context of a question-answering system;
determining a retrieval object according to the current chat question, the last chat conversation question and the corresponding answer;
performing relevant answer retrieval in the question answering system context based on the retrieval object to obtain at least one candidate answer and a candidate value thereof;
and screening and determining an answer of the current chat question from the at least one candidate answer based on the candidate value.
Further, in the above method for retrieving a dialog based on a context of a question and answer system, determining a retrieval object according to the current chat question, the last chat question and the answer corresponding to the last chat question includes:
obtaining answers corresponding to the problems of the last chat conversation;
judging whether the word number of the answer corresponding to the question of the last chat conversation is larger than a preset answer word number threshold value;
and if not, determining a retrieval object according to the current chat question, the last chat conversation question and the answer corresponding to the last chat conversation question.
Further, in the above dialog retrieval method based on the context of the question-answering system, if a highest candidate value among candidate values of the at least one candidate answer is less than or equal to a preset candidate value threshold, the retrieval object is updated according to the answers corresponding to the current chat question and the last chat question to obtain an updated retrieval object;
wherein, the relevant answer retrieval is carried out in the question answering system context based on the retrieval object, and at least one candidate answer and a candidate value thereof are obtained, and the method comprises the following steps:
performing relevant answer retrieval in the question-answering system context based on the updated retrieval object to obtain at least one updated candidate answer and a candidate value thereof;
wherein screening and determining an answer to the current chat question from the at least one candidate answer based on the candidate value comprises:
and screening and determining an answer of the current chat question from the updated at least one candidate answer based on the updated candidate value.
Further, the above dialog retrieval method based on the context of the question-answering system further includes:
and after judging whether the word number of the answer corresponding to the question of the last chat conversation is larger than a preset answer word number threshold value, if so, determining the retrieval object according to the current chat question and the question of the last chat conversation.
Further, in the above dialog retrieval method based on the context of the question-and-answer system, the candidate weights of the answers corresponding to the question of the last chat dialog and the question of the last chat dialog in the retrieval object are respectively smaller than the candidate weight of the current chat question.
Further, in the above dialog retrieval method based on the context of the question-answering system, the screening and determining the answer to the current chat question from the at least one candidate answer based on the candidate value includes:
if the highest candidate value in the candidate values of the at least one candidate answer is greater than a preset candidate value threshold, determining the candidate answer corresponding to the highest candidate value in the at least one candidate answer as the answer of the current chat question.
Further, in the above method for retrieving a dialog based on a context of a question-and-answer system, before the step of obtaining the question of the last chat dialog related to the current chat question and the answer corresponding to the question of the last chat dialog from the context of the question-and-answer system, the method further includes:
determining whether a last chat conversation related to the current chat question exists in the question-answering system context,
and if not, determining the current chat problem as a retrieval object.
According to another aspect of the present application, there is also provided a computer readable medium having computer readable instructions stored thereon, which, when executed by a processor, cause the processor to implement the method of any one of the above.
According to another aspect of the present application, there is also provided a dialog retrieval device based on a context of a question-answering system, the device including:
one or more processors;
a computer-readable medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement a method as in any one of the above.
Compared with the prior art, the method and the device have the advantages that the current chat problem is obtained; obtaining the question of the last chat conversation related to the current chat question and the answer corresponding to the question of the last chat conversation from the context of a question-answering system; determining a retrieval object according to the current chat question, the last chat conversation question and the corresponding answer; performing relevant answer retrieval in the question answering system context based on the retrieval object to obtain at least one candidate answer and a candidate value thereof; and screening and determining an answer of the current chat question from the at least one candidate answer based on the candidate value. The method and the device have the advantages that a large number of context-associated question-answer pairs do not need to be made, and the making cost of the context-associated question-answer pairs is saved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 illustrates a flow diagram of a method for question-answering system context based dialog retrieval in accordance with an aspect of the subject application;
FIG. 2 illustrates a flow diagram of a question-answering system context based dialog retrieval method in an application scenario, according to one aspect of the subject application.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present application is described in further detail below with reference to the attached figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (e.g., Central Processing Units (CPUs)), input/output interfaces, network interfaces, and memory.
The Memory may include volatile Memory in a computer readable medium, Random Access Memory (RAM), and/or nonvolatile Memory such as Read Only Memory (ROM) or flash Memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, Phase-Change RAM (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash Memory or other Memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, magnetic cassette tape, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transmyedia), such as modulated data signals and carrier waves.
Fig. 1 is a flowchart illustrating a dialog retrieval method based on a context of a question-answering system according to an aspect of the present application, and the method includes step S11, step S12, step S13, step S14, and step S15, where the method specifically includes:
step S11, obtaining the current chat question;
step S12, obtaining the question of the last chat conversation related to the current chat question and the answer corresponding to the question of the last chat conversation from the context of the question-answering system; here, the question and answer of the last chat conversation are used to indicate the question associated with the current chat question and the corresponding answer, so that the answer corresponding to the current chat question can be retrieved more quickly and accurately based on one or more associated questions and answers of the last chat conversation.
Step S13, according to the current chat question, the last chat question and the corresponding answer, determining the retrieval object; here, the detection target determined in step S13 differs depending on the question of the last chat conversation related to the current chat question and the answer corresponding thereto.
Step S14, based on the search object, performing relevant answer search in the question answering system context to obtain at least one candidate answer and a candidate value thereof; here, the candidate value is used to indicate a possibility that the candidate answer can be an answer to the current chat question, and the possibility may be expressed in the form of score, specific gravity, similarity, or the like, for example.
And step S15, screening and determining the answer of the current chat question from the at least one candidate answer based on the candidate value, so as to realize the screening of the most preferable answer corresponding to the current chat question from the at least one candidate answer.
The above steps S11 to S15 make the present application not need to make a large number of context-related question-answer pairs, and save the making cost of the context-related question-answer pairs, and the present application only needs to perform the relevant answer retrieval in the context of the existing question-answer system through the retrieval object determined based on the current chat question, the last chat question and the corresponding answer, thereby more quickly and accurately screening the answer to the current chat question, reducing the requirement on the data quality of the searched question-answer system context and the cost requirement for making the question-answer system context data when searching the current chat question, and further saving the cost.
For example, the current chat question Q1 is acquired in step S11; in step S12, based on the current chat question Q1, the question Q2 of the last chat conversation related to the current chat question Q1 and the answer a2 corresponding to the question of the last chat conversation are obtained from the question-answering system context, so as to retrieve the answer corresponding to the current chat question more quickly and preferably later. Determining a retrieval object B according to the current chat question Q1, the question Q2 of the last chat conversation and the corresponding answer A2 in the step S13; the detection object B is different along with the difference of the question Q2 and the corresponding answer A2 of the last chat conversation. In step S14, based on the search object B performing relevant answer search in the context of question-answering system, at least one candidate answer X1, X2, X3, X4,.... Xn and a candidate value corresponding to each candidate answer are obtained, in a preferred embodiment of the present application, each candidate answer X1, X2, X3, X4,..... Xn is embodied in a scoring manner as a possibility of an answer corresponding to the current chat question, and a score corresponding to each candidate answer X1, X2, X3, X4,..... Xn is obtained, in order: score1, score2, score3, score4,.... scoren, i.e. the candidate values score1, score2, score3, score4,...... scoren are used to indicate the likelihood that the candidate answers X1, X2, X3, X4,... Xn may be the answer to the current chat question. If score1 ═ 70, score2 ═ 80, score3 ═ 93, score4 ═ 88,.. scoren ═ 92, i.e. candidate answers X1, X2, X3, X4,.... Xn correspond to said candidate values of 70, 80, 93, 88,..... times.92. In step S15, based on the candidate value: 70. 80, 93, 88, 9,.... 92, the optimal answer is more quickly and accurately screened and determined from the at least one candidate answer X1, X2, X3, X4,.... Xn as the answer a1 to the current chat question, so that the question-answering system can find the optimal answer corresponding to the current chat question in a limited database as much as possible, and simultaneously, the requirements of the question-answering system on the quality and the quantity of the question-answering in the database are reduced, thereby reducing the cost.
Following the above embodiment of the present application, in step S13, determining a search object according to the current chat question, the last chat question, and the answer corresponding to the last chat question includes:
obtaining answers corresponding to the problems of the last chat conversation; here, the answer corresponding to the question of the last chat conversation is obtained based on the question of the last chat conversation.
Judging whether the word number of the answer corresponding to the question of the last chat conversation is larger than a preset answer word number threshold value;
and if not, determining a retrieval object according to the current chat question, the last chat conversation question and the answer corresponding to the last chat conversation question. Here, the answers corresponding to the current chat question, the last chat question and the last chat question are respectively used as query clauses to determine a retrieval object, so as to perform retrieval in the question-answering system in the following.
For example, assume that the preset answer word count threshold V is 30. And obtaining an answer A2 corresponding to the question of the last chat conversation based on the question Q2 of the last chat conversation. If the number of words W of answer a2 for the last chat session question is 25. Judging whether the word number W of the answer a2 corresponding to the question of the last chat conversation is greater than a preset answer word number threshold V, at this time, the word number W of the answer a2 corresponding to the question of the last chat conversation is 25 smaller than the preset answer word number threshold V30, so that the answer a2 corresponding to the current chat question Q1, the question Q2 of the last chat conversation and the question Q2 of the last chat conversation are respectively used as query clauses, determining a search object, and performing related answer search in the question-answer system context according to the determined search object in step S14 to obtain at least one candidate answer and a candidate value thereof; and in step S15, the answer to the current chat question is screened from the at least one candidate answer based on the candidate value and determined, so that when the word count of the answer a2 corresponding to the question Q2 of the last chat conversation is less than or equal to the preset answer word count threshold V, the answer to the current chat question is retrieved and determined through the current chat question Q1, the question Q2 of the last chat conversation and the answer a2 corresponding to the question Q2 of the last chat conversation.
Further, if the highest candidate value of the candidate values of the at least one candidate answer retrieved by the retrieval object determined according to the answers corresponding to the current chat question Q1, the question Q2 of the last chat conversation and the question a2 of the last chat conversation is less than or equal to a preset candidate value threshold, updating the retrieval object B according to the current chat question Q1 and the answer a2 corresponding to the question Q2 of the last chat conversation to obtain an updated retrieval object B';
wherein, the relevant answer retrieval is carried out in the question answering system context based on the retrieval object, and at least one candidate answer and a candidate value thereof are obtained, and the method comprises the following steps:
performing relevant answer retrieval in the question answering system context based on the updated retrieval object B' to obtain at least one updated candidate answer and a candidate value thereof;
wherein screening and determining an answer to the current chat question from the at least one candidate answer based on the candidate value comprises:
and screening and determining an answer of the current chat question from the updated at least one candidate answer based on the updated candidate value. In order to more accurately screen and determine the optimal answer as the answer of the current chat question, the method enables the question answering system to find the optimal answer corresponding to the current chat question in the limited database as much as possible, and simultaneously reduces the requirements of the question answering system on the quality and the quantity of the question answers in the database, thereby reducing the cost.
For example, when the word number of the answer a2 corresponding to the question of the last chat conversation is smaller than the preset answer word number threshold, determining a retrieval object B according to the current chat question Q1, the question Q2 of the last chat conversation and the corresponding answer a 2; next, a relevant answer search is performed in the question answering system context based on the search object B, and at least one candidate answer X1, X2, X3, X4, the. When the highest candidate value 93 of the at least one candidate answer X1, X2, X3, X4, a...... Xn is smaller than a preset candidate value threshold S ═ 95, the search object B is updated according to the current chat question Q1 and the answer a2 corresponding to the question of the last chat conversation, so as to obtain an updated search object B'. Then, based on the updated retrieval object B', relevant answer retrieval is performed in the context of the question-answering system, so as to obtain at least one candidate answer K1, K2, K3, K4, and a score corresponding to each candidate answer K1, K2, K3, K4, a. score1, score2, score3, score4,.... scorem, i.e. the candidate values score1, score2, score3, score4,...... scoren are used to indicate the likelihood that the candidate answers K1, K2, K3, K4,.... Km may be the answer to the current chat question. If K1 is 80, K2 is 90, K3 is 96, K4 is 88, and the candidate answers K1, K2, K3, K4, and the candidate value corresponding to K80, 90, 96, 88. Finally, the answer a1 of the current chat question is screened and determined more quickly and accurately from the updated at least one candidate answer K1, K2, K3, K4,..... k.m based on the updated candidate value 80, 90, 96, 88,.... 78, so that the question-answering system finds the optimal answer corresponding to the current chat question as much as possible in a limited database, and simultaneously, the requirements of the question-answering system on the quality and the quantity of the question-answers in the database are reduced, thereby reducing the cost.
Next, in the foregoing embodiment of the present application, an aspect of the present application provides a dialog retrieval method based on a context of a question-answering system, further including:
and after judging whether the word number of the answer corresponding to the question of the last chat conversation is larger than a preset answer word number threshold value, if so, determining the retrieval object according to the current chat question and the question of the last chat conversation. Here, the current chat question and the last chat conversation question are respectively used as query clauses to determine a retrieval object so as to be retrieved in the question-answering system in the following.
For example, when the preset answer word count threshold V is 30, the answer a2 corresponding to the question of the last chat conversation is obtained based on the question Q2 of the last chat conversation, and the word count W of the answer a2 corresponding to the question of the last chat conversation is counted to be 35. Judging whether the word number W of the answer a2 corresponding to the question of the last chat conversation is greater than a preset answer word number threshold V, at this time, if the word number W of the answer a2 corresponding to the question of the last chat conversation is 35 greater than a preset answer word number threshold V equal to 30, then respectively using the current chat question Q1 and the question Q2 of the last chat conversation as query clauses, determining a retrieval object, so as to subsequently perform relevant answer retrieval in the question-answer system context according to the determined retrieval object in step S14, thereby obtaining at least one candidate answer and a candidate value thereof; and the answer to the current chat question is screened from the at least one candidate answer and determined based on the candidate value in step S15, so that when the word count of the answer a2 corresponding to the question Q2 of the last chat conversation is greater than the preset answer word count threshold V, the answer to the current chat question is retrieved and determined through the current chat question Q1 and the question Q2 of the last chat conversation.
Next, in all the above embodiments of the present application, the candidate weights of the answers corresponding to the question of the last chat conversation and the question of the last chat conversation in the retrieval object are respectively smaller than the candidate weight of the current chat question. When the answers to the questions are searched in the question answering system, the questions of the last chat conversation and the answers corresponding to the questions of the last chat conversation use smaller boost values, and the questions of the current chat conversation use larger boost values, so that the candidate weights of the answers corresponding to the questions of the last chat conversation and the questions of the last chat conversation are respectively smaller than the candidate weight of the questions of the current chat conversation. For example, when the answer to a question is retrieved in the question answering system, the boost value of the answer corresponding to the question of the last chat conversation and the question of the last chat conversation is set to 40, and the boost value of the question of the current chat conversation is set to 60, which is beneficial to more accurately screening and determining the answer corresponding to the question of the previous chat conversation.
For example, when the retrieval object B is determined according to the current chat question Q1, the question Q2 of the last chat conversation and the corresponding answer a2 thereof, the boost value of the question Q2 of the last chat conversation and the answer a2 corresponding to the question of the last chat conversation is set to 40, and the retrieval is performed after the boost value of the current chat question Q1 is set to 60, so that different weights are set for the current chat question Q1, the question Q2 of the last chat conversation and the corresponding answer a2 thereof to obtain the retrieval object, so that the associated answer a1 corresponding to Q1 can be quickly and accurately retrieved.
For another example, when the retrieval object B is determined according to the current chat question Q1 and the question Q2 of the last chat conversation, the boost value of the question Q2 of the last chat conversation is set to 30, and the boost value of the question Q1 of the current chat conversation is set to 70, and then the retrieval is performed, so that different weights are set for the question Q1 of the current chat conversation and the question Q2 of the last chat conversation to obtain the retrieval object, and the associated answer a1 corresponding to the question Q1 can be quickly and accurately retrieved.
For another example, when the retrieval object B is determined based on the current chat question Q1 and the answer a2 corresponding to the question of the previous chat conversation, the retrieval object B is retrieved after the boost value of the answer a2 corresponding to the question of the previous chat conversation is set to 30 and the boost value of the current chat question Q1 is set to 70. So as to realize that different weights are set for the answer A2 corresponding to the current chat question Q1 and the question of the last chat conversation to obtain a retrieval object, so that the associated answer A1 corresponding to Q1 can be quickly and accurately retrieved.
Next, in all the above embodiments of the present application, the screening and determining the answer to the current chat question based on the candidate value includes:
if the highest candidate value of the candidate values of the at least one candidate answer is greater than a preset candidate value threshold, determining the candidate answer corresponding to the highest candidate value of the at least one candidate answer as the answer of the current chat question. In this way, the answer corresponding to the previous chat question can be screened and determined more quickly and accurately.
For example, if the preset candidate value threshold S is 95, in step S14, according to at least one candidate answer X1, X2, X3, X4, and.... Xn (or K1, K2, K3, K4, and.... Km retrieved by the retrieval object B' after updating) retrieved in the context of the question-answering system, where the highest candidate value 97 of the candidate values 70, 80, 97, 88, and X4, and.... Xn is greater than the preset candidate value threshold S, the candidate X3 corresponding to the highest candidate value 97 of the at least one candidate answer X1, X2, X3, X4, and.... Xn is determined as the answer a1 of the current chat question, which enables the question-answering system to answer a1 more accurately. Wherein a highest candidate value 96 of the candidate values 80, 90, 96, 88, 96, 78 of K1, K2, K3, K4,...... K78 is greater than a preset candidate value threshold S, and a candidate answer K3 corresponding to the highest candidate value 96 of the at least one candidate answer K1, K2, K3, K4,...... K m is determined as an answer a1 of the current chat question, so that the question-answering system can search the answer a1 of the previous chat question more quickly and accurately.
Following all the above embodiments of the present application, before the step S12 of obtaining the question of the last chat conversation related to the current chat question and the answer corresponding to the question of the last chat conversation from the context of the question-answering system, the method further includes:
determining whether a last chat conversation related to the current chat question exists in the question-answering system context,
and if not, determining the current chat problem as a retrieval object. If so, the step S12 is executed. Here, when there is no question of the last chat conversation related to the current chat question and no answer corresponding to the question of the last chat conversation in the whole chat conversation, the question-answering system directly searches the current chat question as a search object, thereby obtaining the answer corresponding to the current chat question.
For example, the current chat question Q1 is searched as a search object B to obtain at least one candidate answer X1, X2, X3, X4,.. Xp and its corresponding candidate value score1, score2, score3, score4,.. once, where p is the number of candidate answers searched based on the search object determined by the current chat question Q1 in the whole chat conversation. If the highest candidate among the candidates score1, score2, score3, score4,. score4 is score4, determining whether the highest candidate is score4 is greater than a preset candidate threshold S; if yes, the candidate answer X4 corresponding to the highest candidate value score4 is determined as the answer a1 of the current chat question, so that the question-answering system can retrieve the answer a1 of the current chat question more quickly and accurately; if not, answer A1 to the current chat question is not retrieved.
In a practical application scenario of the present application, fig. 2 shows a flowchart of a dialog retrieval method based on question-answering system context according to an aspect of the present application, where the method includes step S101, step S102, step S103, step S104, step S105, step S106, step S107, step S108, step S109, step S110, step S111, step S112, step S113, step S114, and step S115, and specifically includes:
in an actual application scenario, when a query of a current chat question needs to be performed in a question-answering system context, the current chat question is obtained first, and in step S101, an associated last chat conversation is searched in the question-answering system context based on the current chat question. I.e., the last chat conversation that the question and answer system context related to the current chat question.
Step S102, judging whether a last chat conversation related to the current chat question exists in the question-answering system context, if not, executing step S103; if yes, go to step S104.
In step S103, when there is no previous chat conversation related to the current chat question in the context of the question-answering system, the current chat question (i.e., the question in the current chat conversation) is used to search for a question in the search engine of the context of the question-answering system.
Step S104, when the last chat conversation related to the current chat question exists in the context of the question-answering system, the question and answer of the last chat conversation are obtained. The questions and answers of the last chat conversation are used to indicate the questions and their corresponding answers associated with the current chat question, so that the answers corresponding to the current chat question can be retrieved more quickly and accurately based on one or more of the associated questions and their answers of the last chat conversation.
Step S105, judging whether the word number of the answer corresponding to the question of the last chat conversation is larger than a preset answer word number threshold value; if yes, go to step S106; if not, step S109 is executed.
When the number of words of the answer corresponding to the question of the last chat conversation is greater than the preset answer word number threshold, step S106 is performed to use the current chat question and the question of the last chat conversation as query clauses and perform retrieval. Namely, the retrieval object is determined according to the current chat question and the question of the last chat conversation, so that the retrieval can be carried out in the question-answering system in the following.
Step S107, performing relevant answer retrieval in the context of the question-answering system based on the retrieval object determined in step S106, to obtain at least one candidate answer and a candidate value corresponding to each candidate answer (in the application scenario of the present application, a score is used to represent the candidate value of each candidate answer), so as to determine the candidate answer with the highest candidate value in the at least one candidate answer.
Step S108, judging whether the highest candidate value exceeds a preset candidate value threshold value; if yes, taking the candidate answer corresponding to the highest candidate value as the answer corresponding to the current chat question; if not, the answer corresponding to the current chat question is not retrieved.
Step S109, when the number of words of the answer corresponding to the question of the last chat conversation is less than or equal to the preset answer word number threshold, the current chat question, the question of the last chat conversation and the corresponding answer are used as query clauses to search. Namely, a retrieval object is determined according to the current chat question, the question of the last chat conversation and the corresponding answer, so that the retrieval can be carried out in the question-answering system in the following.
Step S110, performing relevant answer retrieval in the context of the question-answering system based on the retrieval object determined in step S109 to obtain at least one candidate answer and a candidate value corresponding to each candidate answer, so as to determine a candidate answer with the highest candidate value in the at least one candidate answer.
Step S111, judging whether the highest candidate value exceeds a preset candidate value threshold value; if yes, go to step S112; if yes, go to step S113.
Step S112, the candidate answer corresponding to the highest candidate value is used as the answer corresponding to the current chat question.
In step S113, the answer corresponding to the current chat question and the question of the last chat conversation is retrieved as a query clause. Namely, according to the answer corresponding to the current chat question and the last chat conversation question, the updated retrieval object is determined so as to be convenient for subsequent retrieval in the question-answering system.
Step S114, performing relevant answer retrieval in the context of the question-answering system based on the updated retrieval object determined in step S113, to obtain at least one updated candidate answer and a candidate value corresponding to each candidate answer, so as to determine a candidate answer with the highest candidate value in the at least one updated candidate answer.
Step S115, judging whether the updated highest candidate value score exceeds a preset candidate value threshold value; if yes, the candidate answer corresponding to the updated highest candidate value is used as the answer corresponding to the current chat question; if not, the answer corresponding to the current chat question is not retrieved. Therefore, through the steps S101 to S115, it is realized that only the retrieval object determined based on the current chat question, the last chat conversation question and the corresponding answer is needed to perform the relevant answer retrieval in the context of the existing question-answering system, so that the answer of the current chat question is screened out more quickly and accurately, the requirements on the data quality of the searched context of the question-answering system and the cost requirements for making the context data of the question-answering system when the current chat question is searched are reduced, and the cost is further saved.
In summary, the dialog retrieval method based on the context of the question-answering system includes: obtaining a current chat problem; obtaining the question of the last chat conversation related to the current chat question and the answer corresponding to the question of the last chat conversation from the context of a question-answering system; determining a retrieval object according to the current chat question, the last chat conversation question and the corresponding answer; performing relevant answer retrieval in the question answering system context based on the retrieval object to obtain at least one candidate answer and a candidate value thereof; and screening and determining an answer of the current chat question from the at least one candidate answer based on the candidate value. The method and the device have the advantages that a large number of context-associated question-answer pairs do not need to be made, and the making cost of the context-associated question-answer pairs is saved.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or a solution according to the aforementioned embodiments of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (9)

1. A dialog retrieval method based on the context of a question-answering system, the method comprising:
obtaining a current chat problem;
obtaining the question of the last chat conversation related to the current chat question and the answer corresponding to the question of the last chat conversation from the context of a question-answering system;
determining a retrieval object according to the current chat question, the last chat conversation question and the corresponding answer;
performing relevant answer retrieval in the question answering system context based on the retrieval object to obtain at least one candidate answer and a candidate value thereof;
and screening and determining an answer of the current chat question from the at least one candidate answer based on the candidate value.
2. The method of claim 1, wherein determining the search object according to the current chat question, the last chat question and the answer corresponding to the last chat question comprises:
obtaining answers corresponding to the problems of the last chat conversation;
judging whether the word number of the answer corresponding to the question of the last chat conversation is larger than a preset answer word number threshold value;
and if not, determining a retrieval object according to the current chat question, the last chat conversation question and the answer corresponding to the last chat conversation question.
3. The method according to claim 2, wherein if a highest candidate value among the candidate values of the at least one candidate answer is less than or equal to a preset candidate value threshold, the search object is updated according to answers corresponding to the current chat question and the last chat conversation question to obtain an updated search object;
wherein, the relevant answer retrieval is carried out in the question answering system context based on the retrieval object, and at least one candidate answer and a candidate value thereof are obtained, and the method comprises the following steps:
performing relevant answer retrieval in the question-answering system context based on the updated retrieval object to obtain at least one updated candidate answer and a candidate value thereof;
wherein screening and determining an answer to the current chat question from the at least one candidate answer based on the candidate value comprises:
and screening and determining an answer of the current chat question from the updated at least one candidate answer based on the updated candidate value.
4. The method of claim 2, further comprising:
and after judging whether the word number of the answer corresponding to the question of the last chat conversation is larger than a preset answer word number threshold value, if so, determining the retrieval object according to the current chat question and the question of the last chat conversation.
5. The method according to any one of claims 1 to 4, wherein the candidate weights of the answers corresponding to the question of the last chat conversation and the question of the last chat conversation in the retrieval object are respectively smaller than the candidate weight of the current chat question.
6. The method of any one of claims 1 to 4, wherein said filtering and determining an answer to the current chat question from the at least one candidate answer based on the candidate value comprises:
if the highest candidate value in the candidate values of the at least one candidate answer is greater than a preset candidate value threshold, determining the candidate answer corresponding to the highest candidate value in the at least one candidate answer as the answer of the current chat question.
7. The method of claim 1, wherein prior to obtaining answers from a question-answering system context corresponding to a question of a last chat conversation related to the current chat question and a question of the last chat conversation, further comprising:
determining whether a last chat conversation related to the current chat question exists in the question-answering system context,
and if not, determining the current chat problem as a retrieval object.
8. A computer readable medium having computer readable instructions stored thereon, which, when executed by a processor, cause the processor to implement the method of any one of claims 1 to 7.
9. A dialog retrieval device based on the context of a question-answering system, the device comprising:
one or more processors;
a computer-readable medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
CN201911112818.1A 2019-11-14 2019-11-14 Dialog retrieval method and device based on context of question-answering system Pending CN110909141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911112818.1A CN110909141A (en) 2019-11-14 2019-11-14 Dialog retrieval method and device based on context of question-answering system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911112818.1A CN110909141A (en) 2019-11-14 2019-11-14 Dialog retrieval method and device based on context of question-answering system

Publications (1)

Publication Number Publication Date
CN110909141A true CN110909141A (en) 2020-03-24

Family

ID=69817552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911112818.1A Pending CN110909141A (en) 2019-11-14 2019-11-14 Dialog retrieval method and device based on context of question-answering system

Country Status (1)

Country Link
CN (1) CN110909141A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160132589A1 (en) * 2014-11-07 2016-05-12 International Business Machines Corporation Context based passage retreival and scoring in a question answering system
CN108399169A (en) * 2017-02-06 2018-08-14 阿里巴巴集团控股有限公司 Dialog process methods, devices and systems based on question answering system and mobile device
CN110309283A (en) * 2019-06-28 2019-10-08 阿里巴巴集团控股有限公司 A kind of answer of intelligent answer determines method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160132589A1 (en) * 2014-11-07 2016-05-12 International Business Machines Corporation Context based passage retreival and scoring in a question answering system
CN108399169A (en) * 2017-02-06 2018-08-14 阿里巴巴集团控股有限公司 Dialog process methods, devices and systems based on question answering system and mobile device
CN110309283A (en) * 2019-06-28 2019-10-08 阿里巴巴集团控股有限公司 A kind of answer of intelligent answer determines method and device

Similar Documents

Publication Publication Date Title
US6546394B1 (en) Database system having logical row identifiers
CN110019218B (en) Data storage and query method and equipment
US10366093B2 (en) Query result bottom retrieval method and apparatus
CN107491487B (en) Full-text database architecture and bitmap index creation and data query method, server and medium
US20040148293A1 (en) Method, system, and program for managing database operations with respect to a database table
CN107690637B (en) Connecting semantically related data using large-table corpus
US7680821B2 (en) Method and system for index sampled tablescan
CN112035730B (en) Semantic retrieval method and device and electronic equipment
US20100114878A1 (en) Selective term weighting for web search based on automatic semantic parsing
KR20100106464A (en) Method and system for discovery and modification of data clusters and synonyms
US20100312778A1 (en) Predictive person name variants for web search
US20150206101A1 (en) System for determining infringement of copyright based on the text reference point and method thereof
US11829388B2 (en) System and method for identifying questions of users of a data management system
EP3940547A1 (en) Workload aware data partitioning
US7925617B2 (en) Efficiency in processing queries directed to static data sets
CN108897819B (en) Data searching method and device
CN113918605A (en) Data query method, device, equipment and computer storage medium
US20170109402A1 (en) Automated join detection
CN110909141A (en) Dialog retrieval method and device based on context of question-answering system
CN115688779A (en) Address recognition method based on self-supervision deep learning
CN112464101A (en) Electronic book sorting recommendation method, electronic device and storage medium
CN111127065B (en) User job site acquisition method and device
CN112749268A (en) FAQ system sequencing method, device and system based on hybrid strategy
RU2409849C2 (en) Method of searching for information in multi-topic unstructured text arrays
CN112015911A (en) Method for searching massive knowledge maps

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200324

RJ01 Rejection of invention patent application after publication