An intelligent question-answering system and method based on a knowledge base
By establishing a triple data set and using address characters and tags for data link integration, combining BERT and BiLSTM-CRF models, the problem of high dependence on semantic analysis by intelligent question-answer system is solved, achieving more accurate and efficient answer output.
Patent Information
- Application Number
- CN202510188756.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-02-20
AI Technical Summary
The existing intelligent question-and-answer system relies too much on semantic analysis, resulting in problems in which the output results do not match the actual problems.
Establish a triple data set, link and integrate data links through address characters and tags, extract the focus of the problem and convert it into triple data form with no actual answers, use the BERT and BiLSTM-CRF models to identify entity characteristics and relationship expressions, and filter out the highest similarity triple data for integration.
Reduce the dependence on semantic analysis, improve the accuracy and efficiency of the Q&A system, and ensure rapid analysis and accurate answer output in large-scale data retrieval.
Smart Images

Figure CN119739812B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an intelligent question-answering system and method based on a knowledge base. Background Art
[0002] With the continuous development of technology, the technical solutions for data processing have become increasingly simplified. From the initial written records to the data storage on readable media, and from the initial complex classification to the current classification databases. In order to facilitate the query of data more conveniently, various data retrieval systems have been designed and applied. Taking the intelligent customer service on major application platforms as an example, it provides automatic replies by querying relevant knowledge bases. The control of these automatic replies usually analyzes the semantics of the questions raised by users, analyzes and retrieves relevant knowledge in the knowledge base according to the results of semantic analysis, and finally obtains the result closest to the questions raised by users, and outputs this result as an answer to users. This analysis method overly relies on the accuracy of semantic analysis results. If there is a semantic analysis error, it will lead to a situation where the output result does not match the actual question. Summary of the Invention
[0003] In view of the deficiencies of the prior art, the present invention provides the following technical solutions:
[0004] An intelligent question-answering method based on a knowledge base includes the following steps:
[0005] S10: Establish a triple data set. Among them, in each unit of the triple data, in addition to the text data, an address symbol and a marker symbol are also stored. The address symbol points to another data in the triple data in semantic order, and the marker symbol makes an equivalent mark for the data under the same semantics;
[0006] S20: Perform semantic analysis on the question raised by the user through a semantic analysis module, extract the focus of the question, and convert the focus of the question into a triple data form without an actual answer;
[0007] S30: Link the marker symbols of each data in the triple to form a data chain according to the pointing of the address symbol, compare the triple data form without an actual answer with the data chains of approximate triple data in the triple data set, screen out the data with the highest similarity for integration, and output the integration result as the answer to the question.
[0008] As an improvement of the above technical solution, the focus of the question includes the entity features in the question and the relationship expressions between the entity features.
[0009] As an improvement of the above technical solution, the method for extracting the focus of the question in step S20 includes the following steps:
[0010] S21: Identify the output intention category of the problem through the BERT fine-tuning model.
[0011] S22: Extract the entity features in the problem through the BiLSTM-CRF model, and link the entity features to the triple dataset. If the entity features do not exist, mark them as unverified entities, and output the entity features, the relationship expressions between the entity features, and the unverified entities in the form of triple data, forming a triple data form without actual answers.
[0012] As an improvement of the above technical solution, the step S30 includes the following steps:
[0013] S31: List all the triple data in the triple dataset that have the same entity feature characters as those extracted in step S22.
[0014] S32: Compare the entity features extracted from the problem with the data in the triple data to obtain several groups of triple data with the highest similarity.
[0015] S33: Obtain the approximate triple data in the triple data, extract and integrate the data with the same position as the unverified entity, and output the integration result as the answer.
[0016] As an improvement of the above technical solution, the method for obtaining several groups of triple data with the highest similarity in step S32 depends on the following steps:
[0017] S321: Compare the entity features extracted from the problem with the triple data, extract all the triple data with the entity features as the main body, and classify them with the marker of the entity features to obtain the triple data with the same character and the same meaning.
[0018] S322: Screen out and output several groups of triple data with the highest similarity in meaning to the relationship expression from the obtained triple data.
[0019] As an improvement of the above technical solution, the acquisition of the similarity in meaning of the relationship expression in step S322 depends on the following steps:
[0020] S3221: Preset a similarity threshold. When the calculated similarity is greater than the threshold, it is considered that the words have the same meaning.
[0021] S3222: Obtain the words with the same position as the relationship expression in the triple data through the semantic analysis module, obtain the similarity between the words and the word expressions in the triple data form without actual answers, and screen out the data with similarity greater than the preset threshold as several groups of triple data with the highest similarity and output them.
[0022] As an improvement of the above technical solution, the data chain in step S33 includes a comparison chain and a pointing chain, and step S33 includes the following steps:
[0023] S331: Obtain the address symbol pointing of the entity feature in the triple data form without an actual answer, and combine the marker symbols of the entity feature in the triple data in the direction of its address symbol pointing to form a comparison chain.
[0024] S332: Obtain the address symbol pointing of the entity feature in several triple data with the highest similarity, and combine the marker symbols of the entity feature in each triple data in the direction of its address symbol pointing to form a pointing chain.
[0025] S333: Compare the pointing chain with the comparison chain. If the directions are exactly the same or exactly opposite, it is determined as approximate triple data.
[0026] S334: Integrate the data in the approximate triple data that is in the same position as the unverified entity and replace the content in the unverified entity to obtain triple data with an actual answer, and convert the triple data into a complete sentence as the answer for output.
[0027] An intelligent question-answering system based on a knowledge base operates using an intelligent question-answering method as described in the foregoing technical solution, and includes: a database, a semantic analysis module, a data processing module, and a data interaction module.
[0028] The database stores at least a triple data set and corpus data. The semantic analysis module is used to perform semantic analysis on the questions raised by the user, calculate the similarity of the vocabulary, and determine whether the vocabulary meanings are the same according to the similarity. The data processing module is used to extract the question focus in the question and convert the question focus into a triple data form without an actual answer. The data interaction module is used to perform data interaction with the user.
[0029] As an improvement of the above technical solution, the database further includes a marker table, and the marker table stores all marker symbols and the vocabulary corresponding to the marker symbols.
[0030] Advantages of the present invention:
[0031] By integrating the data in the form of triple data to form a triple data set, and forming a triple data form without an actual answer in the form of a simulated answer, comparing and screening the triple data form without an actual answer with the integrated triple data set can quickly find the answers contained in the knowledge base. This question-answering method is more dependent on the establishment of the triple data set. As long as the accuracy can be guaranteed in the initial stage of establishing the triple data set, the accuracy of the subsequent analysis results can be guaranteed, reducing the dependence on semantic analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a flowchart of an intelligent question - answering method based on a knowledge base according to the present invention;
[0033] Figure 2 is a flowchart of step S20 in an intelligent question - answering method based on a knowledge base according to the present invention;
[0034] Figure 3 is a flowchart of step S30 in an intelligent question - answering method based on a knowledge base according to the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0035] The following specific examples illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0036] In practical applications, the intelligent customer service of major application platforms usually provides automatic replies by querying relevant knowledge bases. The control of these automatic replies is usually achieved by performing semantic analysis on the questions raised by users, and analyzing and retrieving relevant knowledge in the knowledge base according to the results of semantic analysis. Finally, the result closest to the question raised by the user is obtained and used as the answer to be output to the user. This analysis method overly relies on the accuracy of the semantic analysis results. If a semantic analysis error occurs, it will lead to a situation where the output result does not match the actual problem.
[0037] To solve the above problems, the following embodiments are provided:
[0038] Embodiment 1
[0039] Please refer to Figures 1 to 3 , and provide an intelligent question - answering method based on a knowledge base, including the following steps:
[0040] S10: Establish a triple data set. Among them, in each unit of the triple data, in addition to text data, an address symbol and a marker symbol are also stored. The address symbol points to another data in the triple data in semantic order, and the marker symbol makes equivalent markings for data under the same semantics.
[0041] When establishing a triple data set, it is necessary to consider the way in which the triple data set is established. Since the existing technology leads to uncertainty in the results based on semantic judgment, in order to reduce this uncertainty, the data needs to be integrated in a certain way. Therefore, it is necessary to ensure the unique pointing of the data. Initial consideration is given to adding address symbols for determination. Since various types of text have non-unique meanings, such as various polyphones and polysemous words, it is also necessary to ensure that when a unique character is located, the word can be accurately classified. Here, consider adding markers and marking the markers with the semantics of the characters. The semantic marking here can be machine judgment or human judgment, or a combination of the two. Since it is the initial establishment of the data set, this establishment is controllable and can be adjusted later. Therefore, although it is also judged by semantics, it has a high degree of adjustability and can be adjusted later, which can minimize the uncertainty brought by semantic analysis.
[0042] Take "Xiao Ming is Xiao Gang's father" as an example. When the sentence is used to create triple data, the extracted entity features are "Xiao Ming" and "Xiao Gang", and "father" is stored as a relational expression, that is, a triple data of ["Xiao Ming", "father", "Xiao Gang"] is obtained. When address symbols and marker codes are added, "father" has an address symbol pointing to "Xiao Ming", and "Xiao Ming" has an address symbol pointing to "Xiao Gang". As a child, "Xiao Gang" will establish an address symbol pointing to "father". The address symbols here can form a chain with their pointing, and use this chain to form multiple sentences with different orders or characters but the same meaning, for example: "Xiao Ming is Xiao Gang's father", "Xiao Gang's father is Xiao Ming", and "The person whose father is Xiao Ming is Xiao Gang".
[0043] When marker codes are added, the different meanings of words can be distinguished. Take "apple" as an example. When it involves words such as "performance" and "parameters", its meaning refers to Apple or Apple mobile phones. When it involves words such as "taste" and "planting", its meaning refers to a type of fruit. Different marker codes indicate different meanings for the same characters. As long as the marker code is determined, all triple data with direct adjacent relationships under this marker code can be determined.
[0044] After the establishment of the triple data set, it is necessary to analyze the user's question. Different from the traditional semantic analysis, after the triple data set is established, it is not necessary to completely determine the specific semantic situation, but only to find the focus of the question raised by the user as much as possible. Specifically, step S20 is executed.
[0045] S20: Perform semantic analysis on the question raised by the user through the semantic analysis module, extract the focus of the question, and convert the focus of the question into a triple data form without an actual answer.
[0046] Among them, the problem focus includes the entity features in the problem and the relationship expressions between the entity features. Based on this, the method for extracting the problem focus in the problem in step S20 includes the following steps:
[0047] S21: Identify the output intention category of the problem through the BERT fine-tuning model.
[0048] First, it is necessary to know the intention of the question raised by the user, whether it is to find an actual answer or a hypothetical question. For example, "What is the speed of sound propagation in a vacuum?" Since there is no medium in a vacuum, sound cannot propagate in a vacuum environment. Although this kind of question has no answer in our conventional semantic understanding, it should belong to the question of finding an actual answer. Another example is "If Napoleon won the Battle of Waterloo, what would Europe be like now?" This kind of question should be a hypothetical question. In this embodiment, for such a hypothetical question, usually only "analysis cannot be performed based on existing knowledge" will be output. This is because the complexity of finding an answer to a hypothetical question is too high, and the design of this embodiment is to speed up the query of data. Therefore, the analysis process of this kind of hypothetical question is deleted to speed up the data analysis speed. When applied to large-scale data retrieval, this processing method can greatly speed up the data analysis and retrieval speed. Of course, the user can also process this kind of hypothetical question by additionally embedding an independent functional module and provide an answer mode for the hypothetical question. However, in this embodiment, only questions of finding actual answers are considered, and subsequent functions are started for this kind of question.
[0049] When step S21 determines that the user's question is a question of finding an actual answer, step S22 is executed.
[0050] S22: Extract the entity features in the problem through the BiLSTM-CRF model, link the entity features to the triple dataset. If the entity feature does not exist, it is marked as an unverified entity, and the entity feature, the relationship expression between the entity features, and the unverified entity are output in the form of triple data to form a triple data form without an actual answer.
[0051] In this embodiment, both the BERT fine-tuning model and the BiLSTM-CRF model are recognition models described in the prior art. Among them, the BERT fine-tuning model is a pre-trained natural language processing model that can consider context vocabulary, better understand the meaning of sentences, and can distinguish the type of user questions and determine the output intention category according to the content of the user's questions. The BiLSTM-CRF model is used to process sequence labeling tasks in natural language processing. Its main body consists of a bidirectional long short-term memory network (Bi-LSTM) and a conditional random field (CRF). The model input is character features, and the output is the predicted label corresponding to each character. By labeling the vocabulary in the question, the function of extracting entity features is realized (entity features are usually the topic words in a sentence. There is at least one topic word in a sentence, and there may be multiple topic words).
[0052] Similar to the establishment of the previous triple dataset, entity features are preferentially extracted here. For example, for the question "Who invented the camera?", when performing entity feature extraction, two entities, "camera" and "inventor", can be extracted, and the relationship expression "invent" between these two entity features can be obtained. However, there is no actual entity in the "inventor" column, that is, the entity feature does not exist. Here, it is marked as an unverified entity. When we get the answer, it should be "The camera was invented by ***" or "The inventor of the camera is ***". After converting this answer form into triple form, it is: ["unknown inventor", "invent", "camera"], which is the triple data form without an actual answer.
[0053] After obtaining the triple data form, comparison and screening are required. Here, step S30 is continued to be executed.
[0054] S30: Use the pointers of the address symbols to link the markers of each data in the triple to form a data chain. Compare the data chain of this triple data form without an actual answer with the data chains of the approximate triple data in the triple dataset, screen out the data with the highest similarity for integration, and output the integration result as the answer to the question.
[0055] Specifically, step S30 includes the following steps:
[0056] S31: List all the triple data in the triple dataset that have the same entity feature characters as those extracted in step S22.
[0057] Regardless of other features, entity features should always exist in the question. This entity feature usually cannot be changed with similar words. Therefore, only the triple data in the triple dataset with the same entity feature characters as the entity features can be screened out to obtain the data with the correct answer.
[0058] In the extraction of the foregoing entity features, the relationship expressions between entity features are generally considered to be extractable. However, in some cases, they cannot be obtained. For example, "What is the relationship between Xiaoming and Xiaogang?" In this case, only the entity features "Xiaoming" and "Xiaogang" can be extracted, and an unknown relationship expression can also be obtained. When establishing a triple data form without an actual answer, it is: ["Xiaoming", "unknown relationship", "Xiaogang"]. However, if this data exists in the database, the entity features "Xiaoming" and "Xiaogang" are unique, and the relationship expression can be inferred inversely through these two entity features. Therefore, it is only necessary to ensure that the characters of the entity features are the same.
[0059] S32: Compare the entity features extracted from the question with the data in the triple data to obtain several groups of triple data with the highest similarity.
[0060] After completing the extraction of the triple data, it is also necessary to obtain the triple data with the highest similarity from the step S32. This is to further reduce the complexity of data comparison and further screen the data in the triple data set. Specifically, it includes the following steps:
[0061] S321: Compare the entity features extracted from the question with the triple data, extract all the triple data with the entity feature as the main body, and classify them with the identifier of the entity feature to obtain the triple data with the same character and the same meaning.
[0062] Since the meaning represented by the identifier is unique, only by screening the corresponding triple data under the condition of the same meaning can it be ensured that the triple data screened has the characteristic of positive correlation. For example, the question is "What tools did Xiaoming invent?" After it is converted into triple data without an actual answer, it is: ["Xiaoming", "invented", "unknown tool"]. When the entity feature "Xiaoming" is used as the main body, since the identifier of "Xiaoming" is unique and the meaning is also the same, after screening with the entity feature "Xiaoming" as the main body, all the triple data obtained is positively correlated with "Xiaoming". After converting the data into regular statements, it may be "Xiaoming is Xiaogang's father", "Xiaoming invented the hammer", etc.
[0063] After determining the positively correlated data, further distinguish them through the relationship expression. Specifically, execute step S322.
[0064] S322: Screen out and output several groups of triple data with the highest similarity in meaning to the relationship expression from the obtained triple data.
[0065] Specifically, the acquisition of the similarity in meaning of the relationship expression in the step S322 depends on the following steps:
[0066] S3221: Preset similarity threshold. When the calculated similarity is greater than this threshold, it is considered that the words have the same meaning.
[0067] Different from the semantic analysis of traditional whole-sentence questions, in this embodiment, only the meanings of a small number of words need to be analyzed to make a judgment. When an error occurs in the result, only the corresponding threshold needs to be increased.
[0068] S3222: Obtain the words in the triple data that have the same position as the relationship expression through the semantic analysis module, obtain the similarity between this word and the word expression in the triple data form without an actual answer, and filter out the data with a similarity greater than the preset threshold as several groups of triple data with the highest similarity for output.
[0069] As already mentioned in the establishment of the foregoing triple data set, there is an address symbol and a marker for each unit in each triple data. Therefore, as long as two data in the triple data are located, the position of the third data in the triple can surely be known. When the word expression meanings in the triple data form without an actual answer are similar, they are considered to have a high similarity and may be synonymous or of the same type of words. For example, for the three sentences "Xiaoming is Xiaogang's father", "Xiaogang is Xiaoming's son", and "Xiaogang injured Xiaoming", when converted into triple form, the results are: ["Xiaoming", "father", "Xiaogang"], ["Xiaogang", "son", "Xiaoming"], ["Xiaoming", "injured", "Xiaogang"]. In this context, it can be considered that "father" and "son" are both words expressing the relationship between people, while "injured" is a verb of action. When analyzing, the verb of action "injured" has a different part of speech from the previous two. When the entity features "Xiaoming" and "Xiaogang" are exactly the same, it can be considered that the relationship expression words "son" and "father" are expressions with a high similarity. Therefore, when outputting, this type of words will also be output together.
[0070] S33: Obtain the approximate triple data in the triple data, extract and integrate the data with the same position as the unverified entity, and output the integration result as the answer.
[0071] As analyzed before, since the triple data without an actual answer is also obtained in the same way as the establishment of the initial triple data set, therefore, if there is an actual answer in the approximate triple data, there must be a set of data with exactly the same or exactly opposite address symbols pointed to in the triple data without an actual answer and the approximate triple data. Specifically, the data chain in step S33 includes a comparison chain and a pointing chain. Step S33 includes the following steps:
[0072] S331: Obtain the address pointer of the entity feature in the triple data form without actual answers, and combine the marker of the entity feature in the triple data in the direction pointed by its address pointer to form a comparison chain.
[0073] S332: Obtain the pointers of the address pointers of the entity feature in several triples with the highest similarity, and combine the markers of the entity feature in each triple data in the direction pointed by its address pointer to form a pointer chain.
[0074] S333: Compare the pointer chain with the comparison chain. If the directions are exactly the same or exactly opposite, it is determined as approximate triple data.
[0075] For example: In the two sentences "Xiaoming is Xiaogang's father" and "Xiaogang is Xiaoming's son", when analyzing the address pointer in the above manner, in the first sentence, the address pointer of "father" points to "Xiaoming", the address pointer of "Xiaoming" points to "Xiaogang", and the address pointer of "Xiaogang" points to "father". In the second sentence, the address pointer of "son" points to "Xiaogang", the address pointer of "Xiaogang" points to "Xiaoming", and the address pointer of "Xiaoming" points to "son". Converting it to the form of marker codes, if the representation form of marker codes is added, "Xiaoming" is represented by 1, "father" and "son" are represented by 2 for the expression of the relationship between people, and "Xiaogang" is represented by 3, then the obtained pointer chain is and , since in this embodiment, when establishing triple data, it is based on the relationship expression. Therefore, here, the marker code of the relationship expression can be not considered, and only the marker code of the entity feature needs to be considered, that is, the obtained pointer chain should be and , and under the above steps, as long as the answers match, the directions of these two pointer chains will usually be the same or opposite.
[0076] In addition to the above situation, there are also two families that both have the two people "Xiaoming" and "Xiaogang", but their relationships are different. For example, "Xiaoming is Xiaogang's uncle". In this case, it seems that it will lead to chaotic output results. However, it can be known from the establishment of the initial data set that the establishment of marker codes not only refers to single characters but also includes meanings. When taking the family as a unit, the meaning represented by the marker code is the family relationship chain. Unless all the member names in the two families are exactly the same, there will be differences in the family relationship chain, and different marker codes will be generated when generating marker codes. This probability can be ignored, so it can be not considered.
[0077] S334: Integrate the data in the approximate triple data with the same position as the unverified entity and replace the content in the unverified entity to obtain triple data with actual answers, and convert the triple data into a complete sentence as the answer for output.
[0078] If there are multiple approximate triple data, it is considered that the answers are mergeable. Taking the question "What tools did Xiaoming invent?" as an example, there can be multiple answers, that is, Xiaoming invented more than one tool. Then there will be multiple approximate triple data in the finally obtained results. At this time, all the data with the same position as the unverified entity can be integrated, and then the content in the unverified entity is replaced to obtain triple data with actual answers. Different from conventional triple data, the data filled in the position of the unverified entity is in the form of an array. When outputting finally, the data in the array is traversed, and it is integrated with the entity features and the relationship expression to form a complete sentence as the answer for output. And this integrated data can be stored in the triple data, which can speed up the query and analysis speed when encountering corresponding questions later.
[0079] In this embodiment, the unknown questions are not analyzed because this embodiment is mostly applied to the question and answer of a specific knowledge base. The questioner should ask questions based on the corresponding knowledge system. This way of asking questions may have incomplete answers, but usually there will be certain answers. If there is no accurate answer to the question asked, in this embodiment, only "No accurate result is queried" will be output, and similar questions with answers will be provided for the user to choose to avoid query errors caused by incorrect user input.
[0080] Embodiment 2
[0081] Provide an intelligent question and answer system based on a knowledge base, which operates by using an intelligent question and answer method based on a knowledge base recorded in Embodiment 2, including: a database, a semantic analysis module, a data processing module, and a data interaction module.
[0082] The database stores at least a triple data set and corpus data. The semantic analysis module is used to perform semantic analysis on the questions proposed by the user, calculate the similarity of vocabulary, and judge whether the vocabulary meanings are the same according to the similarity. The data processing module is used to extract the question focus in the question and convert the question focus into the form of triple data without actual answers. The data interaction module is used to perform data interaction with the user.
[0083] Obtain the questions proposed by the user through the semantic analysis module, perform word meaning analysis and calculation of vocabulary similarity, judge whether the vocabulary meanings are the same or approximate, extract the question focus in the question through the data processing module, and convert the question focus into the form of triple data without actual answers. After comparing and processing the similarity, the analysis result is output to the user through the data processing module.
[0084] In one embodiment, the database further includes a marker table, and the marker table stores all markers and the vocabulary corresponding to the markers.
[0085] In the foregoing solution, for the tag, it can also be separately recorded in a table, so that when querying the tag, the efficiency is higher and the speed is faster.
[0086] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. An intelligent question-answering method based on a knowledge base, characterized in that, It includes the following steps: S10: Establish a triple dataset. In each unit of the triple data, in addition to literal data, an address symbol and a marker symbol are stored. The address symbol points to another data in the triple data in semantic order, and the marker symbol makes equivalent markings for data under the same semantics; S20: Perform semantic analysis on the question raised by the user through a semantic analysis module, extract the question focus in the question, and convert the question focus into a triple data form without an actual answer; S30: Link the marker symbols of each data in the triple data according to the pointing of the address symbol to form a data chain. Compare the triple data form without an actual answer with the data chains of approximate triple data in the triple dataset, screen out the data with the highest similarity for integration, and output the integration result as the answer to the question; The step S30 includes the following steps: S31: List all triple data in the triple dataset that have the same entity feature characters extracted during the question focus extraction process; S32: Compare the entity features extracted from the question with the data in the triple data to obtain several groups of triple data with the highest similarity; S33: Obtain the approximate triple data in the triple data, extract and integrate the data with the same position as the unverified entity, and output the integration result as the answer; The data chain in the step S33 includes a comparison chain and a pointing chain. The step S33 includes the following steps: S331: Obtain the address symbol pointing of the entity feature in the triple data form without an actual answer, and combine the marker symbols of the entity feature in the triple data in the direction pointed by its address symbol to form a comparison chain; S332: Obtain the address symbol pointings of the entity feature in several triple data with the highest similarity, and combine the marker symbols of the entity feature in each triple data in the direction pointed by its address symbol to form a pointing chain; S333: Compare the pointing chain with the comparison chain. If the directions are completely the same or completely opposite, it is determined as approximate triple data; S334: Integrate the data in the approximate triple data with the same position as the unverified entity and replace the content in the unverified entity to obtain a triple data with an actual answer, and convert the triple data into a complete sentence as the answer for output.
2. The intelligent question answering method based on a knowledge base according to claim 1, wherein: The question focus includes entity features in the question and the relationship expressions between entity features.
3. The intelligent question-answering method based on a knowledge base according to claim 2, characterized in that: The method for extracting the question focus in the step S20 includes the following steps: S21: Identify the output intention category of the question through a BERT fine-tuning model; S22: Extract the entity features in the question through a BiLSTM-CRF model, and link the entity features to the triple dataset. If the entity features do not exist, they are marked as unverified entities. Output the entity features, the relationship expressions between entity features, and the unverified entities in the form of triple data to form a triple data form without an actual answer.
4. The intelligent question-answering method based on a knowledge base according to claim 1, characterized in that: The method for obtaining several groups of triple data with the highest similarity in the step S32 depends on the following steps: S321: Compare the entity features extracted from the question with the triple data, extract all the triple data with the entity features as the main body, classify them with the identifier of the entity features, and obtain the triple data with the same characters and the same meaning. S322: Screen out and output several groups of triple data with the highest similarity in the meaning of the relationship expression from the obtained triple data.
5. The intelligent question-answering method based on a knowledge base according to claim 4, wherein: The similarity in the meaning of the relationship expression in step S322 depends on the following steps: S3221: Preset a similarity threshold. When the calculated similarity is greater than this threshold, it is considered that the words have the same meaning. S3222: Obtain the words with the same position as the relationship expression in the triple data through the semantic analysis module, obtain the similarity of the expression of this word and the words in the triple data form without actual answers, and screen out the data with similarity greater than the preset threshold as several groups of triple data with the highest similarity for output.
6. An intelligent question-answering system based on a knowledge base operates by using an intelligent question-answering method based on a knowledge base as described in any one of claims 1 to 5, characterized in that, Including: A database that stores at least a triple data set and corpus data. A semantic analysis module for performing semantic analysis on the questions raised by users, calculating the similarity of words, and judging whether the meanings of words are the same according to the similarity. A data processing module for extracting the problem focus in the question and converting the problem focus into a triple data form without actual answers. A data interaction module for interacting with users.
7. An intelligent question answering system based on a knowledge base according to claim 6, characterized in that: The database also includes a symbol table that stores all symbols and the words corresponding to the symbols.
Citation Information
Patent Citations
Method and equipment for constructing intelligent question-answering system through question generation data set
CN112100351A