Query method based on voice fixed condition
1. The query method based on the voice fixed condition is characterized by comprising the following steps: the method specifically comprises the following steps:
s1, inputting voice by a user;
s2, natural voice recognition;
s3, extracting entity keywords through a knowledge graph;
s4, filling template word slots;
s5, sequencing the query results of the template;
and S6, displaying the sequencing result.
2. The query method based on the fixed voice condition as claimed in claim 1, wherein: in the step S1, the user entering voice means that problem voice information that the user needs to inquire is entered through the voice entering device, the number of times of entering the voice information of the user problem is initially set to two times, the time for setting single problem voice entering information is set to 20S, the voice entering device determines the optimal recording result after twice entering the problem voice information of the user, if no optimal recording result exists, a prompt is given to instruct the user to complete the third recording within 20S, if no optimal recording result exists after the third recording is completed, the user is prompted that the problem voice information cannot be inquired, and after the optimal recording result is determined, willingness information of the user for inquiring the problem is obtained.
3. The query method based on the fixed voice condition as claimed in claim 2, wherein: when the willingness information of the user for inquiring the question is obtained, specifically, after the optimal recording result of the user for inquiring the question is obtained, the voice recording device sends a prompt to guide the user to record a willingness statement voice related to the question voice information, wherein the willingness statement voice specifically refers to an expected result and a tendency result of the user for inquiring the question, and the expected result and the tendency result of the user are the willingness information of the user for inquiring the question.
4. The query method based on the fixed voice condition as claimed in claim 2, wherein: in S2, the natural speech recognition means automatically converting the question speech information queried by the user from a speech format to a text character format, where the question speech information is an optimal recording result, and when the question speech information is converted to question text information, performing homophonic and diphone processing on the question speech information, specifically, performing different types of conversion on homophonic word senses of the question speech information, and performing different types of conversion on diphone word senses of the question speech information.
5. The query method based on the fixed voice condition as claimed in claim 2, wherein: after the problem voice information is processed by homophone and polyphonic, and is converted into different types of problem text information, the converted different types of problem text information are subjected to voice judgment, the problem text information obviously not conforming to the semantics of the problem voice information is removed by combining with the intention information of the user for inquiring the problem, and the problem text information conforming to the intention of the user is reserved.
6. The query method based on the fixed voice condition as claimed in claim 4, wherein: in S3, extracting the entity keyword through the knowledge graph means that after the problem speech information is converted into the problem text information according with the user' S intention through the format, extracting the entity keyword information of the problem text information through the knowledge graph, performing ambiguity analysis on the extracted entity keyword after the entity keyword information is extracted, and specifically, performing different types of division on the extracted entity keyword according to different ambiguity information of the entity keyword information, and performing storage of the different ambiguous entity keyword information in a differentiated manner.
7. The query method based on the fixed voice condition as claimed in claim 6, wherein: in the step S4, after extracting the entity keyword information according to the knowledge graph, taking the entity keyword information as a filling template, and constructing all the entity keyword information with different ambiguities as corresponding word slot filling templates, and after constructing the entity keyword filling templates with different ambiguities, organizing corresponding filling words in the word slots according to the intention information of the user to fill the slots in the entity keyword filling templates, until the entity keyword filling templates with different ambiguities are subjected to information completion by filling words respectively;
the method has the advantages that the template word slot is filled, the user intention information is converted into a clear query instruction, the query instruction of the user is clearer and more accurate through the completion information, and after the entity keyword filling template completes the information through word completion, the clear query instruction converted by different ambiguous entity keywords is substituted into the knowledge graph to respectively query the problem information.
8. The query method based on the fixed voice condition as claimed in claim 7, wherein: in S5, after the actual keywords are processed by filling the template word slots, and the corresponding query instructions processed by filling the template word slots are substituted into the knowledge graph for problem query, the results of the knowledge graph query are output, and the query results of the templates are sorted.
9. The query method based on the fixed voice condition as claimed in claim 8, wherein: when the query results are ranked, firstly, induction processing is carried out on the query results corresponding to a plurality of entity keywords with different ambiguities, paraphrases of the corresponding query results are definitely induced, then the corresponding query results are compared with the intention information of the user query problem, finally, the query results are ranked by taking the matching degree of the query results and the intention information of the user as a ranking standard, and the query results are labeled according to the ranking results.
10. The query method based on the fixed voice condition as claimed in claim 8, wherein: in S6, after comparing and sorting the query result with the willingness information of the user to query the question, the query result is displayed according to the sorting order, specifically, the query result is displayed according to the label sequence of the query result in a text and voice display manner, the text and voice display manner can be selected to be displayed according to the user requirement, or can be displayed in a text and voice combination manner.
Background
The knowledge graph combines theories and methods of subjects such as applied mathematics, graphics, information visualization technology, information science and the like with methods such as metrology introduction analysis, co-occurrence analysis and the like, and utilizes the visual graph to vividly display the core structure, development history, frontier field and integral knowledge framework of the subjects to achieve the modern theory of multi-subject fusion, so that practical and valuable references can be provided for subject research, when a user queries problem results through voice information, generally, the query voice information of the user problem is converted into text through a voice recognition module, then the text information is analyzed and understood and matched through a natural language understanding module, finally, the problem which is closest to the text of the user is searched and retrieved in the knowledge graph, and finally, the result information of the query problem is displayed to the user;
the existing voice query method needs to maintain a huge knowledge base in the process of understanding and matching the user problems, generating answers to the question queries by matching the query speech with corresponding knowledge text within the knowledge base, therefore, the knowledge base needs to be continuously updated and maintained, so that the questions asked by the user need to be stored in the knowledge base, the expansibility of the problem query mode is poor, the maintenance cost is high, and the existing problem query mode based on the voice query assistant, because the voice information of the query problem can not be processed in the query process, the voice information of the query problem can not input and query the accurate will information of the query problem of the user in time when homophonic, polyphonic and ambiguous occurs, and further, the deviation of the query result is increased, so that the user cannot obtain the query result corresponding to the query intention.
Disclosure of Invention
The invention provides a query method based on a voice fixed condition, which can effectively solve the problems that the prior art provided in the background art needs to continuously update and maintain the knowledge base, so that the problems asked by a user need to exist in the knowledge base, the problem query mode has poor expansibility and high maintenance cost, the deviation of query results is increased, and the user cannot obtain the query results corresponding to the query intention.
In order to achieve the purpose, the invention provides the following technical scheme: the query method based on the voice fixed condition specifically comprises the following steps:
s1, inputting voice by a user;
s2, natural voice recognition;
s3, extracting entity keywords through a knowledge graph;
s4, filling template word slots;
s5, sequencing the query results of the template;
and S6, displaying the sequencing result.
According to the technical scheme, in the step S1, the voice input by the user refers to the fact that problem voice information needing to be inquired by the user is input through the voice input equipment, the input times of the voice information of the user problem are initially set to be twice, the time for inputting the information for a single problem voice is set to be 20S, the voice input equipment determines the optimal recording result after inputting the problem voice information of the user twice, if the optimal recording result does not exist, a prompt is given to guide the user to complete third recording in 20S, if the optimal recording result does not exist after the third recording is finished, the user is prompted that the inquiry of the problem voice information cannot be completed, and after the optimal recording result is determined, the willingness information of the user for inquiring the problem is obtained.
According to the technical scheme, when willingness information of a user for inquiring the problem is obtained, specifically, after an optimal recording result of the user for inquiring the problem is obtained, the voice input equipment sends a prompt to guide the user to input willingness statement voice related to the problem voice information, the willingness statement voice specifically refers to an expected result and a tendency result of the user for inquiring the problem, and the expected result and the tendency result of the user are willingness information of the user for inquiring the problem.
According to the above technical solution, in S2, the natural speech recognition means automatically converting the problem speech information queried by the user from a speech format to a text character format, where the problem speech information is an optimal recording result, and when the problem speech information is converted to the problem text information, performing homophone and misphone processing on the problem speech information, specifically, performing different types of conversion on homophone word senses of the problem speech information, and performing different types of conversion on misphone word senses of the problem speech information.
According to the technical scheme, after problem voice information is processed through homophone and polyphonic and is converted into problem text information of different types, the problem text information of the different types after conversion is subjected to voice judgment, problem text information obviously not meeting the semantics of the problem voice information is removed by combining with intention information of a user for inquiring problems, and the problem text information meeting the intention of the user is reserved.
According to the above technical solution, in S3, extracting the entity keyword through the knowledge graph means that after the problem speech information is converted into the problem text information according with the format of the user' S intention, the entity keyword information of the problem text information is extracted through the knowledge graph, and after the entity keyword information is extracted, performing ambiguity analysis on the extracted entity keyword, specifically, performing different types of division on the extracted entity keyword according to different ambiguity information of the entity keyword information, and storing the different ambiguous entity keyword information in a differentiated manner.
According to the technical scheme, in the step S4, after the entity keyword information is extracted according to the knowledge graph, the entity keyword information is used as a filling template, all the entity keyword information with different ambiguities is constructed as corresponding word slot filling templates, after the entity keyword filling templates with different ambiguities are constructed, corresponding filling words in the word slots are organized according to the intention information of the user to fill the word slots in the entity keyword filling templates, and the filling of the information of the entity keyword filling templates with different ambiguities is completed respectively through the filling words;
the method has the advantages that the template word slot is filled, the user intention information is converted into a clear query instruction, the query instruction of the user is clearer and more accurate through the completion information, and after the entity keyword filling template completes the information through word completion, the clear query instruction converted by different ambiguous entity keywords is substituted into the knowledge graph to respectively query the problem information.
According to the technical scheme, in the step S5, after the actual keywords are processed by filling the template word slots, and the corresponding query instructions processed by filling the template word slots are substituted into the knowledge graph for problem query, the results of the knowledge graph query are output, and the query results of the template are sorted.
According to the technical scheme, when the query results are ranked, firstly, induction processing is carried out on the query results corresponding to a plurality of entity keywords with different ambiguities, paraphrases of the corresponding query results are definitely induced, then the corresponding query results are compared with willingness information of user query problems, finally, the query results are ranked by taking the matching degree of the query results and the willingness information of the user as a ranking standard, and a plurality of query results are labeled according to the ranking results.
According to the technical scheme, in the step S6, after the query result is compared with the willingness information of the user to query the question and is subjected to sorting processing, the query result is displayed according to the sorting order, specifically, the query result is displayed according to the label sequence of the query result in a text and voice display mode, the text and voice display mode can be selected according to the user requirement for display, and can also be displayed in a text and voice combination mode.
Compared with the prior art, the invention has the beneficial effects that:
1. the knowledge graph is combined through an automatic generation technology based on query conditions, so that the voice information query and result output of a user are realized, the defect that a knowledge base needs to be maintained in the traditional method is overcome, meanwhile, the intention analysis of short text problem information of the user is realized through the query technology, multi-dimensional query data can be rapidly carried out, the voice query is realized, list type data are screened through natural language, and the method has higher accuracy and good robustness.
2. When a user inputs voice, the voice information can acquire an optimal recording result more quickly in the input process by setting the input times of the voice information and the time of single problem voice input information, meanwhile, the accuracy of the voice information in the input process is ensured, meanwhile, the intention information of the user for inquiring problems can be acquired when the voice is input, the subsequent inquiry results can be preferentially ordered according to the intention information of the user when the inquiry results are output and ordered by acquiring the intention information of the user, so that the user can more accurately acquire the result information of the inquiry problems, and the accuracy of the problem result information when the user inquires the problems is ensured.
3. When format conversion is carried out on voice information of a problem inquired by a user, homophonic and mispronounced processing can be carried out on the voice information of the problem, so that the voice information of the problem can be converted in different types according to homophonic word meanings and mispronounced word meanings of the voice information of the problem, after conversion, problem text information obviously not meeting the semantics of the voice information of the problem can be removed by combining with intention information of the problem inquired by the user, problem text information meeting the intention of the user is reserved, and then the voice information of the problem can be inquired quickly when follow-up problem voice information is inquired, so that the inquiring efficiency and accuracy are ensured;
on the basis of homophonic and diphasic processing, ambiguity analysis processing can be carried out on the extracted entity keyword after the entity keyword information is extracted, and different types of division can be carried out on the extracted entity keyword, so that the entity keyword information with different ambiguities can be used as different query conditions, and further the problem result to be queried by the user can be ensured to be more comprehensive when the user queries the problem.
4. After extracting entity keyword information according to the knowledge graph, taking the entity keyword information as a filling template, constructing all entity keyword information with different ambiguities as corresponding word slot filling templates, and constructing the entity keyword information with different ambiguities after constructing the entity keyword filling templates with different ambiguities;
by filling the template word slot, corresponding word filling in the word slot is organized conveniently according to the intention information of the user, and then the entity keyword filling template is filled in the slot, so that the entity keyword filling templates with different ambiguities can be completed conveniently by filling the words respectively, meanwhile, the intention information of the user can be converted into a definite query instruction, the query instruction of the user is clearer and more accurate by completing the information, and the follow-up problem query result of the user through a knowledge graph is further ensured to be more accurate.
5. After the results of the user problem query are output through the knowledge graph, the corresponding query results can be compared with the intention information of the user query problems, the multiple query results are ranked by taking the matching degree of the query results and the intention information of the user as a ranking standard, and meanwhile, the query results can be displayed according to the ranking order, so that the query results corresponding to the query problems can be found more visually and clearly in the follow-up problem query results of the user, the user can also know different output results of the query problems more visually, the experience of the user in the problem query results is improved, and the problem result query efficiency is ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
In the drawings:
FIG. 1 is a flow chart of a query method of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
Example (b): as shown in fig. 1, the present invention provides a technical solution, which is a query method based on a fixed voice condition, and specifically includes the following steps:
s1, inputting voice by a user;
s2, natural voice recognition;
s3, extracting entity keywords through a knowledge graph;
s4, filling template word slots;
s5, sequencing the query results of the template;
and S6, displaying the sequencing result.
Based on the above technical scheme, in S1, the user entering voice means that problem voice information that the user needs to inquire is entered through a voice entry device, the number of times of entry of the voice information of the user problem is initially set to two times, the time for setting single problem voice entry information is set to 20S, the voice entry device determines an optimal recording result after the problem voice information of the user is entered twice, and if no optimal recording result exists, a prompt is given to instruct the user to complete third recording within 20S, and if no optimal recording result exists after the third recording ends, the user is prompted that the problem voice information cannot be inquired, and after the optimal recording result is determined, willingness information of the user to inquire the problem is obtained.
Based on the technical scheme, when the willingness information of the user for inquiring the problem is obtained, specifically, after the optimal recording result of the user for inquiring the problem is obtained, the voice input device sends a prompt to guide the user to input willingness statement voice related to the problem voice information, the willingness statement voice specifically refers to an expected result and a tendency result of the inquiry problem expected by the user, and the expected result and the tendency result of the user are the willingness information of the user for inquiring the problem.
Based on the above technical solution, in S2, the natural speech recognition means automatically converting the problem speech information queried by the user from a speech format to a text character format, where the problem speech information is an optimal recording result, and when the problem speech information is converted to the problem text information, performing homophone and misphone processing on the problem speech information, specifically, performing different types of conversion on homophone word senses of the problem speech information, and performing different types of conversion on misphone word senses of the problem speech information.
Based on the technical scheme, after the problem voice information is processed by homophone and polyphonic and is converted into different types of problem text information, the converted different types of problem text information are subjected to voice judgment, the problem text information obviously not meeting the semantics of the problem voice information is removed by combining with the intention information of the user for inquiring the problem, and the problem text information meeting the intention of the user is reserved.
Based on the above technical solution, in S3, extracting the entity keyword through the knowledge graph means that after the problem voice information is converted into the problem text information according with the format of the user' S intention, the entity keyword information of the problem text information is extracted through the knowledge graph, and after the entity keyword information is extracted, performing ambiguity analysis on the extracted entity keyword, specifically, performing different types of division on the extracted entity keyword according to different ambiguity information of the entity keyword information, and storing the different ambiguous entity keyword information in a differentiated manner.
Based on the above technical solution, in S4, after extracting entity keyword information according to a knowledge graph, taking the entity keyword information as a filling template, and constructing all entity keyword information with different ambiguities as corresponding word slot filling templates, after constructing different ambiguity entity keyword filling templates, organizing corresponding filling words in word slots according to intention information of a user to fill the slots of the entity keyword filling templates, until completing the information of the entity keyword filling templates with different ambiguities by filling words respectively;
the method has the advantages that the template word slot is filled, the user intention information is converted into a clear query instruction, the query instruction of the user is clearer and more accurate through the completion information, and after the entity keyword filling template completes the information through word completion, the clear query instruction converted by different ambiguous entity keywords is substituted into the knowledge graph to respectively query the problem information.
Based on the above technical solution, in S5, after the actual keyword is processed by filling the template word slot, and the corresponding query instruction after processing the filled template word slot is substituted into the knowledge graph for problem query, the result of the knowledge graph query is output, and the query results of the template are sorted.
Based on the technical scheme, when the query results are ranked, induction processing is firstly carried out on the query results corresponding to a plurality of entity keywords with different ambiguities, paraphrases of the corresponding query results are definitely induced, then the corresponding query results are compared with willingness information of user query problems, finally the query results are ranked by taking the matching degree of the query results and the willingness information of the user as a ranking standard, and a plurality of query results are labeled according to the ranking results.
Based on the above technical solution, in S6, after comparing and sorting the query result with the willingness information of the user to query the question, the query result is displayed according to the sorting order, specifically, the query result is displayed according to the label order of the query result in a text and voice display manner, the text and voice display manner can be selected according to the user requirement for display, and can also be displayed in a text and voice combination manner.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.