A document retrieval method and system based on knowledge graph

By using the method based on the knowledge map in the document search to extract and build the ternary relationship of the document, the problem of unable to understand semantics and knowledge cannot be understood by traditional document search, and the correlation and network search between the documents will be improved. Effect.

CN114064913BInactive Publication Date: 2025-01-28CHINESE PEOPLES LIBERATION ARMY UNIT 31511
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111217200.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The output of traditional document search results only depends on text character matching, fails to understand and analyze at the semantic and knowledge levels, and lacks interaction and correlation between the search results, so in-depth query analysis cannot be carried out.

Method used

Adopt the knowledge graph -based document search method, extract the subject body and information entity through the document extracting model, establish a ternary relationship, and build and query these relationships in the knowledge map database to realize the association and network search between documents.

Benefits of technology

It realizes understanding and analysis from the semantic and knowledge level of the text, establishes the connection between documents, realizes the netwriting graph search, and enhances the accuracy and interaction of the retrieval results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064913B_ABST
    Figure CN114064913B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a document retrieval method and system based on knowledge graph, including: for any received document, using a document extraction model to extract the main entity and each information entity of the document, and establishing a ternary relationship for each information entity; when any user retrieves a document from a graph database through a search page, searching and matching are performed in the main entity nodes in the knowledge graph database according to the keywords input by the user, and the main entity nodes matching the keywords are formed into a result set and returned to the search page; when the user triggers the document title of any main entity node in the result set, all information entities and corresponding relationships corresponding to the main entity are searched according to the attributes of the main entity node, and the knowledge graph of the triggered document is drawn and displayed through the front-end canvas; through the association between entities, connections are established between documents, thereby realizing networked graph search.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of document retrieval, and in particular to a document retrieval method and system based on knowledge graph. Background Art

[0002] With the rise of artificial intelligence and deep learning technologies, and their application in the field of natural language processing, great breakthroughs have been made in entity recognition and relationship extraction of texts, providing strong support for the large-scale construction of knowledge graphs of texts. As an important visual carrier of text knowledge structure, knowledge graphs depict the structural relationships between text entities and entities, providing a solid foundation for visual query of texts. In the process of realizing the present invention, the applicant found that there are at least the following problems in the prior art: the output of traditional document retrieval results is just a simple presentation of matching texts, without understanding and analyzing the semantics and knowledge level of the text; the retrieval results are static and independent, lacking interaction and association between information, and cannot quickly perform deeper query analysis based on a certain result and information point. Summary of the invention

[0003] The embodiment of the present invention provides a document retrieval method and system based on knowledge graph, which changes the simple text character matching of traditional document retrieval results, understands and analyzes the text from the semantic and knowledge levels, extracts entity relationships from static, isolated documents, and establishes connections between documents through the association between entities, thereby realizing networked graph search.

[0004] To achieve the above objectives, on the one hand, an embodiment of the present invention provides a document retrieval method based on a knowledge graph, comprising:

[0005] For any received document, the main entity and each information entity of the document are extracted using a document extraction model, and the type of each information entity in the document is determined using the document extraction model, and the type of the information entity in the document is called a relationship; a ternary relationship is established for each information entity, and the identifier of the document is used as a unified document identifier for all ternary relationships of the document; wherein the main entity refers to the document title, and the information entity refers to the name of other entities except the main entity, and the ternary relationship of each information entity includes: the main entity, the relationship and the information entity;

[0006] Obtain all ternary relations of the document in sequence according to the unified document identifier, and read the main entity from any ternary relation; and search the knowledge graph database for a main entity node that is identical to the main entity and unified document identifier of the document;

[0007] If there is no main entity node with the same main entity and unified document identifier as the document in the knowledge graph database, a new node is created in the knowledge graph database as the main entity node of the document, the document title corresponding to the main entity of the document is used as the name of the main entity node, and the unified identifier of the document ternary relationship is added to the main entity node attribute;

[0008] If there is a main entity node in the graph recognition database that is the same as the main entity and unified document identifier of the document, then no main entity node is created for the main entity of the document, and the node that is the same as the main entity and unified document identifier of the document is used as the main entity node of the document;

[0009] For each ternary relationship of the document, read the information entity from the ternary relationship, and query the knowledge graph database whether there is an information entity with the same name as the information entity in the ternary relationship;

[0010] If there is an information entity with the same name as the information entity in the ternary relationship in the knowledge graph database, the main entity in the ternary relationship is connected to the information entity node with the same name in the knowledge graph database, and the relationship in the ternary relationship is used as the connection between the main entity and the information entity node with the same name in the knowledge graph database;

[0011] If there is no information entity with the same name as the information entity in the ternary relationship, a new node is created in the knowledge graph database as the information entity node in the ternary relationship, the created information entity node is connected to the main entity node of the document, and the relationship in the ternary relationship of the information entity is used as the connection between the main entity and the information entity node;

[0012] When any user retrieves a document from the graph database through the search page, the main entity nodes in the knowledge graph database are searched and matched according to the keywords entered by the user, and the main entity nodes that match the keywords are formed into a result set and returned to the search page;

[0013] When the user triggers the document title of any main entity node in the result set, all information entities and corresponding relationships corresponding to the main entity are searched according to the main entity node attributes, and the knowledge graph of the triggered document is drawn and displayed through the front-end canvas; wherein the knowledge graph of the triggered document has its main entity node as the central root node, its information entity nodes as leaf nodes, and the central root node and the leaf nodes are connected through the relationship between the information entities represented by the leaf nodes;

[0014] The user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph.

[0015] On the other hand, an embodiment of the present invention provides a document retrieval system based on a knowledge graph, comprising:

[0016] A ternary relationship extraction unit is used to extract the main entity and each information entity of any received document using a document extraction model, and to determine the type of each information entity in the document using the document extraction model, and the type of the information entity in the document is called a relationship; a ternary relationship is established for each information entity, and the identifier of the document is used as a unified document identifier for all ternary relationships of the document; wherein the main entity refers to the document title, and the information entity refers to the name of other entities except the main entity, and the ternary relationship of each information entity includes: a main entity, a relationship and an information entity;

[0017] The knowledge graph production unit is used to sequentially obtain all ternary relations of the document according to the unified document identifier, read the main entity from any ternary relation; and search from the knowledge graph database whether there is a main entity node that is the same as the main entity of the document and the unified document identifier;

[0018] If there is no main entity node with the same main entity and unified document identifier as the document in the knowledge graph database, a new node is created in the knowledge graph database as the main entity node of the document, the document title corresponding to the main entity of the document is used as the name of the main entity node, and the unified identifier of the document ternary relationship is added to the main entity node attribute;

[0019] If there is a main entity node in the graph recognition database that is the same as the main entity and unified document identifier of the document, then no main entity node is created for the main entity of the document, and the node that is the same as the main entity and unified document identifier of the document is used as the main entity node of the document;

[0020] For each ternary relationship of the document, read the information entity from the ternary relationship, and query the knowledge graph database whether there is an information entity with the same name as the information entity in the ternary relationship;

[0021] If there is an information entity with the same name as the information entity in the ternary relationship in the knowledge graph database, the main entity in the ternary relationship is connected to the information entity node with the same name in the knowledge graph database, and the relationship in the ternary relationship is used as the connection between the main entity and the information entity node with the same name in the knowledge graph database;

[0022] If there is no information entity with the same name as the information entity in the ternary relationship, a new node is created in the knowledge graph database as the information entity node in the ternary relationship, the created information entity node is connected to the main entity node of the document, and the relationship in the ternary relationship of the information entity is used as the connection between the main entity and the information entity node;

[0023] The retrieval unit is used to search and match the main entity nodes in the knowledge graph database according to the keywords input by the user when any user retrieves documents from the graph database through the search page, and form a result set of the main entity nodes that match the keywords and return it to the search page;

[0024] A display unit is used to search for all information entities and corresponding relationships corresponding to the main entity according to the attributes of the main entity node when the user triggers the document title of any main entity node in the result set, and draw and display the knowledge graph of the triggered document through the front-end canvas; wherein the knowledge graph of the triggered document uses its main entity node as the central root node, its information entity nodes as leaf nodes, and the central root node and the leaf nodes are connected through the relationship between the information entities represented by the leaf nodes; the user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph.

[0025] The above technical solution has the following beneficial effects: it changes the simple text character matching of traditional document retrieval results, understands and analyzes the text from the semantic and knowledge level, extracts entity relationships from static, isolated documents, establishes connections between documents through the association between entities, and thus realizes networked graph search. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 is a flowchart of a document retrieval method based on a knowledge graph according to an embodiment of the present invention;

[0028] Figure 2 is a structural diagram of a document retrieval system based on a knowledge graph according to an embodiment of the present invention;

[0029] Figure 3 is an overall flow chart of an embodiment of the present invention;

[0030] Figure 4 This is a schematic diagram of constructing a knowledge graph according to an embodiment of the present invention;

[0031] Figure 5 It is a graph search logic diagram of an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] like Figure 1 As shown, in combination with an embodiment of the present invention, a document retrieval method based on a knowledge graph is provided, comprising:

[0034] For any received document, the main entity and each information entity of the document are extracted using a document extraction model, and the type of each information entity in the document is determined using the document extraction model, and the type of the information entity in the document is called a relationship; a ternary relationship is established for each information entity, and the identifier of the document is used as a unified document identifier for all ternary relationships of the document; wherein the main entity refers to the document title, and the information entity refers to the name of other entities except the main entity, and the ternary relationship of each information entity includes: the main entity, the relationship and the information entity;

[0035] Obtain all ternary relations of the document in sequence according to the unified document identifier, and read the main entity from any ternary relation; and search the knowledge graph database for a main entity node that is identical to the main entity and unified document identifier of the document;

[0036] If there is no main entity node with the same main entity and unified document identifier as the document in the knowledge graph database, a new node is created in the knowledge graph database as the main entity node of the document, the document title corresponding to the main entity of the document is used as the name of the main entity node, and the unified identifier of the document ternary relationship is added to the main entity node attribute;

[0037] If there is a main entity node in the graph recognition database that is the same as the main entity and unified document identifier of the document, then no main entity node is created for the main entity of the document, and the node that is the same as the main entity and unified document identifier of the document is used as the main entity node of the document;

[0038] For each ternary relationship of the document, read the information entity from the ternary relationship, and query the knowledge graph database whether there is an information entity with the same name as the information entity in the ternary relationship;

[0039] If there is an information entity with the same name as the information entity in the ternary relationship in the knowledge graph database, the main entity in the ternary relationship is connected to the information entity node with the same name in the knowledge graph database, and the relationship in the ternary relationship is used as the connection between the main entity and the information entity node with the same name in the knowledge graph database;

[0040] If there is no information entity with the same name as the information entity in the ternary relationship, a new node is created in the knowledge graph database as the information entity node in the ternary relationship, the created information entity node is connected to the main entity node of the document, and the relationship in the ternary relationship of the information entity is used as the connection between the main entity and the information entity node;

[0041] When any user retrieves a document from the graph database through the search page, the main entity nodes in the knowledge graph database are searched and matched according to the keywords entered by the user, and the main entity nodes that match the keywords are formed into a result set and returned to the search page;

[0042] When the user triggers the document title of any main entity node in the result set, all information entities and corresponding relationships corresponding to the main entity are searched according to the main entity node attributes, and the knowledge graph of the triggered document is drawn and displayed through the front-end canvas; wherein the knowledge graph of the triggered document has its main entity node as the central root node, its information entity nodes as leaf nodes, and the central root node and the leaf nodes are connected through the relationship between the information entities represented by the leaf nodes;

[0043] The user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph.

[0044] Preferably, before extracting the main entity and each information entity of the document by using the document extraction model, the method further includes:

[0045] Obtain a preset number of document samples, identify the information entity of each document sample content, use a document annotation tool to annotate the type of each information entity in English, and use the document annotation tool to mark the starting point position and the ending point position of each information entity, respectively, and represent the starting point position and the ending point position of each information entity with a unique identifier; all unique identifiers form initial annotation data of the document sample;

[0046] For the initial annotation data of the document sample, read each unique identifier of each information entity line by line; for each information entity, match the unique identifiers corresponding to the starting point position and the ending point position of the read information entity with the corresponding original document samples respectively; if the starting point position is matched, mark the word corresponding to the starting point position of the information entity in the original document as "B—English abbreviation of the information entity name"; otherwise, mark the information of other positions of the information entity in the original document including the ending point position as "I—English abbreviation of the information entity name"; the information of each original document sample other than the marked information entity is called a non-information entity, and each non-information entity is marked with "O"; the annotations of the marked information entity and the marked non-entity information of each document sample are used as the final annotation data, and the final annotation data is in a data format that can be recognized by the model to be trained;

[0047] Selecting an applicable model to be trained according to the text format characteristics of all the acquired preset number of document samples, and inputting the final annotation data of all the document samples into the selected model to be trained, wherein the model to be trained includes one of the following models: a model constructed based on rules, dictionaries, and statistical methods, as well as a BERT model, an ALBERT model, a BiLSTM model, and a CRF model;

[0048] By inputting the final labeled data into the training model and optimizing the parameters of the model to be trained through training, the evaluation indicators of the model to be trained meet the respective preset requirements, thus forming a document extraction model; wherein the evaluation indicators include correctness, recall rate, precision and F value.

[0049] Preferably, after adding the unified document identifier of the document ternary relationship to the main entity node attribute, the method further includes:

[0050] Add an Ondblclick mouse double-click event for the newly created main entity node; the Ondblclick mouse double-click event is used to respond when the mouse double-clicks the main entity node;

[0051] After creating a new node in the knowledge graph database as the information entity node in the ternary relationship, the method further includes:

[0052] Add an Ondblclick mouse double-click event for the newly created information entity node, wherein the Ondblclick mouse double-click event is used to automatically capture the entity nodes and connections connected to the information entity node when the mouse double-clicks the information entity node;

[0053] The document retrieval method based on the knowledge graph further includes: if the user does not find the target document in the result set, executing step 1, and if the target document is found in step 1, stopping the execution; if the target document is not found in step 1, continuing to execute step 2 and step 1 as a loop to find other target documents, and so on until the target document is found:

[0054] The user double-clicks any information entity node of the document in the triggered knowledge graph with the mouse, responds to the Ondblclick mouse double-click event added to the information entity node, hides all other nodes first, automatically captures the entity nodes and connections connected to the information entity node, returns all captured main entity nodes associated with the information entity node, and the connections between the information entity node and each main entity node, draws the corresponding knowledge graph through the front-end canvas and displays it; the user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph;

[0055] Step 2: The user double-clicks any main entity node returned in the previous step with the mouse, responds to the Ondblclick mouse double-click event added for the main entity node, hides all other nodes first, returns all information entity nodes associated with the main entity node, and the corresponding connections; draws the corresponding knowledge graph through the front-end canvas and displays it; the user determines which information entity nodes are contained in the document corresponding to the main entity node based on the knowledge graph; the information entity nodes contained in the document corresponding to the main entity node are used by the user to double-click the mouse.

[0056] Preferably, after adding the unified document identifier of the document ternary relationship to the main entity node attribute, the method further includes:

[0057] Add an Onmouseover event for the newly created main entity node; the Onmouseover event responds when the mouse moves over the document title node;

[0058] Drawing and displaying the knowledge graph of the triggered document through the front-end canvas specifically includes:

[0059] When a user hovers the mouse over any main entity node in the knowledge graph, the Onmouseover mouse hover event added to the document title corresponding to the main entity node is responded to, the document storage address corresponding to the unified identifier is retrieved, the document is read from the corresponding document storage address, and the toolkit is used to convert the document into a file format that the user can directly access, or into a file format that the user can access using a tool plug-in, and the accessible document is displayed as a preview file to help the user determine whether the document is the target document.

[0060] Preferably, it also includes:

[0061] A print button is set on the search page, and a print function is added to the print button response event; the print button is used to call the original file storage path of the previewed document through the print function and print the original file when the user requests the print function through the print button after the preview file is displayed to the user; and / or

[0062] An export button is set on the search page, and an export function is added to the corresponding event of the export button. The export button is used to call the original file storage path of the preview document described by the user through the export function when the user requests the export function through the export button after the preview file is displayed to the user, and then read the file stream according to the path to realize the download and export of the preview document.

[0063] In combination with the embodiments of the present invention, Figure 2 As shown, a document retrieval system based on knowledge graph is provided, including:

[0064] A ternary relationship extraction unit is used to extract the main entity and each information entity of any received document using a document extraction model, and to determine the type of each information entity in the document using the document extraction model, and the type of the information entity in the document is called a relationship; a ternary relationship is established for each information entity, and the identifier of the document is used as a unified document identifier for all ternary relationships of the document; wherein the main entity refers to the document title, and the information entity refers to the name of other entities except the main entity, and the ternary relationship of each information entity includes: a main entity, a relationship and an information entity;

[0065] The knowledge graph production unit is used to sequentially obtain all ternary relations of the document according to the unified document identifier, read the main entity from any ternary relation; and search from the knowledge graph database whether there is a main entity node that is the same as the main entity of the document and the unified document identifier;

[0066] If there is no main entity node with the same main entity and unified document identifier as the document in the knowledge graph database, a new node is created in the knowledge graph database as the main entity node of the document, the document title corresponding to the main entity of the document is used as the name of the main entity node, and the unified identifier of the document ternary relationship is added to the main entity node attribute;

[0067] If there is a main entity node in the graph recognition database that is the same as the main entity and unified document identifier of the document, then no main entity node is created for the main entity of the document, and the node that is the same as the main entity and unified document identifier of the document is used as the main entity node of the document;

[0068] For each ternary relationship of the document, read the information entity from the ternary relationship, and query the knowledge graph database whether there is an information entity with the same name as the information entity in the ternary relationship;

[0069] If there is an information entity with the same name as the information entity in the ternary relationship in the knowledge graph database, the main entity in the ternary relationship is connected to the information entity node with the same name in the knowledge graph database, and the relationship in the ternary relationship is used as the connection between the main entity and the information entity node with the same name in the knowledge graph database;

[0070] If there is no information entity with the same name as the information entity in the ternary relationship, a new node is created in the knowledge graph database as the information entity node in the ternary relationship, the created information entity node is connected to the main entity node of the document, and the relationship in the ternary relationship of the information entity is used as the connection between the main entity and the information entity node;

[0071] The retrieval unit is used to search and match the main entity nodes in the knowledge graph database according to the keywords input by the user when any user retrieves documents from the graph database through the search page, and form a result set of the main entity nodes that match the keywords and return it to the search page;

[0072] A display unit is used to search for all information entities and corresponding relationships corresponding to the main entity according to the attributes of the main entity node when the user triggers the document title of any main entity node in the result set, and draw and display the knowledge graph of the triggered document through the front-end canvas; wherein the knowledge graph of the triggered document uses its main entity node as the central root node, its information entity nodes as leaf nodes, and the central root node and the leaf nodes are connected through the relationship between the information entities represented by the leaf nodes; the user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph.

[0073] Preferably, it also includes a physical model training unit, and the physical model training unit is specifically used to:

[0074] Before extracting the main entity and each information entity of the document by using the document extraction model, a preset number of document samples are obtained, the information entity of each document sample content is identified, the type of each information entity is annotated with an English abbreviation using a document annotation tool, and the starting point position and the ending point position of each information entity are respectively marked with a document annotation tool, and the starting point position and the ending point position of each information entity are respectively represented by a unique identifier; all the unique identifiers are used to form the initial annotation data of the document sample;

[0075] For the initial annotation data of the document sample, read each unique identifier of each information entity line by line; for each information entity, match the unique identifiers corresponding to the starting point position and the ending point position of the read information entity with the corresponding original document samples respectively; if the starting point position is matched, mark the word corresponding to the starting point position of the information entity in the original document as "B—English abbreviation of the information entity name"; otherwise, mark the information of other positions of the information entity in the original document including the ending point position as "I—English abbreviation of the information entity name"; the information of each original document sample other than the marked information entity is called a non-information entity, and each non-information entity is marked with "O"; the annotations of the marked information entity and the marked non-entity information of each document sample are used as the final annotation data, and the final annotation data is in a data format that can be recognized by the model to be trained;

[0076] Selecting an applicable model to be trained according to the text format characteristics of all the acquired preset number of document samples, and inputting the final annotation data of all the document samples into the selected model to be trained, wherein the model to be trained includes one of the following models: a model constructed based on rules, dictionaries, and statistical methods, as well as a BERT model, an ALBERT model, a BiLSTM model, and a CRF model;

[0077] By inputting the final labeled data into the training model and optimizing the parameters of the model to be trained through training, the evaluation indicators of the model to be trained meet the respective preset requirements, thus forming a document extraction model; wherein the evaluation indicators include correctness, recall rate, precision and F value.

[0078] Preferably, the knowledge graph production unit includes:

[0079] The first trigger setting subunit is used to add an Ondblclick mouse double-click event to the newly created main entity node after the unified document identifier of the document ternary relationship is added to the main entity node attribute; the Ondblclick mouse double-click event is used to respond when the mouse double-clicks the main entity node;

[0080] The second trigger setting subunit is used to add an Ondblclick mouse double-click event to the newly created information entity node after creating a new node in the knowledge graph database as the information entity node in the ternary relationship, and the Ondblclick mouse double-click event is used to automatically capture the entity nodes and connections connected to the information entity node when the mouse double-clicks the information entity node;

[0081] The document retrieval system based on knowledge graph further includes an interactive retrieval unit, wherein the interactive retrieval unit is specifically used to:

[0082] If the user does not find the target document in the result set, execute step 1. If the target document is found in step 1, stop executing. If the target document is not found in step 1, continue to execute step 2. Step 1 is used as a loop to find other target documents until the target document is found:

[0083] The user double-clicks any information entity node of the document in the triggered knowledge graph with the mouse, responds to the Ondblclick mouse double-click event added to the information entity node, hides all other nodes first, automatically captures the entity nodes and connections connected to the information entity node, returns all captured main entity nodes associated with the information entity node, and the connections between the information entity node and each main entity node, draws the corresponding knowledge graph through the front-end canvas and displays it; the user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph;

[0084] The user double-clicks any main entity node returned in the previous step with the mouse to respond to the Ondblclick mouse double-click event added to the main entity node, hides all other nodes first, returns all information entity nodes associated with the main entity node, and the corresponding connections; draws the corresponding knowledge graph through the front-end canvas and displays it; the user determines which information entity nodes are contained in the document corresponding to the main entity node based on the knowledge graph; the information entity nodes contained in the document corresponding to the main entity node are used by the user to double-click the mouse.

[0085] Preferably, it also includes:

[0086] A third triggering unit is used to add an Onmouseover mouse rollover event to the newly created main entity node after the unified document identifier of the document ternary relationship is added to the main entity node attribute; the Onmouseover mouse rollover event responds to the mouse rolling over the document title node;

[0087] The display unit is specifically used for:

[0088] When a user hovers the mouse over any main entity node in the knowledge graph, the Onmouseover mouse hover event added to the document title corresponding to the main entity node is responded to, the document storage address corresponding to the unified identifier is retrieved, the document is read from the corresponding document storage address, and the toolkit is used to convert the document into a file format that the user can directly access, or into a file format that the user can access using a tool plug-in, and the accessible document is displayed as a preview file.

[0089] Preferably, it also includes:

[0090] A print output unit, used to set a print button on the search page and add a print function in the print button response event; the print button is used to call the original file storage path of the previewed document through the print function and print the original file when the user requests the print function through the print button after the preview file is displayed to the user; and / or

[0091] The export output unit is used to set an export button on the search page and add an export function to the corresponding event of the export button. The export button is used to call the original file storage path of the preview document of the user through the export function when the user requests the export function through the export button after the preview file is displayed to the user, and then read the file stream according to the path to realize the download and export of the preview document.

[0092] The above technical solution of the embodiment of the present invention is described in detail below in conjunction with specific application examples. For technical details not introduced during the implementation process, please refer to the relevant description in the previous text.

[0093] The keywords and technical terms involved in the present invention are as follows:

[0094] Knowledge Graph, known as knowledge domain visualization or knowledge domain mapping map in the library and information industry, is a series of various graphs that show the development process and structural relationship of knowledge. It uses visualization technology to describe knowledge resources and their carriers, and to mine, analyze, construct, draw and display knowledge and their interrelationships.

[0095] Knowledge graph is a modern theory that achieves the purpose of multidisciplinary integration by combining the theories and methods of applied mathematics, graphics, information visualization technology, information science and other disciplines with metrological citation analysis, co-occurrence analysis and other methods, and using visual graphs to vividly display the core structure, development history, frontier fields and overall knowledge architecture of the discipline.

[0096] Interactive search: When the search user cannot construct a good search formula, the process of obtaining more accurate search results by interacting with the search platform and constantly modifying the search formula.

[0097] A method and system for interactive document retrieval based on a knowledge graph (interactive retrieval is reflected in Step 107 to Step 110, and a cyclic interaction is performed in the manner of "clicking a node → presenting an associated graph → selecting a node → responding again" is adopted). A semantic and knowledge-level document retrieval method is constructed through a knowledge graph, providing users with a document entity click-association and interactive analysis-style retrieval based on a graph structure (i.e., interactive retrieval).

[0098] The method provided in the embodiment of the present invention includes:

[0099] 1. Use document annotation tools to annotate information entities (entities refer to entity information and information entities) in document samples;

[0100] 2. Input the labeled data into model training;

[0101] 3. Using the annotated model, extract entity relationships (i.e. entities and relationships) from the retrieved documents;

[0102] 4. Use the extracted ternary relationships to build a document knowledge graph;

[0103] 5. Retrieve all nodes associated with the query keyword in the document knowledge graph;

[0104] 6. In response to the user clicking on a certain graph node, hide other nodes and display the association relationship (i.e., connection relationship, edge) and node (this node is another node in the association relationship) of the node clicked by the user;

[0105] 7. Real-time review and preview of documents of a node that the user is interested in;

[0106] 8. Output the retrieved document based on the confirmation result after the user previews.

[0107] The embodiment of the present invention adopts a server / browser (Browser / Server) architecture, the documents to be retrieved are stored in the server database, and the graph (i.e., document knowledge graph) is presented on the front-end page. The following definitions are set:

[0108] Definition 1: In a graph (i.e., document knowledge graph), the length of a relationship between two nodes is 1, and the length of the relationship between two nodes is called an edge.

[0109] Definition 2: Each document has one and only one number, denoted as File_ID.

[0110] like Figure 3-Figure 5 As shown in the figure, the specific steps of the document interactive retrieval method based on knowledge graph are as follows:

[0111] Step 101. Use the document annotation tool to annotate information entities on more than 500 document samples. The annotation content includes three parts: the starting point position, the ending point position, and the English abbreviation of the information entity type. Among them, the English abbreviation of the information entity type is customized by the user, generally taking the first three capital letters of the entity type in English. For example, to annotate the information entity "Tsinghua University", use the organization type, recorded as "ORG". Commonly used English abbreviations of information entity types are shown in Table 1.

[0112] Table 1 Commonly used information entity marking codes

[0113]

[0114] After the annotation is completed, the annotation tool outputs the annotation results to a file with an extension of ann. Taking "Boao Forum for Asia is scheduled to be held in Boao, Hainan on April 18, 2021" as an example, the annotation output results completed by the annotation tool are shown in Table 2.

[0115] Table 2 Example of output format of annotation results

[0116]

[0117] Step 102. Marking result format conversion

[0118] Since the output data format of the annotation tool is not consistent with the input format of the model to be trained, the corresponding program is required to convert it into the annotation mode of "B or I—English abbreviation of information entity name" and "O" in Table 1. The conversion implementation method is: first start from the first row of Table 2, read the annotation results line by line, and match the starting point and end point information with the original annotated text. If it is the starting point position, the word is marked as "B—English abbreviation of information entity name", otherwise it is marked as "I—English abbreviation of information entity name", and finally the non-entity text of the original text is marked with "O". The converted result data format is shown in Table 3.

[0119] Table 3 Format conversion result data example table

[0120]

[0121]

[0122] Step 103. Input the labeled data into the model training. According to the different texts, comprehensive application (comprehensive application means adopting different models according to the characteristics of the text format) of the existing BERT, ALBERT, BiLSTM, CRF models, as well as models built based on rules, dictionaries, statistics and other methods, input the labeled result data into training, continuously optimize the parameters, and improve the evaluation indicators of the model. The evaluation indicators mainly include accuracy (accuracy means the ratio of the number of correctly identified samples to the number of all samples participating in the experiment), recall rate (recall rate means the ratio of the number of correctly identified entities to the number of real entities in the test set), precision rate (precision rate means the ratio of the number of correctly identified entities to the number of entities identified by the model) and F value (F value means the harmonic mean of accuracy rate and recall rate), etc.

[0123] Step 104. Use the trained model to extract document entity relationships (entities and relationships). Read the paragraph text in a document and input it into the model. The model automatically extracts the entities of the document, and then establishes a ternary relationship based on the extracted entities. The format is: (main entity, relationship, information entity), where the main entity is the extracted document title. If the document has no title, it is replaced by the document name. The relationship is the extracted information entity type, and the information entity is the name of other entities other than the extracted main entity. File_ID is used as the document identifier of all ternary relationships of the document for ternary relationship grouping and identification.

[0124] Step 105. According to the document identifier, take out all the ternary relations of the document extracted in Step 104 in turn, and read out the main entity from it, and find out whether there is a node with the same main entity name and document identifier File_ID in the knowledge graph database. If not, create a new node in the knowledge graph database, set the node name to "document title" (the document title here refers to the type of node), add File_ID to the node attribute, add Onmouseover (code representation of the mouse over event) and Ondblclick (code representation of the mouse double-click event) to the node, and automatically capture the node attribute when the mouse moves over or double-clicks (the node attribute is only for the document title, that is, only for the main entity). Then go to Step 106. If there is a node with the same main entity name and document identifier File_ID in the knowledge graph database, go to Step 106 and link the information entity node of the document with this title node.

[0125] Step 106. Read the information entity from the ternary relationship taken out from Step 104, and check whether there is an information entity with the same name in the knowledge graph database. If it exists, directly connect the information entity with the same name to the document title node corresponding to the main entity in the ternary relationship, and the connection value is the ternary relationship value; if it does not exist, create a new information entity node, and connect the created new information entity node to the document title node (main entity node), and the connection value is also the ternary relationship value. Add Ondblclick (mouse double-click event) for each information entity node, and automatically capture the associated entity node and connection relationship when the mouse is double-clicked.

[0126] Repeat Step 105 and Step 106 to complete the knowledge graph construction of the document, and then return to Step 104 until the entity relationship extraction of all documents and the construction of knowledge graph nodes and edges (edges refer to the connections between knowledge graph nodes, and the values ​​are the relationships in the ternary relationship group) are completed. For details, see Figure 2 .

[0127] Step 107. According to the query keywords input by the user, search for matching document title nodes among all nodes in the knowledge graph database whose node name is "document title" (hereinafter referred to as "document title nodes") and return the result set.

[0128] When the user double-clicks to search for a document title node in the result set, the system searches for all information entity nodes and connection relationships corresponding to the title node based on the node attributes. The result set is: (document title node→relationship 1→information entity 1), (document title node→relationship 2→information entity 2),..., (document title node→relationship n→information entity n). Through the front-end canvas drawing, the system finally presents to the user an information map with the document title node as the central root node and the information entity nodes as leaf nodes.

[0129] Step 108. Use the Ondblclick mouse double-click event to capture a node that the user double-clicks on.

[0130] If the user double-clicks an information entity node, all other nodes (including the main entity node) are hidden first, and then all document title nodes associated with the information entity node are queried and returned. The result set is: (information entity ← relationship 1 ← document title node 1), (information entity ← relationship 2 ← document title node 2), ..., (information entity ← relationship n ← document title node n);

[0131] If the user double-clicks the document title node, all other nodes are hidden first, and then the query returns all information entity nodes associated with the document title node. The result set is: (document title node→relationship 1→information entity 1), (document title node→relationship 2→information entity 2),..., (document title node→relationship n→information entity n).

[0132] These nodes and relationships are drawn on the front-end canvas, presenting the user with a graph structure centered on the document title node or information entity node and with all edges of length 1.

[0133] Step 109. Use the Onmouseover event to capture the node attribute (File_ID) of the document title node that the user slides over, then retrieve the document storage address corresponding to the File_ID, read the document and use the toolkit to convert the document into HTML, PDF and other file formats that can be directly accessed by the front end or accessed by tool plug-ins, then retrieve the document preview file on the front end page and present it to the user to help the user determine whether the document is the one they need to find. Repeat Step 108 and Step 109 until the user finds the target document. For details, see Figure 3 .

[0134] Step 110. Set two buttons, Print and Export, on the front-end page (that is, the document preview page and the front-end search page), and add a print function in the print button response event (the response function when the button is clicked). When the user requests, this function calls the original file storage path of the document being previewed and prints it out (the output document printing result); add a response function for the export button. When the user requests, this function also calls the storage path of the document being previewed, and then reads the file stream according to the path to download and export the document source file of the preview document.

[0135] The beneficial effects achieved by the present invention are as follows:

[0136] The present invention changes the simple text character matching of traditional document retrieval results, understands and analyzes the text from the semantic and knowledge levels, extracts entity relationships from static, isolated documents, and establishes connections between documents through the associations between entities, thereby realizing networked graph search; the retrieval method based on the knowledge graph can actively present the knowledge information structure of the document to the user, actively guide the user to search, and changes the previous user's passive and tentative input search; interactive retrieval is provided to users in the form of a graph network, which is clearer and more vivid than traditional retrieval methods, more readable, and provides better user experience.

[0137] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.

[0138] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.

[0139] The disclosed embodiments are described above to enable any person skilled in the art to implement or use the present invention. Various modifications of these embodiments are obvious to those skilled in the art, and the general principles defined herein may also be applied to other embodiments without departing from the spirit and scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments given herein, but is consistent with the broadest scope of the principles and novel features disclosed in this application.

[0140] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including", just as "including," is explained as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".

[0141] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is 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. A document retrieval method based on knowledge graph, characterized in that: include: For any received document, the main entity and each information entity of the document are extracted using a document extraction model, and the type of each information entity in the document is determined using the document extraction model, and the type of the information entity in the document is called a relationship; a ternary relationship is established for each information entity, and the identifier of the document is used as a unified document identifier for all ternary relationships of the document; wherein the main entity refers to the document title, and the information entity refers to the name of other entities except the main entity, and the ternary relationship of each information entity includes: the main entity, the relationship and the information entity; Obtain all ternary relations of the document in sequence according to the unified document identifier, and read the main entity from any ternary relation; and search the knowledge graph database for a main entity node that is identical to the main entity and unified document identifier of the document; If there is no main entity node with the same main entity and unified document identifier as the document in the knowledge graph database, a new node is created in the knowledge graph database as the main entity node of the document, the document title corresponding to the main entity of the document is used as the name of the main entity node, and the unified identifier of the document ternary relationship is added to the main entity node attribute; If there is a main entity node in the graph recognition database that is the same as the main entity and unified document identifier of the document, then no main entity node is created for the main entity of the document, and the node that is the same as the main entity and unified document identifier of the document is used as the main entity node of the document; For each ternary relationship of the document, read the information entity from the ternary relationship, and query the knowledge graph database whether there is an information entity with the same name as the information entity in the ternary relationship; If there is an information entity with the same name as the information entity in the ternary relationship in the knowledge graph database, the main entity in the ternary relationship is connected to the information entity node with the same name in the knowledge graph database, and the relationship in the ternary relationship is used as the connection between the main entity and the information entity node with the same name in the knowledge graph database; If there is no information entity with the same name as the information entity in the ternary relationship, a new node is created in the knowledge graph database as the information entity node in the ternary relationship, the created information entity node is connected to the main entity node of the document, and the relationship in the ternary relationship of the information entity is used as the connection between the main entity and the information entity node; When any user retrieves a document from the graph database through the search page, the main entity nodes in the knowledge graph database are searched and matched according to the keywords entered by the user, and the main entity nodes that match the keywords are formed into a result set and returned to the search page; When the user triggers the document title of any main entity node in the result set, all information entities and corresponding relationships corresponding to the main entity are searched according to the main entity node attributes, and the knowledge graph of the triggered document is drawn and displayed through the front-end canvas; wherein the knowledge graph of the triggered document has its main entity node as the central root node, its information entity nodes as leaf nodes, and the central root node and the leaf nodes are connected through the relationship between the information entities represented by the leaf nodes; The user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph.

2. The document retrieval method based on knowledge graph according to claim 1, characterized in that: Before extracting the main entity and each information entity of the document by using the document extraction model, the method further includes: Obtain a preset number of document samples, identify the information entity of each document sample content, use a document annotation tool to annotate the type of each information entity in English, and use the document annotation tool to mark the starting point position and the ending point position of each information entity, respectively, and represent the starting point position and the ending point position of each information entity with a unique identifier; all unique identifiers form initial annotation data of the document sample; For the initial annotation data of the document sample, read each unique identifier of each information entity line by line; for each information entity, match the unique identifiers corresponding to the starting point position and the ending point position of the read information entity with the corresponding original document samples respectively; if the starting point position is matched, the word corresponding to the starting point position of the information entity in the original document is marked as "B—English abbreviation of the information entity name"; otherwise, the information of other positions of the information entity in the original document including the ending point position is marked as "I—English abbreviation of the information entity name"; the information of each original document sample other than the marked information entity is called non-information entity, and each non-information entity is marked with "O"; the annotations of the marked information entity and the marked non-entity information of each document sample are used as the final annotation data, and the final annotation data is in a data format that can be recognized by the model to be trained; Selecting an applicable model to be trained according to the text format characteristics of all the acquired preset number of document samples, and inputting the final annotation data of all the document samples into the selected model to be trained, wherein the model to be trained includes one of the following models: a model constructed based on rules, dictionaries, and statistical methods, as well as a BERT model, an ALBERT model, a BiLSTM model, and a CRF model; By inputting the final labeled data into the training model and optimizing the parameters of the model to be trained through training, the evaluation indicators of the model to be trained meet the respective preset requirements, thus forming a document extraction model; wherein the evaluation indicators include correctness, recall rate, precision and F value.

3. The document retrieval method based on knowledge graph according to claim 1, characterized in that: After adding the unified document identifier of the document ternary relationship to the main entity node attribute, the method further includes: Add an Ondblclick mouse double-click event for the newly created main entity node; the Ondblclick mouse double-click event is used to respond when the mouse double-clicks the main entity node; After creating a new node in the knowledge graph database as the information entity node in the ternary relationship, the method further includes: Add an Ondblclick mouse double-click event for the newly created information entity node, wherein the Ondblclick mouse double-click event is used to automatically capture the entity nodes and connections connected to the information entity node when the mouse double-clicks the information entity node; The document retrieval method based on the knowledge graph further includes: if the user does not find the target document in the result set, executing step 1, and if the target document is found in step 1, stopping the execution; if the target document is not found in step 1, continuing to execute step 2 and step 1 as a loop to find other target documents, and so on until the target document is found: Step 1: The user double-clicks any information entity node of the document in the triggered knowledge graph with the mouse, responds to the Ondblclick mouse double-click event added to the information entity node, hides all other nodes first, automatically captures the entity nodes and connections connected to the information entity node, returns all the captured main entity nodes associated with the information entity node, and the connections between the information entity node and each main entity node, draws the corresponding knowledge graph through the front-end canvas and displays it; the user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph; Step 2: The user double-clicks any main entity node returned in the previous step with the mouse, responds to the Ondblclick mouse double-click event added for the main entity node, hides all other nodes first, returns all information entity nodes associated with the main entity node, and the corresponding connections; draws the corresponding knowledge graph through the front-end canvas and displays it; the user determines which information entity nodes are contained in the document corresponding to the main entity node based on the knowledge graph; the information entity nodes contained in the document corresponding to the main entity node are used by the user to double-click the mouse.

4. The document retrieval method based on knowledge graph according to claim 1, characterized in that: After adding the unified document identifier of the document ternary relationship to the main entity node attribute, the method further includes: Add an Onmouseover event for the newly created main entity node; the Onmouseover event responds when the mouse moves over the document title node; Drawing and displaying the knowledge graph of the triggered document through the front-end canvas specifically includes: When a user hovers the mouse over any main entity node in the knowledge graph, the Onmouseover mouse hover event added to the document title corresponding to the main entity node is responded to, the document storage address corresponding to the unified identifier is retrieved, the document is read from the corresponding document storage address, and the toolkit is used to convert the document into a file format that the user can directly access, or into a file format that the user can access using a tool plug-in, and the accessible document is displayed as a preview file to help the user determine whether the document is the target document.

5. The document retrieval method based on knowledge graph according to claim 4 is characterized in that: Also includes: Set a print button on the search page and add a print function to the print button response event; The print button is used to call the original file storage path of the previewed document through the print function and print the original file when the user requests the print function through the print button after the preview file is displayed to the user; and / or An export button is set on the search page, and an export function is added to the corresponding event of the export button. The export button is used to call the original file storage path of the preview document described by the user through the export function when the user requests the export function through the export button after the preview file is displayed to the user, and then read the file stream according to the path to realize the download and export of the preview document.

6. A document retrieval system based on knowledge graph, characterized in that: include: A ternary relationship extraction unit is used to extract the main entity and each information entity of any received document using a document extraction model, and to determine the type of each information entity in the document using the document extraction model, and the type of the information entity in the document is called a relationship; a ternary relationship is established for each information entity, and the identifier of the document is used as a unified document identifier for all ternary relationships of the document; wherein the main entity refers to the document title, and the information entity refers to the name of other entities except the main entity, and the ternary relationship of each information entity includes: a main entity, a relationship and an information entity; The knowledge graph production unit is used to sequentially obtain all ternary relations of the document according to the unified document identifier, read the main entity from any ternary relation; and search from the knowledge graph database whether there is a main entity node that is the same as the main entity of the document and the unified document identifier; If there is no main entity node with the same main entity and unified document identifier as the document in the knowledge graph database, a new node is created in the knowledge graph database as the main entity node of the document, the document title corresponding to the main entity of the document is used as the name of the main entity node, and the unified identifier of the document ternary relationship is added to the main entity node attribute; If there is a main entity node in the graph recognition database that is the same as the main entity and unified document identifier of the document, then no main entity node is created for the main entity of the document, and the node that is the same as the main entity and unified document identifier of the document is used as the main entity node of the document; For each ternary relationship of the document, read the information entity from the ternary relationship, and query the knowledge graph database whether there is an information entity with the same name as the information entity in the ternary relationship; If there is an information entity with the same name as the information entity in the ternary relationship in the knowledge graph database, the main entity in the ternary relationship is connected to the information entity node with the same name in the knowledge graph database, and the relationship in the ternary relationship is used as the connection between the main entity and the information entity node with the same name in the knowledge graph database; If there is no information entity with the same name as the information entity in the ternary relationship, a new node is created in the knowledge graph database as the information entity node in the ternary relationship, the created information entity node is connected to the main entity node of the document, and the relationship in the ternary relationship of the information entity is used as the connection between the main entity and the information entity node; The retrieval unit is used to search and match the main entity nodes in the knowledge graph database according to the keywords input by the user when any user retrieves documents from the graph database through the search page, and form a result set of the main entity nodes that match the keywords and return it to the search page; A display unit is used to search for all information entities and corresponding relationships corresponding to the main entity according to the attributes of the main entity node when the user triggers the document title of any main entity node in the result set, and draw and display the knowledge graph of the triggered document through the front-end canvas; wherein the knowledge graph of the triggered document uses its main entity node as the central root node, its information entity nodes as leaf nodes, and the central root node and the leaf nodes are connected through the relationship between the information entities represented by the leaf nodes; the user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph.

7. The document retrieval system based on knowledge graph according to claim 6, characterized in that: It also includes a physical model training unit, wherein the physical model training unit is specifically used for: Before extracting the main entity and each information entity of the document by using the document extraction model, a preset number of document samples are obtained, the information entity of each document sample content is identified, the type of each information entity is annotated with an English abbreviation using a document annotation tool, and the starting point position and the ending point position of each information entity are respectively marked with a document annotation tool, and the starting point position and the ending point position of each information entity are respectively represented by a unique identifier; all the unique identifiers are used to form the initial annotation data of the document sample; For the initial annotation data of the document sample, read each unique identifier of each information entity line by line; for each information entity, match the unique identifiers corresponding to the starting point position and the ending point position of the read information entity with the corresponding original document samples respectively; if the starting point position is matched, the word corresponding to the starting point position of the information entity in the original document is marked as "B—English abbreviation of the information entity name"; otherwise, the information of other positions of the information entity in the original document including the ending point position is marked as "I—English abbreviation of the information entity name"; the information of each original document sample other than the marked information entity is called non-information entity, and each non-information entity is marked with "O"; the annotations of the marked information entity and the marked non-entity information of each document sample are used as the final annotation data, and the final annotation data is in a data format that can be recognized by the model to be trained; Selecting an applicable model to be trained according to the text format characteristics of all the acquired preset number of document samples, and inputting the final annotation data of all the document samples into the selected model to be trained, wherein the model to be trained includes one of the following models: a model constructed based on rules, dictionaries, and statistical methods, as well as a BERT model, an ALBERT model, a BiLSTM model, and a CRF model; By inputting the final labeled data into the training model and optimizing the parameters of the model to be trained through training, the evaluation indicators of the model to be trained meet the respective preset requirements, thus forming a document extraction model; wherein the evaluation indicators include correctness, recall rate, precision and F value.

8. The document retrieval system based on knowledge graph according to claim 7, characterized in that: The knowledge graph production unit includes: The first trigger setting subunit is used to add an Ondblclick mouse double-click event to the newly created main entity node after the unified document identifier of the document ternary relationship is added to the main entity node attribute; the Ondblclick mouse double-click event is used to respond when the mouse double-clicks the main entity node; The second trigger setting subunit is used to add an Ondblclick mouse double-click event to the newly created information entity node after creating a new node in the knowledge graph database as the information entity node in the ternary relationship, and the Ondblclick mouse double-click event is used to automatically capture the entity nodes and connections connected to the information entity node when the mouse double-clicks the information entity node; The document retrieval system based on knowledge graph further includes an interactive retrieval unit, wherein the interactive retrieval unit is specifically used to: If the user does not find the target document in the result set, execute step 1. If the target document is found in step 1, stop executing. If the target document is not found in step 1, continue to execute step 2. Step 1 is used as a loop to find other target documents until the target document is found: The user double-clicks any information entity node of the document in the triggered knowledge graph with the mouse, responds to the Ondblclick mouse double-click event added to the information entity node, hides all other nodes first, automatically captures the entity nodes and connections connected to the information entity node, returns all captured main entity nodes associated with the information entity node, and the connections between the information entity node and each main entity node, draws the corresponding knowledge graph through the front-end canvas and displays it; the user determines whether the document corresponding to each main entity node is the target document based on the knowledge graph; The user double-clicks any main entity node returned in the previous step with the mouse to respond to the Ondblclick mouse double-click event added to the main entity node, hides all other nodes first, returns all information entity nodes associated with the main entity node, and the corresponding connections; draws the corresponding knowledge graph through the front-end canvas and displays it; the user determines which information entity nodes are contained in the document corresponding to the main entity node based on the knowledge graph; the information entity nodes contained in the document corresponding to the main entity node are used by the user to double-click the mouse.

9. The document retrieval system based on knowledge graph according to claim 6, characterized in that: Also includes: A third triggering unit is used to add an Onmouseover mouse rollover event to the newly created main entity node after the unified document identifier of the document ternary relationship is added to the main entity node attribute; the Onmouseover mouse rollover event responds to the mouse rolling over the document title node; The display unit is specifically used for: When a user hovers the mouse over any main entity node in the knowledge graph, the Onmouseover mouse hover event added to the document title corresponding to the main entity node is responded to, the document storage address corresponding to the unified identifier is retrieved, the document is read from the corresponding document storage address, and the toolkit is used to convert the document into a file format that the user can directly access, or into a file format that the user can access using a tool plug-in, and the accessible document is displayed as a preview file to help the user determine whether the document is the target document.

10. The document retrieval system based on knowledge graph according to claim 9, characterized in that: Also includes: Print output unit, used to set a print button on the search page and add a print function in the print button response event; The print button is used to call the original file storage path of the previewed document through the print function and print the original file when the user requests the print function through the print button after the preview file is displayed to the user; and / or The export output unit is used to set an export button on the search page and add an export function to the corresponding event of the export button. The export button is used to call the original file storage path of the preview document of the user through the export function when the user requests the export function through the export button after the preview file is displayed to the user, and then read the file stream according to the path to realize the download and export of the preview document.

Citation Information

Patent Citations

  • Search method and device

    CN104462505A

  • A method and apparatus for outputting information

    CN109271556A