Construction of knowledge constraints: a case study of 3D structural modeling

The uncertainty of structural interpretation complicates the practical production and application of data-driven complex geological structure modeling technology. Intelligent structural modeling excavates and extracts structural knowledge from structural interpretation through human–machine collaboration and combines structural interpretation to form a new model of complex structural modeling guided by knowledge. Specifically, we focus on utilizing knowledge rule reasoning technology to extract topological semantic knowledge from interpretive data and employ knowledge inference to derive structural constraint information from complex geological structure models, thus effectively constraining the 3D geological structure modeling process. To achieve this, we develop a rule-based knowledge inference system that derives theoretical models consistent with expert cognition from interpretive data and prior knowledge. Additionally, we represent the extracted knowledge as a topological semantic knowledge graph, which facilitates computer recognition and allows estimation of intersection lines during 3D geological modeling, resulting in the creation of accurate models. The applicability of our proposed method to various complex geological structures is validated through application tests using real-world data. Furthermore, our method effectively supports the realization of intelligent structure modeling in real working area.

The remainder of this article follows the following organizational structure."Materials and methods" section briefly describes the relevant research methods of this study.In "Complex geological structure knowledge reasoning" section, the research methods and processes of constructing constraint knowledge of topological geological modeling through knowledge inference are introduced in detail."Result" section shows the application of the proposed framework to a field case."Discussion" section discusses the feasibility of the proposed framework in comparison with existing approaches.The last section will summarize the work of this study.

Materials and methods
As far as we know, only Zhan et al. 14 have introduced knowledge into the study of structural modeling at present, and there is no relevant study on the constraint information of knowledge inference to construct modeling.In this section we will discuss the following two types of research work that are relevant to this paper: knowledge reasoning and explicit modeling 18 .

Explicit structural modeling
Explicit interactive modeling is a classical 3D modeling method to reconstruct 3D geological structures using sparse data.When modeling complex regions containing various types of geological structures, the limitations of using a single method show up.In display modeling, people introduce the workflow of building closed geological models by introducing multi-source data information to constrain 3D geological models.First, all geological surfaces are reconstructed, and then the intersections between them are found by cutting each other under constraints.Most of the subsequent explicit modeling approaches use this workflow.Display modeling allows a large number of interactive modifications, adding appropriate underground control constraints according to the experience of the modeler, but the amount of interaction is very large and prone to topological contradictions 19 .The square deterministic modeling of structural modeling mainly includes the following methods, namely reservoir seismology methods 20 , reservoir sedimentological methods 21 and kriging interpolation methods 22 .It includes some discrete techniques commonly used in software [23][24][25][26] .Yan et al. shown that spatial explicit models produce better results than non-spatial models, thus showing that space is indeed special in terms of summary 27 .In order to build a more reasonable 3D geological structure model, but now lack of understanding of the specific structure.In display modeling, where it is difficult to choose a way to integrate all types of information, geological histories are used to combine multiple scalar fields, merely showing the geological interfaces cutting each other.We focus on introducing knowledge reasoning into structural modeling to construct structural models, and introducing earth scientists' cognition into display modeling to provide more comprehensive and intuitive structural models.We provide a workflow to construct modeling constraints by knowledge reasoning, and improve the stability and efficiency of display modeling by introducing knowledge reasoning.Figure 2 provides constraint information for the pattern layer.

Knowledge reasoning of model constraints
The model constraint can be represented by knowledge graph in data form the construction of the knowledge constraints of the structural model starts from the application field and determines the scope of knowledge constraints 28 .The key to constructing the data layer of the knowledge graph is knowledge reasoning 29 .New insight is obtained through knowledge reasoning, and the given knowledge graph is inferred based on expert knowledge to determine whether it conforms to cognition for updating the rule base of the pattern layer of the knowledge graph.
The target world can be described based on the relationships between entities.Based on this information, the data are not sufficiently meaningful.Relevant data were combined to form the information.Semantics comprise two components: data and relevance.When describing a structural model, the semantic description encompasses both low-level features, such as geometric properties, and high-level features, such as logical relationships between structural elements.By utilizing basic semantic entities, the structural geological model is divided into geometric units, and their spatial topological relationships are described through the relationships between geometric elements.The semantic reasoning between spatial topological geometries yields the construction process of a knowledge graph 30 .
The semantic entities in the modeling knowledge graph refer to geometric objects.Their basic semantic entities can be divided into four types: point (0-cell), line (1-cell), surface (2-cell), and body (3-cell).Relation refers to the topological geometric, positional, and compositional relationships between two entities (including the relationships between target entities).An attribute refers to the position and closure of geometric objects in structural modeling 14 .
Definition 1 (Topological semantic knowledge graph) The creation and update of topological semantic knowledge graphs can be recorded using meta-knowledge, thereby enabling evolution analysis and traceability of complex geological structural knowledge.
where E, V represent the basic elements of the topological semantic knowledge graph.Usually, they are expressed in the form of "head entity, relationship between entities, tail entity".GeoMetaK represents the meta-knowledge of the topological semantic knowledge graph.,It is usually used to indicate the updating of knowledge, P T and P L are used to represent the temporal and spatial relationships of topological semantic knowledge graphs, such as the deposition time order of the interpretation data and the topological spatial location association.
Introducing a knowledge-reasoning algorithm into a knowledge graph to constrain its construction and obtain accurate data samples is necessary.In constructing a topological structure knowledge graph, it is very important to determine the relationship between structural elements.Burns et al. introduced a technique for representing the geological topological relations using a network diagram, in which node entities denote spatial elements and edges indicate the topological connections between them 31 .Based on the above ideas, we used the hierarchical network to obtain the computer representation of the topological structure knowledge graph. (1) The topological structure information fully represented the geometric and structural features of the structural geological model.

Complex geological structure knowledge reasoning Knowledge reasoning rule base construction
The pattern layer of a knowledge graph consists of defining entities, relationships, and attributes, as well as building the knowledge graph's rule base.Structural geology has a long history.Numerous rules and a lot of information regarding the genesis and regularity of movement of geological entities have been formed.Some of these rules can be summarized to form knowledge.
Therefore, according to the definition of a knowledge graph in the construction of a complex-structure knowledge graph, and the schema layer and rule base summary of knowledge constraints are shown in Figs. 3 and 4.
The basic form of the production rule base in this article is Among them, R it represents the number of rules, k is the k rule, which represents the obtained rule con- clusion, and the extraction of the knowledge graph data layer is realized through logical rules.Where E and C represent the conditions and conclusions of rule reasoning.The pattern layer of a knowledge graph consists of defining entities, relationships, and attributes, as well as building the knowledge graph's rule base.Structural geology has a long history.Numerous rules and a lot of information regarding the genesis and regularity of movement of geological entities have been formed.Some of these rules can be summarized to form knowledge.Therefore, according to the definition of a knowledge graph in the construction of a complex-structure knowledge graph, the rule base of knowledge reasoning is summarized as shown in Fig. 4.
In the initial rule base, we first added nine separate geological structure rule patterns as the initial state and then used the geological constraint rule base (prior knowledge) to match the common structural patterns.For   parts that match, we inferred the interpretation of the corresponding geological structure to be geologically reasonable.In the construction of model knowledge reasoning, the focus was on geometric topology knowledge graphs from the perspective of computer geometry and knowledge graph reasoning.In the new reasoning process, we focused on two possibilities: (1) different structural superposition and superposition methods since exhausting all geological structure rules is difficult, and (2) predefined rule errors (prior knowledge errors), as shown in Fig. 4. Experts must determine whether new rules need to be added or whether existing rules are suitable.In the process, the inference rule base is gradually improved and optimized.
The topological structure knowledge graph can be used to represent and describe various geological structural models, including fractures, intrusions, and unconformities.By representing these construction patterns as nodes and using edges to describe the relationships between them, a topology knowledge graph can be constructed.In the knowledge graph, the relationship between different nodes can be expressed as a topological relationship, which can more accurately represent the topological relationship in the geological structure and automatically perform topological inspection and constraints during the modeling process to ensure the correctness of the model.
The geological processes and structural types covered in the rule base are extensive, covering common types of geological structures such as faults, folds, and intrusions and geological structures of different scales, such as large-scale topography and small-scale rock structures.We described the universality of the rule base from three perspectives.(1) The first perspective involves the types of covering tectonic patterns; we listed the types of tectonic patterns contained in the rule base, such as faults, intrusions, and unconformity structures, as shown in Fig. 5.This rule base can cover the most common construction patterns in graphs.(2) The second perspective is the spatial distribution of cover tectonic models.In addition to the types of cover tectonic models, we considered the distribution of these tectonic models in geological space, which can describe various tectonic models in different geological periods and regions.(3) The third perspective includes the complexity of the cover structure model; the complexities of the geological structure models differ.Certain simple models may be relatively easy to describe and identify, whereas others may require more rules to describe.In the subsequent simulation, the given rules were used to achieve a more complex model (Fig. 5).Therefore, our rule base can cover and handle construction patterns with different complexities.

Knowledge reasoning for constraints of geological structure modeling
Knowledge reasoning, which can accurately connect to structural modeling, is the main technology used to build a knowledge graph in the field of structural modeling.The aim of constructing a knowledge graph is to obtain expert knowledge from seismic interpretation data and structured and semi-structured data from seismic interpretation data, such as coordinate data of the horizon and fault plane, intersection information of the horizon and fault plane, and the extraction of geological entities, spatial relations, semantic relations, and sedimentary relations.Furthermore, we determine whether the number of rules is finite or countable.Finally, a complete knowledge graph of the structural model was obtained by combining the knowledge reasoning of the spatial relations.In structural modeling, knowledge reasoning can combine spatial relations to achieve a more accurate reasoning process.For example, the relationship between geological entities can be inferred based on their relative positions and intersections in space.
Reasoning constraints in the knowledge graph are realized through the rules of knowledge reasoning.The process of knowledge reasoning is as follows.The specific reasoning process is shown in Fig. 6.The aim of knowledge reasoning is to make human knowledge comprehensible to computers, construct a geometric topology knowledge graph, and guide 3D geological structure modeling.In our input, the effective horizon data is H i = {h i 1 , h i m , ...., h ia } , where h i m represents the horizon interpretation data at the m point of the i section, M ≤ a , a is the number of horizon.And the effective fault data is F j = {f j 1 , f j n , ..., f j b } where the f j n represents the fault interpretation data at the nth point of the j section, 1 ≤ n ≤ b , b is the number of fault.the quantity of a and b is determined according to the specific work area.
To facilitate processing, we modeled the input prior knowledge as an adjacency matrix.According to the prior knowledge of geological structure (the intersection information of plane and fault plane) obtained from the perspective of geological experts, the prior information is represented by G 1 = (E, V ) , where E = {GeoMetaK, E e_g }, where e ij = 1 indicates that the i-th face and the jth face have an intersection relationship, GeoMetaK = {E F , E H , V } E F and E H represent the fault plane and horizon plane entity respectively.
And (m + n)(m + n) represents the number of intersection relations between horizon planes and fault planes calculated by the bounding box method as our meta-knowledge.e ij = 0 indicates that there is no intersection relationship.And the E e_g represents the point, line, surface, block semantic entity that interprets the data gen- erated, and its specific form is E e_g = {e p 1 , e p 2 , ..., e p n_p , e l 1 , e l 2 , ..., e l n_l , e f 1 , e f 2 , ..., e f n_f , e l 1 , e b 2 , ..., e b n_b } where n_p , n_l , n_f and n_b represent the number of the topological semantic entities of the generated point, line, surface and block entities respectively.What's more The following tables of the above edges represent the topological position relationships between entities respectively, represents the intersection information of prior knowledge (1 represents intersection, and 0 represents non-intersection) to construct the adjacency matrix of prior knowledge.Through the inference of rule base, the transformation of geological structure information to the topological relationship is realized, and the language (i.e., the form of adjacency matrix) that can be read by a computer is c-ombined to create conditions for the subsequent sub-graph inference.The pseudo-code of knowledge reasoning related to algorithm 1 based on the rule base is as Table 1.
In the first stage of reasoning, prior human knowledge is combined with data that the computer can recognize, and computer cognition is realized by matching the corresponding rule base.Vol:.(1234567890) www.nature.com/scientificreports/block entities existing in the knowledge graph are mined by graph isomorphism matching, and the entities and relationship information conforming the geological structure are obtained by approximate subgraph matching.We studied the problem of sub-graph matching for knowledge graph.Specifically, given a query graph G q = {E query , V query } and data graph G d = {E data , V data } the sub-graph matching problem refers to obtaining all the data sub-graphs in G 2 that is isomorphic to G 3 to determine the new entity information in the knowledge graph.Through the study of each algorithm, we selected the VF2 algorithm with block efficiency and speed.The corresponding pseudo-code is as Table 2.
Generally, mapping M is expressed as the mapping of the node pair (e query , e data ) ( e query ∈ G q and e data ∈ G d ) each of which represents the mapping of node e query of G q and e data of G d , M ∈ G d × G q the function F(s, e query , e data ) is a feasibility function that simultaneously increases the comparison of node and edge labels.
The return value is a Boolean value used to prune the search tree.At the same time, it can elimiate the situation where the two graphs can be isomorphic but the final matching result cannot be obtained, which is used to reduce the number of state spaces.P (s) represents the set of all pairs of nodes to be matched.The VF2 algorithm is used to match the isomorphism graph, and a knowledge graph (face and block entities) that matches the given rule pattern is obtained.The VF2 algorithm cannot directly query the number of isomorphic sub-graphs; however, this function can be realized by modifying the VF2 algorithm.Specifically, based on the VF2 algorithm, each matched node pair can be marked, and unmatched node pairs can then be searched.Each time a new match is found, the marked node pairs are removed from the current search to query the number of isomorphic sub-graphs.
The specific process uses Algorithm 1 to realize rule matching and converts prior human knowledge into structured data on the computer with the help of prior rules to guide subsequent subgraph isomorphism matching.Through the modified sub-graph matching model, all sub-graphs that are isomorphic to the graph are traversed through sub-graph isomorphism to infer all surface entities and block entity knowledge and construct a complete knowledge graph.The quality of a knowledge graph obtained through knowledge reasoning is typically not guaranteed; therefore, it is added to the knowledge base.Before the process of quality evaluation is required, the wire-frame model is used in construction modeling to evaluate the quality of the knowledge graph.As shown in Fig. 7, when the constructed knowledge graph does not conform to expert cognition, the error information in the knowledge graph is modified and queried using subgraph matching to identify incorrect subgraph information in the knowledge graph.Quality assessment is the process of measuring and evaluating the credibility of new knowledge before it is added to a knowledge base to eliminate errors or conflicts.

Result
Figure 7 shows the workflow of knowledge reasoning construction modeling constraints participating in construction modeling.Firstly, the knowledge graph is represented as a wire-frame model to determine whether there are errors in the knowledge graph and realize the editing of the knowledge graph data.Secondly, the knowledge graph obtained by knowledge reasoning is a data format that can be recognized by the computer to constrain the boundary conditions of the construction model.Finally, the wire-frame model and the final construction model are consistent with expert knowledge.
In the construction process of knowledge reasoning in the knowledge graph, the entities and relationships in Fig. 8b,c are obtained through the first stage of knowledge reasoning using prior knowledge (Fig. 8a) (where prior knowledge is used to judge the intersection relationship between the horizon surface and fault surface by interpreting the data).Here, entities refer to the intersection line and intersection point entities obtained from prior knowledge, as well the topological semantic relationships between entities.Rule matching in the library was used to realize the reasoning of geological knowledge data to topological structure data, and a preliminary knowledge graph was constructed.In the second stage of knowledge reasoning, the hidden entity and relationship information in the knowledge graph are continuously enriched, and all sub-graphs that are isomorphic to the query sub-graph are obtained through the sub-graph isomorphism query.As shown in Fig. 9, the hidden surface entity and geological block entity knowledge (third and fourth layers) were obtained by reasoning.The knowledge graph obtained in this study does not contain prior knowledge of the initial definition.It is a purely topological semantic knowledge graph.The intersection point, intersection line, closed surface composed of an intersection line, and closed block entity composed of a surface were mined from prior interpretation data.The knowledge graph obtained by knowledge inference is used as the modeling constraint to estimate the boundary conditions of the constructed model [5]and get the final structural modeling,as show in Fig. 10.

Practical application of knowledge reasoning
The constructed geometric constraint knowledge graph can be used to constrain 3D geological structure modeling 5 .The specific process is shown in Fig. 11.Knowledge graph technology is used to construct knowledge graphs in the field of geology so that geologists can query and analyze geological data and identify geological laws and evolution trends.According to the geological knowledge in the knowledge graph, the model was constrained and optimized.The constraint relationship in the knowledge graph is used to specify  www.nature.com/scientificreports/ the topological relationship and geometric properties of the intersection line to improve the accuracy and controllability of the intersection line, provide the geometric constraints required for surface reconstruction, and ensure that the surface is as smooth as possible, while satisfying the geological structural characteristics.The optimized geological model was more consistent with the actual geological conditions.In the subsequent modeling process, the topological structure knowledge graph is integrated into the boundary feature extraction, and then the boundary features are used as surface topology semantic constraints, and the morphological features are used as surface geometry semantic constraints, combined with multi-source information abstraction such as stratigraphic interpretation point clouds and well layered data.It is a multi-constraint surface regression model.By building a rectangular grid, based on the spatial autoregressive neural network, the fitting error and smoothing error are used as loss functions to solve the model, and then construct a model with high fitting degree, good smoothness and accurate morphological characteristics.By comparison in Fig. 12, it is found that in the traditional extrapolation interpolation method, the intersection lines of the second horizon and the first and third horizons are staggered.At the same time, considering that the fault is a reverse fault, the hanging-footwall intersection line is required to be located above the hanging-footwall intersection line.In the traditional extrapolation interpolation method, the intersecting lines of the upper and lower disks of the first horizon also appear interleaved.Under the guidance of the principle of knowledge graph, the method in this paper can expertly extract reliable boundary feature lines that are consistent with geological laws and expert cognition.Ensure that the intersection line of the deposited lower horizon always remains below the intersection line of the deposited upper horizon.Moreover, the hanging-wall (thrust fault) or hanging-wall (normal fault) intersection line always remains above the hanging-wall (thrust fault) or hanging-wall (normal fault) intersection line.This method effectively prevents the occurrence of intersecting lines of adjacent layers or intersecting lines of upper and lower layers, and eliminates any unreasonable phenomenon.

arg min
To test the effectiveness of the complex geological knowledge graph based on knowledge reasoning, we constructed a three-dimensional geological model of the study area in Sichuan.When the traditional structural modeling method (Fig. 13) encounters an unreasonable fault or horizon, it obtains an accurate geological structural model by modifying the original data (Fig. 14).This method requires modification of a large amount of raw data, which is obviously not suitable for more complex work areas.But the method based on the knowledge reasoning (Fig. 10) can accurately constrain the three-dimensional geological modeling and reduce the uncertainty of structural modeling, what's more, this method modifies the knowledge to model the constraints and avoids the uncertainty caused by modifying the original data.

Other knowledge reasoning approaches
In addition, certain neural network-based methods, such as the graph neural network (GNN) 32,33 , can be used for subgraph isomorphism reasoning.These methods use the learning ability of neural networks to query whether a corresponding subgraph exists by learning the feature vectors of nodes and edges and describing the reasoning problem of the graph in detail.
Owing to the high requirements of domain knowledge graphs, ensuring the accuracy of results using a deep learning method is difficult if applied to practical engineering.The existing method constructs a model rule base by human definition to realize the construction of a knowledge graph; however, following the development of deep learning, the rules existing in the construction of knowledge graphs can be automatically learned, efficient knowledge reasoning can be realized, and the rule base can be avoided.For example, the hidden subface and closed block entities in a knowledge graph can be obtained by reasoning based on a random walk, and a topological semantic knowledge graph can be obtained.The AMIE algorithm proposed by Galárraga et al. is an association rule mining algorithm based on an incomplete knowledge base 34 .Each rule is predicted by learning: for each relationship, starting from the rule whose body is empty, the body part of the rule is expanded by three operations, and the candidate rules whose knowledge degree exceeds the threshold are retained to realize association rule mining research of knowledge graphs.

Limitations
The method in this article aims to mine the topological structure of existing models from interpretation data.There is no better method for constructing topological semantic knowledge graphs for other data (such as seismic data); the limitation of this method is that it relies on Expert experience realizes the improvement of the knowledge reasoning rule base.For the limited work area data, our geological rule base can only build a knowledge graph and constrain the three-dimensional structural modeling for the existing work area.For other work areas, our method is theoretically applicable.However, for areas that are not accurate enough, we need to continuously add rules for reasoning to further improve our rule base.Based on a large number of experiments, our method is theoretically effective.Scalable.The disadvantage is that it relies on the participation of a large number of expert experience in the early stage, but in the actual work area, the accuracy of this method is relatively high and can meet the needs of actual production.

Conclusions
This study introduces a technique for knowledge reasoning in the field of structural modeling, which can be applied to create modeling constraints for 3D geological structure modeling in the context of oil exploration.The knowledge graph we constructed enables experts and users to access the semantic information contained in the model at any time and maintain expert knowledge throughout the modeling process.Geological experts can visualize the knowledge graph more easily and find connections between knowledge items.The knowledge graph is used to constrain the boundary information of complex structural models, improving the efficiency of intelligent structural modeling.

Figure 4 .
Figure 4. Topological rule base of knowledge reasoning, initial predefined geological structure rule base (geological structure diagram), including six common reasoning modes and subgraph reasoning query diagram; the geometric topology rule base (geometric structure diagram) contains common geometric reasoning patterns.

Figure 5 .
Figure 5. Lists common geological structure models, such as faults, intrusions, and unconformity structures.Most of the common geological structures exist in fault structures and unconformity structures.In the proposed rules, the above models can be expressed in the form of a knowledge graph.

eFigure 6 .
Figure 6.Complete process of knowledge reasoning can be divided into three parts: transforming geological data into geological constraints that can be read by computer; based on the constructed knowledge base, the knowledge graph is constructed via the knowledge reasoning algorithm.The knowledge graph is represented as a wireframe model to allow expert knowledge to participate in the knowledge graph update.

Figure 7 .
Figure 7.The whole knowledge reasoning ultimately participates in the workflow of the construction modeling.

Figure 8 .
Figure 8.The process of point entity and line entity in the topological geometric knowledge graph obtained by rule base matching in the first stage of knowledge reasoning, which is divided into two steps.(a) Is prior knowledge, and geological experts input the intersection relationship between horizon surface and fault surface; (b) the topological position relationship between the line entity and the entity is obtained by matching the prior knowledge through the rule base; and (c) is the point entity obtained by the rule base matching for the intersection of line entities, and the entities with the same attributes are merged through knowledge fusion to complete the first stage of knowledge reasoning task.

Figure 9 .
Figure 9. Second stage of knowledge reasoning, and the face entity and block entity obtained in the previous stage are used to obtain the subgraph isomorphic to the given graph model by subgraph isomorphism matching, and the matching entity and topological position relationship are recorded, to obtain the updated pure topological space knowledge graph.

Figure 10 .
Figure 10.Closed geological body in the actual work area of three-dimensional geological structure under the constraint of knowledge graph.

Figure 11 .
Figure 11.Complete process of knowledge reasoning constrained 3D construction modeling.It can be divided into two parts: knowledge reasoning participates in intersection estimation and three-dimensional geological body surface interpolation reconstruction closed three-dimensional geological body.

Figure 12 .
Figure 12.Comparison of boundary feature extraction methods.(a) Boundary characteristics guided by knowledge graph; (b) boundary characteristics of extrapolation interpolation.

Table 1 .
After obtaining the basic topological entities and relationship information of the knowledge graph, pattern matching in the knowledge base is carried out through sub-graph matching research.The planar entities and The algorithm of rule matching.

Table 2 .
The algorithm of mining algorithm.