CN111368044A - Intelligent question answering method and device, computer equipment and storage medium - Google Patents

Intelligent question answering method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111368044A
CN111368044A CN202010107521.2A CN202010107521A CN111368044A CN 111368044 A CN111368044 A CN 111368044A CN 202010107521 A CN202010107521 A CN 202010107521A CN 111368044 A CN111368044 A CN 111368044A
Authority
CN
China
Prior art keywords
target
user
entity
question
intention
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010107521.2A
Other languages
Chinese (zh)
Inventor
蔡国庆
孙俊
王永欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhuiyi Technology Co Ltd
Original Assignee
Shenzhen Zhuiyi 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 Shenzhen Zhuiyi Technology Co Ltd filed Critical Shenzhen Zhuiyi Technology Co Ltd
Priority to CN202010107521.2A priority Critical patent/CN111368044A/en
Publication of CN111368044A publication Critical patent/CN111368044A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • 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/338Presentation of query results

Abstract

The application relates to an intelligent question answering method, an intelligent question answering device, computer equipment and a storage medium. The method comprises the following steps: receiving a user question, and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question; combining the target entities and the target user intents to obtain a plurality of combined results; each of the combined results includes a target entity and a target user intent; screening out a target combined result from the plurality of combined results, and determining target query content corresponding to the user question according to the target combined result; and searching according to the target query content to obtain a target answer corresponding to the user question. By adopting the method, the query process can be simplified, and the query efficiency can be improved.

Description

Intelligent question answering method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of question and answer technologies, and in particular, to an intelligent question and answer method, apparatus, computer device, and storage medium.
Background
With the development of science and technology, AI (Artificial Intelligence) is a great leap in a plurality of industries, wherein a question-answering system becomes more and more intelligent under the support of Artificial Intelligence.
At present, a knowledge graph-based question-answering system is developed, and a DAG (directed acyclic graph) is first constructed according to a user question, and then sub-graph matching of the knowledge graph is performed according to the DAG, so that an answer corresponding to the user question is found.
The knowledge-graph-based question-answering system can provide more accurate answers for users. However, in a scenario where there is no relationship between entities in the user question, the process of constructing the DAG is complicated, which results in low query efficiency.
Disclosure of Invention
In view of the above, it is necessary to provide an intelligent question-answering method, an intelligent question-answering device, a computer device, and a storage medium, which can simplify the query process and improve the query efficiency.
An intelligent question-answering method, comprising:
receiving a user question, and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question;
combining the target entities and the target user intents to obtain a plurality of combined results; each combined result comprises a target entity and a target user intention;
screening a target combination result from the plurality of combination results, and determining target query content corresponding to the user question according to the target combination result;
and searching according to the target query content to obtain a target answer corresponding to the user question.
In one embodiment, the above screening out a target combined result from the multiple combined results, and determining target query content corresponding to a user question according to the target combined result includes:
determining a target quantization value of each combined result; the target quantization value is used for representing the accuracy of the query content;
selecting a target combination result from the plurality of combination results according to the plurality of target quantization values;
and determining target query content according to the target user intention corresponding to the target combination result.
In one embodiment, the determining the target quantization value of each combination result includes:
determining the matching state of the target entity and the intention of the target user in each combined result;
determining a target state value of each combination result according to a preset corresponding relation between the matching state and the state value;
inputting the confidence degree corresponding to the target entity, the confidence degree corresponding to the target user intention and the target state value in each combined result into a pre-trained regression model to obtain a target quantization value of each combined result; the confidence corresponding to the target entity is used for representing the correct probability of the target entity; the confidence level corresponding to the target user intention is used to characterize the correct probability of the target user intention.
In one embodiment, the selecting the target combination result from the plurality of combination results according to the plurality of target quantization values includes:
sorting the plurality of combined results according to the plurality of target quantization values;
selecting a target combination result of which the target quantization value meets a first preset condition according to the sequencing result; the first preset condition includes that a target quantization value of the combined result is greater than a preset quantization value.
In one embodiment, the obtaining of the multiple target entities and the multiple target user intentions corresponding to the user question includes:
carrying out entity identification processing on the user question to obtain a plurality of target entities;
and performing intention identification processing on the user question to obtain a plurality of target user intentions.
In one embodiment, the performing entity identification processing on the user question to obtain a plurality of target entities includes:
adopting a preset named entity recognition model to recognize at least one entity text from a user question;
searching a plurality of candidate entities from a preset entity database according to the entity text;
and carrying out disambiguation processing on the candidate entities by adopting a preset entity link model to obtain a plurality of target entities.
In one embodiment, the performing intent recognition processing on the user question to obtain a plurality of target user intentions includes:
performing word segmentation processing on the user questions to obtain a plurality of question words;
determining word vectors corresponding to the questioning words;
inputting the word vectors corresponding to the questioning vocabularies into a pre-trained intention recognition model to obtain a plurality of user intentions output by the intention recognition model and confidence degrees corresponding to the user intentions;
selecting a target user intention which meets a second preset condition from the plurality of user intentions; the second preset condition comprises that the confidence degree corresponding to the user intention is greater than the preset confidence degree.
An intelligent question answering device, the device comprising:
the entity intention acquisition module is used for receiving a user question and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question;
the entity intention combination module is used for combining a plurality of target entities and a plurality of target user intents to obtain a plurality of combination results; each combined result comprises a target entity and a target user intention;
the target query content determining module is used for screening out a target combination result from the plurality of combination results and determining target query content corresponding to the user question according to the target combination result;
and the target answer searching module is used for searching according to the target query content to obtain a target answer corresponding to the user question.
In one embodiment, the target query content determining module is configured to include:
a target quantization value determination submodule for determining a target quantization value of each combination result; the target quantization value is used for representing the accuracy of the query content;
the target combination result selection submodule is used for selecting a target combination result from the plurality of combination results according to the plurality of target quantization values;
and the target query content determining submodule is used for determining the target query content according to the target user intention corresponding to the target combination result.
In one embodiment, the target quantization value determining submodule is specifically configured to determine a matching state between a target entity and a target user intention in each combination result; determining a target state value of each combination result according to a preset corresponding relation between the matching state and the state value; inputting the confidence degree corresponding to the target entity, the confidence degree corresponding to the target user intention and the target state value in each combined result into a pre-trained regression model to obtain a target quantization value of each combined result; the confidence corresponding to the target entity is used for representing the correct probability of the target entity; the confidence level corresponding to the target user intention is used to characterize the correct probability of the target user intention.
In one embodiment, the target combination result selection sub-module is specifically configured to sort the plurality of combination results according to the plurality of target quantization values; selecting a target combination result of which the target quantization value meets a first preset condition according to the sequencing result; the first preset condition includes that a target quantization value of the combined result is greater than a preset quantization value.
In one embodiment, the entity intention obtaining module includes:
the target entity acquisition sub-module is used for carrying out entity identification processing on the user question to obtain a plurality of target entities;
and the target user intention acquisition submodule is used for carrying out intention identification processing on the user question to obtain a plurality of target user intentions.
In one embodiment, the target entity obtaining sub-module is specifically configured to identify at least one entity text from a user question by using a preset named entity identification model; searching a plurality of candidate entities from a preset entity database according to the entity text; and carrying out disambiguation processing on the candidate entities by adopting a preset entity link model to obtain a plurality of target entities.
In one embodiment, the target user intention acquisition submodule is specifically configured to perform word segmentation processing on a user question to obtain a plurality of question words; determining word vectors corresponding to the questioning words; inputting the word vectors corresponding to the questioning vocabularies into a pre-trained intention recognition model to obtain a plurality of user intentions output by the intention recognition model and confidence degrees corresponding to the user intentions; selecting a target user intention which meets a second preset condition from the plurality of user intentions; the second preset condition comprises that the confidence degree corresponding to the user intention is greater than the preset confidence degree.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a user question, and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question;
combining the target entities and the target user intents to obtain a plurality of combined results; each combined result comprises a target entity and a target user intention;
screening a target combination result from the plurality of combination results, and determining target query content corresponding to the user question according to the target combination result;
and searching according to the target query content to obtain a target answer corresponding to the user question.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a user question, and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question;
combining the target entities and the target user intents to obtain a plurality of combined results; each combined result comprises a target entity and a target user intention;
screening a target combination result from the plurality of combination results, and determining target query content corresponding to the user question according to the target combination result;
and searching according to the target query content to obtain a target answer corresponding to the user question.
The intelligent question-answering method, the intelligent question-answering device, the computer equipment and the storage medium receive the user question and acquire a plurality of target entities and a plurality of target user intentions corresponding to the user question; combining the target entities and the target user intents to obtain a plurality of combined results; screening a target combination result from the plurality of combination results, and determining target query content corresponding to the user question according to the target combination result; and searching according to the target query content to obtain a target answer corresponding to the user question. According to the method and the device for determining the target query content, the target query content corresponding to the user question can be determined only by combining the target entity obtained from the user question and the target user intention.
Drawings
FIG. 1 is a diagram of an exemplary environment in which the intelligent question answering method may be implemented;
FIG. 2 is a schematic flow chart diagram illustrating a method for intelligent question answering in one embodiment;
FIG. 3 is a flowchart illustrating the steps of screening out the target combination results and determining the target query content according to the target combination results in one embodiment;
FIG. 4 is a flowchart illustrating the step of determining a target quantization value for each combined result in one embodiment;
FIG. 5 is a flowchart illustrating the steps of obtaining multiple target entities and multiple target user intentions corresponding to a user question in one embodiment;
FIG. 6 is a schematic flow chart diagram illustrating a method for intelligent question answering in another embodiment;
FIG. 7 is a block diagram of an intelligent question answering device in one embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The intelligent question answering method provided by the application can be applied to the application environment shown in fig. 1. The application environment includes a terminal 102 and a server 104, and the terminal 102 and the server 104 communicate through a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, an intelligent question answering method is provided, which is described by taking the example that the method is applied to the server in fig. 1, and includes the following steps:
step 201, receiving a user question, and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question.
In the embodiment of the application, the user question can be received through the terminal, and then the server receives the user question sent by the terminal; the server may also receive user questions directly. The embodiment of the present application does not limit this in detail, and can be set according to actual situations.
After receiving the user question, entity recognition and intention recognition can be performed on the user question to obtain a plurality of target entities and a plurality of target user intentions corresponding to the user question. For example, the received user question is "what the stock price of the peace bank is", the entity identification and the intention identification are performed on the user question, 2 candidate entities are obtained as "000001 (stock code)", "the peace bank (company name)", and 2 target user intentions are obtained as "price query", "stock price diagnosis". The embodiment of the present application does not specifically limit the specific manner of entity identification and intention identification, and may be set according to actual situations.
Step 202, combining the multiple target entities and the multiple target user intents to obtain multiple combined results.
In the embodiment of the application, after a plurality of target entities and a plurality of target user intents are obtained, the target entities and the target user intents are combined to obtain a plurality of combined results, wherein each combined result comprises one target entity and one target user intention.
For example, 2 target entities "000001 (stock code)", "safe bank (company name)", are combined with 2 target user intentions "price query", "stock price diagnosis", respectively, resulting in a combined result 1 of "000001 (stock code)" and "price query", a combined result 2 of "000001 (stock code)" and "stock price diagnosis", a combined result 3 of "safe bank (company name)" and "price query", and a combined result 4 of "safe bank (company name)" and "stock price diagnosis".
And 203, screening a target combination result from the plurality of combination results, and determining target query content corresponding to the user question according to the target combination result.
In the embodiment of the application, after a plurality of combination results are obtained, the target combination result is screened out according to the preset screening condition. Specifically, after the target entity and the target user intention are combined, the confidence corresponding to the combined result is calculated according to the confidence of the target entity obtained during the entity recognition and the confidence corresponding to the target user intention obtained during the intention recognition; and then, screening out a target combination result according to the confidence coefficient of the combination result.
For example, if the confidence of the combination result 1 is 0.92, the confidence of the combination result 2 is 0.52, the confidence of the combination result 3 is 0.39, and the confidence of the combination result 4 is 0.35, the combination result 1 may be determined as the target combination result.
In practical application, disambiguation processing can be performed according to the combined result, and since the target user intends to perform price query or stock price diagnosis, the combined result 3 and the combined result 4 corresponding to the target entity "safe bank (company name)" are not considered, and the target combined result is screened only according to the confidence degrees corresponding to the combined result 1 and the combined result 2.
After the target combination result is screened out, the real query intention of the user is determined according to the target entity and the target user intention in the target combination result, namely the target determines the target query content according to the combination result. For example, the combined result 1 is a target combined result, the target entity in the combined result 1 is "000001 (stock code)", the target user is intended to be "price query", and the target query content can be obtained as follows: a price query is made for 000001 (stock code).
And step 204, searching according to the target query content to obtain a target answer corresponding to the user question.
In the embodiment of the application, after the target query content is determined, answer searching is carried out according to the target query content, so that a target answer corresponding to the user question is obtained. For example, according to the target query content is: a price query is made to 000001 (stock code) to get the target answer "stock 000001 price is 14.77 yuan". The answer searching mode is not limited in detail in the embodiment of the application, and the answer searching mode can be set according to actual conditions.
In the intelligent question-answering method, a user question is received, and a plurality of target entities and a plurality of target user intentions corresponding to the user question are obtained; combining the target entities and the target user intents to obtain a plurality of combined results; screening a target combination result from the plurality of combination results, and determining target query content corresponding to the user question according to the target combination result; and searching according to the target query content to obtain a target answer corresponding to the user question. According to the method and the device for determining the target query content, the target query content corresponding to the user question can be determined only by combining the target entity obtained from the user question and the target user intention. In addition, because the DAG does not need to be constructed, the body does not need to be maintained, and the maintenance cost and the use threshold are reduced.
In another embodiment, as shown in fig. 3, this embodiment relates to an optional process of screening out a target combined result from a plurality of combined results, and determining target query content corresponding to a user question according to the target combined result. On the basis of the foregoing embodiment, the step 203 may specifically include the following steps:
in step 301, the target quantization values for the respective combination results are determined.
In the embodiment of the application, first, a target quantization value of each combined result is determined, where the target quantization value is used to represent the accuracy of the query content, that is, the target quantization value indicates a probability that the combined result is the content that the user really wants to query. Determining the target quantization value specifically includes the following, see fig. 4:
step 3011, determine the matching status between the target entity and the target user's intention in each combination result.
Wherein the match status may include at least one of a match, a partial default, an entity rejection, and a pure intent. For example, the target entities are "shanxi province" and "xi 'an city", the target user is intended to be "what is good-eating", and if the combined result is "what is good-eating in xi' an city of shanxi province", the matching state is matching; if the combined result is 'what is good for eating in Shaanxi province/what is good for eating in Xian city', the matching state is partial default; if the combination result is 'what is good for eating in Guangzhou city of Shaanxi province', the matching state is entity rejection; if the combined result is "what is nice", the match status is pure intent. The matching state is not limited in detail in the embodiment of the application, and can be set according to actual conditions.
Step 3012, determine the target status value of each combination result according to the preset corresponding relationship between the matching status and the status value.
Specifically, the correspondence between the matching state and the state value is set in advance. For example, a match corresponds to 90 points, a partial default corresponds to 80 points, an entity rejection corresponds to 30 points, and a pure intent corresponds to 50 points. After the matching state corresponding to each combination result is determined, the target state value of each combination result can be obtained according to the corresponding relationship. For example, if the target entity in the combined result 1 is "000001 (stock code)", the target user intends to be "price query", and the matching status of the combined result 1 is determined to be matching, the target status value of the combined result 1 is 90 points.
Step 3013, the confidence corresponding to the target entity, the confidence corresponding to the target user intention, and the target state value in each combined result are input into a pre-trained regression model to obtain the target quantization value of each combined result.
The confidence corresponding to the target entity is used for representing the correct probability of the target entity; the confidence level corresponding to the target user intention is used to characterize the correct probability of the target user intention.
Specifically, a regression model is trained in advance, and entity weight of a confidence corresponding to the target entity in the regression model and intention weight of a confidence corresponding to the intention of the target user in the regression model are obtained. Since the confidence degree corresponding to each target entity and the confidence degree corresponding to each target user intention have been obtained when the entity recognition and the intention recognition are performed, after the target state value of each combined result is obtained, for each combined result, the confidence degree corresponding to the target entity and the confidence degree corresponding to the target user intention in the combined result, and the target state value of the combined result are input into the regression model, and then the regression model outputs the target quantized value of the combined result.
For example, if the confidence corresponding to the target entity "000001 (stock code)" in the combined result 1 is 0.9385, the confidence corresponding to the target user intention "price query" is 0.7138, and the target state value corresponding to the combined result 1 is 90 points, the confidence and the target state value are input into the regression model, and the regression model may obtain the target quantization value of the combined result 1 as 0.9237 according to the formula, where the target quantization value is (the confidence corresponding to the target entity × entity weight + the confidence corresponding to the target user intention × intention weight) ×, and so on, obtain the target quantization value of the combined result 2 as 0.5230.
Step 302, selecting a target combination result from the plurality of combination results according to the plurality of target quantization values.
In the embodiment of the application, after the target quantization values of all the combination results are obtained, the combination results are sequenced according to the target quantization values; selecting a target combination result of which the target quantization value meets a first preset condition according to the sequencing result; the first preset condition includes that a target quantization value of the combined result is greater than a preset quantization value.
For example, the target quantization value of the combination result 1 is 0.9237, the target quantization value of the combination result 2 is 0.5230, the combination results are sorted from high to low according to the target quantization value, the combination result 1 is the first bit, the combination result 2 is the second bit, and the combination result 1 with the first bit can be directly determined as the target combination result; it is also possible to determine the combination result 1 larger than a preset quantization value of 0.8 as the target combination result. The preset quantization value is not limited in detail in the embodiment of the application, and can be set according to actual conditions.
Step 303, determining target query content according to the target user intention corresponding to the target combination result.
In the embodiment of the application, after the target combination result is determined, the target user intention in the target combination result indicates the content that the user really wants to search, and the target query content can be determined according to the target user intention.
In the step of screening out the target combined result from the plurality of combined results and determining the target query content corresponding to the user question according to the target combined result, determining the target quantization value of each combined result; and selecting a target combination result from the plurality of combination results according to the plurality of target quantization values, wherein the target user intention in the target combination result indicates the content which the user really wants to search, so that the target query content can be determined according to the target user intention. According to the method and the device, when the content which the user really wants to search is determined, the target entity and the intention of the target user are comprehensively considered, so that the accuracy of the target query content can be improved, the accuracy of the target answer is improved, and the use experience of the user is improved.
In another embodiment, as shown in fig. 5, this embodiment relates to an optional process of obtaining a plurality of target entities and a plurality of target user intentions corresponding to user questions. On the basis of the foregoing embodiment, the foregoing step 201 may specifically include the following steps:
step 401, performing entity identification processing on the user question to obtain a plurality of target entities.
In the embodiment of the present application, obtaining the target entity from the user question may include the following steps: adopting a preset named entity recognition model to recognize at least one entity text from a user question; searching a plurality of candidate entities from a preset entity database according to the entity text; and carrying out disambiguation processing on the candidate entities by adopting a preset entity link model to obtain a plurality of target entities.
Specifically, a named entity recognition model is trained in advance, and entity expressions in the user questions are recognized by the named entity recognition model, namely at least one entity text is recognized from the user questions. For example, the user question is "what the stock price of the safe bank is", and the entity text identified from the user question is "safe bank".
And presetting an entity database, and searching a plurality of candidate entities matched with the entity texts from the entity database after identifying at least one entity text. For example, the entity text is "safe bank", and the candidate entities found to match "safe bank" from the entity database are "000001 (stock code)" and "safe bank (company name)".
And pre-training an entity link model, and inputting each candidate entity into the entity link model to obtain the confidence corresponding to each candidate entity. The higher the confidence degree corresponding to the candidate entity is, the smaller the ambiguity introduced by the candidate entity is; the lower the confidence corresponding to the candidate entity, the greater the ambiguity introduced by the candidate entity. And removing the candidate entity with lower confidence coefficient to obtain the target entity corresponding to the user question.
Step 402, performing intent recognition processing on the user question to obtain a plurality of target user intentions.
In the embodiment of the present application, obtaining the target entity from the user question may include the following steps: performing word segmentation processing on the user questions to obtain a plurality of question words; determining word vectors corresponding to the questioning words; inputting the word vectors corresponding to the questioning vocabularies into a pre-trained intention recognition model to obtain a plurality of user intentions output by the intention recognition model and confidence degrees corresponding to the user intentions; selecting a target user intention which meets a second preset condition from the plurality of user intentions; the second preset condition comprises that the confidence degree corresponding to the user intention is greater than the preset confidence degree.
For example, the word segmentation processing is performed on the user question "how much the stock price of the safe bank" is "to obtain the question words" safe bank "and" stock price ", then the word vector 1 corresponding to the" safe bank "and the word vector 2 corresponding to the" stock price "are determined, and the word vector 1 and the word vector 2 are respectively input into the pre-trained intention recognition model, so that the intention entity model outputs the user intention and confidence corresponding to the word vector 1, and the user intention and confidence corresponding to the word vector 2. The preset confidence coefficient is 0.8, and the user intention with the confidence coefficient larger than the preset confidence coefficient is used as the target user intention. The preset confidence coefficient is not limited in detail in the embodiment of the application, and can be set according to actual conditions.
In one embodiment, after obtaining a plurality of target user intents, the target entity obtained in the above steps may be subjected to disambiguation processing in combination with the target user intents; or in multiple rounds of conversation, disambiguating the target entity in the current round of conversation according to the historical round of conversation. The disambiguation mode is not limited in detail in the embodiment of the application, and the disambiguation mode can be set according to actual conditions.
In the step of obtaining a plurality of target entities and a plurality of target user intentions corresponding to the user questions, the confidence degrees corresponding to the target entities and the target entities are obtained through the named entity model and the entity link model, and the target user intentions are obtained through the intention identification model, so that a combined result can be obtained according to the target entities and the target user intentions subsequently, and further target query contents can be obtained.
In another embodiment, as shown in fig. 6, this embodiment relates to an alternative process of the intelligent question-answering method. On the basis of the above embodiment, the method specifically includes the following steps:
step 501, receiving a user question.
Step 502, entity identification processing is performed on the user questions to obtain a plurality of target entities.
In one embodiment, at least one entity text is identified from a user question by adopting a preset named entity identification model; searching a plurality of candidate entities from a preset entity database according to the entity text; and carrying out disambiguation processing on the candidate entities by adopting a preset entity link model to obtain a plurality of target entities.
Step 503, performing intent recognition processing on the user question to obtain a plurality of target user intentions.
In one embodiment, the method comprises the steps of performing word segmentation processing on a user question to obtain a plurality of question words; determining word vectors corresponding to the questioning words; inputting the word vectors corresponding to the questioning vocabularies into a pre-trained intention recognition model to obtain a plurality of user intentions output by the intention recognition model and confidence degrees corresponding to the user intentions; selecting a target user intention which meets a second preset condition from the plurality of user intentions; the second preset condition comprises that the confidence degree corresponding to the user intention is greater than the preset confidence degree.
In the embodiment of the present application, the sequence of step 502 and step 503 is not limited in detail, and may be set according to actual situations.
Step 504, combining the multiple target entities and the multiple target user intents to obtain multiple combined results; each combined result includes a target entity and a target user intent.
Step 505, determining a target quantization value of each combination result; the target quantization value is used for representing the accuracy of the query content.
In one embodiment, the matching state of the target entity and the target user intention in each combined result; determining a target state value of each combination result according to a preset corresponding relation between the matching state and the state value; inputting the confidence degree corresponding to the target entity, the confidence degree corresponding to the target user intention and the target state value in each combined result into a pre-trained regression model to obtain a target quantization value of each combined result; the confidence corresponding to the target entity is used for representing the correct probability of the target entity; the confidence level corresponding to the target user intention is used to characterize the correct probability of the target user intention.
Step 506, a target combination result is selected from the plurality of combination results according to the plurality of target quantization values.
In one embodiment, the plurality of combined results are sorted according to the plurality of target quantization values; selecting a target combination result of which the target quantization value meets a first preset condition according to the sequencing result; the first preset condition includes that a target quantization value of the combined result is greater than a preset quantization value.
And step 507, determining target query content according to the target user intention corresponding to the target combination result.
And step 508, searching according to the target query content to obtain a target answer corresponding to the user question.
In the intelligent question-answering method, a user question is received, and entity identification processing and intention identification processing are carried out on the user question to obtain a target entity and a target user intention; then, combining the target entity and the target user intention, and determining a target combination result according to the target quantization value of each combination result; and finally, determining the target query content which the user really wants to search according to the target combination result, and searching the target answer according to the target query content. According to the embodiment of the application, a DAG does not need to be constructed, the process of determining the target query content is simple and easy to realize, the query efficiency can be improved, and the maintenance cost of the body is reduced.
It should be understood that although the various steps in the flowcharts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 7, there is provided an intelligent question answering apparatus, including:
an entity intention obtaining module 601, configured to receive a user question, and obtain a plurality of target entities and a plurality of target user intentions corresponding to the user question;
an entity intent combination module 602, configured to combine multiple target entities and multiple target user intents to obtain multiple combination results; each combined result comprises a target entity and a target user intention;
a target query content determining module 603, configured to screen a target combination result from the multiple combination results, and determine a target query content corresponding to a user question according to the target combination result;
and the target answer searching module 604 is configured to search according to the target query content to obtain a target answer corresponding to the user question.
In one embodiment, the target query content determining module 603 is configured to include:
a target quantization value determination submodule for determining a target quantization value of each combination result; the target quantization value is used for representing the accuracy of the query content;
the target combination result selection submodule is used for selecting a target combination result from the plurality of combination results according to the plurality of target quantization values;
and the target query content determining submodule is used for determining the target query content according to the target user intention corresponding to the target combination result.
In one embodiment, the target quantization value determining submodule is specifically configured to determine a matching state between a target entity and a target user intention in each combination result; determining a target state value of each combination result according to a preset corresponding relation between the matching state and the state value; inputting the confidence degree corresponding to the target entity, the confidence degree corresponding to the target user intention and the target state value in each combined result into a pre-trained regression model to obtain a target quantization value of each combined result; the confidence corresponding to the target entity is used for representing the correct probability of the target entity; the confidence level corresponding to the target user intention is used to characterize the correct probability of the target user intention.
In one embodiment, the target combination result selection sub-module is specifically configured to sort the plurality of combination results according to the plurality of target quantization values; selecting a target combination result of which the target quantization value meets a first preset condition according to the sequencing result; the first preset condition includes that a target quantization value of the combined result is greater than a preset quantization value.
In one embodiment, the entity intention obtaining module 601 includes:
the target entity acquisition sub-module is used for carrying out entity identification processing on the user question to obtain a plurality of target entities;
and the target user intention acquisition submodule is used for carrying out intention identification processing on the user question to obtain a plurality of target user intentions.
In one embodiment, the target entity obtaining sub-module is specifically configured to identify at least one entity text from a user question by using a preset named entity identification model; searching a plurality of candidate entities from a preset entity database according to the entity text; and carrying out disambiguation processing on the candidate entities by adopting a preset entity link model to obtain a plurality of target entities.
In one embodiment, the target user intention acquisition submodule is specifically configured to perform word segmentation processing on a user question to obtain a plurality of question words; determining word vectors corresponding to the questioning words; inputting the word vectors corresponding to the questioning vocabularies into a pre-trained intention recognition model to obtain a plurality of user intentions output by the intention recognition model and confidence degrees corresponding to the user intentions; selecting a target user intention which meets a second preset condition from the plurality of user intentions; the second preset condition comprises that the confidence degree corresponding to the user intention is greater than the preset confidence degree.
For the specific limitations of the intelligent question-answering device, reference may be made to the above limitations of the intelligent question-answering method, which are not described herein again. The modules in the intelligent question answering device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing intelligent question and answer data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an intelligent question-answering method.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a user question, and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question;
combining the target entities and the target user intents to obtain a plurality of combined results; each combined result comprises a target entity and a target user intention;
screening a target combination result from the plurality of combination results, and determining target query content corresponding to the user question according to the target combination result;
and searching according to the target query content to obtain a target answer corresponding to the user question.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining a target quantization value of each combined result; the target quantization value is used for representing the accuracy of the query content;
selecting a target combination result from the plurality of combination results according to the plurality of target quantization values;
and determining target query content according to the target user intention corresponding to the target combination result.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining the matching state of the target entity and the intention of the target user in each combined result;
determining a target state value of each combination result according to a preset corresponding relation between the matching state and the state value;
inputting the confidence degree corresponding to the target entity, the confidence degree corresponding to the target user intention and the target state value in each combined result into a pre-trained regression model to obtain a target quantization value of each combined result; the confidence corresponding to the target entity is used for representing the correct probability of the target entity; the confidence level corresponding to the target user intention is used to characterize the correct probability of the target user intention.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
sorting the plurality of combined results according to the plurality of target quantization values;
selecting a target combination result of which the target quantization value meets a first preset condition according to the sequencing result; the first preset condition includes that a target quantization value of the combined result is greater than a preset quantization value.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
carrying out entity identification processing on the user question to obtain a plurality of target entities;
and performing intention identification processing on the user question to obtain a plurality of target user intentions.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
adopting a preset named entity recognition model to recognize at least one entity text from a user question;
searching a plurality of candidate entities from a preset entity database according to the entity text;
and carrying out disambiguation processing on the candidate entities by adopting a preset entity link model to obtain a plurality of target entities.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
performing word segmentation processing on the user questions to obtain a plurality of question words;
determining word vectors corresponding to the questioning words;
inputting the word vectors corresponding to the questioning vocabularies into a pre-trained intention recognition model to obtain a plurality of user intentions output by the intention recognition model and confidence degrees corresponding to the user intentions;
selecting a target user intention which meets a second preset condition from the plurality of user intentions; the second preset condition comprises that the confidence degree corresponding to the user intention is greater than the preset confidence degree.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a user question, and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question;
combining the target entities and the target user intents to obtain a plurality of combined results; each combined result comprises a target entity and a target user intention;
screening a target combination result from the plurality of combination results, and determining target query content corresponding to the user question according to the target combination result;
and searching according to the target query content to obtain a target answer corresponding to the user question.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining a target quantization value of each combined result; the target quantization value is used for representing the accuracy of the query content;
selecting a target combination result from the plurality of combination results according to the plurality of target quantization values;
and determining target query content according to the target user intention corresponding to the target combination result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining the matching state of the target entity and the intention of the target user in each combined result;
determining a target state value of each combination result according to a preset corresponding relation between the matching state and the state value;
inputting the confidence degree corresponding to the target entity, the confidence degree corresponding to the target user intention and the target state value in each combined result into a pre-trained regression model to obtain a target quantization value of each combined result; the confidence corresponding to the target entity is used for representing the correct probability of the target entity; the confidence level corresponding to the target user intention is used to characterize the correct probability of the target user intention.
In one embodiment, the computer program when executed by the processor further performs the steps of:
sorting the plurality of combined results according to the plurality of target quantization values;
selecting a target combination result of which the target quantization value meets a first preset condition according to the sequencing result; the first preset condition includes that a target quantization value of the combined result is greater than a preset quantization value.
In one embodiment, the computer program when executed by the processor further performs the steps of:
carrying out entity identification processing on the user question to obtain a plurality of target entities;
and performing intention identification processing on the user question to obtain a plurality of target user intentions.
In one embodiment, the computer program when executed by the processor further performs the steps of:
adopting a preset named entity recognition model to recognize at least one entity text from a user question;
searching a plurality of candidate entities from a preset entity database according to the entity text;
and carrying out disambiguation processing on the candidate entities by adopting a preset entity link model to obtain a plurality of target entities.
In one embodiment, the computer program when executed by the processor further performs the steps of:
performing word segmentation processing on the user questions to obtain a plurality of question words;
determining word vectors corresponding to the questioning words;
inputting the word vectors corresponding to the questioning vocabularies into a pre-trained intention recognition model to obtain a plurality of user intentions output by the intention recognition model and confidence degrees corresponding to the user intentions;
selecting a target user intention which meets a second preset condition from the plurality of user intentions; the second preset condition comprises that the confidence degree corresponding to the user intention is greater than the preset confidence degree.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An intelligent question-answering method, characterized in that the method comprises:
receiving a user question, and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question;
combining the target entities and the target user intents to obtain a plurality of combined results; each of the combined results includes a target entity and a target user intent;
screening out a target combined result from the plurality of combined results, and determining target query content corresponding to the user question according to the target combined result;
and searching according to the target query content to obtain a target answer corresponding to the user question.
2. The method according to claim 1, wherein the screening out a target combined result from the plurality of combined results, and determining target query content corresponding to the user question according to the target combined result comprises:
determining a target quantization value for each of the combined results; the target quantization value is used for representing the accuracy of the query content;
selecting the target combination result from the plurality of combination results according to the plurality of target quantization values;
and determining the target query content according to the target user intention corresponding to the target combination result.
3. The method of claim 2, wherein determining the target quantization value for each of the combined results comprises:
determining the matching state of the target entity and the intention of the target user in each combined result;
determining a target state value of each combination result according to a preset corresponding relation between the matching state and the state value;
inputting the confidence degree corresponding to the target entity, the confidence degree corresponding to the target user intention and the target state value in each combined result into a pre-trained regression model to obtain a target quantization value of each combined result; the confidence corresponding to the target entity is used for representing the correct probability of the target entity; and the confidence degree corresponding to the target user intention is used for representing the correct probability of the target user intention.
4. The method of claim 2, wherein said selecting the target combined result from the plurality of combined results according to the plurality of target quantization values comprises:
sorting the plurality of combined results according to the plurality of target quantization values;
selecting the target combination result of which the target quantization value meets a first preset condition according to the sorting result; the first preset condition includes that a target quantization value of the combined result is greater than a preset quantization value.
5. The method according to any one of claims 1-4, wherein the obtaining of the plurality of target entities and the plurality of target user intentions corresponding to the user question comprises:
carrying out entity identification processing on the user question to obtain a plurality of target entities;
and performing intention identification processing on the user question to obtain a plurality of target user intentions.
6. The method of claim 5, wherein the performing entity identification processing on the user question to obtain the plurality of target entities comprises:
adopting a preset named entity recognition model to recognize at least one entity text from the user question;
searching a plurality of candidate entities from a preset entity database according to the entity text;
and carrying out disambiguation processing on the candidate entities by adopting a preset entity link model to obtain a plurality of target entities.
7. The method according to claim 5, wherein the performing the intent recognition processing on the user question to obtain the plurality of target user intentions comprises:
performing word segmentation processing on the user questions to obtain a plurality of question words;
determining a word vector corresponding to each question word;
inputting the word vector corresponding to each question word into a pre-trained intention recognition model to obtain a plurality of user intentions output by the intention recognition model and a confidence coefficient corresponding to each user intention;
selecting a target user intention which meets a second preset condition from the plurality of user intentions; the second preset condition comprises that the confidence degree corresponding to the user intention is greater than a preset confidence degree.
8. An intelligent question answering device, characterized in that the device comprises:
the entity intention acquisition module is used for receiving a user question and acquiring a plurality of target entities and a plurality of target user intentions corresponding to the user question;
the entity intention combination module is used for combining the target entities and the target user intents to obtain a plurality of combination results; each of the combined results includes a target entity and a target user intent;
the target query content determining module is used for screening out a target combined result from the combined results and determining target query content corresponding to the user question according to the target combined result;
and the target answer searching module is used for searching according to the target query content to obtain a target answer corresponding to the user question.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010107521.2A 2020-02-21 2020-02-21 Intelligent question answering method and device, computer equipment and storage medium Pending CN111368044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010107521.2A CN111368044A (en) 2020-02-21 2020-02-21 Intelligent question answering method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010107521.2A CN111368044A (en) 2020-02-21 2020-02-21 Intelligent question answering method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111368044A true CN111368044A (en) 2020-07-03

Family

ID=71206390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010107521.2A Pending CN111368044A (en) 2020-02-21 2020-02-21 Intelligent question answering method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111368044A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183098A (en) * 2020-09-30 2021-01-05 完美世界(北京)软件科技发展有限公司 Session processing method and device, storage medium and electronic device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522393A (en) * 2018-10-11 2019-03-26 平安科技(深圳)有限公司 Intelligent answer method, apparatus, computer equipment and storage medium
CN110427467A (en) * 2019-06-26 2019-11-08 深圳追一科技有限公司 Question and answer processing method, device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522393A (en) * 2018-10-11 2019-03-26 平安科技(深圳)有限公司 Intelligent answer method, apparatus, computer equipment and storage medium
CN110427467A (en) * 2019-06-26 2019-11-08 深圳追一科技有限公司 Question and answer processing method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183098A (en) * 2020-09-30 2021-01-05 完美世界(北京)软件科技发展有限公司 Session processing method and device, storage medium and electronic device
CN112183098B (en) * 2020-09-30 2022-05-06 完美世界(北京)软件科技发展有限公司 Session processing method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN110162633B (en) Voice data intention determining method and device, computer equipment and storage medium
CN111160017B (en) Keyword extraction method, phonetics scoring method and phonetics recommendation method
CN111104495B (en) Information interaction method, device, equipment and storage medium based on intention recognition
CN108427707B (en) Man-machine question and answer method, device, computer equipment and storage medium
CN110287285B (en) Method and device for identifying problem intention, computer equipment and storage medium
CN108595695B (en) Data processing method, data processing device, computer equipment and storage medium
WO2020232877A1 (en) Question answer selection method and apparatus, computer device, and storage medium
CN110598206A (en) Text semantic recognition method and device, computer equipment and storage medium
CN109063217B (en) Work order classification method and device in electric power marketing system and related equipment thereof
CN110674319A (en) Label determination method and device, computer equipment and storage medium
US20210390370A1 (en) Data processing method and apparatus, storage medium and electronic device
CN108038544B (en) Neural network deep learning method and system based on big data and deep learning
CN111078847A (en) Power consumer intention identification method and device, computer equipment and storage medium
CN111597313B (en) Question answering method, device, computer equipment and storage medium
CN113157863A (en) Question and answer data processing method and device, computer equipment and storage medium
CN110910864A (en) Training sample selection method and device, computer equipment and storage medium
CN110781677B (en) Medicine information matching processing method and device, computer equipment and storage medium
CN112541079A (en) Multi-intention recognition method, device, equipment and medium
CN112766319A (en) Dialogue intention recognition model training method and device, computer equipment and medium
CN111124898B (en) Question-answering system testing method and device, computer equipment and storage medium
CN112632248A (en) Question answering method, device, computer equipment and storage medium
CN110555165B (en) Information identification method and device, computer equipment and storage medium
CN111178714A (en) Intimacy degree determination method and device, computer equipment and storage medium
CN113239697B (en) Entity recognition model training method and device, computer equipment and storage medium
CN111368044A (en) Intelligent question answering method and device, computer equipment and storage 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