An extraction and management method suitable for manufacturing a large data condition knowledge graph

CN117851607BActive Publication Date: 2026-08-18NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311873235.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2026-08-18
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

引入的额外节点或行数据会导致数据冗余并造成查询效率低下

Benefits of technology

[0038] In the conditional knowledge extraction process, this invention uses a syntax tree to connect the factual and conditional parts, ensuring that the final output conditional triples can be correctly matched with the corresponding factual triples. Then, importing the syntax tree into the training model can extract all the factual and conditional triples contained in the text, which is convenient for subsequent storage and retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117851607B_ABST
    Figure CN117851607B_ABST
Patent Text Reader

Abstract

The application designs an extraction and management method suitable for manufacturing a conditional knowledge graph of big data, which is divided into three parts of conditional knowledge extraction, storage management and query processing; the conditional knowledge extraction extracts a fact part and a corresponding condition part in a text sentence in the form of a triple respectively, and combines the triples into nested triples through semantic logical relations in the text sentence; the storage management aims to store the nested triples obtained by the conditional knowledge extraction part in a standardized form, solves the storage redundancy problem, and facilitates subsequent management and query; the query processing aims to give a fact query with a restriction condition, and obtains a corresponding query result in the storage system through an efficient query processing method; based on the technical scheme of the application, in the process of conditional matching, the query efficiency will not be reduced due to too large traversal depth, and efficient query is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of conditional knowledge graph technology, specifically relating to a method for extracting and managing conditional knowledge graphs suitable for manufacturing big data. Background Technology

[0002] The value of big data lies in the massive amounts of knowledge it contains. To acquire and further apply this knowledge, knowledge graph models can be used for representation and management. A knowledge graph is a graph-based method for knowledge representation and management. Its basic building block is a triple of the form "(head entity, relation, tail entity)," a concise and clear structure that can express direct relationships between any entities. Therefore, knowledge graphs are considered a data model with powerful knowledge representation capabilities, capable of depicting the relationships between entities in the real world, and more easily understood by both humans and computers.

[0003] However, traditional knowledge graphs have limited expressive capabilities. In representing and managing knowledge from manufacturing big data, they face challenges arising from complex technological processes and cannot express the vast amount of complex knowledge inherent in these processes. Complex processes refer to those involving multiple sub-steps and varying production conditions. These complex technological processes contain rich and valuable knowledge about the enterprise's production processes.

[0004] Consider the following textual description of a compressor billet casting process: "If the billet surface temperature rises too much, the temperature sensor will issue an alarm. At this time, the following changes will occur inside the billet: if the stress exceeds the solidification front fracture strength, cracks will occur; if the billet solidifies close to complete solidification, a central segregation line will occur." This process contains several complex facts that depend on certain conditions. For example, cracks do not appear inside the billet without reason; they only appear when the stress exceeds the solidification front fracture strength. Using existing traditional knowledge extraction techniques, the above process description can only yield ordinary knowledge triples such as "(stress, exceeds, solidification front fracture strength)" and "(inside the billet, produces, cracks)," failing to express the logical causal relationships between these triples. When users want to understand the logical relationships between these pieces of knowledge, such as the specific reasons for "(cracks appear inside the billet)," existing knowledge graph modeling methods cannot obtain the causal relationships stated in the process statements. This limits the expressive power of traditional knowledge graphs and restricts the further mining, discovery, and application of manufacturing big data knowledge.

[0005] Therefore, the complex processes prevalent in manufacturing require knowledge graph models with stronger expressive capabilities, as well as new methods for storing and managing knowledge graphs, to better support conditional information in complex processes. Jiang et al. proposed conditional knowledge graphs, an extension of the knowledge graph field. While the steps required to construct a knowledge graph remain applicable, the specific models and algorithms for each step are no longer suitable. This is because traditional knowledge graph construction ignores the conditional semantics in conditional statements, thus failing to guarantee the validity of facts and losing important conditional contextual information that can be used for reasoning and exploration. By treating conditional tuples and fact tuples differently in knowledge graphs, Jiang et al. proposed a hierarchical scientific knowledge graph representation method based on three types of nodes: statements, facts / conditions, and concepts / attributes, and based on this, they proposed a conditional knowledge graph construction model.

[0006] After establishing a representation model for conditional knowledge graphs, an efficient management system is needed to manage the triple data within them and enable further applications. Systems supporting knowledge graph management can currently be categorized into two types:

[0007] (1) RDF storage (Jena, RDF-3X, gStore, etc.). RDF storage is typically used to represent triples (s, p, o) in knowledge graphs, i.e., (subject, predicate, object). Jena and RDF-3X use relational tables to store triples and perform queries based on these tables. gStore stores triples in a large graph and uses subgraph matching to perform queries on the knowledge graph.

[0008] (2) Attribute graph storage (Neo4j, Nebula, etc.). Attribute graph storage is a data model based on nodes and edges that stores complex relationships and attribute information between entities.

[0009] From the perspective of conditional knowledge extraction, although Jiang et al.'s SciKG introduces conditional information and can represent fact triples and condition triples, it also overlooks some issues, as can be seen from the SciKG representation structure and the aforementioned tuple results. First, it ignores the constraints between fact and condition tuples. SciKG only provides a structured representation of the condition and fact tuples contained in a sentence, as well as the reference relationships between tuples and sentences, but it cannot clearly distinguish the mutual constraints between fact and condition tuples. Second, SciKG ignores the parallel relationships between condition tuples, failing to consider whether the relationship between condition tuples is "AND" or "OR," even though the two represent completely different meanings. "AND" means that the constrained fact is valid only when all certain conditions are met. "OR," on the other hand, means that the constrained fact is valid as long as any one of the conditions is met.

[0010] From the perspective of conditional knowledge management, mature knowledge graph management systems such as gStore and Neo4j can effectively handle traditional knowledge graphs organized in a graph-like manner. However, they face a series of challenges when dealing with conditional knowledge graphs with nested structures. The most direct challenge is how to efficiently manage nested structures. To manage nested triples in existing systems, additional data is generally introduced to simulate multi-level nested structures. For example, for systems using graph models, additional nodes can be created to represent nested tuples; for systems based on relational models, additional rows of data need to be inserted to record the nesting relationships between nested triples. The introduced additional nodes or rows of data lead to data redundancy and inefficient querying. In addition, due to the introduction of Boolean relation semantics, various problems caused by equivalent Boolean semantics need to be considered, including storage redundancy of equivalent semantics and query difficulties. Summary of the Invention

[0011] To address the shortcomings of existing technologies, this invention designs a method for extracting and managing conditional knowledge graphs suitable for manufacturing big data. Based on the textual corpus of manufacturing big data, conditional knowledge extraction technology is used to extract fact triples expressing factual information and conditional triples corresponding to those facts. The fact triples are formally ordinary triples, while the conditional triples are formally nested triples. Several fact and conditional triples are combined to form nested triples capable of expressing complete causal logical relationships, thus constructing a conditional knowledge graph. After obtaining the nested triples, they are converted into a tree structure model. By applying a series of transformation rules, the conditional knowledge graph can be stored and retrieved in a concise and efficient manner.

[0012] A method for extracting and managing conditional knowledge graphs suitable for manufacturing big data consists of three parts: conditional knowledge extraction, storage management, and query processing.

[0013] Specifically, given a text with conditional knowledge, all the facts and corresponding conditions contained in the text are extracted in the form of triples through conditional knowledge extraction, and then combined into nested triples. Subsequently, the nested triples are transformed into a minimal conditional multi-way tree for storage through transformation rules, which facilitates query processing.

[0014] The conditional knowledge extraction process extracts the factual parts and their corresponding conditional parts from the text statement as triples, and combines them into nested triples based on the semantic logical relationships within the text statement; specifically, it includes:

[0015] Step 1: Construct a dataset containing conditional sentences based on the text corpus of manufacturing big data, and label the dataset. The labeling method adopts knowledge graph labeling, that is, labeling (head entity, relation, tail entity) parts. Not only the fact part is labeled, but also the condition part is labeled, so that the condition part can be taken into account when the model is trained in the later extraction process.

[0016] Step 2: Preprocess the labeled dataset by using word embedding to classify different types of conditional words to facilitate transfer learning;

[0017] Step 3: Use the RST method to generate a syntax tree from the text sentences in the dataset, where the root node is the condition, the left subtree is the entity unit, and the right subtree is the condition unit; if there are conjunctions in the fact or condition part, that is, there are two or more facts or conditions in the text sentence; the root nodes of the left subtree and the right subtree are the conjunctions.

[0018] Step 4: Set the parameters and training parameters of the extraction model. The extraction model includes an Encoder-Decoder layer, a decoder, and a softmax function. The syntax tree is fed into the extraction model for training. The model extracts knowledge from the left subtree of the fact part and the right subtree of the condition part in the syntax tree, respectively, and finally generates fact triples of the fact part and condition triples of the condition part. The fact triples and condition triples are combined into nested triples by combining the hierarchical relationship in the syntax tree.

[0019] The purpose of the aforementioned storage management is to store the nested triples obtained from the extracted conditional knowledge in a standardized form, thereby resolving storage redundancy issues and facilitating subsequent management and retrieval; specifically:

[0020] Step 1: Given any nested triplet t extracted from conditional knowledge c =(s c p c o c ), where s c and o cThis represents nested head and tail entities, i.e., s c and o c Belongs to the entity set (V) ET ), which is also a triple, p c s c and o c Three types of conjunctions between: (1) p c ∈E IF Describing a causal relationship, indicating that in o c Under the premise that it is true, s c Only then was it established; (2)p c ∈E BL Describe Boolean logic relations, representing s c and o c This constitutes a composite relationship; (3)p c ∈E PD Represents ordinary relations on traditional knowledge graphs;

[0021] Step 2: t c The conditional binary tree P is recursively parsed and constructed, where the root node of P represents the relation P. c The left subtree represents the nested head entity s. c The right subtree represents the nested tail entity o. c Leaf nodes represent head or tail entities in a knowledge graph.

[0022] Step 3: Convert the conditional binary tree T into a conditional multi-way tree, where the root node of the conditional multi-way tree represents p. c , and p c = "IF"; the left child represents a fact triple; the right child represents a relation p. c ∈E BL ∪E PD A multi-way tree consisting of non-leaf nodes and entities as leaf nodes; the transformation process begins from the root node of the conditional binary tree. If the current node is empty, no processing is performed; next, the conditional binary tree is processed according to the type of the current node:

[0023] (1) If the type is E IF Then, recursively search for the node labeled "IF" in the right subtree of the current node and return the root node of its right subtree; construct a conditional multi-way tree based on the collected condition and fact subtrees; finally, return the root node of the found conditional subtree.

[0024] (2) If type is not E IF If the current node is found, the node labeled "IF" is searched recursively in the left and right subtrees of the current node and the current node is returned.

[0025] Step 4: Processing conditional multi-way trees containing E BL ∪EPD The node P with the label "AND" transforms the conditional multi-way tree into a minimum conditional multi-way tree, or simply a conditional tree, such that the tree contains at most one node with the label "AND", and the node with the label "AND" is closest to the root node. The specific processing rules are as follows:

[0026] (1) The "AND" or "OR" node merging rule is the associative law: When node P is labeled "AND" or "OR", if its child node C is also labeled "AND" or "OR", then node P and node C are merged into a node N labeled "AND" or "OR", and the child nodes of node P excluding C and the child nodes of node C are connected to node N.

[0027] (2) The AND node merging and pushing rule is the AND distribution law: When the label of node P is "OR" and the number of child nodes of P with the label "AND" is greater than or equal to 2, if the child nodes of these child nodes have the same label L, then the label of P is changed to "AND", and a node with the label "OR" is generated as the parent node of all child nodes that are not L. The child nodes with the same label L and the newly generated label "OR" are the child nodes of P.

[0028] (3) The OR distribution law, also known as the "AND" node assignment push-up rule, states that when the label of node P is "AND" and the label of P's parent node P' is "OR", then the label of node P' is changed to "AND", and for each child node C of node P, the label is changed to "AND". i Create a binary node N labeled "OR". i Each C i The corresponding N i The child nodes contain C i It and all non-P child nodes in P'; and put all N i As a new child node of P′;

[0029] (4) The commutative law is the equivalence rule for child nodes of “AND” or “OR” nodes: When the label of node P is “AND” or “OR”, the child nodes of P can be swapped arbitrarily.

[0030] Step 5: Use the Neo4j graph database interface to create nodes of a minimum conditional multi-way tree and establish relationships between nodes for persistent storage. Furthermore, to reduce data storage costs, leaf nodes of the conditional tree are deduplicated, meaning that leaf nodes with the same label are stored only once, corresponding to entities in the knowledge graph. To quickly locate the leaf nodes of the conditional multi-way tree corresponding to an entity, a hash table is created for all knowledge graph entities and conditional tree leaf nodes to support subsequent query processing on the conditional knowledge graph.

[0031] The purpose of the query processing is to obtain the corresponding query result in the storage system based on a given fact query with constraints, using an efficient query processing method; specifically:

[0032] Step 1: Load the stored conditional knowledge graph from the Neo4j graph database into memory all at once, and construct several conditional trees from the leaf nodes upwards; given a quadruple to be queried Q = (s q p q o q c), where: (s q p q o q )∈V ET ×E PD ×V ET This constitutes a fact tuple, s q p q o q If the value is unknown, it is represented by "?"; c is a nested triple, serving as a constraint; the result set of this query should be: all fact tuples (s, p, o) that are true under constraint c, where s, p, and o must respectively satisfy s q p q o q The value; this type of query is called a fact query with restrictions;

[0033] Step 2: Perform pre-query parsing, using the same processing flow as the storage management module, transforming the nested triples c in query Q into a minimal conditional multi-way tree, called the query tree T. q ;

[0034] Step 3: Start executing the query;

[0035] Step 1: First, in the conditional knowledge graph, find the query tree T. q Subtrees T with the same topology c This makes T c It is T q Conditional matching; the conditional matching refers to: given two multi-way trees T1 = (V1, E1, L) and T2 = (V2, E2, L), where V1 and V2 are sets of vertices of the multi-way trees, E1 and E2 are sets of edges, and L is a set of vertex labels, if a binary relation exists... T2 is called a conditional match of T1, where: for each node u∈V1, there exists a node v∈V2 such that (u, v)∈R, and v is called a candidate of u; for each pair (u, v)∈R, it is required that: a) L(v)=L(u), and b) let Sub u Let U be the set of child nodes of u, Sub v={n|n is a candidate of m, m∈Sub u},like Then v = LCA(Sub) v ), where LCA(·) represents the lowest common ancestor; specifically, given a query tree T q Through T q A post-order traversal is performed, searching for a matching condition in the conditional knowledge graph. If the currently traversed node is a leaf node, the corresponding node is directly matched in the storage system as a candidate. If the current node is not a leaf node, an empty list C is initialized first, which will store the candidates for all child nodes. Then, a post-order traversal is performed on all child nodes. When the child node traversal is complete, the corresponding candidate has been calculated and can be added to C. The lowest common ancestor of all nodes in list C is calculated in the storage system, and the result is the candidate for the current node. The above process is repeated to finally obtain the query tree T. q All candidates of the root node constitute the condition match T. c The root node;

[0036] Step 2: Obtain the query tree T q All conditions match T c Then, pass through each T in sequence. c Find all the fact tuples corresponding to the root node, and then compare them with s in query Q. q p q o q The comparisons are performed, and the final result is the fact tuple (s, p, o).

[0037] Beneficial technical effects of the present invention:

[0038] In the conditional knowledge extraction process, this invention uses a syntax tree to connect the factual and conditional parts, ensuring that the final output conditional triples can be correctly matched with the corresponding factual triples. Then, importing the syntax tree into the training model can extract all the factual and conditional triples contained in the text, which is convenient for subsequent storage and retrieval.

[0039] In storage management, when using conditional binary trees to represent nested triples, the same semantic facts can be expressed in different ways, leading to different structures for the corresponding nested triples and consequently, different conditional binary trees, causing storage redundancy. After a series of processing steps, conditional multi-way trees with different structures but the same semantic information can be uniformly represented as minimal conditional multi-way trees.

[0040] In query processing, the core issue is finding the condition matching of the query tree in the condition knowledge graph. The query tree is a minimal condition multi-way tree, which in form satisfies the master-conjunctive normal form and has a definite upper bound on depth. Therefore, the query efficiency will not decrease due to excessive traversal depth during the condition matching process, thus achieving efficient querying. Attached Figure Description

[0041] Figure 1 Flowchart of the condition extraction process according to an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of the extraction model structure framework of this invention embodiment;

[0043] Figure 3 Flowchart of constructing a conditional multi-branch tree according to an embodiment of the present invention;

[0044] Figure 4 Flowchart of the condition matching algorithm according to an embodiment of the present invention;

[0045] Figure 5 A schematic diagram illustrating the query execution time results of this invention embodiment and the Neo4j method. Detailed Implementation

[0046] The present invention will be further described below with reference to the accompanying drawings and embodiments;

[0047] A method for extracting and managing conditional knowledge graphs suitable for manufacturing big data consists of three parts: conditional knowledge extraction, storage management, and query processing.

[0048] Specifically, given a text with conditional knowledge, all the facts and corresponding conditions contained in the text are extracted in the form of triples through conditional knowledge extraction, and then combined into nested triples. Subsequently, the nested triples are transformed into a minimal conditional multi-way tree for storage through transformation rules, which facilitates query processing.

[0049] The conditional knowledge extraction process extracts the factual parts and their corresponding conditional parts from the text statement as triples, and combines them into nested triples based on the semantic logical relationships within the text statement; as shown in the appendix. Figure 1 As shown, it specifically includes:

[0050] Step 1: Construct a dataset containing conditional sentences from a large volume of text corpus based on public datasets or user-owned private datasets, and label the dataset using knowledge graph annotation, i.e., labeling (head entity, relation, tail entity) parts, not only the factual parts but also the conditional parts, so that the conditional parts can be taken into account when the model is trained later.

[0051] Step 2: Preprocess the labeled dataset by using word embedding to classify different types of conditional words to facilitate transfer learning;

[0052] Step 3: Use the RST method to generate a syntax tree from the text sentences in the dataset, where the root node is the condition, the left subtree is the entity unit, and the right subtree is the condition unit; if there are conjunctions in the fact or condition part, that is, there are two or more facts or conditions in the text sentence; the root nodes of the left subtree and the right subtree are the conjunctions.

[0053] Step 4: Set the parameters and training parameters of the extraction model, as shown in Table 1. The extraction model includes an Encoder-Decoder layer, a decoder, and a softmax function, as shown in the appendix. Figure 2 As shown; the syntax tree is fed into the extraction model for training. This model extracts knowledge from the left subtree representing the fact part and the right subtree representing the condition part of the syntax tree, respectively, ultimately generating fact triples representing the fact part and condition triples representing the condition part. These fact triples and condition triples are then combined into nested triples based on the hierarchical relationships in the syntax tree. The overall process of the conditional knowledge extraction module is as follows: Figure 1 As shown, the model framework is extracted as follows: Figure 2 As shown.

[0054] Table 1. Model parameters and training parameters;

[0055]

[0056] The purpose of the aforementioned storage management is to store the nested triples obtained from the extracted conditional knowledge in a standardized form, thereby resolving storage redundancy issues and facilitating subsequent management and retrieval; specifically:

[0057] Step 1: Given any nested triplet t extracted from conditional knowledge c =(s c p c o c ), where s c and o c This represents nested head and tail entities, i.e., s c and o c Belongs to the entity set (V) ET ), which is also a triple, p c s c and o c Three types of conjunctions between: (1) p c ∈E IF Describing causal relationships (IF / WHEN / SINCE, etc.), indicating that in o c Under the premise that it is true, s cOnly then is it established, for example (s) c ,IF,o c (2)p c ∈E BL Describes Boolean logical relations (AND / OR), representing s c and o c To form a composite relation, such as (s c AND, o c ), (s c OR,o c (3)p c ∈E pD Represents ordinary relations on traditional knowledge graphs;

[0058] Step 2: t c The conditional binary tree P is recursively parsed and constructed, where the root node of P represents the relation P. c The left subtree represents the nested head entity s. c The right subtree represents the nested tail entity o. c Leaf nodes represent head or tail entities in a knowledge graph.

[0059] Step 3: Convert the conditional binary tree T into a conditional multi-way tree, where the root node of the conditional multi-way tree represents p. c , and p c = "IF"; the left child represents a fact triple; the right child represents a relation p. c ∈E BL ∪E PD A multi-way tree consisting of non-leaf nodes and entities as leaf nodes; the specific conversion process is as follows: Figure 3 As shown, the transformation process begins from the root node of the conditional binary tree. If the current node is empty, no processing is performed. Next, the conditional binary tree is processed according to the type of the current node:

[0060] (1) If the type is E IF Then, recursively search for the node labeled "IF" in the right subtree of the current node and return the root node of its right subtree; construct a conditional multi-way tree based on the collected condition and fact subtrees; finally, return the root node of the found conditional subtree.

[0061] (2) If type is not E IF If the current node is found, the node labeled "IF" is searched recursively in the left and right subtrees of the current node and the current node is returned.

[0062] Step 4: Processing conditional multi-way trees containing E BL ∪E pDThe node P with the label "AND" transforms the conditional multi-way tree into a minimum conditional multi-way tree, or simply a conditional tree, such that the tree contains at most one node with the label "AND", and the node with the label "AND" is closest to the root node. The specific processing rules are as follows:

[0063] (1) The "AND" or "OR" node merging rule is the associative law: When node P is labeled "AND" or "OR", if its child node C is also labeled "AND" or "OR", then node P and node C are merged into a node N labeled "AND" or "OR", and the child nodes of node P excluding C and the child nodes of node C are connected to node N.

[0064] (2) The AND node merging and pushing rule is the AND distribution law: When the label of node P is "OR" and the number of child nodes of P with the label "AND" is greater than or equal to 2, if the child nodes of these child nodes have the same label L, then the label of P is changed to "AND", and a node with the label "OR" is generated as the parent node of all child nodes that are not L. The child nodes with the same label L and the newly generated label "OR" are the child nodes of P.

[0065] (3) The OR distribution law, also known as the "AND" node assignment push-up rule, states that when the label of node P is "AND" and the label of P's parent node P' is "OR", then the label of node P' is changed to "AND", and for each child node C of node P, the label is changed to "AND". i Create a binary node N labeled "OR". i Each C i The corresponding N i The child nodes contain C i It and all non-P child nodes in P'; and put all N i As a new child node of P′;

[0066] (4) The commutative law is the equivalence rule for child nodes of “AND” or “OR” nodes: When the label of node P is “AND” or “OR”, the child nodes of P can be swapped arbitrarily.

[0067] Step 5: Use the Neo4j graph database interface to create nodes of a minimum conditional multi-way tree and establish relationships between nodes for persistent storage. Furthermore, to reduce data storage costs, leaf nodes of the conditional tree are deduplicated, meaning that leaf nodes with the same label are stored only once, corresponding to entities in the knowledge graph. To quickly locate the leaf nodes of the conditional multi-way tree corresponding to an entity, a hash table is created for all knowledge graph entities and conditional tree leaf nodes to support subsequent query processing on the conditional knowledge graph.

[0068] The purpose of the query processing is to obtain the corresponding query result in the storage system based on a given fact query with constraints, using an efficient query processing method; specifically:

[0069] Step 1: Load the stored conditional knowledge graph from the Neo4j graph database into memory all at once, and construct several conditional trees from the leaf nodes upwards; given a quadruple to be queried Q = (s q p q o q c), where: (s q p q o q )∈V ET ×E PD ×V ET This constitutes a fact tuple, s q p q o q If the value is unknown, it is represented by "?"; c is a nested triple, serving as a constraint; the result set of this query should be: all fact tuples (s, p, o) that are true under constraint c, where s, p, and o must respectively satisfy s q p q o q The value; this type of query is called a fact query with restrictions;

[0070] Step 2: Perform pre-query parsing, using the same processing flow as the storage management module, transforming the nested triples c in query Q into a minimal conditional multi-way tree, called the query tree T. q ;

[0071] Step 3: Start executing the query;

[0072] Step 1: First, in the conditional knowledge graph, find the query tree T. q Subtrees T with the same topology c This makes T c It is T q Conditional matching; the conditional matching refers to: given two multi-way trees T1 = (V1, E1, L) and T2 = (V2, E2, L), where V1 and V2 are sets of vertices of the multi-way trees, E1 and E2 are sets of edges, and L is a set of vertex labels, if a binary relation exists... T2 is called a conditional match of T1, where: for each node u∈V1, there exists a node v∈V2 such that (u, v)∈R, and v is called a candidate of u; for each pair (u, v)∈R, it is required that: a) L(v)=L(u), and b) let Sub u Let U be the set of child nodes of u, Sub v ={n|n is a candidate of m, m∈Subu},like Then v = LCA(Sub) v ), where LCA(·) represents the lowest common ancestor; specifically, given a query tree T q The process begins from its root node. Figure 4 The conditional matching algorithm shown uses T... q A post-order traversal is performed, searching for a matching condition in the conditional knowledge graph. If the currently traversed node is a leaf node, the corresponding node is directly matched in the storage system as a candidate. If the current node is not a leaf node, an empty list C is initialized first, which will store the candidates for all child nodes. Then, a post-order traversal is performed on all child nodes. When the child node traversal is complete, the corresponding candidate has been calculated and can be added to C. The lowest common ancestor of all nodes in list C is calculated in the storage system, and the result is the candidate for the current node. The above process is repeated to finally obtain the query tree T. q All candidates of the root node constitute the condition match T. c The root node;

[0073] Step 2: Obtain the query tree T q All conditions match T c Then, pass through each T in sequence. c Find all the fact tuples corresponding to the root node, and then compare them with s in query Q. q p q o q The comparisons are performed, and the final result is the fact tuple (s, p, o).

[0074] The conditional knowledge graph extraction and management method for manufacturing big data described in this invention employs two evaluation metrics for conditional knowledge extraction: triple unit evaluation and triple evaluation. For triple unit evaluation, following the evaluation method of Jiang et al., a pairwise comparison method is used to match the extracted triples with the constituent units of the labeled real triples, i.e., the corresponding head entity, relation, and tail entity, to evaluate the accuracy of triple unit extraction. For triple evaluation, this invention performs pairwise comparisons on the entire triple set, using a more stringent standard to evaluate the performance of the triple extraction method. For both tasks, this invention uses the same evaluation metrics, including precision, recall, and F1 score.

[0075] Table 2 shows a comparison with several representative baseline methods, including the traditional rule-based open information extraction system Stanford OpenIE, and sequence labeling-based models Allennlp OpenIE and MIMO. For the evaluation of fact triples and condition triples, since Stanford OpenIE, Allennlp OpenIE, and MIMO do not consider the existence of condition triples, only all extracted triples were evaluated. For MIMO and the conditional knowledge extraction method proposed in this invention, the F1 scores for fact and condition triples were calculated separately. In both types of triple accuracy evaluation tasks, MIMO consistently outperformed other baseline methods. Compared with BERT-based MIMO models, this invention improves the F1 score by 3.0% and 15.2% on the triplet extraction task. Compared with LSTM-based MIMO models, this invention improves the F1 score by 0.7% and 8.4% on the triplet extraction task, far exceeding previous rule-based open information extraction systems and neural network methods based on sequence labeling or sequence generation.

[0076] Table 2 compares existing methods with the conditional knowledge extraction method described in this invention;

[0077]

[0078] For storage management and query processing, a comparison was made with the existing mature graph database Neo4j. Due to the lack of publicly available large-scale conditional knowledge graph datasets, this invention created a data generator, generating three datasets of different sizes, and generating a dataset based on real-world Wikipedia Talk. The statistical data are shown in Table 3.

[0079] Table 3. Dataset node types and quantities;

[0080]

[0081] Furthermore, since Neo4j cannot directly store and query nested triples in conditional knowledge graphs, the following processing is required for Neo4j:

[0082] All nodes in the condition tree are stored as Neo4j nodes; parent-child relationships in the condition tree are stored as Neo4j edges. When executing a fact query with constraints using Neo4j, a post-order traversal of the query tree is required to construct a Cypher query statement for every two parent-child relationships. The final constructed Cypher query statement is then executed on Neo4j, and the query efficiency is compared with that of this invention. To ensure the comprehensiveness and representativeness of the query cases, the constraints c in query Q are divided into three categories: (C1) c is a single condition value; (C2) c is a regular triple; and (C3) c is a nested triple. Among them, the relations in the triple are further divided into regular relations (E... PD ) and Boolean relation (E) BL There are two methods. A query workload is built for each query test case, with each workload containing 10 queries, and the average query time is calculated. Experimental results are as follows: Figure 5 As shown, the query efficiency of the storage management module and query processing module described in this invention is 1 to 3 orders of magnitude better than that of the Neo4j method. Furthermore, the query efficiency of this invention does not decrease with the complexity of the query tree structure because the condition tree in the storage management module has an upper bound on depth, limiting the maximum traversal depth during the query process. These experimental results demonstrate that this invention satisfies the requirements of concise and efficient storage and querying of conditional knowledge graphs.

Claims

1. A method for extracting and managing conditional knowledge graphs suitable for manufacturing big data, characterized in that, It is divided into three parts: conditional knowledge extraction, storage management, and query processing; Specifically, given a text with conditional knowledge, all the facts and corresponding conditions contained in the text are extracted in the form of triples through conditional knowledge extraction, and then combined into nested triples. Subsequently, the nested triples are transformed into a minimal conditional multi-way tree for storage through transformation rules, which facilitates query processing. The storage management specifically refers to: Step 1: Given any nested triples extracted from conditional knowledge ,in and This represents nested head and tail entities, i.e. and It belongs to the entity set ( ), which is also a triple. express and Three types of conjunctions between them: (1) Describing causal relationships, indicating that in Under the premise that it is established, It was only established then; (2) Describe Boolean logic relations, representing and This forms a composite relationship; (3) Represents ordinary relations on traditional knowledge graphs; Step Two: Recursively parse and construct as a conditional binary tree , The root node represents the relation. The left subtree represents the nested head entity. The right subtree represents nested tail entities. Leaf nodes represent head or tail entities in a knowledge graph. Step 3: Construct the condition binary tree Convert to a set of conditional multi-way trees, where the root node of the conditional multi-way tree represents... ,and "IF"; the left child represents a fact triple; The right child indicates a relationship A multi-way tree consisting of non-leaf nodes and entities as leaf nodes; the transformation process begins from the root node of the conditional binary tree. If the current node is empty, no processing is performed; next, the conditional binary tree is processed according to the type of the current node: (1) If the type is If the node is labeled "IF", then recursively search for the node labeled "IF" in the right subtree of the current node and return the root node of its right subtree; and construct a conditional multi-way tree based on the collected conditions and fact subtrees. Finally, return the root node of the found conditional subtree; (2) If the type is not If the current node is found, the node labeled "IF" is searched recursively in the left and right subtrees of the current node and the current node is returned. Step 4: Processing conditional multi-way trees containing... nodes with middle tags The conditional multi-way tree is transformed into a minimum conditional multi-way tree, or simply a conditional tree, such that the tree contains at most one node labeled "AND", and the node labeled "AND" is closest to the root node. The specific processing rules are as follows: (1) The "AND" or "OR" node merging rule is the associative law: when nodes When the label is "AND" or "OR", if its child nodes When the label is also "AND" or "OR", then the node will be... and nodes Merge into a single node labeled "AND" or "OR". and will the node remove Child nodes and nodes Child nodes connect to nodes ; (2) The AND node merging and pushing rule, also known as the AND distributive law: when a node The label is "OR" and When the number of child nodes with the "AND" label is greater than or equal to 2, if the child nodes of these child nodes have the same label... Then The label is changed to "AND", and a node with the label "OR" is generated as all representations of not being. The parent node of a child node will have the same label. The child nodes and newly generated labels are "OR" as Child nodes; (3) The "AND" node allocation push-up rule, i.e., the OR allocation law: when a node The label is "AND" and father node When the label is "OR", then the node will be... The label is changed to "AND", and the node is... Each child node Create a binary node labeled "OR". Each corresponding Child nodes contain Self and All non- Child nodes; and put all of them As The new child node; (4) The equivalence rule for child nodes of "AND" or "OR" nodes, also known as the commutative law: when a node... When the label is "AND" or "OR", The child nodes can be swapped arbitrarily; Step 5: Use the Neo4j graph database interface to create nodes of a minimum conditional multi-way tree and establish relationships between nodes for persistent storage. Furthermore, to reduce data storage costs, deduplication is performed on the leaf nodes of the conditional tree, meaning that leaf nodes with the same label are stored only once, corresponding to entities in the knowledge graph. To quickly locate the leaf nodes of the conditional multi-way tree corresponding to an entity, a hash table is created for all knowledge graph entities and conditional tree leaf nodes to support subsequent query processing on the conditional knowledge graph.

2. The method for extracting and managing conditional knowledge graphs suitable for manufacturing big data according to claim 1, characterized in that, The conditional knowledge extraction extracts the factual part and its corresponding conditional part contained in the text statement as triples, and combines them into nested triples through the semantic logical relationship in the text statement.

3. The method for extracting and managing conditional knowledge graphs suitable for manufacturing big data according to claim 2, characterized in that, The conditional knowledge extraction specifically refers to: Step 1: Construct a dataset containing conditional sentences based on the text corpus of manufacturing big data, and label the dataset. The labeling method adopts knowledge graph labeling, that is, labeling the head entity, relation, and tail entity parts. Not only the fact part is labeled, but also the condition part is labeled so that the condition part can be taken into account when the model is trained in the later extraction process. Step 2: Preprocess the labeled dataset by using word embedding to classify different types of conditional words to facilitate transfer learning; Step 3: Use the RST method to generate a syntax tree from the text sentences in the dataset, where the root node is the condition, the left subtree is the entity unit, and the right subtree is the condition unit; if there are conjunctions in the fact or condition part, that is, there are two or more facts or conditions in the text sentence; the root nodes of the left subtree and the right subtree are the conjunctions. Step 4: Set the parameters and training parameters of the extraction model, which includes an Encoder-Decoder layer, a decoder, and a softmax function; The syntax tree is fed into an extraction model for training. This model extracts knowledge from the left subtree of the fact part and the right subtree of the condition part in the syntax tree, respectively, and finally generates fact triples of the fact part and condition triples of the condition part. The fact triples and condition triples are combined into nested triples by combining the hierarchical relationship in the syntax tree.

4. The method for extracting and managing conditional knowledge graphs suitable for manufacturing big data according to claim 1, characterized in that, The purpose of the storage management is to store the nested triples obtained from the conditional knowledge extraction in a standardized form, thereby solving the storage redundancy problem and facilitating subsequent management and querying.

5. The method for extracting and managing conditional knowledge graphs suitable for manufacturing big data according to claim 1, characterized in that, The purpose of the query processing is to obtain the corresponding query result in the storage system based on a given fact query with constraints, using an efficient query processing method.

6. The method for extracting and managing conditional knowledge graphs suitable for manufacturing big data according to claim 5, characterized in that, The query management specifically refers to: Step 1: Load the stored conditional knowledge graph from the Neo4j graph database into memory all at once, and construct several conditional trees from the leaf nodes upwards; given a quadruple to be queried... ,in: This constitutes a fact tuple. , , If the value is unknown, use "?" to represent it; The nested triples serve as constraints; the result set of this query should be: [conditions that satisfy the constraints]. In the case of all valid fact tuples ,and , , To satisfy respectively , , The value; this type of query is called a fact query with restrictions; Step 2: Perform query parsing, using the same processing flow as the storage management module, to process the query. Nested triples in Transform it into a minimal conditional multi-way tree, called a query tree. ; Step 3: Start executing the query; Step 1: First, find the query tree in the conditional knowledge graph. Subtrees with the same topology , making yes Conditional matching; the conditional matching refers to: given two multi-way trees and ,in and For the set of vertices of a multi-way tree, and For edge set, Given a set of vertex labels, if a binary relation exists... ,say yes The conditional matching, where: for each node There exists a node Make ,say for The candidates; for each pair Requirements: a) And b) Let for The set of child nodes, ,like ,So , Represents the lowest common ancestor; specifically, given a query tree. Through the Perform a post-order traversal, searching for conditional matches in the conditional knowledge graph; if the currently traversed node is a leaf node, then directly match the corresponding node in the storage system as a candidate; if the current node is a non-leaf node, then first initialize an empty list. , We will store all candidate child nodes, then perform a post-order traversal of all child nodes. When the child node traversal is complete and the corresponding candidate has been calculated, it can be added to the list. In the storage system, a list is calculated. The lowest common ancestor of all nodes in the tree is calculated, and the result is the candidate for the current node; repeating the above process eventually yields the query tree. All candidates of the root node are considered as matching conditions. The root node; Step 2: Obtain the query tree All conditions match Then, pass through each one in turn. Find all the fact tuples corresponding to the root node, and then match them with the query. In , , By comparing the results, we finally obtain the fact tuple. As a query result.

Citation Information

Patent Citations

  • Knowledge tree triple storage query method

    CN114186071A

  • Entity relation joint extraction method, system and equipment based on bidirectional tree type labeling method

    CN116757190A