A user-driven knowledge graph construction method, device and medium

Through the knowledge graph representation method of user intention process sequence behavior log answer document and thought chain imitation learning to generate answer documents, it solves the gap problem between knowledge graph construction and user needs, and achieves more efficient knowledge coverage and accurate information retrieval.

CN118469004BActive Publication Date: 2024-09-24HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410911347.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-09-24
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

There is a gap between the existing knowledge graph construction process and the actual needs of users, resulting in poor accuracy in information retrieval and reasoning.

Method used

Design a knowledge graph representation method based on the user intention process sequence behavior log answer document, associate the process sequence with the answer document, use thinking chain imitation learning to generate the answer document, and build a user-driven knowledge graph.

Benefits of technology

It reduces the cost of knowledge graph construction, improves knowledge coverage and retrieval accuracy, and solves the problem of lack of existing answers to questions and answers in process sequences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118469004B
    Figure CN118469004B
Patent Text Reader

Abstract

The present application provides a user-driven knowledge graph construction method, device and medium, which relates to the field of artificial intelligence. The method includes: designing a knowledge graph representation scheme based on the user's intention process sequence behavior log answer document; constructing a knowledge graph through the knowledge graph representation scheme, designing a process sequence in the knowledge graph and an answer document association method, and obtaining a document answer data set for the process sequence; constructing an answer document generation model based on thinking chain imitation learning; obtaining a process sequence to be retrieved, and generating an answer document for the process sequence to be retrieved through the answer document generation model and the document answer data set for the process sequence to be retrieved. By mining the process sequence of events, it is used to construct a process graph, so that the knowledge graph can provide more comprehensive and accurate semantic information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a user-driven knowledge graph construction method, device and medium. Background Art

[0002] Knowledge graph, also known as scientific knowledge graph, is called knowledge domain visualization or knowledge domain mapping map in the library and information industry. It is a series of various graphics 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.

[0003] Time-series knowledge graph question answering involves reasoning and answering questions about time-series information in knowledge graphs. In time-series knowledge graph question answering tasks, existing methods mainly use information retrieval and end-to-end reasoning, but traditional knowledge graph construction is often information-driven, usually requiring a lot of manpower and time costs, and there is a gap between the knowledge graph construction process and the actual needs of users, resulting in poor accuracy of information retrieval and reasoning. Summary of the invention

[0004] The purpose of the present invention is to provide a user-driven knowledge graph construction method, device and medium in order to solve the problem that there is a gap between the existing knowledge graph construction process and the actual needs of users, resulting in poor accuracy of information retrieval and reasoning.

[0005] 1. In order to solve the gap between knowledge graph construction and actual user needs, we study the knowledge graph representation method based on the clue of "user intention process sequence behavior log answer document". 2. In order to solve the association problem between process sequence and answer question, we study the association method between process sequence and answer document based on cross-document relationship retrieval. 3. In order to solve the challenge of lack of existing answer question for some process sequences, we study the answer document generation method based on thought chain imitation learning.

[0006] The above-mentioned purpose of the present application is achieved through the following technical solutions:

[0007] S1: Design a knowledge graph representation scheme based on the user intention process sequence behavior log answer document; construct a knowledge graph through the knowledge graph representation scheme;

[0008] S2: Design a method to associate process sequences with answer documents in the knowledge graph to obtain a document answer dataset for process sequences;

[0009] S3: Construct a solution document generation model based on thought chain imitation learning;

[0010] S4: Obtain the process sequence to be retrieved, and generate the answer document of the process sequence to be retrieved by using the answer document generation model and the document answer data set of the process sequence to be retrieved.

[0011] Optionally, step S1 includes:

[0012] S11: Acquire each target event; the target event includes at least one process;

[0013] S12: Record the behavior log information of each target event, the timing information of the process, and the cross-modal information of the answer document, and build a single-source knowledge graph for each target event;

[0014] S13: Through the super-point representation method of the knowledge graph, connect each single-source knowledge graph to complete the construction of the knowledge graph.

[0015] Optionally, step S13 includes:

[0016] The super points include: user intention super points, process super points and entity super points;

[0017] The same user intent in each single-source knowledge graph is connected through user intent super-points;

[0018] The same processes in each single-source knowledge graph are connected through process superpoints;

[0019] The same entities in each single-source knowledge graph are connected through entity superpoints to complete the construction of the knowledge graph.

[0020] Optionally, step S2 includes:

[0021] Set process sequence , process sequence The document corpus , process sequence There are adjacent processes and Process ;

[0022] From the document corpus Find the process containing and Process Documentation ;

[0023] In multiple documents Perform process identification and retrieve documents All processes in

[0024] If the process in all processes In the documentation appears multiple times in different mentions, then the process Disambiguate different references to

[0025] Taking each process as a node, three types of nodes are constructed. The three types of nodes include: the head node of the head process , the tail node of the tail process , intermediate nodes of other processes ;

[0026] If the process Mentions and processes The mention appears in the document In the same text paragraph, the text paragraph is used as an edge to connect the two process nodes; by traversing the document All text paragraphs and processes in the file are obtained to form a connection graph with processes as nodes and text paragraphs as edges.

[0027] Each document The same process is merged between them to finally obtain the document Process connection diagram ;

[0028] Connection diagram according to the process , get the process and Process The reasoning path ;

[0029] Using text encoder to process and Process and reasoning paths to encode and calculate the process and Process Correlation with the reasoning path , the calculation formula is as follows:

[0030]

[0031]

[0032] in Indicates the process and Process Text combination; Indicates the process and Process The embedded vector is Represents the reasoning path The vector after embedding; and Obtained through the pre-trained BERT model;

[0033] By relevance For multiple reasoning paths Scoring and sorting are performed, and the reasoning paths with scores greater than the preset threshold are retained;

[0034] Combine the text paragraphs in the retained multiple reasoning paths to obtain the process and Process Document answer dataset.

[0035] Optionally, the reasoning path includes the following:

[0036] Direct path: If the process and Process If both appear in a text paragraph, the process and Process In the process connection diagram directly related, forming a direct path;

[0037] Multi-hop path: Find the starting node through bounded depth-first search To the head node The paths whose path length does not exceed the preset threshold are obtained as multi-hop paths;

[0038] Default path: If the process and Process If there is no direct path or multi-hop path, all the processes that contain and Process The text paragraph is considered as a reasoning path, namely the default path.

[0039] Optionally, step S3 includes:

[0040] The process of generating solution documents from process sequences is defined as a Markov decision process;

[0041] Setting the inference strategy Expert decision-making process for behavioral cloning in imitation learning of thought chains;

[0042] Extracting expert strategies from behavioral cloning Calculation process information;

[0043] Train reasoning strategies by computing process information ;

[0044] Combining expert strategies and reasoning strategies , build a solution document generation model.

[0045] An electronic device includes a processor, a memory, a user interface and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes a user-driven knowledge graph construction method.

[0046] A computer-readable storage medium stores instructions, which, when executed, perform a user-driven knowledge graph construction method.

[0047] The beneficial effects of the technical solution provided by this application are:

[0048] This application builds a user-driven knowledge graph based on the association between user intention, process sequence, behavior log and answer document, in order to reduce the cost of knowledge graph construction and improve knowledge coverage. A knowledge graph representation method based on the clue of "user intention process sequence behavior log answer document" is designed to solve the gap between knowledge graph construction and actual user needs; a process sequence and answer document association method based on cross-document relationship retrieval is designed to associate process sequences with answer questions; a solution document generation method based on thought chain imitation learning is designed to solve the problem that some process sequences lack existing answers. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The present application will be further described below with reference to the accompanying drawings and embodiments, in which:

[0050] Figure 1 It is a step diagram of the user-driven knowledge graph construction method in an embodiment of the present application;

[0051] Figure 2 It is a schematic diagram of a knowledge graph representation method of a user-driven knowledge graph construction method in an embodiment of the present application;

[0052] Figure 3 It is a schematic diagram of the electronic device structure of the user-driven knowledge graph construction method in the embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to have a clearer understanding of the technical features, purposes and effects of the present application, the specific implementation methods of the present application are now described in detail with reference to the accompanying drawings.

[0054] Please refer to Figure 1 , Figure 1 It is a step diagram of a user-driven knowledge graph construction method in an embodiment of the present application, including:

[0055] S1: Design a knowledge graph representation scheme based on the user intention process sequence behavior log answer document; construct a knowledge graph through the knowledge graph representation scheme;

[0056] Step S1 includes:

[0057] S11: Acquire each target event; the target event includes at least one process;

[0058] S12: Record the behavior log information of each target event, the timing information of the process, and the cross-modal information of the answer document, and build a single-source knowledge graph for each target event;

[0059] S13: Through the super-point representation method of the knowledge graph, connect each single-source knowledge graph to complete the construction of the knowledge graph.

[0060] Specifically,

[0061] Step S13 includes:

[0062] The super points include: user intention super points, process super points and entity super points;

[0063] The same user intent in each single-source knowledge graph is connected through user intent super-points;

[0064] The same processes in each single-source knowledge graph are connected through process superpoints;

[0065] The same entities in each single-source knowledge graph are connected through entity superpoints to complete the construction of the knowledge graph.

[0066] Specifically, traditional knowledge graph construction is often information-driven, usually requiring a lot of manpower and time, and there is a gap between the knowledge graph construction process and the actual needs of users. To solve this problem, this application proposes a user-driven knowledge graph representation solution that combines the clues of "user intention process sequence behavior log answer document", such as Figure 2 The knowledge graph representation scheme includes not only traditional concept entities, but also documents, process sequences, and answer documents.

[0067] Specifically, when a user wants to achieve a specific goal (for example, a car needs to go from point A to point B, such as Figure 2As shown in the figure, a series of steps or events will be performed. Each event will leave a series of behavior logs when it is completed. Vehicle A may choose to pass through C, D, and then E, etc. Vehicle B with the same goal may choose the Great Barrier Reef in the third process. These behavior logs may include AIS historical tracks, pictures, news texts, etc. The answer document refers to the cross-modal information involved in each process node and from one process node to the next. For example, if the process sequence of vehicle A involves C, D, E, etc., then the knowledge graph needs to be able to cover this knowledge. By mining the process sequence obtained from the research content and extending it to the construction process of the knowledge graph, the knowledge graph can provide more comprehensive and accurate semantic information. In addition, in the representation scheme, the timing information of the process is retained. Each process (that is, each event) has its timestamp, which allows users to understand the sequential relationship between events when completing a certain goal. These timing information and the association with the original behavior log help improve the performance of downstream timing tasks.

[0068] Fusion of the above-mentioned multiple single-source knowledge graphs involves conflicts in multi-source knowledge. In traditional knowledge fusion schemes, it is common to align entities in different data sources and then directly merge them into an overall knowledge graph. However, this approach is prone to information loss and errors because it ignores the semantic differences and conflicts between different data sources. To address this challenge, this application introduces knowledge representation based on hypernodes. The hypernode-based knowledge representation scheme aims to retain data from each original data source so that the source of the data can be determined and its development can be tracked. Its representation scheme is to associate the same entity from different data sources with an additional "hypernode" instead of directly merging the same node. The advantage of this knowledge representation scheme is that it can eliminate conflicts between entities and effectively remove erroneous data introduced in the process of knowledge fusion, thereby providing a more consistent and reliable data foundation for the construction of knowledge graphs. For example, a graph constructed based on user intent and related documents may involve the same user intent, process nodes, and consistent answer documents. Therefore, it is necessary to aggregate data from different vehicles through hypernodes (such as user intent hypernodes, process hypernodes, etc.).

[0069] S2: Design a method to associate process sequences with answer documents in the knowledge graph to obtain a document answer dataset for process sequences;

[0070] Step S2 includes:

[0071] Set process sequence , process sequence The document corpus , process sequence There are adjacent processes and Process ;

[0072] From the document corpus Find all processes that contain and Process Documentation ;

[0073] In multiple documents Perform process identification and retrieve documents All processes in

[0074] If the process in all processes In the documentation appears multiple times in different mentions, then the process Disambiguate different references to

[0075] Specifically, the previous method of associating processes usually requires the use of information extraction tools to extract clear relationships from text. However, this information-driven graph construction method is costly, time-consuming, and ineffective. In the end, the resulting graph will lose some of the original semantic information during the construction process.

[0076] Taking each process as a node, three types of nodes are constructed. The three types of nodes include: the head node of the head process , the tail node of the tail process , intermediate nodes of other processes ;

[0077] Specifically, within a document, a text paragraph usually exists as an independent semantic fragment. If two processes appear in the same text paragraph at the same time, we can assume that they are semantically related.

[0078] If the process Mentions and processes The mention appears in the document In the same text paragraph, the text paragraph is used as an edge to connect the two process nodes; by traversing the document All text paragraphs and processes in the file are obtained to form a connection graph with processes as nodes and text paragraphs as edges.

[0079] Each document The same process is merged between them to finally obtain the document Process connection diagram ;

[0080] According to the process connection diagram , get the process and Process The reasoning path ;

[0081] The reasoning path includes the following:

[0082] Direct path: If the process and Process If both appear in a text paragraph, the process and Process In the process connection diagram directly related, forming a direct path;

[0083] Multi-hop path: Find the starting node through bounded depth-first search To the head node The paths whose path length does not exceed the preset threshold are obtained as multi-hop paths;

[0084] Default path: If the process and Process If there is no direct path or multi-hop path, all the processes that contain and Process The text paragraph is regarded as a reasoning path, namely the default path;

[0085] Specifically, for two adjacent processes and Process , can be obtained from the process and Process There may be a reasoning path between them. Reasoning Path , these paths are not necessarily related to the process and Process Related, there may be some noise, therefore, these reasoning paths need to be evaluated and filtered.

[0086] Using text encoders for process and Process and reasoning paths to encode and calculate the process and Process Correlation with the reasoning path , the calculation formula is as follows:

[0087]

[0088]

[0089] in Indicates the process and Process Text combination; Indicates the process and Process The embedded vector is Represents the reasoning path The vector after embedding; and Obtained through the pre-trained BERT model;

[0090] By relevance For multiple reasoning paths Scoring and sorting are performed, and the reasoning paths with scores greater than the preset threshold are retained;

[0091] Combine the text paragraphs in the retained multiple reasoning paths to obtain the process and Process Document answer dataset.

[0092] Specifically, existing methods for associating process sequences with answer documents mainly focus on keyword matching or shallow semantic matching methods. These methods work well for simple and clear process sequences, but they are not effective for process sequences involving multiple steps, and related sub-steps are scattered in various documents, or when there are complex relationships between process sequences. Based on the cross-document relationship retrieval algorithm, a method for associating process sequences with answer documents is designed to fully explore the relationship between process sequences and answer questions. Search for documents in the document corpus that can complete the process. And change the process status from Transfer to Based on human intuition, complete the process And change the process status from Transfer to It may be necessary to go through one or more steps. To this end, a method for associating process sequences with answer documents is designed to retrieve all possible reasoning evidences, and based on this, the answer documents of the process sequence are obtained. BERT (Bidirectional Encoder Representations from Transformers) model.

[0093] S3: Construct a solution document generation model based on thought chain imitation learning;

[0094] Step S3 includes:

[0095] The process of generating solution documents from process sequences is defined as a Markov decision process;

[0096] Setting the inference strategy Expert decision-making process for behavioral cloning in imitation learning of thought chains;

[0097] Extracting expert strategies from behavioral cloning Calculation process information;

[0098] Train reasoning strategies by computing process information ;

[0099] Combining expert strategies and reasoning strategies , build a solution document generation model.

[0100] Specific, reasoning strategies When faced with new process sequence data, the corresponding process sequence solution document can also be generated. During the process cloning process, not only the input and output obtained by the expert strategy are learned, but also the intermediate calculation results in the process of generating the output by the expert strategy are learned.

[0101] Specifically, original documents, long text fragments, answer documents, etc. are also used as node types of the knowledge graph. Only entity extraction and entity association are required for the original documents. The knowledge graph construction method does not require fine-grained information extraction of the entire corpus. The process of extracting the original knowledge graph only involves entity types related to answering user questions.

[0102] Specifically, based on the constructed knowledge graph, combined with the retrieval enhanced generation (RAG) method, an enhanced knowledge graph representation method was designed. By delaying the relationship extraction stage to the retrieval stage, entities related to answering questions and the association information between entities were newly extracted in the knowledge graph according to the user's query, thus reducing the cost of knowledge graph construction.

[0103] Specifically, the path information of the knowledge graph is used to guide the evidence retrieval process, and documents closely related to user questions are gradually retrieved and reasoned based on the big model, which significantly improves the accuracy and comprehensiveness of knowledge retrieval, thereby enhancing the accuracy and comprehensiveness of the results generated by the big model.

[0104] Based on the knowledge graph query, the subgraph related to the user's question is retrieved, including related entities and the association information between entities, etc. The entity description and the association information between entities include long text fragments, and are not limited to precise entity names or relationship names; the reasoning results reversely enhance the knowledge graph and enrich the content of the knowledge graph.

[0105] S4: Obtain the process sequence to be retrieved, and generate the answer document of the process sequence to be retrieved by using the answer document generation model and the document answer data set of the process sequence to be retrieved.

[0106] The present application also discloses an electronic device. Figure 3 , Figure 3The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .

[0107] The communication bus 502 is used to realize the connection and communication between these components.

[0108] The user interface 503 may include a display screen, and the optional user interface 503 may also include a standard wired interface or a wireless interface.

[0109] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0110] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.

[0111] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A user-driven knowledge graph construction method, It is characterized in that The method comprises the following steps: S1: Design a knowledge graph representation scheme based on user intention process sequence behavior log answer document; Construct a knowledge graph through the knowledge graph representation scheme; S2: Design a method to associate process sequences with answer documents in the knowledge graph to obtain a document answer dataset for process sequences; Step S2 includes: Set process sequence , process sequence The document corpus , process sequence There are adjacent processes and Process ; From the document corpus Find the process containing and Process Documentation ; In multiple documents Perform process identification and retrieve documents All processes in If the process in all processes In the documentation appears multiple times in different mentions, then the process Disambiguate different references to Take each process as a node and build three types of nodes. The three types of nodes include: the head node of the head process , the tail node of the tail process , intermediate nodes of other processes ; If the process Mentions and processes The mention appears in the document In the same text paragraph, the text paragraph is used as an edge to connect the two process nodes; by traversing the document All text paragraphs and processes in the file are obtained to form a connection graph with processes as nodes and text paragraphs as edges. Each document The same process is merged between them to finally obtain the document Process connection diagram ; According to the process connection diagram , get the process and Process The reasoning path ; Using text encoder to process and Process and reasoning paths to encode and calculate the process and Process Correlation with the reasoning path , the calculation formula is as follows: in Indicates the process and Process Text combination; Indicates the process and Process The embedded vector is Represents the reasoning path The vector after embedding; and Obtained through the pre-trained BERT model; By relevance For multiple reasoning paths Scoring and sorting are performed, and the reasoning paths with scores greater than the preset threshold are retained; Combine the text paragraphs in the retained multiple reasoning paths to obtain the process and Process Document answer dataset of The reasoning path includes the following: Direct path: If the process and Process If both appear in a text paragraph, the process and Process In the process connection diagram directly related, forming a direct path; Multi-hop path: Find the starting node through bounded depth-first search To the head node The paths whose path length does not exceed the preset threshold are obtained as multi-hop paths; Default path: If the process and Process If there is no direct path or multi-hop path, all the processes that contain and Process The text paragraph is regarded as a reasoning path, namely the default path; S3: Construct a solution document generation model based on thought chain imitation learning; S4: Obtain the process sequence to be retrieved, and generate the answer document of the process sequence to be retrieved through the answer document generation model and the document answer data set of the process sequence to be retrieved, as follows: By associating the process sequence in the knowledge graph with the answer document, a document answer dataset of the process sequence to be retrieved is obtained; The answer document generation model is used to infer the document answer dataset of the process sequence to be retrieved, and the answer document of the process sequence to be retrieved is generated.

2. A user-driven knowledge graph construction method as claimed in claim 1, It is characterized in that Step S1 includes: S11: Acquire each target event; the target event includes at least one process; S12: Record the behavior log information of each target event, the timing information of the process, and the cross-modal information of the answer document, and build a single-source knowledge graph for each target event; S13: Through the super-point representation method of the knowledge graph, connect each single-source knowledge graph to complete the construction of the knowledge graph.

3. A user-driven knowledge graph construction method as claimed in claim 2, It is characterized in that Step S13 includes: The super points include: user intention super points, process super points and entity super points; the entity super points include: behavior log super points and answer document super points; The same user intent in each single-source knowledge graph is connected through user intent super-points; The same processes in each single-source knowledge graph are connected through process superpoints; The same entities in each single-source knowledge graph are connected through entity superpoints to complete the construction of the knowledge graph.

4. A user-driven knowledge graph construction method as claimed in claim 1, It is characterized in that Step S3 includes: The process of generating solution documents from process sequences is defined as a Markov decision process; Setting the inference strategy Expert decision-making process for behavioral cloning in imitation learning of thought chains; Extracting expert strategies from behavioral cloning Calculation process information; Train reasoning strategies by computing process information ; Combining expert strategies and reasoning strategies , build a solution document generation model.

5. An electronic device, It is characterized in that The electronic device comprises a processor (501), a memory (505), a user interface (503) and a network interface (504), wherein the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device executes the method according to any one of claims 1 to 4.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed by a computer, the method according to any one of claims 1 to 4 is executed.