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

Question answering method, device and equipment Download PDF

Info

Publication number
CN112115241A
CN112115241A CN201910543886.7A CN201910543886A CN112115241A CN 112115241 A CN112115241 A CN 112115241A CN 201910543886 A CN201910543886 A CN 201910543886A CN 112115241 A CN112115241 A CN 112115241A
Authority
CN
China
Prior art keywords
question
answer
objects
determining
preset
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.)
Granted
Application number
CN201910543886.7A
Other languages
Chinese (zh)
Other versions
CN112115241B (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
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 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

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

Landscapes

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

Abstract

The embodiment of the invention provides a question answering method, a question answering device and question answering equipment, wherein the method comprises the following steps: obtaining a question-answer list corresponding to the 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; obtaining the question distinguishing degree of each question in the question-answer list, wherein the question distinguishing degree is as follows: the answer is the minimum value of the number of the objects of the first preset answer and the number of the objects of the second preset answer; the method comprises the steps of displaying at least one first question according to question distinction degrees of questions in a question-answer list, receiving a first answer corresponding to each first question input by a user, determining a target object according to the at least one first question and the first answer 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 intelligent devices (e.g., mobile phones, computers, robots, etc.) can intelligently interact 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 as follows: 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 above interaction process is single, and cannot meet the requirement of the user on the intelligent service, resulting in poor flexibility of question-answer interaction.
Disclosure of Invention
The embodiment of the invention provides a question and answer method, a question and answer device and question and answer 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:
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 each question corresponding to each object, and the answers are first preset answers or second preset answers;
obtaining the question distinguishing degree of each question in the question-answer list, wherein the question distinguishing degree is as follows: the answer is the minimum value of the number of the objects of the first preset answer and the number of the objects of the second preset answer;
displaying at least one first question according to the question distinction degree of the questions in the question-answer list, receiving a first answer corresponding to each first question input by a user, determining a target object according to the at least one first question and the first answer corresponding to each first question, and displaying the target object.
In a possible implementation manner, the presenting at least one first question according to the question distinction degree of the questions in the question-answer list, 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:
executing a question showing operation, wherein the question showing operation comprises the following steps: determining the first question in a question set according to the question discrimination of each question in the question set, displaying the first question, and deleting the first question in the question set; initially, the question set includes all questions in the question-answer list;
performing 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 times are greater than the preset times or the number of the objects in the object set is 1, and determining the target object in the object set.
In a possible implementation, the determining the first question in the question set according to the question distinguishing degree of each question in the question set includes:
and determining the problem with the highest degree in the problem set as the first problem.
In a 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 comprises:
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;
deleting the objects except the at least one first object in the object set to obtain the updated object set.
In a possible implementation, the first answer is a third preset answer; the updating the object set according to the first question and the first answer comprises:
determining that the updated set of objects is the same as the objects in the set of objects before updating.
In a possible implementation manner, the repeatedly performing the question presenting operation, the answer receiving operation, and the object determining operation until the number of times of repetition is greater than a preset number of times 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 repeated times are more than the preset times, and determining the target object in the object set according to the number of the objects in the object set;
alternatively, the first and second electrodes may be,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of the objects 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 in the object set is less 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 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 a possible implementation manner, the presenting at least one first question according to the question distinction degree of the questions in the question-and-answer list includes:
according to the question distinction degree of the questions in the question-answer list, the at least one first question is played in a voice mode; alternatively, the first and second electrodes may be,
and displaying the at least one first question in a text according to the question distinction degree of the questions in the question-answer list.
In a possible implementation manner, the types of the objects in the question and answer list are the same, and the types of the objects in the question and answer list are the object types corresponding to the question and answer types.
In a second aspect, an embodiment of the present invention provides a question answering device, including: a first obtaining module, a second obtaining module, a determining module and a displaying module, wherein,
the first obtaining module is used for obtaining a question and answer list corresponding to the question and answer type, wherein the question and 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 discrimination of each question in the question-and-answer list, where the question discrimination is: the answer is the minimum value of the number of the objects of the first preset answer and the number of the objects of the second preset answer;
the determining module is used for displaying at least one first question according to the question distinction degree of the questions in the question-answer list, 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 a possible implementation, the determining module is specifically configured to:
executing a question showing operation, wherein the question showing operation comprises the following steps: determining the first question in a question set according to the question discrimination of each question in the question set, displaying the first question, and deleting the first question in the question set; initially, the question set includes all questions in the question-answer list;
performing 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 times are greater than the preset times or the number of the objects in the object set is 1, and determining the target object in the object set.
In a possible implementation, the determining module is specifically configured to:
and determining the problem with the highest degree in the problem set as the first problem.
In a 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;
deleting the objects except the at least one first object in the object set to obtain the updated object set.
In a possible implementation, the first answer is a third preset answer; the determining module is specifically configured to:
determining that the updated set of objects is the same as the objects in the set of objects before updating.
In a possible implementation, the determining module is specifically configured to:
repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repeated times are more than the preset times, and determining the target object in the object set according to the number of the objects in the object set;
alternatively, the first and second electrodes may be,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of the objects in the object set is 1, and determining one object in the object set as the target object.
In a possible implementation, the determining module is specifically configured to:
if the number of the objects in the object set is less 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 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 a possible implementation, the display module is specifically configured to:
according to the question distinction degree of the questions in the question-answer list, the at least one first question is played in a voice mode; alternatively, the first and second electrodes may be,
and displaying the at least one first question in a text according to the question distinction degree of the questions in the question-answer list.
In a possible implementation manner, the types of the objects in the question and answer list are the same, and the types of the objects in the question and answer list are the object types corresponding to the question and answer types.
In a third aspect, an embodiment of the present invention provides a question answering device, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by 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 the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of the first aspect is implemented.
According to the question and answer method, device and 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 question and answer between the electronic equipment and the user, the electronic equipment can determine to obtain the target object, and the target object determined by the electronic equipment is 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 in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a question answering method according to 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 schematic flow chart of another question answering method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a question answering system according to 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 diagram of a hardware structure of a question answering device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic view 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 and answer type is set in the electronic device 101, for example, the question and answer type may be a human question and answer type, an animal question and answer type, a fruit question and answer type, a city question and answer type, and the like. If multiple (greater than or equal to 2) question-answer types are set in the electronic device, the user may select one question-answer type in the electronic device before the user interacts with the electronic device. If the electronic equipment is provided with a question and answer type, the user does not need to select the question and answer type in the electronic equipment.
Aiming at any one question and answer type, in the interaction process of 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 a set object, after the question and answer are carried out for many times between the electronic equipment and the user, the electronic equipment can determine to obtain a target object, and the target object determined by the electronic equipment is consistent with the object set by the user. In the man-machine interaction, the electronic equipment asks questions and the user answers according to the set object, so that the target object determined by the electronic equipment is consistent with the object set by the user, the interest of intelligent interaction is increased, and the flexibility of question-answer interaction is improved.
The technical means shown in the present application will be described in detail below with reference to specific examples. It should be noted that the following embodiments may be combined with each other, and the description of the same or similar contents in different embodiments is not repeated.
Fig. 2 is a schematic flow chart of a question answering method according to an embodiment of the present invention. Referring to fig. 2, the method may include:
s201, obtaining a question and answer list corresponding to the question and answer type.
The execution subject of the embodiment of the present invention may be an electronic device, or may be a question answering device provided in the electronic device. 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 a character question-answer type, the object type corresponding to the question-answer type is a character, the user sets a target character, the electronic equipment and the user perform question-answer interaction about the character, the electronic equipment can determine the target character, and the target character set by the electronic equipment is consistent with the target character set by the user.
When the question-answer type is an animal question-answer type, the object type corresponding to the question-answer type is an animal, a user sets a target animal, the electronic equipment and the user perform 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, and 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, and the like.
Alternatively, the second preset answer may be "NO", or other answers having the same meaning as "NO", such as "NO", "wrong", and the like.
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.
The questions in the question-answer list are related to the object types corresponding to the question-answer types. For example, when the question-answer type is a person question-answer type, and the object type corresponding to the question-answer type is a person, the questions in the question-answer list are related to the person, for example, the questions may be: whether a man is born, whether a man is born in China, whether a man is in the world, whether a professional is to play basketball, and the like. For example, when the question-answer type is an animal question-answer type, and the object type corresponding to the question-answer type is an animal, the questions in the question-answer list are related to the animal, for example, the questions may be: whether it is a carnivore, whether it is four legs, whether it lives in the arctic, etc.
The types of the objects in the question and answer list are the types of the objects corresponding to the question and answer types, and the types of the objects in the question and answer list are the same. For example, when the object type corresponding to the question and answer type is a person, the object in the question and answer list is a person (name of the person). When the object type corresponding to the question-answer type is an animal, the object in the question-answer list is the animal (name of the animal).
The answer of 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 Caocao, the answer to the question (whether it is male) corresponding to the subject (Caocao) is yes. When the problem is: if yes, the answer to the question (if no) corresponding to the object (Zhuge liang) is no when the object is Zhuge liang.
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 and answer list by way of example only, and does not limit the format of the question and answer list.
For example, when the question-answer type is the person question-answer type, the question-answer list corresponding to the person question-answer type may be as shown in table 2:
TABLE 2
Figure BDA0002103373420000081
Figure BDA0002103373420000091
It should be noted that table 2 illustrates the question-answer list corresponding to the character question-answer type by way of example only, and is not limited to the question-answer list corresponding to the character question-answer type.
Alternatively, before the embodiment shown in fig. 2 is executed, the structured information of a large number of objects may be obtained, and the question-answer list may be generated according to the structured information. Optionally, the structured information according to a large number of objects may 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 is present, age, sex, whether married, whether it is present, etc. For example, a place of birth may be converted to a question: whether born in china or the united states, etc. Converting gender to question: whether it is a boy or a girl.
S202, obtaining the question distinction degree of each question in the question-answer list.
Wherein, the problem discrimination is as follows: the answer is the minimum value of the number of the objects with yes answers and the number of the objects with no answers.
Optionally, for any question, in the question-answer list, if the number of objects whose answers are yes is a1, and the number of objects whose answers are no is a2, the question differentiation degree of the question is the minimum value of a1 and a 2.
For example, suppose that the question distinction degree of each question in the question-answer list can be as shown in table 3:
TABLE 3
Figure BDA0002103373420000092
Figure BDA0002103373420000101
S203, displaying at least one first question according to question distinction degrees of questions in the question-answer list, 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.
Optionally, the electronic device may exhibit at least one first problem through the following possible implementations: the at least one first question is played in voice or displayed in text.
Alternatively, the user may input the first answer through the following feasible implementation manners: the first answer is input in the electronic device by voice, or the first answer is input in the electronic device by text.
Optionally, the first answer input by the user may be any one of the following: if not, the third preset answer is given. The third preset answer is "unknown", or an answer having the same meaning as "unknown", for example, "uncertain", "unknown", and the like.
For convenience of description, the third preset answer is taken as an unknown example for illustration.
For example, after the electronic device presents the first question, if the user knows the answer clearly, the user may determine whether the attribute of the object set by the user satisfies the first question, if so, the user answers yes, and if not, the user answers no. If the user does not know the answer, the user may answer unknown.
For example, assuming that the object set by the user is cao, if the electronic device exhibits the first problem: if it is born in china, when the user knows the answer, the first answer input by the user is yes. If the first problem displayed by the electronic equipment is: if the answer is known, the first answer input by the user is no. If the first problem displayed by the electronic equipment is: if the answer is unknown, the first answer input by the user is unknown.
Alternatively, the target object may be determined by the following feasible implementation:
executing question display operation, wherein the question display operation comprises the following steps: determining a first question in the question set according to the question distinction degree of each question in the question set, displaying the first question, and deleting the first question in the question set; initially, the question set includes all questions in the question-answer list;
executing an answer receiving operation, wherein the answer receiving operation comprises the following steps: 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 the question-answer list;
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repetition times are greater than the preset times or the number of the objects in the object set is 1, and determining the target object in the object set.
And S204, displaying the target object.
Optionally, the target object may be presented by: the name of the target object may be played in voice, or may be displayed in the form of text, or may be displayed in the form of a picture.
Alternatively, the number of target objects may be 1 or more. When the number of the target objects is multiple, the target objects may be displayed respectively, or the target objects may be displayed sequentially according to the heat degree of the target objects. The popularity of the target object refers to the popularity of the target object in the recent period of time, for example, the larger the number of searches of the target object in the recent period of time, the higher the popularity of the target object.
According to the question answering method provided by the embodiment of the invention, the electronic equipment can display the question corresponding to the question answering type, the user inputs the answer corresponding to the question in the electronic equipment according to the object set by the user, after the question answering for many times between the electronic equipment and the user, the electronic equipment can determine to obtain the target object, and the target object determined by the electronic equipment is 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 of the above embodiments, the question-answering method will be described in detail below with reference to fig. 3.
Fig. 3 is a schematic flow chart of another question answering method according to an embodiment of the present invention. Referring to fig. 3, the method may include:
s301, a question and answer list corresponding to the question and answer type is obtained.
It should be noted that the execution process of S301 may refer to the execution process of S201, and is not described herein again.
S302, determining a question set and an object set according to the question and answer list.
Wherein, the question set comprises all questions in the question-answer list. All the objects in the question-answer list are included in the object set.
S303, obtaining the question distinction degree of each question in the question-answer list.
It should be noted that the execution process of S303 may refer to the execution process of S202, and is not described herein again.
S304, determining a first question in the question set according to the question distinction degree of each question in the question set, and displaying the first question.
One of the problems in the problem set whose problem discrimination read the most may be determined as the first problem.
Optionally, when the number of the questions with the largest question discrimination in the question set is multiple, any one of the multiple questions may be determined as the first question.
S305, deleting the first question in the question set.
After the electronic device displays the first question, the first question is deleted from the question set, so that the problem that the electronic device displays the first question repeatedly can be avoided.
S306, receiving a first answer corresponding to the first question input by the user.
Alternatively, the first answer input by the user may be yes, no, or unknown.
Optionally, the user determines an answer to the first question according to an object set by the user, if the user can determine that the obtained answer is yes or no, the first answer input by the user is yes or no, and if the user does not know the first answer corresponding to the first question, the first answer input by the user is unknown.
And S307, updating the object set according to the first question and the first answer.
Alternatively, the set of objects may be updated by a possible implementation as follows:
one possible implementation is:
and when the first answer is no, 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, and deleting the objects except the at least one first object in the object set to obtain an updated object set.
In this possible implementation, the object in the updated object set is at least one first object. That is, the answers of the first questions corresponding to all the objects in the updated object set are the first answers.
Another possible implementation:
when the first answer is unknown, determining that the objects in the updated object set are the same as the objects in the object set before updating.
In this possible implementation, the user does not know the true answer to the first question, and the first answer input by the user is unknown, so that it is determined that the updated object set is the same as the objects in the object set before the update.
S308, judging whether the repetition times are more than the preset times or not, or whether the number of the objects in the object set is 1 or not.
If yes, go to S309.
If not, go to step S304.
Here, the number of repetitions refers to the number of repetitions of S304-S307, that is, the number of repetitions refers to the number of times that the question presenting operation, the answer receiving operation, and the object determining operation are repeatedly performed.
For example, the preset number of times may be 10 times, 15 times, etc.
When the number of times that the first answer input by the user is unknown is large, the preset number may be increased, for example, assuming that the preset number is 10 times, if the number of times that the first answer input by the user is unknown is large, the preset number may be set to 15 times.
S309, determining a target object in the object set.
Optionally, when the repetition times is greater than the preset times, the target object is determined in the object set according to the number of objects included in the object set.
If the number of the objects in the object set is less than or equal to the preset number, determining the objects in the object set as target objects; and if the number of the objects 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.
For example, the predetermined number may be 3, 2, etc.
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 user's sex, age, hobby, and the like.
Optionally, when the number of objects included in the object set is 1, one object in the object set is determined 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 question-answers between the electronic device and the user, the electronic device may determine that the target object is obtained, and the target object determined by the electronic device is consistent with the object set by the user. The interest of intelligent interaction is increased, and the flexibility of question-answer interaction is improved.
The question answering method shown in the embodiment of the present invention is described in detail below by specific examples with reference to fig. 4.
Fig. 4 is a schematic diagram of a question answering scheme provided in the embodiment of the present invention. Referring to fig. 4, the electronic device may display a plurality of question and answer types, and the user may select one question and answer type according to actual needs. For example, assume that the question-answer type selected by the user is a human question-answer type.
The electronic equipment determines that the question set is all questions in the question and answer list corresponding to the person question and answer type, and the object set is all objects in the question and answer list corresponding to the person question and answer type.
The electronic equipment selects a first question with highest discrimination in the question set: if not, the first question is played by voice and deleted from the set of questions. 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 response.
The electronic equipment selects a first question with highest discrimination in the question set: if the question is not a virtual character, the first question is played in a voice mode, and the first question is deleted from the question set. Since the object set by the user is orychophragmus violaceus, the user answers no. The electronic device updates the set of objects according to the user's response.
Repeating the above process for multiple times, if the electronic device determines that the target object is Zhuge Liang, then playing the voice: you want Zhuge Liang in your mind.
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 device 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 and answer list corresponding to a question and answer type, where the question and answer list includes a plurality of questions, a plurality of objects, and an answer of each question corresponding to each object, and 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-and-answer list, where the question distinction degree is: the answer is the minimum value of the number of the objects of the first preset answer and the number of the objects of the second preset answer;
the determining module 13 is configured to display at least one first question according to the question distinction degree of the questions in the question-answer list, 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 method embodiment, the implementation principle and the beneficial effect are similar, and the detailed description is omitted.
In a possible implementation, the determining module 13 is specifically configured to:
executing a question showing operation, wherein the question showing operation comprises the following steps: determining the first question in a question set according to the question discrimination of each question in the question set, displaying the first question, and deleting the first question in the question set; initially, the question set includes all questions in the question-answer list;
performing 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 times are greater than the preset times or the number of the objects in the object set is 1, and determining the target object in the object set.
In a possible implementation, the determining module 13 is specifically configured to:
and determining the problem with the highest degree in the problem set as the first problem.
In a 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;
deleting the objects except the at least one first object in the object set to obtain the updated object set.
In a possible implementation, the first answer is a third preset answer; the determining module 13 is specifically configured to:
determining that the updated set of objects is the same as the objects in the set of objects before updating.
In a possible implementation, 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 repeated times are more than the preset times, and determining the target object in the object set according to the number of the objects in the object set;
alternatively, the first and second electrodes may be,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of the objects in the object set is 1, and determining one object in the object set as the target object.
In a possible implementation, the determining module 13 is specifically configured to:
if the number of the objects in the object set is less 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 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 a possible embodiment, the display module 14 is specifically configured to:
according to the question distinction degree of the questions in the question-answer list, the at least one first question is played in a voice mode; alternatively, the first and second electrodes may be,
and displaying the at least one first question in a text according to the question distinction degree of the questions in the question-answer list.
In a possible implementation manner, the types of the objects in the question and answer list are the same, and the types of the objects in the question and answer list are the object types corresponding to the question and answer types.
The question answering device provided by the embodiment of the invention can execute the technical scheme shown in the method embodiment, the implementation principle and the beneficial effect are similar, and the detailed description is omitted.
Fig. 6 is a schematic diagram of a hardware structure of a question answering device according to an embodiment of the present invention, and as shown in fig. 6, the question answering device 20 includes: at least one processor 21 and a memory 22. The processor 21 and the memory 22 are connected by a bus 23.
In a specific implementation, the at least one processor 21 executes computer-executable instructions stored by the memory 22, so that the at least one processor 21 performs the above question-answering method.
For a specific implementation process of the processor 21, reference may be made to the above method embodiments, which implement similar principles and technical effects, and this embodiment is not described herein again.
In the embodiment shown in fig. 6, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. 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 invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise high speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the question answering method as described above is implemented.
The computer-readable storage medium 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 or optical disk. Readable storage media can be any available media 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. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.
The division of the units is only a logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into 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 such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (20)

1. A question-answering method, comprising:
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 each question corresponding to each object, and the answers are first preset answers or second preset answers;
obtaining the question distinguishing degree of each question in the question-answer list, wherein the question distinguishing degree is as follows: the answer is the minimum value of the number of the objects of the first preset answer and the number of the objects of the second preset answer;
displaying at least one first question according to the question distinction degree of the questions in the question-answer list, receiving a first answer corresponding to each first question input by a user, determining a target object according to the at least one first question and the first answer corresponding to each first question, and displaying the target object.
2. The method according to claim 1, wherein the presenting at least one first question according to the question differentiation 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 comprises:
executing a question showing operation, wherein the question showing operation comprises the following steps: determining the first question in a question set according to the question discrimination of each question in the question set, displaying the first question, and deleting the first question in the question set; initially, the question set includes all questions in the question-answer list;
performing 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 times are greater than the preset times or the number of the objects in the object set is 1, and determining the target object in the object set.
3. The method of claim 2, wherein determining the first question in the set of questions based on the question discrimination of each question in the set of questions comprises:
and determining the problem with the highest degree in the problem set as the first problem.
4. The method according to claim 2 or 3, 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 comprises:
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;
deleting the objects except the at least one first object in the object set to obtain the updated object set.
5. The method according to claim 2 or 3, wherein the first answer is a third preset answer; the updating the object set according to the first question and the first answer comprises:
determining that the updated set of objects is the same as the objects in the set of objects before updating.
6. The method according to claim 2 or 3, wherein the repeatedly performing the question presenting operation, the answer receiving operation and the object determining operation until the number of times of repetition is greater than a preset number of times or the number of objects included in the object set is 1, determining the target object in the object set comprises:
repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the repeated times are more than the preset times, and determining the target object in the object set according to the number of the objects in the object set;
alternatively, the first and second electrodes may be,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of the objects in the object set is 1, and determining one object in the object set as the target object.
7. The method of claim 6, wherein the determining the target object in the set of objects according to the number of objects included in the set of objects comprises:
if the number of the objects in the object set is less 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 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.
8. The method according to any one of claims 1-3, wherein said presenting at least one first question according to question discrimination of questions in said question-and-answer list comprises:
according to the question distinction degree of the questions in the question-answer list, the at least one first question is played in a voice mode; alternatively, the first and second electrodes may be,
and displaying the at least one first question in a text according to the question distinction degree of the questions in the question-answer list.
9. The method according to any one of claims 1 to 3, 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.
10. A question answering device, comprising: a first obtaining module, a second obtaining module, a determining module and a displaying module, wherein,
the first obtaining module is used for obtaining a question and answer list corresponding to the question and answer type, wherein the question and 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 discrimination of each question in the question-and-answer list, where the question discrimination is: the answer is the minimum value of the number of the objects of the first preset answer and the number of the objects of the second preset answer;
the determining module is used for displaying at least one first question according to the question distinction degree of the questions in the question-answer list, 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.
11. The apparatus of claim 10, wherein the determining module is specifically configured to:
executing a question showing operation, wherein the question showing operation comprises the following steps: determining the first question in a question set according to the question discrimination of each question in the question set, displaying the first question, and deleting the first question in the question set; initially, the question set includes all questions in the question-answer list;
performing 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 times are greater than the preset times or the number of the objects in the object set is 1, and determining the target object in the object set.
12. The apparatus of claim 11, wherein the determining module is specifically configured to:
and determining the problem with the highest degree in the problem set as the first problem.
13. The apparatus according to claim 11 or 12, 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;
deleting the objects except the at least one first object in the object set to obtain the updated object set.
14. The apparatus according to claim 11 or 12, wherein the first answer is a third preset answer; the determining module is specifically configured to:
determining that the updated set of objects is the same as the objects in the set of objects before updating.
15. The apparatus according to claim 11 or 12, 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 repeated times are more than the preset times, and determining the target object in the object set according to the number of the objects in the object set;
alternatively, the first and second electrodes may be,
and repeatedly executing the question display operation, the answer receiving operation and the object determining operation until the number of the objects in the object set is 1, and determining one object in the object set as the target object.
16. The apparatus of claim 15, wherein the determining module is specifically configured to:
if the number of the objects in the object set is less 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 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.
17. The device according to any one of claims 10 to 12, wherein the display module is specifically configured to:
according to the question distinction degree of the questions in the question-answer list, the at least one first question is played in a voice mode; alternatively, the first and second electrodes may be,
and displaying the at least one first question in a text according to the question distinction degree of the questions in the question-answer list.
18. The apparatus according to any one of claims 10 to 12, 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.
19. A question answering device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the question answering method according to any one of claims 1 to 9.
20. A computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement the question-answering method according to any one of claims 1 to 9.
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 true CN112115241A (en) 2020-12-22
CN112115241B 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 (14)

* 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
US20090012926A1 (en) * 2006-03-01 2009-01-08 Nec Corporation Question answering device, question answering method, and question answering program
US20120089622A1 (en) * 2010-09-24 2012-04-12 International Business Machines Corporation Scoring candidates using structural information in semi-structured documents for question answering systems
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
US20150339574A1 (en) * 2014-05-21 2015-11-26 International Business Machines Corporation Extensible Validation Framework for Question and Answer Systems
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

Patent Citations (14)

* 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
US20090012926A1 (en) * 2006-03-01 2009-01-08 Nec Corporation Question answering device, question answering method, and question answering program
US20120089622A1 (en) * 2010-09-24 2012-04-12 International Business Machines Corporation Scoring candidates using structural information in semi-structured documents for question answering systems
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
US20150339574A1 (en) * 2014-05-21 2015-11-26 International Business Machines Corporation Extensible Validation Framework for Question and Answer Systems
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
唐娟: ""一种基于形式概念分析的问答系统答案抽取的研究"", 《计算机应用》, pages 653 - 655 *

Also Published As

Publication number Publication date
CN112115241B (en) 2023-09-05

Similar Documents

Publication Publication Date Title
CN109800291B (en) Question answering method and device, electronic equipment and storage medium
CN107967110A (en) Playing method, playing device, electronic equipment and computer readable storage medium
CN109978139B (en) Method, system, electronic device and storage medium for automatically generating description of picture
CN105988799B (en) Method and server for managing software store pages
CN111858951A (en) Learning recommendation method and device based on knowledge graph and terminal equipment
CN109542878B (en) List creation method and device
US11868345B2 (en) Information processing system, electronic device, information processing method, and recording medium
CN114372215A (en) Search result display method, search request processing method and device
CN111339280A (en) Question and answer sentence processing method, device, equipment and storage medium
CN110489674B (en) Page processing method, device and equipment
CN108845955B (en) Chinese input method test method and device and electronic equipment
CN111870932B (en) Interactive processing method, device and equipment based on game
CN111159379B (en) Automatic question setting method, device and system
CN110750633B (en) Method and device for determining answer of question
CN110087120B (en) Same-window switching method of online list and local list and computing equipment
CN117033599A (en) Digital content generation method and related equipment
CN112115241B (en) Question answering method, device and equipment
US20200215436A1 (en) Method for simultaneously translating language of game device and related products
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
CN111796846B (en) Information updating method, device, terminal equipment and readable storage medium
CN109376298B (en) Data processing method and device, terminal equipment and computer storage medium
US20170185270A1 (en) Animation display method for view and terminal device
CN111476039A (en) Instant language translation method of intelligent vehicle-mounted system and related product

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