Intelligent question and answer method and system based on scientific research project knowledge graph

By using knowledge graph technology in scientific research projects, an intelligent question and answer system is established to solve the correlation problem of scientific research data retrieval, achieve efficient and accurate intelligent answers, directly feed back answers and recommend related questions, improving the efficiency and accuracy of answers. .

CN118673105APending Publication Date: 2024-09-20CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310251896.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Scientific research data is stored dispersedly in multiple heterogeneous data sources, and retrieval relies on titles, attributes, and full-text retrieval. It lacks intelligence, resulting in inaccurate searches and poor relevance, making it impossible to effectively find and recommend related content.

Method used

Using an intelligent question and answer method based on knowledge graphs, by importing scientific research project knowledge graph data into the graph database, a custom entity segmentation library, question keyword set and search sentence template are established to obtain user questions for word segmentation, marking entity parts of speech and classification. , generate executable query statements, execute the query and feedback the answer.

Benefits of technology

It realizes intelligent answers to scientific research data, improves the efficiency and accuracy of answers, makes up for the shortcomings of traditional retrieval, and can directly feed back answers and recommend related questions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673105A
    Figure CN118673105A
Patent Text Reader

Abstract

The invention discloses an intelligent question and answer method and system based on a scientific research project knowledge graph, solves the relevance problem of knowledge, effectively makes up for the deficiency of traditional single content retrieval, feeds back user answers more directly and intuitively, and provides an intelligent question and answer system for questions which are not answered. And related question recommendation or mild reply can also be given, so that intelligent question answering of the user is realized, and the answering efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of scientific research project information technology, and in particular to an intelligent question-answering method and system based on a scientific research project knowledge graph. Background Art

[0002] A large amount of scientific research data generated in business scenarios such as demand collection, plan declaration, contract management, patent management, and achievement rewards for scientific and technological projects is often stored in multiple heterogeneous data sources in a scattered manner, and the correlation between various information is poor. At present, the retrieval of various types of scientific research data is only based on titles, attributes, and full texts. The search is not detailed enough, and the keyword-based search only performs fuzzy matching on the data, and the searched data is not accurate enough. At the same time, the traditional search results are loose in content, poorly correlated, lacking intelligence, and unable to find and recommend related content. Therefore, it is particularly urgent to break through the barriers of multiple heterogeneous data sources, build a high correlation between multiple scientific research data, and establish intelligent retrieval based on the correlation of knowledge graphs. Summary of the invention

[0003] In view of the above problems, the present invention is proposed to provide an intelligent question answering method and system based on a scientific research project knowledge graph that overcomes the above problems or at least partially solves the above problems.

[0004] According to one aspect of the present invention, an intelligent question answering method based on a scientific research project knowledge graph is provided, comprising:

[0005] Import scientific research project knowledge graph data and use graph database to store entities, attributes, and relationships;

[0006] Establish custom entity word segmentation database, question keyword set, question classification and corresponding search statement template basic information;

[0007] Get the question input by the user;

[0008] Segmenting the question and marking entity parts of speech, and classifying the question according to the entity parts of speech and the question keywords;

[0009] In the case where multiple question categories are extracted, the questions are decomposed into recommendation questions and fed back to the user;

[0010] Obtain a search statement template according to the question classification and generate an executable query statement;

[0011] The query statement is executed, the query result is packaged into an answer and fed back to the user.

[0012] Optionally, the importing of scientific research project knowledge graph data and the use of a graph database to store entities, attributes, and relationships specifically include:

[0013] Develop predefined standard templates;

[0014] The knowledge graph data is assembled according to the standard template, an import task is generated and an import log is recorded, multiple imports are performed to overwrite the original data, and the imported knowledge graph data is stored in the Neo4j graph database.

[0015] Optionally, the establishment of a custom entity word segmentation library, a question keyword set, a question classification, and corresponding search statement template basic information specifically includes:

[0016] Establish a custom entity word segmentation library, classify all entities, generate custom dictionaries according to the classification, add the custom dictionaries to the HanLP custom dictionary path and update the custom dictionary model;

[0017] Establishing a question keyword set, establishing a keyword set according to the entity classification, representing the same type of search objects, and setting multiple keywords for each question keyword set;

[0018] Establishing question classification, establishing question classification according to the entity classification and the question keyword set, and establishing a Cypher query statement template of the Neo4j graph database for each question classification.

[0019] Optionally, the segmenting the question and marking entity parts of speech, and classifying the question according to the entity parts of speech and the question keywords specifically includes:

[0020] Use HanLP to segment the question sentence to get segmentation phrases, extract all entity parts of speech from the segmentation phrases to get entity classification;

[0021] Check the number of entity categories. If multiple entity categories are included, provide feedback to the user to simplify the question.

[0022] According to the known entity classification, the question and the question keyword set are further matched. If the question keyword is matched, the corresponding question classification is generated. If the question keyword is not matched, the basic information of the entity is retrieved by default.

[0023] Optionally, in the case where multiple question categories are extracted, decomposing the question into recommendation questions and feeding back to the user specifically includes:

[0024] Check the number of question categories. If there are multiple question categories, set recommended questions according to each category, and encapsulate multiple recommended questions into answers to feed back to the user.

[0025] Optionally, the step of obtaining a search statement template according to question classification and generating an executable query statement specifically includes:

[0026] According to the question classification, the Cypher query statement template corresponding to the Neo4j graph database is obtained, and the parameters in the template are replaced to generate an executable query statement.

[0027] Optionally, executing the query statement, packaging the query result into an answer and feeding it back to the user specifically includes:

[0028] Obtain a Neo4j database connection, execute search statements, obtain search results one by one, encapsulate the search results into answers in different formats according to the number of search results, and feed back the answers to users.

[0029] The present invention also provides an intelligent question-answering system based on a scientific research project knowledge graph, the question-answering system comprising:

[0030] The knowledge graph management module is used to manage and maintain the scientific research project knowledge graph, and to import, export, edit, and visualize the scientific research project knowledge graph;

[0031] The basic information configuration module is used to configure the basic data used by the intelligent question-answering processing module, including the generation and update of custom entity lexicons, the creation and editing of question keyword sets, the creation of question classifications, and the creation and editing of graph database query statement templates corresponding to question classifications;

[0032] Intelligent question-and-answer module, which is used to provide a visual user access interface and implement user questions and system answers in the form of window dialogue;

[0033] The intelligent question-answering processing module is used to implement the intelligent question-answering processing process, including obtaining user questions, classifying questions, processing feedback for multi-classified questions, encapsulating search statements, executing database searches and encapsulating answers, and finally feeding back answers to users;

[0034] The data display module provides a visual information display interface, and displays detailed information on the retrieved scientific research project data according to different entity types.

[0035] The present invention provides an intelligent question-answering method based on a scientific research project knowledge graph, including: importing scientific research project knowledge graph data, using a graph database to store entities, attributes, and relationships; establishing a custom entity word segmentation library, a question keyword set, a question classification, and basic information of a corresponding search statement template; obtaining a question input by a user; performing word segmentation on the question and marking entity parts of speech, and classifying the question according to the entity parts of speech and the question keyword; for a situation where multiple question classifications are extracted, decomposing the question into recommended questions and feeding back to the user; obtaining a search statement template according to the question classification and generating an executable query statement; executing the query statement, encapsulating the query result into an answer, and feeding back to the user. , realizing intelligent answers to user questions, and improving the efficiency and accuracy of answers.

[0036] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0038] Figure 1 An overall flow chart of an intelligent question-answering method based on a scientific research project knowledge graph provided by an embodiment of the present invention;

[0039] Figure 2 A schematic diagram of a research project knowledge graph model used in an embodiment of the present invention;

[0040] Figure 3 An example flow chart of question classification provided by an embodiment of the present invention;

[0041] Figure 4 A schematic diagram of the composition of an intelligent question-answering system based on a scientific research project knowledge graph provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0043] The terms "comprises" and "having" and any variations thereof in the description embodiments, claims and drawings of the present invention are intended to cover non-exclusive inclusions, for example, including a series of steps or units.

[0044] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0045] The embodiment of the present invention provides an intelligent question-answering method based on a scientific research project knowledge graph, and its example flow chart is as follows: Figure 1 As shown, including:

[0046] Step S1, import the scientific research project knowledge graph data, use the graph database to store entities, attributes, and relationships. The schematic diagram of the scientific research project knowledge graph model is as follows: Figure 2 shown.

[0047] Step S1a, formulate predefined standard templates, using csv file format, and formulate corresponding templates for entities, attributes, and relationships respectively, wherein the entity standard template is: entity ID, entity name, entity category, the entity attribute standard template is: entity ID, entity name, entity category, attribute type ID, attribute type, attribute value, and the entity relationship standard template is: entity AID, entity name A, entity category A, relationship type ID, relationship type, entity BID, entity name B, entity category B;

[0048] Step S1b, assembling the knowledge graph data according to the standard template and packaging the three data files into a ZIP format;

[0049] Step S1c, create a new import task and upload the knowledge graph data package, decompress the data package, first parse all entities from the entity data file, and check whether the entity already exists in the Neo4j graph database according to each entity ID. If not, add a new one, otherwise update the original entity; then parse the entity attribute information from the entity attribute data file, and check whether the attribute value exists according to the entity ID and attribute ID. If not, add a new one, otherwise update the original entity attribute; then parse the entity relationship from the entity relationship data file, and check whether the relationship between entities exists according to the entity AID, relationship type ID, and entity BID. If not, add a new one, otherwise update the original entity relationship.

[0050] Step S2: Establish a custom entity word segmentation library, a question keyword set, a question classification, and basic information of the corresponding search statement template. Including:

[0051] Step S2a, establish a custom entity segmentation library. Retrieve all entity categories from the graph database, generate custom dictionary TXT documents according to the entity categories, and name the TXT documents with the entity category names. Then obtain the corresponding entities from the graph database according to each entity category, take the entity name and enter it into the corresponding custom dictionary TXT document, with each entity name occupying one line. After all custom dictionaries are built, add the custom dictionaries to the HanLP custom dictionary path, and finally update the custom dictionary model;

[0052] Step S2b, establish a question keyword set. First, establish question keyword sets according to entity classification, including codes and names, and then enter keywords for each question keyword set. It is recommended to enter as many keywords as possible to ensure that the corresponding search intent is fully covered. For example: for project entity classification, establish a project question keyword set (code: XM), where keywords include: "What are the projects", "Related projects", "What is the project", etc.;

[0053] Step S2c, establish question classification. First, establish question classification according to entity classification and question keyword set, including question classification code, name, corresponding entity classification, corresponding question keyword set, and remarks, such as: institution-patent (code: jg_zl) means searching for patents invented according to institutions. Then, establish a Cypher query statement template for the Neo4j graph database for each question classification. Preset parameters can be inserted into the Cypher query statement, and the parameter name is surrounded by @ on both sides. The return parameters in the query statement must be converted into a unified alias, including entity label, entity ID, and entity name.

[0054] Step S3, obtaining the question input by the user; the user submits a question request at the front end, and the back end service receives the request and parses the user's question.

[0055] Step S4, segment the question and mark the entity part of speech, and classify the question according to the entity part of speech and question keywords. The example flow chart is as follows: Figure 3 As shown, including:

[0056] Step S4a, use HanLP to segment the question, retain the words matched by the custom dictionary to form segmentation phrases, obtain each segmentation from the segmentation phrases one by one, obtain entity classification according to its entity part of speech, and regroup the segmentations of the same category. Finally, obtain the segmentation phrase corresponding to each entity classification;

[0057] Step S4b, checking the number of entity categories extracted from the question, if there are multiple entity categories, then the user is fed back to simplify the question, otherwise proceed to the next step;

[0058] Step S4c, based on the known entity classification, further match the question with each question keyword set, check whether the question contains each keyword in the question keyword set, if each question keyword set matches at least one keyword, then generate a corresponding question classification based on the entity classification and the question keyword set, if ultimately no question keyword set is matched, then the basic information of the entity is retrieved by default.

[0059] Step S5, check the number of question categories extracted. If there are multiple question categories, obtain the question categories one by one, and convert the questions into recommended questions based on the extracted entities and question keyword sets. For example, if the question category is: institution-patent, the question is converted to "What are the invention patents of XXX company?"; then encapsulate multiple recommended questions into a question list to form an answer and feedback to the user. If there is only one question category, proceed to the next step;

[0060] Step S6, obtaining a search statement template according to the question classification and generating an executable query statement; firstly obtaining a Cypher query statement template corresponding to the Neo4j graph database according to the question classification, and then replacing various parameters in the template to generate an executable query statement.

[0061] Step S7, execute the query statement, encapsulate the query result into an answer and feed it back to the user. It includes: obtaining a database connection from the Neo4j database connection pool, executing the search statement, obtaining the search results one by one, if there is only one search result, encapsulating the retrieved entity information into an answer, if there are multiple search results, concatenating the first 10 data into an answer, if there are more than 10 search results, concatenating the first 10 data into an answer, and implicitly adding the question sentence to the answer as a link to more search results, and finally feeding back the answer to the user.

[0062] Example 2

[0063] The embodiment of the present invention provides an intelligent question-answering system based on a scientific research project knowledge graph, the composition diagram is as follows: Figure 4 As shown, including:

[0064] The knowledge graph management module 1 adopts the method of step S1 in Example 1 to manage and maintain the scientific research project knowledge graph, including the import, export, editing, and visual display of the scientific research project knowledge graph.

[0065] Basic information configuration module 2, using the method of step S2 in embodiment 1, implements configuration management of various basic data used by the intelligent question-answering processing module, including generation and update of custom entity word library, creation and keyword editing of question keyword set, creation of question classification, and creation and editing of graph database query statement template corresponding to question classification;

[0066] Intelligent question and answer module 3 adopts the method of step S3 in embodiment 1, provides a visual user access interface, and implements user questions and system replies in the form of window dialogue. Clicking the entity name in the reply can link to the data display module to display detailed data information; clicking more in the reply can open a new page to view more data lists;

[0067] The intelligent question and answer processing module 4 integrates the methods of step S4, step S5, step S6, and step S7 in embodiment 1 to realize the processing process of intelligent question and answer, including obtaining user questions, classifying questions, processing feedback for multi-classified questions, encapsulating search statements, executing database retrieval and encapsulating answers, and finally feeding back the answers to the user.

[0068] The data display module 5 provides a visual information display interface, and displays detailed information on the retrieved scientific research project data according to different entity types, including scientific research project characterization, patent characterization, scientific research institution portrait, and scientific researcher portrait.

[0069] Beneficial effects: The present invention discloses an intelligent question-answering method and system based on a scientific research project knowledge graph, which solves the problem of knowledge relevance and effectively makes up for the shortcomings of traditional single content retrieval. At the same time, the method more directly and intuitively feeds back user answers, and can also give related question recommendations or euphemistic replies to unanswered questions, thereby realizing intelligent answers to user questions and improving the efficiency and accuracy of answers.

[0070] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An intelligent question-answering method based on a scientific research project knowledge graph, characterized in that: The intelligent answering method comprises: Import scientific research project knowledge graph data and use graph database to store entities, attributes, and relationships; Establish custom entity word segmentation database, question keyword set, question classification and corresponding search statement template basic information; Get the question input by the user; Segmenting the question and marking entity parts of speech, and classifying the question according to the entity parts of speech and the question keywords; In the case where multiple question categories are extracted, the questions are decomposed into recommendation questions and fed back to the user; Obtain a search statement template according to the question classification and generate an executable query statement; The query statement is executed, the query result is packaged into an answer and fed back to the user.

2. According to claim 1, an intelligent question-answering method based on a scientific research project knowledge graph is characterized in that: The import of scientific research project knowledge graph data and the use of graph database to store entities, attributes, and relationships specifically include: Develop predefined standard templates; The knowledge graph data is assembled according to the standard template, an import task is generated and an import log is recorded, multiple imports are performed to overwrite the original data, and the imported knowledge graph data is stored in the Neo4j graph database.

3. According to claim 1, an intelligent question-answering method based on a scientific research project knowledge graph is characterized in that: The establishment of the custom entity word segmentation library, question keyword set, question classification and corresponding search statement template basic information specifically includes: Establish a custom entity word segmentation library, classify all entities, generate custom dictionaries according to the classification, add the custom dictionaries to the HanLP custom dictionary path and update the custom dictionary model; Establishing a question keyword set, establishing a keyword set according to the entity classification, representing the same type of search objects, and setting multiple keywords for each question keyword set; Establishing question classification, establishing question classification according to the entity classification and the question keyword set, and establishing a Cypher query statement template of the Neo4j graph database for each question classification.

4. According to claim 1, an intelligent question-answering method based on a scientific research project knowledge graph is characterized in that: The segmenting of the question and marking entity parts of speech, and classifying the question according to the entity parts of speech and the question keywords specifically include: Use HanLP to segment the question sentence to obtain segmentation phrases, and extract all entity parts of speech from the segmentation phrases to obtain entity classification; Check the number of entity categories. If multiple entity categories are included, provide feedback to the user to simplify the question. According to the known entity classification, the question and the question keyword set are further matched. If the question keyword is matched, the corresponding question classification is generated. If the question keyword is not matched, the basic information of the entity is retrieved by default.

5. According to claim 1, an intelligent question-answering method based on a scientific research project knowledge graph is characterized in that: In the case where multiple question categories are extracted, decomposing the question into recommendation questions and feeding back to the user specifically includes: Check the number of question categories. If there are multiple question categories, set recommended questions according to each category, and encapsulate multiple recommended questions into answers to feed back to the user.

6. The intelligent question-answering method based on the scientific research project knowledge graph according to claim 1, characterized in that: The step of obtaining a search statement template according to question classification and generating an executable query statement specifically includes: According to the question classification, the Cypher query statement template corresponding to the Neo4j graph database is obtained, and the parameters in the template are replaced to generate an executable query statement.

7. The intelligent question-answering method based on the scientific research project knowledge graph according to claim 1, characterized in that: The executing of the query statement, packaging the query result into an answer and feeding back the answer to the user specifically includes: Obtain a Neo4j database connection, execute search statements, obtain search results one by one, encapsulate the search results into answers in different formats according to the number of search results, and feed back the answers to users.

8. An intelligent question-answering system based on scientific research project knowledge graph, characterized in that: The question-answering system comprises: The knowledge graph management module is used to manage and maintain the scientific research project knowledge graph, and to import, export, edit, and visualize the scientific research project knowledge graph; The basic information configuration module is used to configure the basic data used by the intelligent question-answering processing module, including the generation and update of custom entity lexicons, the creation and editing of question keyword sets, the creation of question classifications, and the creation and editing of graph database query statement templates corresponding to question classifications; Intelligent question-and-answer module, which is used to provide a visual user access interface and implement user questions and system answers in the form of window dialogue; The intelligent question-answering processing module is used to implement the intelligent question-answering processing process, including obtaining user questions, classifying questions, processing feedback for multi-classified questions, encapsulating search statements, executing database searches and encapsulating answers, and finally feeding back answers to users; The data display module provides a visual information display interface, and displays detailed information on the retrieved scientific research project data according to different entity types.

Citation Information

Patent Citations

  • Platform system for scientific research social contact and service and design method of platform system

    CN106651607A

  • Question answering system construction method and system based on military domain knowledge graph

    CN113806513A

  • Scheduling method for dynamic allocation of operation and maintenance resources based on knowledge graph platform

    CN114372145A

  • College professional intelligent question-answering system and method based on knowledge graph

    CN114547342A

  • Systems and methods for question recommendation

    WO2021035578A1