A key pattern mining method for a complex geological structure key knowledge graph
By combining the improved GAT model with relational graph neural networks and an adaptive edge deletion mechanism, the problem of edge matching in complex geological structure knowledge graphs was solved, enabling efficient key pattern mining and expert interaction, and improving the research efficiency of geological structure oil and gas reservoirs.
Patent Information
- Application Number
- CN202310839145.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-07-10
AI Technical Summary
Existing methods for mining key patterns in knowledge graphs of complex geological structures fail to effectively consider edge matching, resulting in excessive computational burden in large-scale node data and difficulty in finding subgraphs isomorphic to the query graph, leading to low efficiency in expert interaction.
An improved GAT model is adopted, which combines the one-way propagation mechanism and adaptive edge deletion mechanism of the fusion relation graph neural network. Key patterns are mined through approximate subgraph matching, and the model performance is optimized by balancing the structural features of nodes, edges and subgraphs in the graph neural network.
It improves the accuracy of key pattern mining in complex geological structure knowledge graphs and the efficiency of expert interaction, promotes the research on oil and gas reservoirs in complex geological structures, and helps experts better understand and mine geological structure knowledge graphs.
Smart Images

Figure CN116881328B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of knowledge graph technology for complex geological structures, specifically involving a method for mining key patterns in key knowledge graphs of complex geological structures. Background Technology
[0002] In the context of knowledge graphs, key pattern mining plays a crucial role. Knowledge graphs represent and organize knowledge in the form of graphs, where nodes represent entities or concepts and edges describe the relationships between entities. By mining key patterns in knowledge graphs, meaningful and influential patterns can be discovered, thereby deepening the understanding of the internal relationships and structure of the knowledge graph. Combining key patterns with approximate subgraph matching allows searching for subgraphs in the knowledge graph that are similar to the key patterns. This mining method helps to discover key subgraphs in the knowledge graph that exhibit similar associations or structures, thus uncovering valuable knowledge and information.
[0003] With the increasing quantity and diversity of available data in knowledge graphs (KGs), the need for their analysis and understanding is growing. In the geological field, pattern mining techniques can discover important geological strata patterns or rock type patterns from geological knowledge graphs. By mining these patterns, distinctive features of geological strata in different regions or geological periods can be identified, providing valuable insights into the evolution of geological strata and the distribution of rock types. Furthermore, pattern mining techniques can be used to find important subgraphs with similar structural or relational patterns within the knowledge graph, thereby revealing the patterns of geological structures or the distribution of subsurface resources. The application of complex geological structure knowledge graphs in 3D geological structure modeling and their role in providing precise constraints for oil and gas exploration have yielded good results. The knowledge between original facts and semantics is the key pattern of the knowledge graph. These key patterns can serve as indicators of regularities in the data, which can be represented as patterns or constraints, allowing users to improve KG modeling. Alternatively, they can help optimize query evaluation by highlighting different prototypes of entities. Moreover, since patterns are extracted from original facts, they can highlight errors in the data or modeling when they do not conform to expected patterns.
[0004] Graph structures are ubiquitous in the real world, and many studies have discovered and utilized repeating subgraph patterns on input graphs. These subgraph patterns are also known as network motifs on isomorphic graphs or meta-structures on heterogeneous graphs. Mining key pattern queries is an important task in the field of knowledge graphs. These key patterns can help discover potential regularities and associations in knowledge graphs, thereby leading to a better understanding of the information within them. In recent years, approximate subgraph matching algorithms have been widely used in key pattern mining tasks in knowledge graphs. These algorithms can discover other concepts or relationships related to a given concept by finding similar subgraphs within the knowledge graph.
[0005] Knowledge graphs, as a knowledge representation method, are widely used in intelligent question-answering and recommendation systems. Currently, research on knowledge graphs mainly focuses on information querying and retrieval based on them. In some domain-specific knowledge graphs, certain subgraph structures (patterns) have specific physical meanings. For example, in a geological structure knowledge graph network, a closed-loop structure composed of intersecting line entities is a subsurface entity; a closed-loop structure of underground entities is a geological block entity. Graph structure data often contains noise, making it difficult to find subgraphs isomorphic to the query graph, leading to unmatched results after long searches. Furthermore, when the number of nodes is large, precise methods incur a significant computational burden, a common problem in many practical applications. Additionally, key pattern mining of complex geological structure knowledge graphs requires consideration of edge matching. Existing research lacks a method for matching nodes, edges, and subgraph structures based on graph neural networks; existing research also lacks a systematic process for mining key patterns in complex geological structure knowledge graphs. To improve the efficiency of expert interaction and to address these issues, a method is needed. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention proposes a method for mining key patterns in a key knowledge graph of complex geological structures. By improving the existing GAT model, the graph pattern mining problem in the knowledge graph is modeled as an approximate subgraph matching problem of the knowledge graph, which is used to mine frequent patterns in the knowledge graph, thereby realizing the mining of key patterns in the key knowledge graph of complex geological structures.
[0007] The technical solution adopted in this invention is: a method for mining key patterns in a key knowledge graph of complex geological structures, the specific steps of which are as follows:
[0008] S1. Construct an improved GAT model;
[0009] S2, Training the improved GAT model;
[0010] S3. Apply the improved GAT model trained in step S2 to the existing complex geological structure knowledge graph dataset to realize the mining of key patterns in the key knowledge graph of complex geological structures.
[0011] In step S1, an improved GAT model is obtained by adding a one-way propagation mechanism of a fused relational graph neural network and an added adaptive edge deletion mechanism to the existing GAT model.
[0012] Furthermore, step S2 is specifically as follows:
[0013] S21. Use a general domain knowledge graph dataset as the original dataset, and construct graph pairs from the original single graphs in the original dataset to obtain the original dataset with approximate subgraph matching after processing. Divide it into training set and test set, and calculate the truth matching matrix of graph pairs in training set and test set using VF3 algorithm.
[0014] S211. Construct graph pairs from the original single graphs in the original dataset to obtain the original dataset with approximate subgraph matching after processing.
[0015] Each graph pair contains a data graph and a query graph. A graph is randomly selected from the original dataset as the data graph G, and then a connected subgraph is randomly selected from the data graph G as the query graph Q, forming a graph pair. For each matching graph pair, i.e. the data graph and the query graph, all edges between them are found and added to the matching subgraph, and finally the given dataset information is obtained.
[0016] In the original dataset, the labels of nodes and edges are represented by numbers;
[0017] Repeat the above steps n times to form the original dataset of approximate subgraph matching after processing. Divide the dataset into training set and test set in an 8:2 ratio. The number of repetitions n is set according to the actual number of datasets required.
[0018] In this case, the graph pairs in the test set are not visible to the model during the training phase.
[0019] S212. Calculate the truth matching matrix of graph pairs in the training set and the test set using the VF3 algorithm;
[0020] The VF3 algorithm is used to compare the node labels in the query graph with the node labels in the data graph and find matching nodes. Nodes that match are considered to have similar labels. By analyzing the matching nodes, a set of nodes with similar labels in the data graph is mined, revealing the correlation and patterns between nodes, and a truth-value matching matrix is obtained.
[0021] For edge label mining, the VF3 algorithm considers edge matching. By comparing the labels of edges in the query graph with the labels of edges in the data graph, it obtains the truth matching matrix of edge matching.
[0022] S22. Input the training set and truth matching matrix obtained in step S211 into the improved GAT model, perform approximate subgraph matching, and finally train it using the loss function.
[0023] Node features are matched with edge features using a relational graph attention network:
[0024]
[0025] in, Let ε represent the embedding vector of query graph node v at layer k+1, MLP represent the multilayer perceptron at layer k, and ε represent the embedding vector of query graph node v at layer k+1. k The parameters to be learned, namely the self-loop weights of the k-th layer, α v,u The normalized attention coefficients represent the data graph G and the query graph Q, respectively, and N(v) represents the neighboring nodes of node v. This represents the vector embedded in the k-th layer of the data graph node u.
[0026]
[0027]
[0028]
[0029]
[0030] Among them, h v G and h u G Let h represent the embedding vectors of nodes u and v in the data graph, respectively. v Q and h u Q Let represent the embedding vectors of query graph node u and node v, respectively. This represents the embedding vector of the query graph at layer t. It is the per-sample query vector in the attention mechanism, α v,u Q,(t) and α v,u G,(t) Let G and Q represent the normalized attention coefficients of the data graph G and the query graph Q, respectively. Let the attention coefficient for removing the edge be denoted by . Q and G represent the query graph and data graph, respectively; W represents the learnable weight matrix; || represents the connection between vectors; and LeakyReLU represents the ReLU loss function.
[0031] The loss function includes a loss function that integrates nodes, edges, and subgraph structures.
[0032] Subgraph structure fusion is achieved through the loss function L D To perform training, the expression is as follows:
[0033]
[0034] Among them, L D After deleting redundant edges, ensure the structure remains consistent with the original structure. Q represents the number of nodes in the query graph, and a ud The abbreviation "a" indicates that redundant edges should not be deleted. ud This is an abbreviation for removing unnecessary edges.
[0035]
[0036] Among them, M ij Let s represent the predicted matching matrix. h It represents a similarity measure of vector spaces, similar to Euclidean or cosine similarity. μ represents the node-level embedding of query graph Q and data graph G at layer t, respectively. -1 This represents pre-defined, learnable parameters that are used to match node features with edge features via a relational graph attention network.
[0037] Design a loss function for node and edge matching, N Q_v N Q_e Represent the number of nodes in the main nodes and the number of nodes in the edge nodes, respectively:
[0038]
[0039]
[0040] Among them, L v L represents the loss function for node feature matching. e The loss function represents the edge feature matching; OP and EP represent the original edge and node matching matrices, respectively. This indicates that the final matrix is used to evaluate entity and edge features.
[0041] L t =αL e +(1-α)L D (10)
[0042] L total =βL v +(1-β)L t (11)
[0043] Where α∈[0,1] and β∈[0,1] represent hyperparameters that adjust the trade-off between the two components, and L t L represents the loss function used for node and edge mechanisms. total This represents the loss function used to balance the features and subgraph structure.
[0044] During the training phase, the query graph of a subgraph randomly selected from the original dataset is used as a positive sample in the data graph. At the same time, some mismatched subgraphs are generated. By analyzing the matching features, subgraphs with similar labels in the data graph are mined as negative samples.
[0045] For each query graph, find a similar subgraph in the data graph and return the corresponding matching matrix to make the obtained subgraph more similar to the truth matching matrix.
[0046] Furthermore, step S3 is specifically as follows:
[0047] S31. Input the existing complex geological structure knowledge graph dataset into the improved GAT model trained in step S2 for fine-tuning. The model matches nodes in the geological structure knowledge graph based on the learned features and matching rules.
[0048] First, the existing complex geological structure knowledge graph dataset is partitioned to obtain the data graph of the complex geological structure knowledge graph dataset, and then input into the query graph as the input of the improved GAT model;
[0049] The improved GAT model trained in step S22 is used on the small graphs after partitioning in the dataset of knowledge graphs for complex geological structures.
[0050] The domain graph structure data in the complex geological structure knowledge graph dataset, namely the query graph and data graph obtained by processing the complex geological structure knowledge graph dataset through step S22, are input into the improved GAT model. The dataset parameters are fine-tuned, the representation vector of each node is calculated through one-way propagation, and noise and useless information are filtered out through an adaptive edge deletion mechanism to obtain the representation vector of the subgraph. The representation vector of the subgraph is compared with its label or target vector, the loss function is calculated, and the approximate subgraph matching of the complex geological structure knowledge graph is achieved by adjusting the parameters of the complex geological structure knowledge graph dataset. The parameters of the improved GAT model are updated through the backpropagation algorithm to continuously optimize the performance of the model.
[0051] The parameters of the complex geological structure knowledge graph dataset include the dimension of the hidden vector, the number of attention heads, and the number of layers.
[0052] S32. Obtain the matching matrix through the output of the model;
[0053] The model output is the predicted matching matrix, where each element represents the degree of matching between the corresponding nodes.
[0054] S33. Display possible matching geological structure patterns on nodes through mouse interaction;
[0055] This tool combines a matching matrix with a geological structure knowledge graph visualization tool. When the mouse hovers over a specific node, it displays possible geological structure patterns that match that node, based on information from the matching matrix.
[0056] If the queried node matches the given structural pattern, it means that a key pattern of the geological structural knowledge graph has been discovered; if no match is found, the node may have a new geological structural pattern. Expert knowledge is used to determine whether a new geological structural pattern exists, and the pattern library information is continuously mined.
[0057] The beneficial effects of this invention are as follows: First, the method of this invention constructs an improved GAT model by adding a unidirectional propagation mechanism fused with a relational graph neural network and an adaptive edge deletion mechanism to the existing GAT model. Then, the effectiveness of the improved GAT model is verified by training it. Finally, the trained improved GAT model is applied to an existing complex geological structure knowledge graph dataset to achieve the mining of key patterns in the key knowledge graph of complex geological structures. This invention uses graph neural networks to mine key patterns of geological structures, introduces an adaptive edge deletion mechanism, balances the relationship between node features, edge features, and subgraph structure features, and improves the accuracy of approximate subgraph matching. This, in turn, improves the mining capability of key patterns in geological structure knowledge graphs and the efficiency of expert interaction. By applying the trained model to the mining of key patterns in complex geological structure knowledge graphs, it helps experts find data subgraphs similar to the query subgraph more quickly, promoting the research and development of oil and gas reservoirs in complex geological structures. This helps experts in the field of geological structures better understand and mine oil and gas reservoirs in complex geological structures, and promotes the progress of related research. Attached Figure Description
[0058] Figure 1 This is a flowchart of a method for mining key patterns in a key knowledge graph of complex geological structures according to the present invention.
[0059] Figure 2 This is a schematic diagram of the matching matrix in the approximate subgraph matching in an embodiment of the present invention.
[0060] Figure 3 This is a schematic diagram illustrating training by fusing information from nodes, edges, and subgraph structures in an embodiment of the present invention.
[0061] Figure 4 This is a schematic diagram of the loss function of the improved GAT model in an embodiment of the present invention.
[0062] Figure 5 This is a graph showing the ratio of the query graph to the target graph in an embodiment of the present invention.
[0063] Figure 6 This is a flowchart illustrating the key pattern mining process for complex geological structure knowledge graphs in an embodiment of the present invention.
[0064] Figure 7 This is a simplified diagram of a knowledge map of complex geological structures and their connections in an embodiment of the present invention.
[0065] Figure 8 This is a schematic diagram of the key patterns of the knowledge graph query diagram for complex geological structures in an embodiment of the present invention.
[0066] Figure 9 This is a comparison chart of the effects of three models with different key modes in an embodiment of the present invention.
[0067] Figure 10 This is a visualization of the key pattern mining of complex geological structure knowledge graphs in an embodiment of the present invention. Detailed Implementation
[0068] The method of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0069] like Figure 1 The flowchart of a key pattern mining method for a key knowledge graph of complex geological structures according to the present invention is shown below, and the specific steps are as follows:
[0070] S1. Construct an improved GAT model;
[0071] S2, Training the improved GAT model;
[0072] S3. Apply the improved GAT model trained in step S2 to the existing complex geological structure knowledge graph dataset to realize the mining of key patterns in the key knowledge graph of complex geological structures.
[0073] In step S1, a one-way propagation mechanism of fused relational graph neural network and an added adaptive edge deletion mechanism are added to the existing GAT (Graph Attention Network) model to obtain an improved GAT model (KG-GAT).
[0074] In this embodiment, step S2 is specifically as follows:
[0075] S21. Use a general domain knowledge graph dataset as the original dataset, and construct graph pairs from the original single graphs in the original dataset to obtain the original dataset with approximate subgraph matching after processing. Divide it into training set and test set, and calculate the truth matching matrix of graph pairs in training set and test set using VF3 algorithm.
[0076] S211. Construct graph pairs from the original single graphs in the original dataset to obtain the original dataset with approximate subgraph matching after processing.
[0077] Each graph pair contains a data graph and a query graph. A graph is randomly selected from the original dataset as the data graph G, and then a connected subgraph is randomly selected from the data graph G as the query graph Q, forming a graph pair. For each matching graph pair, i.e., the data graph and the query graph, all edges between them are found and added to the matching subgraph, and finally the given dataset information is obtained.
[0078] In the original dataset, the labels of nodes and edges are represented by numbers;
[0079] Repeat the above steps n times to form the original dataset of approximate subgraph matching after processing. Divide the dataset into training set and test set in an 8:2 ratio. The number of repetitions n is set according to the actual number of datasets required.
[0080] In this case, the graph pairs in the test set are not visible to the model during the training phase.
[0081] S212. Calculate the truth matching matrix of graph pairs in the training set and the test set using the VF3 algorithm;
[0082] The VF3 algorithm is used to compare the node labels in the query graph with the node labels in the data graph and find matching nodes. Nodes that match are considered to have similar labels. By analyzing the matching nodes, a set of nodes with similar labels in the data graph is mined, revealing the correlation and patterns between nodes, and a truth-value matching matrix is obtained.
[0083] For edge label mining, the VF3 algorithm considers edge matching. By comparing the labels of edges in the query graph with the labels of edges in the data graph, it obtains the truth matching matrix of edge matching.
[0084] S22. Input the training set and truth matching matrix obtained in step S211 into the improved GAT model, perform approximate subgraph matching, and finally train it using the loss function.
[0085] For the structural information of mismatched nodes and edges, we hope that their weights are close to 0, so that the matching matrices of nodes and edges are closer.
[0086] like Figure 2 As shown, previous graph matching methods did not consider edge label matching. The method of this invention achieves approximate subgraph matching by adding an information fusion mechanism for edge labels. The fusion mechanism used for nodes and edge labels is the same, and node features are matched with edge features through a relational graph attention network.
[0087]
[0088] in, Let ε represent the embedding vector of query graph node v at layer k+1, MLP represent the multilayer perceptron at layer k, and ε represent the embedding vector of query graph node v at layer k+1. k The parameters to be learned, namely the self-loop weights of the k-th layer, α v,u The normalized attention coefficients represent the data graph G and the query graph Q, respectively, and N(v) represents the neighboring nodes of node v. This represents the vector embedded in the k-th layer of the data graph node u.
[0089]
[0090]
[0091]
[0092]
[0093] Among them, h v G and h u G Let h represent the embedding vectors of nodes u and v in the data graph, respectively. v Q and h u Q Let represent the embedding vectors of query graph node u and node v, respectively. This represents the embedding vector of the query graph at layer t. It is the per-sample query vector in the attention mechanism, α v,u Q,(t) and α v,u G,(t) Let G and Q represent the normalized attention coefficients of the data graph G and the query graph Q, respectively. Let the attention coefficient for removing the edge be denoted by . Q and G represent the query graph and data graph, respectively; W represents the learnable weight matrix; || represents the connection between vectors; and LeakyReLU represents the ReLU loss function.
[0094] The loss function includes a loss function that integrates nodes, edges, and subgraph structures.
[0095] Through the loss function L D To perform training, the expression is as follows:
[0096]
[0097] Among them, L D After deleting redundant edges, ensure the structure remains consistent with the original structure. Q represents the number of nodes in the query graph, and aud The abbreviation "a" indicates that redundant edges should not be deleted. ud This is an abbreviation for removing unnecessary edges.
[0098]
[0099] Among them, M ij Let s represent the predicted matching matrix. h It represents a similarity measure of vector spaces, similar to Euclidean or cosine similarity. μ represents the node-level embedding of query graph Q and data graph G at layer t, respectively. -1 This represents pre-defined, learnable parameters. A graph attention network is used to match node features with edge features, such as... Figure 3 As shown, training is performed by fusing information from nodes, edges, and subgraph structures, while also considering node feature fusion, edge feature fusion, and subgraph structure matching to improve the accuracy of approximate subgraph matching in knowledge graphs.
[0100] Design a loss function for node and edge matching to minimize the resulting loss function, N. Q_v N Q_e Represent the number of nodes in the main nodes and the number of nodes in the edge nodes, respectively:
[0101]
[0102]
[0103] Among them, L v L represents the loss function for node feature matching. e The loss function represents the edge feature matching; OP and EP represent the original edge and node matching matrices, respectively. This means that the final matrix is used to evaluate entity and edge features, so that the resulting loss function is as small as possible.
[0104] L t =αL e +(1-α)L D (10)
[0105] L total =βL v +(1-β)L t (11)
[0106] To improve the detail and accuracy of key pattern mining in knowledge graphs and enhance the effectiveness of key pattern queries, prior knowledge is used as a query graph in deep learning to identify whether given pattern information exists in the existing data graph. By observing the query graph, the loss function is designed to consist of three parts: node features, edge features, and structural attributes. α∈[0,1] and β∈[0,1] represent the hyperparameters that adjust the trade-off between the two components, respectively. t L represents the loss function used for node and edge mechanisms. total This represents the loss function used to balance features and subgraph structure, specifically as follows: Figure 3 As shown.
[0107] During the training phase, the query graph of a subgraph randomly selected from the original dataset is used as a positive sample in the data graph. At the same time, some mismatched subgraphs are generated. By analyzing the matching features, subgraphs with similar labels in the data graph are mined as negative samples.
[0108] For each query graph, find a similar subgraph in the data graph and return the corresponding matching matrix to make the obtained subgraph more similar to the truth matching matrix.
[0109] Training is performed using a loss function, designed to produce a matching matrix that more closely approximates the actual ground truth matrix and effectively balances the similarity between structure and features. Figure 4 and Figure 5 This demonstrates that the improved GAT model converges better and can better balance data size imbalance. Figure 4 In the text, 'a' represents the balance between edge labels and node labels. Figure 5 The horizontal axis represents the F1-Score of approximate subgraph matching under the state of extreme imbalance between the query graph and the target graph. Tables 1 and 2 demonstrate the high time efficiency of the model and the effectiveness of fusing node, edge and structural features for key pattern mining. Table 1 shows the average running time, and Table 2 shows the F1 scores of the three baselines and the KG-GAT model on four datasets.
[0110] Table 1
[0111]
[0112] Table 2
[0113]
[0114] In this embodiment, step S3 is specifically as follows:
[0115] S31. Input the existing complex geological structure knowledge graph dataset into the improved GAT model trained in step S2 for fine-tuning. The model will match the nodes in the geological structure knowledge graph according to the learned features and matching rules.
[0116] The specific process for mining key patterns in complex geological structure knowledge graphs is as follows: Figure 6 As shown.
[0117] First, the existing complex geological structure knowledge graph dataset is partitioned, with the degree of nodes in each subgraph being as high as possible, while the number of edges connecting different partitions is minimized. (A simplified diagram of the complex geological structure knowledge graph and its connections is shown below.) Figure 7 As shown), and input the query map (the key pattern of the complex geological structure knowledge graph query map is as follows). Figure 8 As shown), it serves as the input to the improved GAT model;
[0118] The improved GAT model trained in step S22 is used on the small graphs (small graphs after partitioning in the domain dataset of knowledge graph of complex geological structures);
[0119] The improved GAT model integrates the unidirectional propagation mechanism of the relational graph neural network and the added adaptive edge deletion mechanism, which respectively satisfy feature aggregation to adapt to feature similarity, and hope that the weight of redundant edges is as close to 0 as possible after training to adapt to structural similarity, and continuously iterate to achieve feature fusion and subgraph structure matching.
[0120] The domain graph structure data in the complex geological structure knowledge graph dataset, namely the query graph and data graph obtained by processing the complex geological structure knowledge graph dataset through step S22, is input into the improved GAT model. The dataset parameters are fine-tuned, the representation vector of each node is calculated through one-way propagation, and noise and useless information are filtered out through an adaptive edge deletion mechanism to obtain the representation vector of the subgraph. The representation vector of the subgraph is compared with its label or target vector, and the loss function is calculated. By adjusting the parameters of the domain dataset of the complex geological structure knowledge graph, approximate subgraph matching of the complex geological structure knowledge graph is achieved. The parameters of the improved GAT model are updated through the backpropagation algorithm to continuously optimize the performance of the model.
[0121] The parameters of the complex geological structure knowledge graph dataset include the dimension of the hidden vector, the number of attention heads, and the number of layers.
[0122] S32. Obtain the matching matrix through the output of the model;
[0123] The model outputs a predicted matching matrix, where each element represents the degree of matching between corresponding nodes. The degree of matching can be a score or a probability value, indicating the similarity or degree of matching between nodes. A higher score indicates that there is a greater likelihood of association or matching between nodes.
[0124] like Figure 9 As shown, the F1-Score of the approximate subgraph matching method found by comparison in the geological structure dataset is determined by the size of the subgraph, where (3,2) represents a geological key pattern (fracture, intrusion, and unconformity, etc.), where 3 represents the number of nodes and 2 represents the number of edge labels.
[0125] from Figure 9 The improved GAT model outperforms SUM-GNN and AED-GNN on existing complex geological knowledge-constructed knowledge graph datasets. The study found that considering the similarity of edge labels can improve the accuracy of approximate subgraph matching. However, the accuracy of approximate subgraph matching may decrease with the increase in the number of nodes and edge labels, but overall, the improved GAT model proposed in this invention can handle approximate subgraph matching research well.
[0126] S33. Display possible matching geological structure patterns on nodes through mouse interaction;
[0127] To enable interactive mouse-based display of potential matching geological structural patterns, a matching matrix is combined with a geological structural knowledge graph visualization tool. When the mouse hovers over a specific node, the matching matrix displays potential matching geological structural patterns for that node, such as... Figure 10 As shown.
[0128] Figure 10 The results predicted on the actual dataset of the knowledge graph of complex geological structures are visualized and queried through mouse interaction, which facilitates knowledge interaction among experts. If the matched structural pattern does not conform to the expert's understanding, it can be easily discovered and corrected, thereby building a more complete knowledge graph and facilitating subsequent 3D geological structure modeling. Figure 10 (a) represents the key pattern for approximate matching of geological feature lines. Figure 10(b) Key patterns representing approximate matching of geological feature surfaces. Mouse interaction provides a more intuitive way for users to explore and understand key patterns in the geological structure knowledge graph. Through interactive operations, users can understand the possible matching geological structure patterns associated with specific nodes, further deepening their research and analysis of the characteristics and patterns of geological structures. Experts can more easily modify the knowledge graph through visualization, improving the efficiency of knowledge graph interaction and making the constructed knowledge graph more consistent with expert cognition, thus facilitating structural modeling. If the queried node matches a given structural pattern, it indicates that a key pattern in the geological structure knowledge graph has been discovered; if no match is found, the node may have a new geological structure pattern. Expert knowledge can be used to determine whether a new geological structure pattern exists, continuously mining information from the pattern library.
[0129] In this embodiment, to evaluate the performance of the improved GAT model in recognizing graph pair matching relationships in knowledge graphs, four publicly available graph structure datasets—Tumblr_ct1, DBLP, Facebook, Protein, and Twitter—were used. These datasets include edge labels, and each data graph in the dataset and a randomly drawn connected subgraph from the data graph are used as sample pairs for each dataset. The ground truth matching matrix is then calculated using VF3. The improved GAT model (considering node, edge, and graph structure information) was evaluated using these four publicly available datasets, and the evaluation results are shown in Table 2. A complex geological structure knowledge graph dataset was used to measure the model's performance in the real world. Figure 8 This is a key pattern for querying knowledge graphs of complex geological structures.
[0130] Field data collection (geological structure modeling) is used to measure the model's effectiveness in the real world. Figure 7 This is a simplified knowledge graph diagram for the field of geological structure modeling, showing the connections between nodes and edges. The original dataset serves as the graph for each sample. Each graph pair needs to contain a data graph and a query graph. First, a geological structure knowledge graph is mined from the interpreted data. Based on the query subgraph constructed using expert knowledge, the query graph and target graph are input. Using a trained model, approximate subgraph matching of the knowledge graph is performed by inputting the query graph and target graph, improving the efficiency of expert interaction in the field of geological structures and promoting the exploration and research of oil and gas reservoirs in complex geological structures. By adding a mouse interaction mechanism to the existing knowledge graph, the predicted matching matrix is visualized, realizing the interaction between expert knowledge and the knowledge graph. This allows for the construction of a complete knowledge graph that meets expert needs, used to constrain structural modeling and build more complete 3D geological models.
[0131] In summary, the method of this invention first transforms patterns with specific physical meanings into subgraph structures, including topological structures and entity attributes. Then, these complex geological structure subgraph structures are used as query graphs for approximate subgraph matching in knowledge graph data. The approximate subgraph matching performed by the method of this invention differs from existing approximate subgraph matching research. Existing deep learning approximate subgraph matching research considers edge label matching and introduces an adaptive edge deletion mechanism to ensure structural similarity, achieving a balance between node features, edge features, and subgraph structure features, thus improving the accuracy of approximate subgraph matching. By applying the trained model to the mining of key patterns in complex geological structure knowledge graphs, the efficiency of expert interaction is improved. The method of this invention, when applied to existing research on the construction of complex geological structure knowledge graphs, enhances expert interaction and can construct geological structure models that better align with expert cognition.
[0132] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A method for mining key patterns in a key knowledge graph of complex geological structures, the specific steps of which are as follows: S1. Construct an improved GAT model; S2, Training the improved GAT model; S3. Apply the improved GAT model trained in step S2 to the existing complex geological structure knowledge graph dataset to realize the mining of key patterns in the key knowledge graph of complex geological structures. in, The key modes include: complete fracture, partial fracture, unconformity, anticline, layered strata, regression, and overburden; In step S1, a one-way propagation mechanism of fused relational graph neural network and an added adaptive edge deletion mechanism are added to the existing GAT model to obtain an improved GAT model. Step S2 is as follows: S21. Use a general domain knowledge graph dataset as the original dataset, and construct graph pairs from the original single graphs in the original dataset to obtain the original dataset with approximate subgraph matching after processing. Divide it into training set and test set, and calculate the truth matching matrix of graph pairs in training set and test set using VF3 algorithm. S22. Input the training set and ground truth matching matrix obtained in step S21 into the improved GAT model, perform approximate subgraph matching, and finally train it using the loss function. Node features are matched with edge features using a relational graph attention network: (1) in, Indicates query graph node In the The embedding vector of the layer, Indicates the first Multilayer perceptron, The parameter representing the learned parameter, i.e., the first... Layer self-loop weights, The normalized attention coefficients represent the data graph G and the query graph Q. Represents a node The neighboring nodes, Represents data graph nodes In the The embedding vector of the layer; (2) (3) (4) (5) in, and These represent data graph nodes. and nodes Embedded vector, and These represent the query graph nodes respectively. and nodes Embedded vector, Indicates the query graph is in Layer embedding vectors, It is the per-sample query vector in the attention mechanism. and Let G and Q represent the normalized attention coefficients of the data graph G and the query graph Q, respectively. Let the attention coefficient for removing the edge be denoted by . Q and G represent the query graph and data graph, respectively. This represents the learnable weight matrix. Indicates the connection between vectors. Represents the ReLU loss function; The loss function includes a loss function for the fusion of node, edge, and subgraph structures; Subgraph structure fusion through loss function To perform training, the expression is as follows: (6) in, After deleting redundant edges, ensure the structure remains consistent with the original structure. This indicates the number of nodes in the query graph. This is an abbreviation indicating that redundant edges should not be deleted. This is an abbreviation for removing unwanted edges. (7) in, This represents the predicted matching matrix. It represents a similarity measure of vector spaces, similar to Euclidean or cosine similarity. These represent the query graph Q and the data graph G in the [missing information - likely a specific location or event]. Layer-level embedding, This represents pre-defined learnable parameters, which are used to match node features with edge features through a relational graph attention network; Design a loss function for node and edge matching. , Represent the number of nodes in the main nodes and the number of nodes in the edge nodes, respectively: (8) (9) in, The loss function represents node feature matching. The loss function for edge feature matching; and These represent the edge and node matching matrices of the original matching, respectively. , The final matrix is used to evaluate entity and edge features; (10) (11) in, and These represent the hyperparameters that adjust the trade-off between the two components. This represents the loss function used for node and edge mechanisms. This represents the loss function used to balance the features and subgraph structure. During the training phase, the query graph of the subgraph randomly selected from the original dataset is used as a positive sample in the data graph. At the same time, some mismatched subgraphs are generated. By analyzing the matching features, subgraphs with similar labels in the data graph are mined as negative samples. For each query graph, find a similar subgraph in the data graph and return the corresponding matching matrix to make the obtained subgraph more similar to the truth matching matrix.
2. The method for mining key patterns in a key knowledge graph of complex geological structures according to claim 1, characterized in that, The specific steps of S21 are as follows: S211. Construct graph pairs from the original single graphs in the original dataset to obtain the original dataset with approximate subgraph matching after processing. Each graph pair contains a data graph and a query graph. A graph is randomly selected from the original dataset as the data graph G, and then a connected subgraph is randomly selected from the data graph G as the query graph Q to form a graph pair. For each matching graph pair, i.e. the data graph and the query graph, all edges between them are found and added to the matching subgraph. Finally, the given dataset information is obtained. In the original dataset, the labels of nodes and edges are represented by numbers; Repeat the above steps n times to form the original dataset of approximate subgraph matching after processing. Divide the dataset into training set and test set in an 8:2 ratio. The number of repetitions n is set according to the actual number of datasets required. In this case, the graph pairs in the test set are not visible to the model during the training phase; S212. Calculate the truth matching matrix of graph pairs in the training set and the test set using the VF3 algorithm; The VF3 algorithm is used to compare the node labels in the query graph with the node labels in the data graph and find matching nodes. Nodes that match successfully are considered to have similar labels. By analyzing the matching nodes, the set of nodes with similar labels in the data graph is mined, revealing the correlation and patterns between nodes, and a truth-value matching matrix is obtained. For edge label mining, the VF3 algorithm considers edge matching. By comparing the labels of edges in the query graph with the labels of edges in the data graph, it obtains the truth matching matrix of edge matching.
3. The method for mining key patterns in a key knowledge graph of complex geological structures according to claim 1, characterized in that, Step S3 is as follows: S31. Input the existing complex geological structure knowledge graph dataset into the improved GAT model trained in step S2 for fine-tuning. The model matches nodes in the geological structure knowledge graph based on the learned features and matching rules. First, the existing complex geological structure knowledge graph dataset is partitioned to obtain the data graph of the complex geological structure knowledge graph dataset, and then input into the query graph as the input of the improved GAT model; The improved GAT model trained in step S22 is used on the small graphs after partitioning in the dataset of knowledge graphs for complex geological structures. The domain graph structure data in the complex geological structure knowledge graph dataset, namely the query graph and data graph obtained by processing the complex geological structure knowledge graph dataset through step S22, are input into the improved GAT model. The dataset parameters are fine-tuned, the representation vector of each node is calculated through one-way propagation, and noise and useless information are filtered out through an adaptive edge deletion mechanism to obtain the representation vector of the subgraph. The representation vector of the subgraph is compared with its label or target vector, the loss function is calculated, and the approximate subgraph matching of the complex geological structure knowledge graph is achieved by adjusting the parameters of the complex geological structure knowledge graph dataset. The parameters of the improved GAT model are updated through the backpropagation algorithm to continuously optimize the performance of the model. The parameters of the complex geological structure knowledge graph dataset include the hidden vector dimension, the number of attention heads, and the number of layers. S32. Obtain the matching matrix through the output of the model; The model output is the predicted matching matrix, where each element of the matching matrix represents the degree of matching between the corresponding nodes. S33. Display possible matching geological structure patterns on nodes through mouse interaction; This tool combines a matching matrix with a geological structure knowledge graph visualization tool; when the mouse hovers over a specific node, it displays the geological structure patterns that may match that node based on the information in the matching matrix. If the queried node matches the given structural pattern, it means that a key pattern of the geological structural knowledge graph has been discovered; if no match is found, the node may have a new geological structural pattern. Expert knowledge is used to determine whether a new geological structural pattern exists, and the pattern library information is continuously mined.
Citation Information
Patent Citations
Abnormal structure mining method and device based on knowledge graph and readable storage medium
CN113704326A
Knowledge inference method based on knowledge embedding and association relationship combination
CN115796283A