Intelligent question and answer method and system based on four-layer feature vector matching model
By building an intelligent question-answering system with a four-layer feature vector matching model, the problems of multi-dimensional search and insufficient precision of traditional question-answering systems are solved, and efficient and accurate knowledge query and answer extraction are achieved, which is suitable for complex business scenarios.
Patent Information
- Application Number
- CN202211734224.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Traditional intelligent question-answering systems are unable to conduct multi-dimensional searches, cannot locate and retrieve attachment data, and lack accuracy in understanding user intent and extracting answers from knowledge repositories.
A four-layer feature vector matching model is adopted, including the construction of structured data graphs of multiple knowledge warehouses such as knowledge base, question and answer database, and expert database. The bag-of-words vectors are extracted using TF-IDF and chi-square detection algorithms. The question and answer pair model is trained in combination with the naive Bayes algorithm. The unstructured data knowledge graph is constructed through the dependency syntax model, and a full-text search schema is configured to realize multi-angle knowledge query.
The search efficiency and accuracy of the question-answering system have been improved, and it can adapt to complex business scenarios. The accuracy of the question-answering model has reached more than 90%, and it supports multiple question input methods, which is suitable for the question-answering needs of the equipment manufacturing industry throughout its life cycle.
Smart Images

Figure CN115964466B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent question answering in artificial intelligence, and specifically to an intelligent question answering method and system based on a four-layer feature vector matching model. Background Art
[0002] Since the 20th century, with the rise and development of natural language understanding, semantic analysis, mobile internet, and deep learning algorithms, the development of intelligent question-answering has also been rapid. Due to its advantages such as 24 / 7 online service, fast response time, high concurrent call volume, and automatic reply, major domestic companies have made breakthroughs in this field in recent years. A large number of intelligent question-answering products have emerged, such as Alibaba Xiaomi and Xiaomi Xiaoai, and these products have become widely used in people's daily lives.
[0003] However, traditional intelligent question-answering generally only matches question-answer pairs, and can only match questions within the question-answer library. It cannot perform multi-dimensional searches on questions, nor can it locate and retrieve attachment data. Therefore, building a complete search and feedback mechanism using knowledge graphs for multi-dimensional and multi-category question searches and feedback mechanisms can effectively improve question search efficiency.
[0004] Whether an intelligent question-answering system can adapt to the business complexity of different industries and accurately answer questions raised by users mainly involves two aspects of functions: first, whether it can correctly understand the user's intention; second, whether it can accurately extract the corresponding answers from the knowledge warehouse.
[0005] Currently, the mainstream approach to understanding user intent both domestically and internationally is to segment user questions using natural language processing (NLP), generate word vectors, and then perform semantic analysis. However, due to the wide range of business domains and the numerous specialized terms involved in actual applications, the accuracy of word segmentation is often affected.
[0006] When extracting answers from the knowledge warehouse after understanding user intent, the degree of matching between answers and questions depends on the accuracy of the classification algorithm model. Improving the accuracy of the algorithm model and optimizing the search logic are also top priorities of intelligent question-answering technology. Summary of the Invention
[0007] In order to solve the above technical problems, the present invention provides an intelligent question-answering method and system based on a four-layer feature vector matching model.
[0008] The technical solution of the present invention is: an intelligent question-answering method based on a four-layer feature vector matching model, comprising:
[0009] Step S1: collect knowledge and classify, build six knowledge warehouses of knowledge base, ontology base, question and answer base, expert base, note base and forum base and the structured data graph of the knowledge warehouse;
[0010] Step S2: based on TF-IDF algorithm and chi-square detection algorithm, the bag of words vector of the question and answer base is extracted, and based on naive Bayes algorithm, the data in all the question and answer bases is trained to obtain a trained question and answer pair model;
[0011] Step S3: the structured data in the ontology base, knowledge base, expert base, note base and forum base is classified and quantified to form a generalization sample template and corresponding generalization samples, a graph walk query statement of the generalization sample template is configured, and based on a naive Bayes model, the generalization samples are trained to obtain a trained structured data semantic generalization model;
[0012] Step S4: the unstructured data in the knowledge warehouse is extracted by using a dependency syntax model to extract entity-relation data, and an unstructured data knowledge graph is constructed;
[0013] Step S5: the knowledge warehouse is configured with a full-text retrieval schema, the key information of the structured data is indexed, and the unstructured data is created with a full-text retrieval index;
[0014] Step S6: a four-layer result feedback model is constructed: the user inputs a problem to be searched or a keyword in a search page, the trained question and answer pair model in step S2 is used to calculate the similarity of the problem to be searched and the existing problems in the question and answer base, if the similarity is greater than a threshold a, the answer is pushed to the user by an answer construction module; otherwise, the structured data semantic generalization model in step S3 is entered, the similarity of the problem to be searched and the existing templates in the sample template is calculated, if the similarity is greater than a threshold b, the answer is pushed to the user by the answer construction module; otherwise, the unstructured data graph in step S4 is entered, if there is a same name unstructured entity node, the answer associated with the node is pushed to the user, if not, the full-text retrieval schema in step S5 is entered, and the answer matched by full-text search is obtained;
[0015] Step S7: after the user obtains the answer, the answer can be evaluated and fed back, if the feedback problem is solved, the portrait of the user is updated according to the problem, and the problem interested by the user and the counter-question guide are generated; if the feedback problem is not solved, the problem is recorded in an unknown problem base and waits for business experts to maintain.
[0016] Compared with the prior art, the present application has the following advantages:
[0017] 1. The present invention discloses an intelligent question-answering method based on a four-layer feature vector matching model, which provides a variety of question input methods, including questions or keywords, etc. It is more intelligent and convenient than the traditional keyword retrieval method, and is more suitable for practical business scenarios.
[0018] 2. This invention improves the accuracy of question-answer pair models and structured data semantic generalization models. The TF-IDF algorithm, when constructing bag-of-word vectors for the question-answer database, better reflects the relevance of words to questions. Simultaneously, the chi-squared test algorithm performs dimensionality reduction on the bag-of-word vectors, further eliminating irrelevant influencing factors. This enables the accuracy of the question-answer pair model on the test set to exceed 90%.
[0019] 3. This invention can better cope with complex business scenarios. By thoroughly sorting out the business areas involved in the entire life cycle of the equipment manufacturing industry, a question-and-answer classification system and a domain synonym database are constructed based on this, enabling the question-and-answer system to better solve various problems throughout the entire life cycle of the equipment manufacturing industry.
[0020] 4. The four-layer feature vector matching system provided by the present invention can query knowledge from multiple angles, and the construction of structured and unstructured graphs also improves the search efficiency and accuracy of knowledge. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 Flowchart of an intelligent question-answering method based on a four-layer feature vector matching model in an embodiment of the present invention;
[0022] Figure 2 Schematic diagram of the architecture of the question-answer model in an embodiment of the present invention;
[0023] Figure 3 Schematic diagram of the architecture of the structured data semantic generalization model in an embodiment of the present invention;
[0024] Figure 4 Schematic diagram of the structured data semantic generalization process in an embodiment of the present invention;
[0025] Figure 5 Schematic diagram of the process of constructing an unstructured data knowledge graph in an embodiment of the present invention;
[0026] Figure 6 Schematic diagram of the construction process of full-text retrieval in an embodiment of the present invention;
[0027] Figure 7 This is a schematic diagram of the first layer of the process of searching for answers and outputting results using the question-answer pair model in an embodiment of the present invention;
[0028] Figure 8Schematic diagram of the second layer of the process of searching for answers and outputting results using a structured data semantic generalization model in an embodiment of the present invention;
[0029] Figure 9 Schematic diagram of the overall architecture of the four-layer result feedback model in an embodiment of the present invention;
[0030] Figure 10 This is a structural block diagram of an intelligent question-answering system based on a four-layer feature vector matching model in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The present invention provides an intelligent question-answering method based on a four-layer feature vector matching model, constructs a four-layer search system, and can query knowledge from multiple angles. The construction of structured and unstructured graphs also improves the search efficiency and accuracy of knowledge.
[0032] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below through specific implementation and in conjunction with the accompanying drawings.
[0033] Example 1
[0034] like Figure 1 As shown, an embodiment of the present invention provides an intelligent question answering method based on a four-layer feature vector matching model, comprising the following steps:
[0035] Step S1: Collect and classify knowledge, build six knowledge warehouses including knowledge base, ontology library, question and answer library, expert library, note library, and forum library, as well as a structured data map of the knowledge warehouse;
[0036] Step S2: Extract the bag-of-words vectors of the question-answer database based on the TF-IDF algorithm and the chi-squared test algorithm. At the same time, train the question-answer pair model on all the data in the question-answer database based on the naive Bayes algorithm to obtain a trained question-answer pair model.
[0037] Step S3: Classify the structured data in the ontology library, knowledge base, expert library, note library, forum library, and question-and-answer library, and quantify them to form generalized sample templates and corresponding generalized samples. Configure graph walk query statements for the generalized sample templates, and train the structured data semantic generalization model on the generalized samples based on the naive Bayes model to obtain a trained structured data semantic generalization model.
[0038] Step S4: Extract triples from the unstructured data in the knowledge warehouse using the dependency syntax model, extract entity-relationship data, and construct an unstructured data knowledge graph;
[0039] Step S5: Configure a full-text search schema for the knowledge warehouse, index key information of structured data, and create a full-text search index for unstructured data;
[0040] Step S6: Construct a four-layer result feedback model: the user enters the question or keyword to be retrieved in the search page, and the question-answer pair model trained in step S2 calculates the similarity between the question to be retrieved and the existing questions in the question-answer library. If the similarity is greater than the threshold a, the answer construction module pushes the answer to the user; otherwise, it enters the structured data semantic generalization model in step S3 to calculate the similarity between the question to be retrieved and the existing templates in the sample template. If the similarity is greater than the threshold b, the answer construction module pushes the answer to the user; otherwise, it enters the unstructured data graph in step S4. If there is an unstructured entity node with the same name, the answer associated with the node is pushed to the user. If not, it enters the full-text search schema in step S5 to search for matching answers from the full text;
[0041] Step S7: After the user gets the answer, he or she can evaluate and provide feedback on the answer. If the feedback indicates that the problem has been solved, the user's profile will be updated based on the problem, and questions of interest to the user and counter-question guidance will be generated; if the feedback indicates that the problem has not been solved, the problem will be recorded in the unknown question library and wait for maintenance by business experts.
[0042] In one embodiment, the above step S1: collecting and classifying knowledge, constructing six knowledge warehouses including a knowledge base, an ontology library, a question-and-answer library, an expert library, a note library, and a forum library, and a structured data map of the knowledge warehouses, specifically includes:
[0043] Collect knowledge from multiple data sources or import knowledge in batches. Categorize the collected knowledge according to the six knowledge systems to build six knowledge warehouses: knowledge base, ontology library, question and answer library, expert library, note library, and forum library, as well as a structured data map of the knowledge warehouse. At the same time, build a synonym library to perform semantic replacement for synonyms, including:
[0044] We thoroughly sorted out the application business fields and built six knowledge systems: knowledge, ontology, Q&A, experts, notes, and forums;
[0045] Through batch import and knowledge collection, knowledge can be imported into the system in batches, or collected from third-party systems. The collected knowledge can be categorized according to the six major knowledge systems to build a unified knowledge warehouse. Knowledge collection can be acquired from a variety of data sources such as databases, documents, and websites, and then collected into the business system through collection tasks. Furthermore, to improve search accuracy, this embodiment of the present invention constructs a synonym thesaurus, allowing semantic substitution of synonyms during searches.
[0046] In one embodiment, step S2 above: extracting the bag-of-words vectors of the question-answer database based on the TF-IDF algorithm and the chi-square test algorithm, and simultaneously training the question-answer pair model on all the data in the question-answer database based on the naive Bayes algorithm to obtain a trained question-answer pair model, specifically includes:
[0047] Step S21: Feature extraction is performed on the question-answer pair data in the question-answer database based on the TF-IDF algorithm. The word frequency of each word in the question is counted, and the inverse text frequency of a word in all texts is counted. The bag-of-words vector of the question-answer database is obtained by calculating the word frequency - inverse text frequency of all questions.
[0048] Step S22: Using the chi-square detection algorithm, as shown in formula (1), the bag-of-words vector is screened and optimized according to the chi-square value, and the question is vectorized based on the bag-of-words vector to obtain a question vector;
[0049]
[0050] Among them, O is the actual value of the word bag vector, E is the expected value of the word bag vector; x 2 is the chi-square value of the bag-of-words vector;
[0051] Step S23: Take the question vector as input and the question ID as output, and use the naive Bayes classification algorithm to perform model training to obtain a trained question-answer pair model.
[0052] like Figure 2 The following is a schematic diagram of the architecture of the question-answer model.
[0053] In one embodiment, the above step S3: classifying the structured data in the ontology library, knowledge base, expert library, note library, forum library, and question-and-answer library, and quantifying them to form a generalized sample template and a corresponding generalized sample, configuring a graph walk query statement for the generalized sample template, and training the generalized sample on a structured data semantic generalization model based on a naive Bayesian model to obtain a trained structured data semantic generalization model, specifically includes:
[0054] The CQL graph walk query statement of the generalized sample template is configured according to the preset form of what, when, where, who, which and how, and the corresponding generalized sample is constructed according to the generalized sample template. The structured data semantic generalization model is trained using the generalized sample to obtain a trained structured data semantic generalization model.
[0055] First, configure generalized sample templates in the form of what, when, where, who, which, and how, convert the questions input by the user according to the above templates, and obtain the corresponding generalized samples for model training.
[0056] like Figure 3 The figure shows the architecture diagram of the structured data semantic generalization model.
[0057] like Figure 4 The figure shows a schematic diagram of the semantic generalization process of structured data.
[0058] In one embodiment, the above step S4: extracting triples from the unstructured data in the knowledge warehouse using a dependency syntax model, extracting entity-relationship data, and constructing an unstructured data knowledge graph specifically includes:
[0059] The unstructured data in the knowledge warehouse is used to construct a dependency syntax tree of the sentence using the dependency syntax model. Syntactic analysis and the BROWN word clustering algorithm are used to obtain the entity-relationship triples of the sentence. After fusion calculation, an unstructured data graph is formed.
[0060] The unstructured data such as attachments in the knowledge warehouse are extracted into triples by using a dependency syntactic model to extract useful entity-relationship data; the domain-specific entity-relationship data in the knowledge warehouse are extracted through corpus annotation and a named entity recognition model.
[0061] When extracting triple relationships from unstructured data, the dependency syntax model is used to construct the dependency syntax tree of the sentence. Syntactic analysis and the BROWN word clustering algorithm are used to analyze the "entity-relationship" triples of the sentence, and the entities with the same name in the same attachment are deduplicated. After fusion calculations, an unstructured data knowledge graph is formed.
[0062] like Figure 5 The figure shows a schematic diagram of the process of building a knowledge graph for unstructured data.
[0063] In one embodiment, the above step S5: configuring a full-text search schema for the knowledge warehouse, indexing key information of structured data, and creating a full-text search index for unstructured data; wherein the key information includes: title, keywords, abstract, category, confidentiality level, creator, and release time, specifically including:
[0064] Configure a full-text search schema for the knowledge warehouse, index structured data, including title, keywords, abstract, category, confidentiality level, creator, and publication time, as key information, and create a full-text search index for unstructured data; at the same time, set the search weight of the index field. For example, set the weight of the title to be greater than the weight of the attachment. Then, the field with the higher weight will be positioned higher in the query result list.
[0065] like Figure 6 The following is a schematic diagram of the construction process of full-text retrieval.
[0066] In one embodiment, the above step S6: constructs a four-layer result feedback model: the user enters the question to be retrieved or the keyword in the search page, and the question-answer pair model trained in step S2 calculates the similarity between the question to be retrieved and the existing questions in the question-answer library. If the similarity is greater than a threshold value a, the answer construction module pushes the answer to the user; otherwise, it enters the structured data semantic generalization model in step S3 to calculate the similarity between the question to be retrieved and the existing templates in the sample template. If the similarity is greater than a threshold value b, the answer construction module pushes the answer to the user; otherwise, it enters the unstructured data graph in step S4. If there is an unstructured entity node with the same name, the answer associated with the node is pushed to the user. If not, it enters the full-text search schema in step S5 to search for matching answers from the full text;
[0067] In this step, a four-layer result feedback model is constructed for answer retrieval, which is specifically divided into the following steps:
[0068] 1) Enter the search question or keyword on the search page, segment the question, and remove stop words;
[0069] 2) Use the trained question-answer pair model from step S2, such as Figure 7 As shown, the cosine similarity between the question vector and the questions in the question-answer database is calculated. When only one question in the question-answer pair has a similarity greater than the question-answer threshold a with the question being asked, the matching question answer is directly returned. When the similarity of multiple questions is greater than the question-answer threshold a but the difference between the top two similarities is greater than the confidence difference, the matching question answer is directly returned. When the similarity of multiple questions is greater than the question-answer threshold a and the difference between the top two similarities is less than the confidence difference, a list of similar questions is returned to further guide the user to accurately locate the question. When the similarity is less than the question-answer threshold a, the next step is entered.
[0070] 3) The problem is transferred to the structured data semantic generalization model trained in step S3, such as Figure 8 As shown in Figure 1, the similarity between the current question and the existing templates in the generalized sample template is calculated. If there is a matching template greater than the question-answer threshold b, the answer construction module pushes the answer to the user, otherwise it goes to the next step;
[0071] 4) The question is transferred to the entity node set in the unstructured data knowledge graph constructed in step S4. If there is an unstructured entity node with the same or similar name, the answer construction module pushes the data associated with the node to the user as the answer. If not, the question is transferred to the next step.
[0072] 5) The problem is transferred to the full-text search schema constructed in step S5, the key fields defined in the schema are searched, and the data in the knowledge warehouse is matched according to the index full text.
[0073] The answer construction module in this step displays the answer in the following way:
[0074] The search results for the first-level question-answer pair model are displayed in the form of matching questions, the best answers to the questions, and a list of full-text search set results;
[0075] For the search results of the semantic generalization model of the second-layer structured data, the matching generalization sample template is used, and according to the configured CQL graph walk query statement, the matching graph nodes or attributes are queried and displayed in the form of a graph query result list and a full-text search set result list;
[0076] The search results for entity nodes in the third-layer unstructured data knowledge graph are displayed in the form of a list of knowledge items associated with the matched unstructured nodes and a list of full-text search set results;
[0077] The search results of the fourth-level full-text search are displayed in the form of a full-text search set result list under the search scope and search weight defined in the schema configuration.
[0078] Figure 9 A schematic diagram of the overall architecture of the four-layer result feedback model is shown.
[0079] In one embodiment, in the above step S7: after the user gets the answer, he or she can evaluate and provide feedback on the answer. If the feedback indicates that the problem has been solved, the user's profile is updated based on the problem, and questions of interest to the user and counter-question guidance are generated; if the feedback indicates that the problem has not been solved, the problem is recorded in the unknown question library and waits for maintenance by business experts.
[0080] This invention discloses an intelligent question-answering method based on a four-layer feature vector matching model. It provides multiple question input methods, including questions or keywords, making it more intelligent and convenient than traditional keyword search methods, making it more suitable for practical business scenarios. This invention improves the accuracy of question-answer pair models and structured data semantic generalization models. When constructing bag-of-word vectors for the question-answer database, the TF-IDF algorithm is used to better reflect the relevance of words to questions. Simultaneously, the chi-squared test algorithm is used to reduce the dimensionality of the bag-of-word vectors, further eliminating irrelevant influencing factors. This allows the accuracy of the question-answer pair matching model to exceed 90% on the test set. This invention can better cope with complex business scenarios. By thoroughly analyzing the business areas involved in the entire life cycle of the equipment manufacturing industry, a question-answering classification system and a domain synonym library are constructed based on this information, enabling the question-answering system to better address various issues throughout the equipment manufacturing industry's life cycle. The four-layer search system provided by this invention enables knowledge queries from multiple perspectives, and the construction of structured and unstructured graphs also improves knowledge search efficiency and accuracy.
[0081] Example 2
[0082] like Figure 10 As shown, the embodiment of the present invention provides an intelligent question-answering system based on a four-layer feature vector matching model, including the following modules:
[0083] The knowledge warehouse construction module 81 is used to collect and classify knowledge, and to construct six knowledge warehouses including the knowledge base, ontology library, question and answer library, expert library, note library, and forum library, as well as a structured data map of the knowledge warehouse;
[0084] The question-answer pair model training module 82 is used to extract the bag-of-words vector of the question-answer database based on the TF-IDF algorithm and the chi-square test algorithm, and to train the question-answer pair model on all the data in the question-answer database based on the naive Bayes algorithm to obtain a trained question-answer pair model;
[0085] The structured data semantic generalization model training module 83 is used to classify the structured data in the ontology library, knowledge base, expert library, note library, forum library, and question-and-answer library, and quantify it to form a generalized sample template and the corresponding generalized sample, configure the graph walk query statement of the generalized sample template, and train the structured data semantic generalization model on the generalized sample based on the naive Bayes model to obtain a trained structured data semantic generalization model;
[0086] The module 84 for constructing an unstructured data knowledge graph is used to extract triples from the unstructured data in the knowledge warehouse using a dependency syntax model, extract entity-relationship data, and construct an unstructured data knowledge graph.
[0087] Building a full-text index module 85, which is used to configure a full-text search schema for the knowledge warehouse, index key information of structured data, and create a full-text search index for unstructured data;
[0088] Constructing a four-layer result feedback model module 86: used for users to enter the question or keyword to be retrieved in the search page. The trained question-answer pair model calculates the similarity between the question to be retrieved and the existing questions in the question-answer library. If the similarity is greater than a threshold value a, the answer construction module pushes the answer to the user; otherwise, it switches to the structured data semantic generalization model to calculate the similarity between the question to be retrieved and the existing templates in the sample template. If the similarity is greater than a threshold value b, the answer construction module pushes the answer to the user; otherwise, it switches to the unstructured data graph. If there is an unstructured entity node with the same name, the answer associated with the node is pushed to the user. If not, it switches to the full-text search schema and searches for matching answers from the full text;
[0089] Evaluation and feedback module 87: After the user gets the answer, he can evaluate and feedback the answer. If the feedback problem has been solved, the user's portrait will be updated according to the problem, and questions of interest to the user and counter-question guidance will be generated; if the feedback is not solved, the problem will be recorded in the unknown question library and wait for maintenance by business experts.
[0090] The above embodiments are provided for the purpose of describing the present invention only and are not intended to limit the scope of the present invention. The scope of the present invention is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the present invention are intended to be within the scope of the present invention.
Claims
1. An intelligent question-answering method based on a four-layer feature vector matching model, characterized in that: include: Step S1: Collect and classify knowledge, and construct six knowledge warehouses including knowledge base, ontology library, question and answer library, expert library, note library, and forum library, as well as structured data maps of the knowledge warehouses; Step S2: extracting the bag-of-words vectors of the question-answer database based on the TF-IDF algorithm and the chi-squared detection algorithm, and simultaneously training the question-answer pair model on all the data in the question-answer database based on the naive Bayes algorithm to obtain a trained question-answer pair model; Step S3: Classify the structured data in the ontology library, knowledge base, expert library, note library, forum library, and question-and-answer library, and quantify them to form generalized sample templates and corresponding generalized samples, configure graph walk query statements for the generalized sample templates, and train the structured data semantic generalization model on the generalized samples based on the naive Bayes model to obtain a trained structured data semantic generalization model; Step S4: extracting triples from the unstructured data in the knowledge warehouse using a dependency syntax model, extracting entity-relationship data, and constructing an unstructured data knowledge graph; Step S5: configuring a full-text search schema for the knowledge warehouse, indexing key information of structured data, and creating a full-text search index for unstructured data; Step S6: Constructing a four-layer result feedback model: The user enters a question or keyword to be searched on the search page. The question-answer pair model trained in step S2 calculates the similarity between the question to be searched and the existing questions in the question-answer library. If the similarity is greater than a threshold a, the answer construction module pushes the answer to the user. Otherwise, the process proceeds to step S3 in the structured data semantic generalization model to calculate the similarity between the question to be retrieved and the existing templates in the sample templates. If the similarity is greater than a threshold value b, the answer construction module pushes the answer to the user. Otherwise, the process proceeds to the unstructured data graph in step S4. If an unstructured entity node with the same name exists, the answer associated with the node is pushed to the user. If not, the process proceeds to the full-text search schema in step S5 to search for matching answers from the full text. Step S7: After the user gets the answer, he or she can provide feedback on the answer. If the feedback indicates that the problem has been solved, the user's profile is updated based on the problem, and questions of interest to the user and counter-question guidance are generated. If the feedback is not resolved, the issue will be recorded in the unknown issue library and await maintenance by business experts.
2. The intelligent question-answering method based on the four-layer feature vector matching model according to claim 1, characterized in that: Step S1: Collecting and classifying knowledge, constructing six knowledge warehouses including knowledge base, ontology library, question and answer library, expert library, note library, and forum library, as well as structured data maps of the knowledge warehouses, specifically includes: Knowledge is collected from multiple data sources, or imported in batches. The collected knowledge is classified according to the six major knowledge systems to build six knowledge warehouses: knowledge base, ontology library, question and answer library, expert library, note library, and forum library, as well as structured data maps of the knowledge warehouses. At the same time, a synonym library is built to perform semantic replacement on synonyms.
3. The intelligent question-answering method based on the four-layer feature vector matching model according to claim 2, characterized in that: Step S2: extracting the bag-of-words vectors of the question-answer database based on the TF-IDF algorithm and the chi-squared detection algorithm, and simultaneously training the question-answer pair model on all the data in the question-answer database based on the naive Bayes algorithm to obtain a trained question-answer pair model, specifically including: Step S21: Feature extraction is performed on the question-answer pair data in the question-answer database based on the TF-IDF algorithm. The word frequency of each word in the question is counted, and the inverse text frequency of a word in all texts is counted. The bag-of-words vector of the question-answer database is obtained by calculating the word frequency - inverse text frequency of all questions. Step S22: Using the chi-square detection algorithm, as shown in formula (1), the bag-of-words vector is screened and optimized according to the chi-square value, and the question is vectorized based on the bag-of-words vector to obtain a question vector; Wherein, O is the actual value of the word bag vector, E is the expected value of the word bag vector; x 2 is the chi-square value of the bag-of-words vector; Step S23: Taking the question vector as input and the question ID as output, the naive Bayes classification algorithm is used to perform model training to obtain a trained question-answer pair model.
4. The intelligent question-answering method based on the four-layer feature vector matching model according to claim 1, characterized in that: The step S3: classifying the structured data in the ontology library, knowledge base, expert library, note library, forum library, and question-and-answer library, and quantifying them to form a generalized sample template and a corresponding generalized sample, configuring a graph walk query statement for the generalized sample template, and training the structured data semantic generalization model on the generalized sample based on a naive Bayes model to obtain a trained structured data semantic generalization model, specifically including: The CQL graph walk query statement of the generalized sample template is configured according to the preset form of what, when, where, who, which and how, and a corresponding generalized sample is constructed according to the generalized sample template. The structured data semantic generalization model is trained using the generalized sample to obtain a trained structured data semantic generalization model.
5. The intelligent question-answering method based on the four-layer feature vector matching model according to claim 1, characterized in that: The step S4: extracting triples from the unstructured data in the knowledge warehouse using a dependency syntax model, extracting entity-relationship data, and constructing an unstructured data knowledge graph, specifically includes: The unstructured data in the knowledge warehouse is used to construct a dependency syntax tree of the sentence using a dependency syntax model, and the entity-relationship triples of the sentence are obtained using syntax analysis and BROWN word clustering algorithm. After fusion calculation, an unstructured data graph is formed.
6. The intelligent question-answering method based on the four-layer feature vector matching model according to claim 1, characterized in that: Step S5: configuring a full-text search schema for the knowledge warehouse, indexing key information of structured data, and creating a full-text search index for unstructured data; wherein the key information includes: title, keyword, abstract, category, confidentiality level, creator, and release time, specifically including: A full-text search schema is configured for the knowledge warehouse, and structured data, including title, keyword, abstract, category, confidentiality level, creator and release time, is indexed as key information, and a full-text search index is created for unstructured data; at the same time, the search weight of the index field is set.
7. An intelligent question-answering system based on a four-layer feature vector matching model, characterized in that: Includes the following modules: Build a knowledge warehouse module to collect and classify knowledge, and construct six knowledge warehouses: knowledge base, ontology library, question and answer library, expert library, note library, and forum library, as well as structured data maps of the knowledge warehouses; A question-answer pair model training module is used to extract the bag-of-words vectors of the question-answer library based on the TF-IDF algorithm and the chi-square test algorithm, and to train the question-answer pair model on all the data in the question-answer library based on the naive Bayes algorithm to obtain a trained question-answer pair model; A structured data semantic generalization model training module is used to classify the structured data in the ontology library, knowledge base, expert library, note library, forum library, and question-and-answer library, and quantify it to form a generalized sample template and the corresponding generalized sample, configure the graph walk query statement of the generalized sample template, and train the structured data semantic generalization model on the generalized sample based on the naive Bayes model to obtain a trained structured data semantic generalization model; Constructing an unstructured data knowledge graph module, which is used to extract triples from the unstructured data in the knowledge warehouse using a dependency syntax model, extract entity-relationship data, and construct an unstructured data knowledge graph; Construct a full-text indexing module to configure a full-text search schema for the knowledge warehouse, index key information of structured data, and create a full-text search index for unstructured data; Constructing a four-layer result feedback model module: When a user enters a question or keyword to be retrieved on the search page, the trained question-answer pair model calculates the similarity between the question to be retrieved and the existing questions in the question-answer library. If the similarity is greater than a threshold value a, the answer construction module pushes the answer to the user. Otherwise, the module enters the structured data semantic generalization model to calculate the similarity between the question to be retrieved and the existing templates in the sample template. If the similarity is greater than a threshold value b, the answer construction module pushes the answer to the user. Otherwise, the query will be transferred to the unstructured data graph. If there is an unstructured entity node with the same name, the answer associated with the node will be pushed to the user. If not, the query will be transferred to the full-text search schema to search for matching answers from the full text. Evaluation and feedback module: After the user gets the answer, he or she can provide evaluation and feedback on the answer. If the feedback problem has been solved, the user's profile will be updated according to the problem, and questions of interest to the user and counter-questions will be generated; If the feedback is not resolved, the issue will be recorded in the unknown issue library and await maintenance by business experts.
Citation Information
Patent Citations
A method and an apparatus for generating a question-answer pair
CN108959559A
Intelligent question answering method and device based on medical knowledge graph
CN113505243A