CN112115241B - Question answering method, device and equipment - Google Patents

Question answering method, device and equipment Download PDF

Info

Publication number
CN112115241B
CN112115241B CN201910543886.7A CN201910543886A CN112115241B CN 112115241 B CN112115241 B CN 112115241B CN 201910543886 A CN201910543886 A CN 201910543886A CN 112115241 B CN112115241 B CN 112115241B
Authority
CN
China
Prior art keywords
question
answer
objects
determining
object set
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.)
Active
Application number
CN201910543886.7A
Other languages
Chinese (zh)
Other versions
CN112115241A (en
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.)
Baidu Online Network Technology Beijing Co Ltd
Shanghai Xiaodu Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Shanghai Xiaodu Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd, Shanghai Xiaodu Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910543886.7A priority Critical patent/CN112115241B/en
Publication of CN112115241A publication Critical patent/CN112115241A/en
Application granted granted Critical
Publication of CN112115241B publication Critical patent/CN112115241B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Abstract

The embodiment of the invention provides a question answering method, a question answering device and equipment, wherein the method comprises the following steps: acquiring a question-answer list corresponding to a question-answer type, wherein the question-answer list comprises a plurality of questions, a plurality of objects and answers of each question corresponding to each object, and the answers are first preset answers or second preset answers; acquiring the problem distinction degree of each problem in the question-answer list, wherein the problem distinction degree is as follows: the answer is the minimum value in the number of objects of the first preset answer and the number of objects of the second preset answer; displaying at least one first question according to the question distinction of the questions in the question-answer list, receiving first answers corresponding to each first question input by a user, determining a target object according to the at least one first question and the first answers corresponding to each first question, and displaying the target object. The flexibility of question-answer interaction is improved.

Description

Question answering method, device and equipment
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a question answering method, a question answering device and question answering equipment.
Background
Currently, many smart devices (e.g., mobile phones, computers, robots, etc.) can interact intelligently with users to provide intelligent services to the users.
In the prior art, the process of providing intelligent services to users by intelligent devices is generally: the user inputs the questions in the intelligent device, and the intelligent device determines corresponding answers according to the questions input by the user and displays the corresponding answers. However, the interaction process is single, and the requirement of the user on intelligent service cannot be met, so that the flexibility of question-answer interaction is poor.
Disclosure of Invention
The embodiment of the invention provides a question and answer method, a question and answer device and equipment, which improve the flexibility of question and answer interaction.
In a first aspect, an embodiment of the present invention provides a question answering method, including:
acquiring a question-answer list corresponding to a question-answer type, wherein the question-answer list comprises a plurality of questions, a plurality of objects and answers of each question corresponding to each object, and the answers are first preset answers or second preset answers;
acquiring the problem distinction degree of each problem in the question-answering list, wherein the problem distinction degree is as follows: the answer is the minimum value in the number of objects of the first preset answer and the number of objects of the second preset answer;
and displaying at least one first question according to the question distinction of the questions in the question-answer list, receiving first answers corresponding to each first question input by a user, determining a target object according to the at least one first question and the first answers corresponding to each first question, and displaying the target object.
In a possible implementation manner, the distinguishing and displaying at least one first question according to the questions in the question-answer list, and receiving a first answer corresponding to each first question input by a user, and determining a target object according to the at least one first question and the first answer corresponding to each first question includes:
performing a problem display operation, the problem display operation comprising: determining the first problem in a problem set according to the problem distinction of each problem in the problem set, displaying the first problem, and deleting the first problem in the problem set; initially, the question set includes all questions in the question-answer list;
executing an answer receiving operation, the answer receiving operation comprising: receiving a first answer corresponding to the first question input by a user;
performing an object determination operation, the object determination operation comprising: updating an object set according to the first question and the first answer; initially, the object set comprises all objects in the question-answer list;
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than a preset number or the number of objects included in the object set is 1, and determining the target object in the object set.
In one possible implementation, the determining the first question in the question set according to the question distinction of each question in the question set includes:
the most distinguished one of the set of questions is determined to be the first question.
In one possible implementation manner, the first answer is a first preset answer or a second preset answer; the updating the object set according to the first question and the first answer includes:
determining at least one first object in the object set, wherein an answer of the first question corresponding to the first object is the first answer;
and deleting the objects except for the at least one first object in the object set to obtain the updated object set.
In one possible implementation manner, the first answer is a third preset answer; the updating the object set according to the first question and the first answer includes:
and determining that the updated object set is the same as the object in the object set before updating.
In one possible implementation manner, the repeatedly executing the question presenting operation, the answer receiving operation, and the object determining operation until the number of repetitions is greater than a preset number or the number of objects included in the object set is 1, determining the target object in the object set includes:
Repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than a preset number, and determining the target object in the object set according to the number of objects included in the object set;
or alternatively, the process may be performed,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of objects included in the object set is 1, and determining one object in the object set as the target object.
In a possible implementation manner, the determining the target object in the object set according to the number of objects included in the object set includes:
if the number of the objects included in the object set is smaller than or equal to the preset number, determining the objects in the object set as the target objects;
and if the number of the objects included in the object set is greater than the preset number, determining the target object in the object set according to the attribute information of the objects in the object set and/or the attribute information of the user.
In one possible implementation manner, the presenting at least one first question according to the question distinction of the questions in the question-answering list includes:
According to the problem distinction of the problems in the question-answering list, playing the at least one first problem in a voice manner; or alternatively, the process may be performed,
and displaying the at least one first question in a text mode according to the question distinction degree of the questions in the question-answering list.
In one possible implementation manner, the types of the objects in the question-answer list are the same, and the types of the objects in the question-answer list are the types of the objects corresponding to the question-answer types.
In a second aspect, an embodiment of the present invention provides a question answering apparatus, including: the device comprises a first acquisition module, a second acquisition module, a determination module and a display module, wherein,
the first obtaining module is used for obtaining a question-answer list corresponding to a question-answer type, wherein the question-answer list comprises a plurality of questions, a plurality of objects and answers of the questions corresponding to the objects, and the answers are first preset answers or second preset answers;
the second obtaining module is configured to obtain a question distinction degree of each question in the question-answering list, where the question distinction degree is: the answer is the minimum value in the number of objects of the first preset answer and the number of objects of the second preset answer;
the determining module is used for displaying at least one first question according to the question distinction of the questions in the question-answer list and receiving a first answer corresponding to each first question input by a user, and determining a target object according to the at least one first question and the first answer corresponding to each first question;
The display module is used for displaying the target object.
In one possible implementation manner, the determining module is specifically configured to:
performing a problem display operation, the problem display operation comprising: determining the first problem in a problem set according to the problem distinction of each problem in the problem set, displaying the first problem, and deleting the first problem in the problem set; initially, the question set includes all questions in the question-answer list;
executing an answer receiving operation, the answer receiving operation comprising: receiving a first answer corresponding to the first question input by a user;
performing an object determination operation, the object determination operation comprising: updating an object set according to the first question and the first answer; initially, the object set comprises all objects in the question-answer list;
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than a preset number or the number of objects included in the object set is 1, and determining the target object in the object set.
In one possible implementation manner, the determining module is specifically configured to:
The most distinguished one of the set of questions is determined to be the first question.
In one possible implementation manner, the first answer is a first preset answer or a second preset answer; the determining module is specifically configured to:
determining at least one first object in the object set, wherein an answer of the first question corresponding to the first object is the first answer;
and deleting the objects except for the at least one first object in the object set to obtain the updated object set.
In one possible implementation manner, the first answer is a third preset answer; the determining module is specifically configured to:
and determining that the updated object set is the same as the object in the object set before updating.
In one possible implementation manner, the determining module is specifically configured to:
repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than a preset number, and determining the target object in the object set according to the number of objects included in the object set;
or alternatively, the process may be performed,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of objects included in the object set is 1, and determining one object in the object set as the target object.
In one possible implementation manner, the determining module is specifically configured to:
if the number of the objects included in the object set is smaller than or equal to the preset number, determining the objects in the object set as the target objects;
and if the number of the objects included in the object set is greater than the preset number, determining the target object in the object set according to the attribute information of the objects in the object set and/or the attribute information of the user.
In one possible implementation manner, the display module is specifically configured to:
according to the problem distinction of the problems in the question-answering list, playing the at least one first problem in a voice manner; or alternatively, the process may be performed,
and displaying the at least one first question in a text mode according to the question distinction degree of the questions in the question-answering list.
In one possible implementation manner, the types of the objects in the question-answer list are the same, and the types of the objects in the question-answer list are the types of the objects corresponding to the question-answer types.
In a third aspect, an embodiment of the present invention provides a question answering apparatus, including: at least one processor and memory;
the memory stores computer-executable instructions;
The at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the question-answering method according to any one of the first aspects.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where computer executable instructions are stored in the computer readable storage medium, and when the processor executes the computer executable instructions, the question answering method according to any one of the first aspects is implemented.
In a fifth aspect, embodiments of the present invention provide a computer program product comprising: a computer program stored in a readable storage medium, from which it can be read by at least one processor of an electronic device, the at least one processor executing the computer program causing the electronic device to perform the method as described above.
According to the question and answer method, the question and answer device and the question and answer equipment provided by the embodiment of the invention, the electronic equipment can display the question corresponding to the question and answer type, the user inputs the answer corresponding to the question in the electronic equipment according to the object set by the user, after multiple questions and answers between the electronic equipment and the user, the electronic equipment can determine to obtain the target object, and the electronic equipment determines to obtain the target object consistent with the object set by the user. The interest of intelligent interaction is increased, and the flexibility of question-answer interaction is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it will be obvious that the drawings in the following description are some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of a question-answering method provided by an embodiment of the present invention;
fig. 2 is a schematic flow chart of a question-answering method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another question-answering method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of questions and answers provided in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a question answering device according to an embodiment of the present invention;
fig. 6 is a schematic hardware structure of a question answering device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic diagram of an application scenario of a question-answering method according to an embodiment of the present invention. Referring to fig. 1, an electronic device 101 and a user 102 are included. At least one question-answer type is set in the electronic device 101, and for example, the question-answer type may be a person question-answer type, an animal question-answer type, a fruit question-answer type, a city question-answer type, or the like. If multiple (greater than or equal to 2) question and answer types are set in the electronic device, the user can select one question and answer type in the electronic device before the user interacts with the electronic device. If a question and answer type is set in the electronic equipment, the user does not need to select the question and answer type in the electronic equipment.
Aiming at any question and answer type, in the process of interaction between a user and the electronic equipment, the electronic equipment can display a question corresponding to the question and answer type, the user inputs an answer corresponding to the question in the electronic equipment according to an object set by the user, after multiple questions and answers between the electronic equipment and the user, the electronic equipment can determine to obtain a target object, and the electronic equipment determines to obtain the target object consistent with the object set by the user. In the man-machine interaction, the electronic equipment carries out questioning and answers according to the object set by the user, so that the electronic equipment can determine that the target object is consistent with the object set by the user, the interestingness of intelligent interaction is improved, and the flexibility of questioning and answering interaction is improved.
The technical scheme shown in the application is described in detail by specific examples. It should be noted that the following embodiments may be combined with each other, and for the same or similar matters, the description will not be repeated in different embodiments.
Fig. 2 is a flow chart of a question answering method according to an embodiment of the present application. Referring to fig. 2, the method may include:
s201, acquiring a question and answer list corresponding to the question and answer type.
The execution body of the embodiment of the application can be electronic equipment or a question answering device arranged in the electronic equipment. Optionally, the electronic device may be a mobile phone, a computer, an intelligent robot, or the like. Alternatively, the question answering device may be implemented by software, or may be implemented by a combination of software and hardware.
Alternatively, the question-answer types may include a person question-answer type, an animal question-answer type, a fruit question-answer type, a city question-answer type, and the like.
When the question-answer type is the person question-answer type, the object type corresponding to the question-answer type is the person, the user sets a target person, the electronic equipment and the user conduct question-answer interaction about the person, the electronic equipment can determine the target person, and the target person set by the electronic equipment is consistent with the target person set by the user.
When the question-answer type is the animal question-answer type, the object type corresponding to the question-answer type is the animal, the user sets the target animal, the electronic equipment and the user conduct question-answer interaction about the animal, the electronic equipment can determine the target animal, and the target animal set by the electronic equipment is consistent with the target animal set by the user.
The question-answer list comprises a plurality of questions, a plurality of objects and answers of each question corresponding to each object, wherein the answers are first preset answers or second preset answers.
Alternatively, the first preset answer may be "YES", or other answers having the same meaning as "YES", such as "YES", "pair", etc.
Alternatively, the second preset answer may be "NO", or other answers having the same meaning as "NO", such as "NO", "error", or the like.
It should be noted that, for convenience of description, the following description will take the first preset answer as yes and the second preset answer as no as an example.
Questions in the question-and-answer list are related to the object type corresponding to the question-and-answer type. For example, when the question-answer type is a person question-answer type, the object type corresponding to the question-answer type is a person, and then the question in the question-answer list is related to the person, for example, the question may be: whether it is a boy, whether it is born in china, whether it is in the world, whether it is a basketball, etc. in profession. For example, when the question type is an animal question type, the object type corresponding to the question type is an animal, and then the question in the question list is related to the animal, for example, the question may be: whether it is a carnivorous animal, whether it is four legs, whether it is living in the North Pole, etc.
The types of the objects in the question-answer list are the object types corresponding to the question-answer types, and the types of the objects in the question-answer list are the same. For example, when the object type corresponding to the question-answer type is a person, then the object in the question-answer list is a person (name of the person). When the object type corresponding to the question-answer type is an animal, then the object in the question-answer list is an animal (the name of the animal).
The answer to each question corresponding to each object in the question-answer list is yes or no. For example, when the problem is: if the subject is a Caoca, the answer to the question (whether it is a male) corresponding to the subject (Caoca) is yes. When the problems are: if the object is zhuge, the answer to the question (whether or not the object is the world) corresponding to the object (zhuge) is no.
Alternatively, the question-answer list may be as shown in table 1:
TABLE 1
Problem 1 Problem 2 Problem 3 ……
Object 1 Answer (yes/no) Answer (yes/no) Answer (yes/no) ……
Object 2 Answer (yes/no) Answer (yes/no) Answer (yes/no) ……
Object 3 Answer (yes/no) Answer (yes/no) Answer (yes/no) ……
…… …… …… …… ……
It should be noted that table 1 illustrates the format of the question-answer list by way of example only, and is not limited to the format of the question-answer list.
For example, when the question type is a person question type, the question list corresponding to the person question type may be as shown in table 2:
TABLE 2
It should be noted that table 2 illustrates, by way of example only, a question-answer list corresponding to a person question-answer type, and is not a limitation of the question-answer list corresponding to a person question-answer type.
Alternatively, before executing the embodiment shown in fig. 2, the structured information of a large number of objects may be acquired first, and a question-answer list may be generated according to the structured information. Optionally, the structured information according to a large number of objects can be converted into corresponding questions and answers, so as to construct a question-answer list. For example, when the object type is a person, then the structured information of the person may include: birth place, whether star, age, sex, wedding, whether the world is in existence, etc. For example, the birth place may be converted into a question: whether it is born in china, or in the united states, etc. Sex was converted to a question: whether it is a boy or a girl.
S202, acquiring the problem distinction degree of each problem in the question-answer list.
Wherein, the problem differentiation is: the answer is the minimum value of the number of objects which are yes and the number of objects which are no.
Optionally, for any one question, in the question-answer list, assuming that the number of objects whose answer is yes corresponding to the question is a1 and the number of objects whose answer is no corresponding to the question is a2, the question distinction of the question is the minimum value in a1 and a 2.
For example, assume that the question discrimination of each question in the question-answer list may be as shown in table 3:
TABLE 3 Table 3
S203, displaying at least one first question according to the question distinction of the questions in the question-answer list, receiving first answers corresponding to each first question input by a user, and determining a target object according to the at least one first question and the first answers corresponding to each first question.
Alternatively, the electronic device may exhibit at least one first problem by: the voice plays the at least one first question or the text displays the at least one first question.
Alternatively, the user may input the first answer by the following possible implementation manners: the first answer is entered in the electronic device in voice or in text.
Alternatively, the first answer input by the user may be any one of the following: and if not, a third preset answer is provided. The third preset answer is "unknown", or an answer having the same meaning as "unknown", for example, "uncertain", "not known", or the like.
For convenience of description, hereinafter, description will be given taking the third preset answer as an example without knowledge.
For example, after the electronic device displays the first question, if the user clearly knows the answer, the user may determine whether the attribute of the object set by the user satisfies the first question, if yes, the user answers yes, and if no, the user answers no. If the user does not know the answer, the user may answer the unaware.
For example, assuming that the object set by the user is a Cao, if the electronic device displays a first problem as follows: whether it is born in china, when the user knows the answer, the first answer entered by the user is yes. If the first problem displayed by the electronic device is: if the user is in the world, when the user knows the answer, the first answer input by the user is no. If the first problem displayed by the electronic device is: whether it is a hollyhock, when the user does not know the answer, the first answer entered by the user is unknown.
Alternatively, the target object may be determined by the following possible implementation:
executing a problem display operation, the problem display operation comprising: determining a first problem in the problem set according to the problem distinction of each problem in the problem set, displaying the first problem, and deleting the first problem in the problem set; initially, the question set includes all questions in the question-answer list;
Executing an answer receiving operation, the answer receiving operation comprising: receiving a first answer corresponding to a first question input by a user;
performing an object determination operation, the object determination operation comprising: updating the object set according to the first question and the first answer; initially, the object set comprises all objects in a question-answer list;
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than the preset number or the number of objects included in the object set is 1, and determining a target object in the object set.
S204, displaying the target object.
Alternatively, the target object may be presented as follows: the name of the target object may be played in voice, or the name of the target object may be displayed in text, or the image of the target object may be displayed in picture.
Alternatively, the number of the target objects may be 1 or more. When the number of the target objects is plural, the target objects may be displayed separately, or the plural target objects may be displayed in sequence according to the heat of the target objects. The popularity of the target object refers to the popularity of the target object in the last period of time, for example, the more the target object is searched in the last period of time, the higher the popularity of the target object.
According to the question and answer method provided by the embodiment of the invention, the electronic equipment can display the question corresponding to the question and answer type, the user inputs the answer corresponding to the question in the electronic equipment according to the object set by the user, after multiple questions and answers between the electronic equipment and the user, the electronic equipment can determine to obtain the target object, and the electronic equipment determines to obtain the target object consistent with the object set by the user. The interest of intelligent interaction is increased, and the flexibility of question-answer interaction is improved.
On the basis of any one of the above embodiments, a detailed description will be given below of the question-answering method with reference to fig. 3.
Fig. 3 is a flow chart of another question-answering method according to an embodiment of the present invention. Referring to fig. 3, the method may include:
s301, acquiring a question and answer list corresponding to the question and answer type.
It should be noted that, the execution process of S301 may refer to the execution process of S201, and will not be described herein.
S302, determining a problem set and an object set according to the question and answer list.
Wherein the question set includes all questions in the question-answer list. The object set includes all objects in the question-answer list.
S303, acquiring the problem distinction degree of each problem in the question-answer list.
It should be noted that, the execution process of S303 may refer to the execution process of S202, which is not described herein.
S304, determining a first problem in the problem set according to the problem distinction of each problem in the problem set, and displaying the first problem.
One of the problem sets that has the largest problem discrimination read may be determined as the first problem.
Alternatively, when the number of questions having the largest degree of distinction among the question sets is plural, any one of the plural questions may be determined as the first question.
S305, deleting the first question from the question set.
After the electronic device presents the first question, the first question is deleted from the question set, so that repeated questions presented by the electronic device can be avoided.
S306, receiving a first answer corresponding to the first question input by the user.
Alternatively, the first answer entered by the user may or may not be yes or may not be known.
Optionally, the user determines an answer to the first question according to the object set by the user, if the user can determine whether the answer is yes or not, the first answer input by the user is yes or not, and if the user does not know the first answer corresponding to the first question, the first answer input by the user is not known.
S307, updating the object set according to the first question and the first answer.
Alternatively, the object set may be updated by the following possible implementations:
one possible implementation:
and when the first answer is whether the user is not, determining at least one first object in the object set, wherein the answer of the first question corresponding to the first object is the first answer, deleting objects except for the at least one first object in the object set, and obtaining an updated object set.
In such a possible implementation, the object in the updated set of objects is at least one first object. That is, the answers to the first questions corresponding to all the objects in the updated object set are the first answers.
Another possible implementation is:
when the first answer is unknown, the updated object set is determined to be the same as the objects in the object set before the update.
In such a possible implementation, the user does not know the true answer to the first question, and the first answer entered by the user is not known, and therefore, it is determined that the updated object set is identical to the objects in the object set before the update.
S308, judging whether the repetition number is larger than the preset number or whether the number of objects included in the object set is 1.
If yes, then S309 is performed.
If not, S304 is performed.
The number of repetitions refers to the number of repetitions of S304-S307, that is, the number of repetitions refers to the number of repetitions of performing the question presenting operation, the answer receiving operation, and the object determining operation.
For example, the preset number of times may be 10 times, 15 times, or the like.
When the number of times of the first answer input by the user is unknown is large, the preset number of times may be increased, for example, assuming that the preset number of times is 10 times, if the number of times of the first answer input by the user is large, the preset number of times may be set to 15 times.
S309, determining a target object in the object set.
Optionally, when the repetition number is greater than the preset number, determining the target object in the object set according to the number of objects included in the object set.
If the number of the objects included in the object set is smaller than or equal to the preset number, determining the objects in the object set as target objects; if the number of the objects included in the object set is greater than the preset number, determining a target object in the object set according to the attribute information of the objects in the object set and/or the attribute information of the user.
For example, the preset number may be 3, 2, or the like.
For example, the attribute information of the object may include the heat of the object, and the like. The attribute information of the user may include the sex, age, taste, etc. of the user.
Optionally, when the number of objects included in the object set is 1, determining one object in the object set as the target object.
In the embodiment shown in fig. 3, the electronic device may display a question corresponding to the question-answer type, the user inputs an answer corresponding to the question in the electronic device according to the object set by the user, after multiple questions and answers between the electronic device and the user, the electronic device may determine to obtain the target object, and the electronic device determines to obtain the target object consistent with the object set by the user. The interest of intelligent interaction is increased, and the flexibility of question-answer interaction is improved.
Next, a question-answering method shown in the embodiment of the present invention will be described in detail by way of a specific example with reference to fig. 4.
Fig. 4 is a schematic diagram of questions and answers provided in an embodiment of the present invention. Referring to fig. 4, the electronic device may display a plurality of question-answer types, and the user may select one question-answer type according to actual needs. For example, assume that the question-answer type selected by the user is a person question-answer type.
The electronic device determines that the question set is all questions in the question-answer list corresponding to the person question-answer type, and the object set is all objects in the question-answer list corresponding to the person question-answer type.
The electronic equipment selects a first problem with highest degree of distinction from the problem set: if not, the first question is played by voice and deleted from the question set. Assuming that the object set by the user is zhuge, the user answers yes. The electronic device updates the set of objects according to the user's answer.
The electronic equipment selects a first problem with highest degree of distinction from the problem set: if it is a virtual character, the first question is played in voice and deleted from the question set. Since the object set by the user is Zhuge light, the user answers no. The electronic device updates the set of objects according to the user's answer.
Repeating the above process for a plurality of times, and if the electronic device determines that the target object is Zhuge Liang, playing the voice: what you want to feel in mind is Zhuge Liang.
Fig. 5 is a schematic structural diagram of a question answering device according to an embodiment of the present invention. Referring to fig. 5, the question answering apparatus 10 may include: a first acquisition module 11, a second acquisition module 12, a determination module 13 and a presentation module 14, wherein,
the first obtaining module 11 is configured to obtain a question-answer list corresponding to a question-answer type, where the question-answer list includes a plurality of questions, a plurality of objects, and an answer of each question corresponding to each object, where the answer is a first preset answer or a second preset answer;
The second obtaining module 12 is configured to obtain a question distinction degree of each question in the question-answer list, where the question distinction degree is: the answer is the minimum value in the number of objects of the first preset answer and the number of objects of the second preset answer;
the determining module 13 is configured to display at least one first question according to a question distinction of the questions in the question-answer list, and receive a first answer corresponding to each first question input by a user, and determine a target object according to the at least one first question and the first answer corresponding to each first question;
the display module 14 is configured to display the target object.
The question answering device provided by the embodiment of the invention can execute the technical scheme shown in the embodiment of the method, and the implementation principle and the beneficial effects are similar, and the details are not repeated here.
In a possible embodiment, the determining module 13 is specifically configured to:
performing a problem display operation, the problem display operation comprising: determining the first problem in a problem set according to the problem distinction of each problem in the problem set, displaying the first problem, and deleting the first problem in the problem set; initially, the question set includes all questions in the question-answer list;
Executing an answer receiving operation, the answer receiving operation comprising: receiving a first answer corresponding to the first question input by a user;
performing an object determination operation, the object determination operation comprising: updating an object set according to the first question and the first answer; initially, the object set comprises all objects in the question-answer list;
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than a preset number or the number of objects included in the object set is 1, and determining the target object in the object set.
In a possible embodiment, the determining module 13 is specifically configured to:
the most distinguished one of the set of questions is determined to be the first question.
In one possible implementation manner, the first answer is a first preset answer or a second preset answer; the determining module 13 is specifically configured to:
determining at least one first object in the object set, wherein an answer of the first question corresponding to the first object is the first answer;
and deleting the objects except for the at least one first object in the object set to obtain the updated object set.
In one possible implementation manner, the first answer is a third preset answer; the determining module 13 is specifically configured to:
and determining that the updated object set is the same as the object in the object set before updating.
In a possible embodiment, the determining module 13 is specifically configured to:
repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than a preset number, and determining the target object in the object set according to the number of objects included in the object set;
or alternatively, the process may be performed,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of objects included in the object set is 1, and determining one object in the object set as the target object.
In a possible embodiment, the determining module 13 is specifically configured to:
if the number of the objects included in the object set is smaller than or equal to the preset number, determining the objects in the object set as the target objects;
and if the number of the objects included in the object set is greater than the preset number, determining the target object in the object set according to the attribute information of the objects in the object set and/or the attribute information of the user.
In one possible embodiment, the display module 14 is specifically configured to:
according to the problem distinction of the problems in the question-answering list, playing the at least one first problem in a voice manner; or alternatively, the process may be performed,
and displaying the at least one first question in a text mode according to the question distinction degree of the questions in the question-answering list.
In one possible implementation manner, the types of the objects in the question-answer list are the same, and the types of the objects in the question-answer list are the types of the objects corresponding to the question-answer types.
The question answering device provided by the embodiment of the invention can execute the technical scheme shown in the embodiment of the method, and the implementation principle and the beneficial effects are similar, and the details are not repeated here.
Fig. 6 is a schematic hardware structure of a question answering apparatus according to an embodiment of the present invention, and as shown in fig. 6, the question answering apparatus 20 includes: at least one processor 21 and a memory 22. Wherein the processor 21 and the memory 22 are connected by a bus 23.
In a specific implementation, at least one processor 21 executes computer-executable instructions stored in the memory 22, so that the at least one processor 21 performs the question-answering method as described above.
The specific implementation process of the processor 21 can be referred to the above method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In the embodiment shown in fig. 6, it should be understood that the processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise high speed RAM memory or may further comprise non-volatile storage NVM, such as at least one disk memory.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
The present application also provides a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement the question-answering method as described above.
The computer readable storage medium described above may be implemented by any type of volatile or non-volatile memory device or 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 memory, flash memory, magnetic disk, or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). The processor and the readable storage medium may reside as discrete components in a device.
The division of the units is merely a logic function division, and there may be another division manner when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
According to an embodiment of the present application, there is also provided a computer program product comprising: a computer program stored in a readable storage medium, from which at least one processor of an electronic device can read, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any one of the embodiments described above.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (18)

1. A question-answering method, comprising:
acquiring a question-answer list corresponding to a question-answer type, wherein the question-answer list comprises a plurality of questions, a plurality of objects and answers of each question corresponding to each object, and the answers are first preset answers or second preset answers;
acquiring the problem distinction degree of each problem in the question-answering list, wherein the problem distinction degree is as follows: the answer is the minimum value in the number of objects of the first preset answer and the number of objects of the second preset answer;
performing a problem display operation, the problem display operation comprising: determining a first problem in a problem set according to the problem distinction degree of each problem in the problem set, displaying the first problem, and deleting the first problem in the problem set; initially, the question set includes all questions in the question-answer list;
executing an answer receiving operation, the answer receiving operation comprising: receiving a first answer corresponding to the first question input by a user;
performing an object determination operation, the object determination operation comprising: updating an object set according to the first question and the first answer; initially, the object set comprises all objects in the question-answer list;
And repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than the preset number or the number of objects included in the object set is 1, and determining a target object in the object set.
2. The method of claim 1, wherein the determining the first question in the set of questions based on the question discrimination of each question in the set of questions comprises:
the most distinguished one of the set of questions is determined to be the first question.
3. The method according to claim 1 or 2, wherein the first answer is a first preset answer or a second preset answer; the updating the object set according to the first question and the first answer includes:
determining at least one first object in the object set, wherein an answer of the first question corresponding to the first object is the first answer;
and deleting the objects except for the at least one first object in the object set to obtain the updated object set.
4. The method according to claim 1 or 2, wherein the first answer is a third preset answer; the updating the object set according to the first question and the first answer includes:
And determining that the updated object set is the same as the object in the object set before updating.
5. The method according to claim 1 or 2, wherein the repeatedly performing the question presenting operation, the answer receiving operation, and the object determining operation until a number of repetitions is greater than a preset number or a number of objects included in the object set is 1, determining the target object in the object set includes:
repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than a preset number, and determining the target object in the object set according to the number of objects included in the object set;
or alternatively, the process may be performed,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of objects included in the object set is 1, and determining one object in the object set as the target object.
6. The method of claim 5, wherein determining the target object in the object set according to the number of objects included in the object set comprises:
If the number of the objects included in the object set is smaller than or equal to the preset number, determining the objects in the object set as the target objects;
and if the number of the objects included in the object set is greater than the preset number, determining the target object in the object set according to the attribute information of the objects in the object set and/or the attribute information of the user.
7. The method according to claim 1 or 2, wherein said presenting at least one first question according to a question distinction of a question in said question-answering list comprises:
according to the problem distinction of the problems in the question-answering list, playing the at least one first problem in a voice manner; or alternatively, the process may be performed,
and displaying the at least one first question in a text mode according to the question distinction degree of the questions in the question-answering list.
8. The method according to claim 1 or 2, wherein the types of the objects in the question-answer list are the same, and the types of the objects in the question-answer list are the types of the objects corresponding to the question-answer types.
9. A question answering apparatus, comprising: the device comprises a first acquisition module, a second acquisition module, a determination module and a display module, wherein,
The first obtaining module is used for obtaining a question-answer list corresponding to a question-answer type, wherein the question-answer list comprises a plurality of questions, a plurality of objects and answers of the questions corresponding to the objects, and the answers are first preset answers or second preset answers;
the second obtaining module is configured to obtain a question distinction degree of each question in the question-answering list, where the question distinction degree is: the answer is the minimum value in the number of objects of the first preset answer and the number of objects of the second preset answer;
the determining module is used for displaying at least one first question according to the question distinction of the questions in the question-answer list and receiving a first answer corresponding to each first question input by a user, and determining a target object according to the at least one first question and the first answer corresponding to each first question;
the display module is used for displaying the target object;
the determining module is specifically configured to:
performing a problem display operation, the problem display operation comprising: determining the first problem in a problem set according to the problem distinction of each problem in the problem set, displaying the first problem, and deleting the first problem in the problem set; initially, the question set includes all questions in the question-answer list;
Executing an answer receiving operation, the answer receiving operation comprising: receiving a first answer corresponding to the first question input by a user;
performing an object determination operation, the object determination operation comprising: updating an object set according to the first question and the first answer; initially, the object set comprises all objects in the question-answer list;
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than a preset number or the number of objects included in the object set is 1, and determining the target object in the object set.
10. The apparatus of claim 9, wherein the determining module is specifically configured to:
the most distinguished one of the set of questions is determined to be the first question.
11. The apparatus of claim 9 or 10, wherein the first answer is a first preset answer or a second preset answer; the determining module is specifically configured to:
determining at least one first object in the object set, wherein an answer of the first question corresponding to the first object is the first answer;
And deleting the objects except for the at least one first object in the object set to obtain the updated object set.
12. The apparatus according to claim 9 or 10, wherein the first answer is a third preset answer; the determining module is specifically configured to:
and determining that the updated object set is the same as the object in the object set before updating.
13. The apparatus according to claim 9 or 10, wherein the determining module is specifically configured to:
repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition number is greater than a preset number, and determining the target object in the object set according to the number of objects included in the object set;
or alternatively, the process may be performed,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of objects included in the object set is 1, and determining one object in the object set as the target object.
14. The apparatus of claim 13, wherein the determining module is specifically configured to:
if the number of the objects included in the object set is smaller than or equal to the preset number, determining the objects in the object set as the target objects;
And if the number of the objects included in the object set is greater than the preset number, determining the target object in the object set according to the attribute information of the objects in the object set and/or the attribute information of the user.
15. The apparatus according to claim 9 or 10, wherein the display module is specifically configured to:
according to the problem distinction of the problems in the question-answering list, playing the at least one first problem in a voice manner; or alternatively, the process may be performed,
and displaying the at least one first question in a text mode according to the question distinction degree of the questions in the question-answering list.
16. The apparatus according to claim 9 or 10, wherein the types of the objects in the question-answer list are the same, and the types of the objects in the question-answer list are the types of the objects corresponding to the question-answer types.
17. A question answering apparatus, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory cause the at least one processor to perform the question-answering method according to any one of claims 1 to 8.
18. A computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, implement the question-answering method according to any one of claims 1 to 8.
CN201910543886.7A 2019-06-21 2019-06-21 Question answering method, device and equipment Active CN112115241B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910543886.7A CN112115241B (en) 2019-06-21 2019-06-21 Question answering method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910543886.7A CN112115241B (en) 2019-06-21 2019-06-21 Question answering method, device and equipment

Publications (2)

Publication Number Publication Date
CN112115241A CN112115241A (en) 2020-12-22
CN112115241B true CN112115241B (en) 2023-09-05

Family

ID=73796508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910543886.7A Active CN112115241B (en) 2019-06-21 2019-06-21 Question answering method, device and equipment

Country Status (1)

Country Link
CN (1) CN112115241B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044487A (en) * 2001-07-31 2003-02-14 Sony Corp Question/answer system and server device corresponding to the same
CN102903008A (en) * 2011-07-29 2013-01-30 国际商业机器公司 Method and system for computer question answering
CN104699730A (en) * 2013-12-05 2015-06-10 国际商业机器公司 Identifying and displaying relationships between candidate answers
CN104850539A (en) * 2015-05-28 2015-08-19 宁波薄言信息技术有限公司 Natural language understanding method and travel question-answering system based on same
CN105912629A (en) * 2016-04-07 2016-08-31 上海智臻智能网络科技股份有限公司 Intelligent question and answer method and device
US9582757B1 (en) * 2014-07-25 2017-02-28 Amazon Technologies, Inc. Scalable curation system
US10073833B1 (en) * 2017-03-09 2018-09-11 International Business Machines Corporation Domain-specific method for distinguishing type-denoting domain terms from entity-denoting domain terms
CN108897867A (en) * 2018-06-29 2018-11-27 北京百度网讯科技有限公司 For the data processing method of knowledge question, device, server and medium
CN109063152A (en) * 2018-08-08 2018-12-21 鲸数科技(北京)有限公司 Intelligent answer method, apparatus and intelligent terminal
CN109614476A (en) * 2018-12-11 2019-04-12 平安科技(深圳)有限公司 Customer service system answering method, device, computer equipment and storage medium
CN109635094A (en) * 2018-12-17 2019-04-16 北京百度网讯科技有限公司 Method and apparatus for generating answer

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007099812A1 (en) * 2006-03-01 2007-09-07 Nec Corporation Question answering device, question answering method, and question answering program
WO2012040356A1 (en) * 2010-09-24 2012-03-29 International Business Machines Corporation Providing question and answers with deferred type evaluation using text with limited structure
US9607035B2 (en) * 2014-05-21 2017-03-28 International Business Machines Corporation Extensible validation framework for question and answer systems

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044487A (en) * 2001-07-31 2003-02-14 Sony Corp Question/answer system and server device corresponding to the same
CN102903008A (en) * 2011-07-29 2013-01-30 国际商业机器公司 Method and system for computer question answering
CN104699730A (en) * 2013-12-05 2015-06-10 国际商业机器公司 Identifying and displaying relationships between candidate answers
US9582757B1 (en) * 2014-07-25 2017-02-28 Amazon Technologies, Inc. Scalable curation system
CN104850539A (en) * 2015-05-28 2015-08-19 宁波薄言信息技术有限公司 Natural language understanding method and travel question-answering system based on same
CN105912629A (en) * 2016-04-07 2016-08-31 上海智臻智能网络科技股份有限公司 Intelligent question and answer method and device
US10073833B1 (en) * 2017-03-09 2018-09-11 International Business Machines Corporation Domain-specific method for distinguishing type-denoting domain terms from entity-denoting domain terms
CN108897867A (en) * 2018-06-29 2018-11-27 北京百度网讯科技有限公司 For the data processing method of knowledge question, device, server and medium
CN109063152A (en) * 2018-08-08 2018-12-21 鲸数科技(北京)有限公司 Intelligent answer method, apparatus and intelligent terminal
CN109614476A (en) * 2018-12-11 2019-04-12 平安科技(深圳)有限公司 Customer service system answering method, device, computer equipment and storage medium
CN109635094A (en) * 2018-12-17 2019-04-16 北京百度网讯科技有限公司 Method and apparatus for generating answer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐娟."一种基于形式概念分析的问答系统答案抽取的研究".《计算机应用》.2007,653-655+682. *

Also Published As

Publication number Publication date
CN112115241A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN109741755B (en) Voice awakening word threshold management device and method for managing voice awakening word threshold
CN107967110A (en) Playback method, playing device, electronic equipment and computer-readable recording medium
CN109033244B (en) Search result ordering method and device
US11868345B2 (en) Information processing system, electronic device, information processing method, and recording medium
EP3951691A1 (en) Method and system for automatically generating data acquisition module
CN109460503B (en) Answer input method, answer input device, storage medium and electronic equipment
CN112988988A (en) Question answering method, device and equipment
CN110489674B (en) Page processing method, device and equipment
CN108845955B (en) Chinese input method test method and device and electronic equipment
CN112420150B (en) Medical image report processing method and device, storage medium and electronic equipment
CN112115241B (en) Question answering method, device and equipment
CN111159379B (en) Automatic question setting method, device and system
CN109710945B (en) Method and device for generating text based on data, computer equipment and storage medium
WO2016018336A1 (en) Create a heterogeneous learner group
CN110750633A (en) Method and device for determining answer of question
CN114372215B (en) Search result display and search request processing method and device
CN111143660A (en) Intelligent recommendation method and device for knowledge platform and computer readable storage medium
WO2022237121A1 (en) Information pushing method and apparatus, device, and storage medium
CN109299378A (en) Methods of exhibiting, device, terminal and the storage medium of search result
CN109376298B (en) Data processing method and device, terminal equipment and computer storage medium
WO2021240673A1 (en) Conversation program, device, and method
CN114218477A (en) Display interface control method and device and electronic equipment
CN113656693A (en) Resource acquisition method and device
CN113297371A (en) Method, device and equipment for generating recommended question library and storage medium
CN108197113B (en) Article information conversion method, device, equipment and computer readable medium

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
TA01 Transfer of patent application right

Effective date of registration: 20210512

Address after: 100085 Baidu Building, 10 Shangdi Tenth Street, Haidian District, Beijing

Applicant after: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) Co.,Ltd.

Applicant after: Shanghai Xiaodu Technology Co.,Ltd.

Address before: 100085 Baidu Building, 10 Shangdi Tenth Street, Haidian District, Beijing

Applicant before: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant