Document-level geological space relation extraction method and system
By combining RoBERTa, convolutional neural network and graph convolutional network, cross-sentence spatial relationships in geological text are extracted, and the problem that the existing technology is difficult to capture document-level context information is solved, and efficient spatial relationship extraction is achieved, for geological Research provides strong support.
Patent Information
- Application Number
- CN202411348615.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The existing geological text spatial relationship extraction methods are difficult to identify long-distance dependencies between geological entities across sentences, and cannot effectively capture document-level context information, making it difficult to extract cross-sentence spatial relationships.
Using the document-level geological spatial relationship extraction method based on RoBERTa pre-trained language model, convolutional neural network and graph convolutional network, heterogeneous graphs are constructed by obtaining the fusion of semantic features and structural features of geological text data, and graph convolutional networks are used. Extract node features and transform them into entity-level semantic hierarchical maps to predict the spatial relationship between geological entities.
It effectively solves the problem of difficult to extract cross-sentence relationships, and can efficiently extract structured spatial relationship information from massive unstructured geological texts, providing a reliable data foundation for geological research.
Smart Images

Figure CN119250078A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of geological data mining, and in particular to a document-level geological spatial relationship extraction method and system. Background Art
[0002] With the development of information technology, a large amount of earth science information has been aggregated and integrated, and big data has become a new scientific paradigm in the field of earth science. In recent years, with the continuous development of technologies such as artificial intelligence and natural language processing, geological text mining tasks have gradually become a hot issue in the field of earth science. The predicates and phrases of various spatial relationships contained in massive unstructured geological text data describe the spatial position and relationship of geological objects in detail. These spatial relationship information can provide a reliable data basis for research such as scene reconstruction, spatial analysis and spatial reasoning of underground space.
[0003] Previous spatial relation methods for geological texts focus on sentence-level spatial relation extraction tasks, which predict the spatial relations between entities in a sentence. However, sentence-level spatial relation models have difficulty identifying spatial relations between entities across sentences. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that the current relationship extraction method is difficult to capture the long-distance dependency of the context in the geological text and complete the cross-sentence spatial relationship extraction, and propose a document-level geological spatial relationship extraction method, comprising the following steps:
[0005] S1. Acquire geological text data, define geological entity types and geological spatial relationship types, and annotate the geological text data according to the defined geological entity types and geological spatial relationship types;
[0006] S2. Construct a document-level geological spatial relationship extraction model based on the RoBERTa pre-trained language model, convolutional neural network, and graph convolutional network;
[0007] S3, inputting the annotated geological text data into the RoBERTa pre-trained language model to obtain semantic features with contextual semantic information;
[0008] S4, inputting semantic features into convolutional neural network to obtain structural features of text context;
[0009] S5, fusing the semantic features with the structural features to obtain fused features;
[0010] S6. Based on the fusion features, a heterogeneous graph is constructed, and the heterogeneous graph is processed using a graph convolutional network to extract the node features of the heterogeneous graph;
[0011] S7, according to the node features of the heterogeneous graph, converting the heterogeneous graph into an entity-level semantic hierarchy graph, and obtaining a geological entity node vector containing path reasoning information;
[0012] S8. Predict the spatial relationship between geological entities based on the geological entity node vectors to obtain structured spatial relationship triples.
[0013] Furthermore, the geological entity types include four categories: rocks, place names, strata, and geological structures;
[0014] The types of geological spatial relationships include topological relationships, absolute orientation relationships, and relative orientation relationships. Topological relationships are further divided into six types: inclusion, equality, connection, separation, coverage, and intersection. Absolute orientation relationships are further divided into nine types: east, west, south, north, southeast, northeast, southwest, northwest, and central. Relative orientation relationships are further divided into seven types: upper, lower, left, right, inside, top, and bottom.
[0015] Furthermore, the geological text data is annotated as follows:
[0016] Entity_label<Pos,Type,Sent_id>
[0017] Relation_label<Relation,Head,Tail,Evidence>
[0018] Among them, Entity_label represents the geological entity labeling, Pos represents the head and tail position index of the geological entity in the document, Type represents the geological entity type, and Sent_id represents the position index of the sentence where the geological entity is located in the document; Relation_label represents the geological spatial relationship labeling, Relation represents the geological spatial relationship type, Head represents the head entity index corresponding to the geological spatial relationship, Tail represents the tail entity index corresponding to the geological spatial relationship, and Evidence represents the sentence index involved in inferring the geological spatial relationship.
[0019] Furthermore, S3 is expressed as:
[0020] G sem =[g1,g2,…,g n ]=RoBERTa([x1,x2,…,x n ])
[0021] Among them G sem represents semantic features, x i Represents the geological text data after the i-th annotation, i = 1, 2, ..., n, g i For x iSemantic features obtained after passing through the RoBERTa encoder.
[0022] Furthermore, the fusion feature is expressed as:
[0023] H=[h1,h2,…,h k ]=[(g1:C struct ),(g2:C struct ),…,(g n :C struct )])
[0024] Among them, H represents the fusion feature, h k represents the fusion feature of the kth character, g n represents the nth semantic feature, C struct Indicates structural features.
[0025] Furthermore, the heterogeneous graph has three types of nodes: mention nodes, entity nodes, and sentence nodes; five types of edges: mention-mention edge, mention-entity edge, mention-sentence edge, entity-sentence edge, and sentence-sentence edge;
[0026] Mention node m i Representation for: Among them, w j ∈m i Indicates the mention of node m i Contains the character w j ,h j Indicates w j Fusion features, avg means taking the average value;
[0027] Entity Node e i Representation for: Among them, m j ∈e i Indicates m j Belongs to entity node e i The corresponding mentioned node;
[0028] Sentence nodes i Representation for: Among them, w k ∈s i Represents sentence node s i Contains the character w k ,h k Indicates w k fusion characteristics.
[0029] Furthermore, the graph convolutional network is used to process heterogeneous graphs as follows:
[0030]
[0031] in, represents the i-th node feature output by the l+1th layer of the graph convolutional network, σ(·) represents the activation function, x represents the edge type set, represents the set of neighbor nodes connected to node i through the x-th edge, is the trainable parameter matrix of the lth layer of the graph convolutional network, d n is the dimension of the node representation, represents the feature of the jth node output by the lth layer of the graph convolutional network, Represents the i-th node feature output by the l-th layer of the graph convolutional network.
[0032] Furthermore, S7 is specifically:
[0033] S71. Merge all the edges between different entities that connect the same two entities to obtain the edges in the entity-level graph. arrive The representation of a directed edge is defined as:
[0034]
[0035] Among them, e ij Represents the entity level graph arrive The representation of directed edges, Represents the entity e after graph convolution i The expression, e i represents the i-th entity, Represents the entity e after graph convolution j The expression, e j represents the jth entity, σ(·) represents the activation function, and W q and b q is a trainable parameter, [;] is a concatenation operator;
[0036] S72. According to the edge representation, the path of the head entity and the tail entity passing through another entity is obtained, which is represented as follows:
[0037]
[0038] in, Represents the head entity e h With the tail entity e t Through the entity o The i-th path of ho , e ot , e to , e oh They are connected entities e h and e o、e o and e t 、e t and e o 、e o and e h The vector representation of the directed edges between ;
[0039] S73, using the head entity and the tail entity to search for information of different paths between the fused head entity and the tail entity, expressed as:
[0040]
[0041]
[0042] Among them, s i is the i-th path feature after merging the head and tail entities, [e h ;e i ] means e h and e i The concatenated vector, e h Indicates the head entity, e i represents the i-th entity, W l is a trainable parameter, α i represents the normalized attention weight of the ith path, P h,t Represents the final path information used to infer spatial relationships. Both represent natural index, s j Represents the j-th path feature after fusing the head and tail entities.
[0043] Furthermore, in S8, the spatial relationship between geological entities is predicted based on the geological entity node vectors and expressed as:
[0044] P(r|e h ,e t )=sigmoid(W b σ(W a I h,t +b a )+b b )
[0045]
[0046] Among them, P(r|e h ,e t ) represents the geological entity e h and e t The spatial relationship between a , W b Represent different weight coefficients, b a 、b bThey represent different biases, σ(·) represents the activation function, and I h,t represents the final vector representation used to predict the spatial relationship of geological entities, |e h -e t | means e h and e t The absolute value after subtraction, Indicates multiplication, m doc Represents a document node, which is obtained by taking the average of the vector representations of the sentence nodes;
[0047] According to the results of spatial relationship prediction, the target spatial relationship triplet (e h ,P(r|e h ,e t ),e t ).
[0048] The present invention also proposes a document-level geological spatial relationship extraction system, comprising:
[0049] A data acquisition module is used to acquire geological text data, define geological entity types and geological spatial relationship types, and annotate the geological text data according to the defined geological entity types and geological spatial relationship types;
[0050] Model building module, used to build a document-level geological spatial relationship extraction model based on the RoBERTa pre-trained language model, convolutional neural network, and graph convolutional network;
[0051] The semantic feature acquisition module is used to input the annotated geological text data into the RoBERTa pre-trained language model to obtain semantic features with contextual semantic information;
[0052] The structural feature acquisition module is used to input the semantic features into the convolutional neural network to obtain the structural features of the text context;
[0053] A feature fusion module is used to fuse semantic features with structural features to obtain fused features;
[0054] The heterogeneous graph construction and processing module is used to construct a heterogeneous graph based on fusion features, process the heterogeneous graph using a graph convolutional network, and extract node features of the heterogeneous graph;
[0055] A heterogeneous graph conversion module is used to convert the heterogeneous graph into an entity-level semantic hierarchical graph according to the node features of the heterogeneous graph, and obtain the geological entity node vector containing path reasoning information;
[0056] The spatial relationship triplet acquisition module is used to predict the spatial relationship between geological entities based on the geological entity node vectors and obtain structured spatial relationship triples.
[0057] The beneficial effects brought by the technical solution provided by the present invention are:
[0058] The present invention proposes a document-level geological spatial relationship extraction method and system based on graph convolutional network. First, the semantic features and structural features of geological text data are obtained and integrated. Based on the method of building heterogeneous graphs, the graph convolutional network is used to capture non-local grammar and context information, and an entity-level semantic hierarchy graph is constructed through semantic interaction to model the potential relationship reasoning path between entities and predict the spatial relationship between geological entities. This method can effectively solve the problem of long-distance dependency and cross-sentence relationship being difficult to extract, and then efficiently extract structured spatial relationship information from massive unstructured geological texts, providing strong support for solving theoretical and practical problems in geological cognition, prediction, decision-making and evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a flow chart of a method for extracting geological spatial relationships at the document level according to an embodiment of the present invention;
[0060] Figure 2 Schematic diagram of the structure of a convolutional neural network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0061] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0062] A flowchart of a document-level geological spatial relationship extraction method according to an embodiment of the present invention is shown in FIG. Figure 1 , specifically including the following steps:
[0063] S1. Acquire geological text data, define geological entity types and geological spatial relationship types, and annotate the geological text data according to the defined geological entity types and geological spatial relationship types.
[0064] Specifically, it is first necessary to collect geological text data containing different years and covering multiple regions. The embodiment of the present invention collects high-quality geological survey reports with a wide range of years and covering multiple regions from the website of the National Geological Archives of the China Geological Survey as the data basis; the collected geological survey reports are cleaned by deleting charts and special characters.
[0065] Determine the geological entity type and geological spatial relationship type and annotate the acquired geological text data. And divide the data set into training set, validation set and test set according to a certain ratio.
[0066] Among them, the geological entity types include four categories: rocks, place names, strata, and geological structures. For example, "hornblende schist" and "shallow granular rock" belong to rocks, "Geren Co tectonic belt" belongs to geological structures, "Laga Formation" and "Quehala Group" belong to strata, and "Linzhou Belt" belongs to place names. The geological spatial relationship types include three categories: topological relationship, absolute orientation relationship, and relative orientation relationship. The topological relationship is further divided into six types: inclusion, equality, connection, separation, coverage, and intersection. The absolute orientation relationship is further divided into nine types: east, west, south, north, southeast, northeast, southwest, northwest, and central. The relative orientation relationship is further divided into seven types: top, bottom, left, right, inside, top, and bottom. For example, "periphery", "outside", and "periphery" are classified as separation in topological relationships, "interlaced", "interlayered", and "truncation" are classified as intersections in topological relationships, "east", "eastward", and "east end" are classified as the east in absolute orientation relationships, and "bottom" and "bottom end" are classified as the bottom in relative orientation relationships.
[0067] Specifically, data labeling needs to complete two parts of labeling: Entity_label and Relation_label, as shown below:
[0068] (1)Entity_label<Pos,Type,Sent_id>
[0069] (2)Relation_label<Relation,Head,Tail,Evidence>
[0070] Among them, Entity_label represents the geological entity labeling, which includes three parts: Pos represents the geological entity index, Type represents the geological entity type, and Sent_id represents the position index of the sentence where the geological entity is located in the document. For example, when the sentence where the geological entity is located is the second sentence in the document, Sent_id is 2. Relation_label represents the geological spatial relationship labeling, which includes four parts: Relation represents the geological spatial relationship type, Head represents the head entity index corresponding to the geological spatial relationship, Tail represents the tail entity index corresponding to the geological spatial relationship, and Evidence represents the sentence index involved in inferring the geological spatial relationship. For example, the sentences involved in the geological spatial relationship are the second and third sentences, and Evidence is [2,3].
[0071] After the data is labeled, it is divided into training set, validation set and test set in a ratio of 7:2:1.
[0072] S2. Construct a document-level geological spatial relationship extraction model based on the RoBERTa pre-trained language model, convolutional neural network and graph convolutional network.
[0073] S3. Input the annotated geological text data into the RoBERTa pre-trained language model to obtain semantic features with contextual semantic information.
[0074] First, the sample is input into the RoBERTa pre-trained language model to obtain the character embedding vector with rich contextual information of the geological corpus, that is, the semantic feature. The text vectorization process is completed by RoBERTa as follows:
[0075] G sem =[g1,g2,…,g n ]=RoBERTa([x1,x2,…,x n ])
[0076] Among them G sem represents semantic features, x i Represents the geological text data after the i-th annotation, i = 1, 2, ..., n, g i For x i Semantic features obtained after passing through the RoBERTa encoder.
[0077] Suppose there is the following text: "The Nyainqentanglha Group is mainly composed of felsic mylonite. The group is interbedded with amphibolite, hornblende schist, surrounding rock..." After the text passes through the RoBERTa encoder, each character such as "Nian" and "Qing" can get a corresponding vector with contextual semantic information.
[0078] S4. Input the semantic features into the convolutional neural network to obtain the structural features of the text context. First, input the semantic features into the convolutional neural network, refer to Figure 2 , Figure 2 This is a simplified diagram of the structure of the convolutional neural network of the embodiment of the present invention. Different scale features are extracted by convolution kernels of different sizes, and the features of different scales are pooled. The multi-scale features after pooling are fused together to obtain a multi-scale feature vector, and finally the structural features are obtained by Dropout operation. The input of CNN is the output embedding matrix G of the RoBERTa model. sem =[g1,g2,…,g n ], the dimension is [batch_size, Maxlen-2, 768], where Maxlen-2 is the number of Chinese characters in a sentence and 768 is the dimension of the embedding vector corresponding to each character. The output of CNN is C struct =CNN([g1,g2,…,g n ]), where C struct For all Chinese characters in the same sentence, the same structural features are assigned to them.
[0079] S5. Fuse the semantic features with the structural features to obtain fused features. Generate a fused feature vector for each Chinese character. The fused vector is expressed as follows:
[0080] H=[h1,h2,…,h k ]=[(g1:C struct ),(g2:C struct ),…,(g n :C struct )])
[0081] Among them, H represents the fusion feature, h k represents the kth fusion feature, g n represents the nth semantic feature, C struct express
[0082] Take "The Nyainqentanglha Group is mainly composed of felsic mylonite. The rock group is interbedded with amphibolite, hornblende schist, surrounding rock..." as an example. After the structural feature extraction, the characters "nian" and "qing" can obtain a feature vector with context structure. At the same time, the structural features of each character in the sentence "The Nyainqentanglha Group is mainly composed of felsic mylonite" are the same. Finally, each character will be represented by a vector that integrates semantic features and structural features.
[0083] S6. Based on the fusion features, a heterogeneous graph is constructed, and the graph convolutional network is used to process the heterogeneous graph and extract the node features of the heterogeneous graph. The heterogeneous graph is used to simulate the complex interactive relationship of the context.
[0084] The heterogeneous graph has three types of nodes: mention nodes, entity nodes, and sentence nodes, and five types of edges: mention-mention edge, mention-entity edge, mention-sentence edge, entity-sentence edge, and sentence-sentence edge.
[0085] The mention node is a model of different representations of geological entities in the document. i The vector representation of n mi is obtained by j The fusion features of are averaged and are Among them, w j ∈m i Indicates the mention of node m i Contains the character w j ,h j Indicates w j The fusion features of , avg means taking the average value.
[0086] Entity Node e i Representation is the average representation of all mentioned nodes corresponding to the geological entity, which is Among them, m j∈e i Indicates m j Belongs to entity node e i The corresponding mentioned node.
[0087] Sentence nodes i Representation is the character w contained in the sentence j The fusion features of are averaged and are Among them, w k ∈s i Represents sentence node s i Contains the character w k ,h k Indicates w k fusion characteristics.
[0088] "The Nyainqentanglha Group is mainly composed of felsic mylonite. The group is intercalated with amphibolite, hornblende schist, and surrounding rock... Its eastern part is..." Taking this text as an example, the geological entity "Nyainqentanglha Group" includes "Nyainqentanglha Group" and "Nyainqentanglha Group" includes multiple geological mentions such as "the group" and "its", and each sentence is also a node in the heterogeneous graph. An edge, namely, a mention-mention edge, will be established between the two mention nodes of "the group" and "its", and "the group" will establish an edge, namely, a mention-sentence edge, with its corresponding sentence node, and the same applies to other edges.
[0089] After constructing the heterogeneous graph, the global heterogeneous graph is convolved by stacking l layers of R-GCN (Relational graph convolutional network), and the forward pass of the nodes in the l+1th layer is updated as follows:
[0090]
[0091] in, represents the i-th node feature output by the l+1th layer of the graph convolutional network, σ(·) represents the activation function, X represents the edge type set, represents the set of neighbor nodes connected to node i through the x-th edge, is the trainable parameter matrix of the lth layer of the graph convolutional network, d n is the dimension of the node representation, represents the feature of the jth node output by the lth layer of the graph convolutional network, Represents the i-th node feature output by the l-th layer of the graph convolutional network.
[0092] S7. According to the node features of the heterogeneous graph, the heterogeneous graph is converted into an entity-level semantic hierarchical graph to obtain the geological entity node vector containing path reasoning information.
[0093] S71. Merge all the edges between different entities that connect the same two entities to obtain the edges in the entity-level graph. arrive The representation of a directed edge is defined as:
[0094]
[0095] Among them, e ij Represents the entity level graph arrive The representation of directed edges, Represents the entity e after graph convolution i The expression, e i represents the i-th entity, Represents the entity e after graph convolution j The expression, e j represents the jth entity, σ(·) represents the activation function, and W q and b q is a trainable parameter, and [;] is a concatenation operator.
[0096] S72. According to the edge representation, the path of the head entity and the tail entity passing through another entity is obtained, which is represented as follows:
[0097]
[0098] in, Represents the head entity e h With the tail entity e t Through the entity o The i-th path of ho , e ot , e to , e oh They are connected entities e h and e o 、e o and e t 、e t and e o 、e o and e h The vector representation of the directed edges between ;
[0099] S73, using the head entity and the tail entity to search for information of different paths between the fused head entity and the tail entity, expressed as:
[0100]
[0101] Among them, s i is the i-th path feature after merging the head and tail entities, [e h ;e i ] means e h and ei The concatenated vector, W l is a trainable parameter, α i represents the normalized attention weight of the ith path, P h,t Represents the final path information used to infer spatial relationships. Both represent natural index, s j Represents the j-th path feature after fusing the head and tail entities.
[0102] S8. Predict the spatial relationship between geological entities based on the geological entity node vectors to obtain structured spatial relationship triples.
[0103] The spatial relationship between geological entities predicted by geological entity node vectors is expressed as:
[0104] P(r|e h ,e t )=sigmoid(W b σ(W a I h,t +b a )+b b )
[0105]
[0106] Among them, P(r|e h ,e t ) represents the geological entity e h and e t The spatial relationship between a , W b Represent different weight coefficients, b a 、b b They represent different biases, σ(·) represents the activation function, and I h,t represents the final vector representation used to predict the spatial relationship of geological entities, |e h -e t | means e h and e t The absolute value after subtraction, Indicates multiplication, m doc Represents a document node, which is obtained by taking the average of the vector representations of the sentence nodes;
[0107] According to the results of spatial relationship prediction, the target spatial relationship triplet (e h ,P(r|e h ,e t ),e t ).
[0108] P(r|e h ,e t)=sigmoid(W b σ(W a I h,t +b a )+b b )
[0109]
[0110] "The Nyainqentanglha Group is mainly composed of felsic mylonite. The group is interbedded with amphibolite, hornblende schist, and surrounding rocks..." Taking this text as an example, after spatial relationship prediction, we can get triplets such as <Nyainqentanglha Group, including felsic mylonite>, <Nyainqentanglha Group, including felsic mylonite>, and <Nyainqentanglha Group, including hornblende schist>.
[0111] The embodiment of the present invention further provides a document-level geological spatial relationship extraction system, comprising:
[0112] A data acquisition module is used to acquire geological text data, define geological entity types and geological spatial relationship types, and annotate the geological text data according to the defined geological entity types and geological spatial relationship types;
[0113] Model building module, used to build a document-level geological spatial relationship extraction model based on the RoBERTa pre-trained language model, convolutional neural network, and graph convolutional network;
[0114] The semantic feature acquisition module is used to input the annotated geological text data into the RoBERTa pre-trained language model to obtain semantic features with contextual semantic information;
[0115] The structural feature acquisition module is used to input the semantic features into the convolutional neural network to obtain the structural features of the text context;
[0116] A feature fusion module is used to fuse semantic features with structural features to obtain fused features;
[0117] The heterogeneous graph construction and processing module is used to construct a heterogeneous graph based on fusion features, process the heterogeneous graph using a graph convolutional network, and extract node features of the heterogeneous graph;
[0118] A heterogeneous graph conversion module is used to convert the heterogeneous graph into an entity-level semantic hierarchical graph according to the node features of the heterogeneous graph, and obtain the geological entity node vector containing path reasoning information;
[0119] The spatial relationship triplet acquisition module is used to predict the spatial relationship between geological entities based on the geological entity node vectors and obtain structured spatial relationship triples.
[0120] The embodiment of the present invention assumes the following geological text information:
[0121] [1] Jingzhushan Formation. This formation is distributed in Bangong Co, Gaize, Bange, Luolong, Basu and other places. It has a small exposed area and relatively complex lithology.
[0122] [2] Its upper part is mainly composed of fine clastic rocks, which generally taper upwards and are in unconformable contact with the Triassic, Jurassic, and Lower Cretaceous.
[0123] [3] The middle part is purple-red complex conglomerate, sandstone, lithic sandstone and gravelly limestone, while the lower part is limestone containing freshwater bivalves.
[0124] [4] Its base is mainly composed of gray-yellow conglomerate interbedded with sandstone, siltstone, limestone and angioclase calcite. The calcite has irregular grains, polysynthetic twins and wavy extinction.
[0125] [5] The top of this group is composed of purple-red conglomerate, sandstone and siltstone, as well as a small amount of silt-grade debris. Most of the debris are in sub-angular or sub-circular original forms and are spatially layered.
[0126] The geological entities that can be extracted from the geological text include "Jingzhushan Formation", "Bangong Co", "Gaze", "Bange", "Triassic", "Jurassic", "Lower Cretaceous", "complex conglomerate", "sandstone", "limestone", etc. The spatial relationship words include "distributed in (including)", "upper part", "middle part", "top", "bottom", etc. The entity pairs that need to be judged are located in the sentence, such as "Jingzhushan Formation" and "Bangong Co", etc. There are a large number of spatial relationship entity pairs across sentences in the geological text, and the cross-sentence relationship is expressed by subject omission, abbreviation, reference, etc., such as "its (Jingzhushan Formation)" and "fine clastic rock" due to reference expression in the above text, and "Jingzhushan Formation" and "complex conglomerate" due to subject omission.
[0127] Based on the two extracted entity pairs, such as "Dewu Ka Lower Formation" and "silty microcrystalline limestone", the spatial relationship between the two can be calculated, and finally it can be determined that "lower part" is the relational word between "Dewu Ka Lower Formation" and "silty microcrystalline limestone", forming the <Dewu Ka Lower Formation, lower part, silty microcrystalline limestone> triplet.
[0128] The previous sentence-level spatial relationship extraction method is difficult to perform effective extraction when faced with such texts. Although this method can extract triplets such as <its, upper part, fine clastic rock>, <its, contact, Triassic>, and <it, bottom, conglomerate and siltstone>, due to the limitations of sentence-level research, it is difficult to determine which geological entity "its", "it" and "this group" specifically refer to. Similarly, when faced with sentences with omitted subjects, the model cannot extract the head entity, and all relevant spatial relationship description information except the first sentence is omitted.
[0129] However, the method of the present invention can effectively identify complex geological entities with nested structures appearing in geological texts, such as "lithic sandstone intercalated with gravel limestone", "sandstone intercalated with siltstone", etc., and can overcome the limitations of Chinese expression habits such as reference, subject omission and abbreviation in extracting cross-sentence relations. For example, "it", "it" and "this group" appearing in the text are all pronouns and abbreviations of "Jingzhushan Formation", thereby obtaining triples containing spatial relationship information, such as <Bangong Co, including, Jingzhushan Formation>, <Jingzhushan Formation, upper part, fine clastic rock>, <Jingzhushan Formation, bottom, sandstone intercalated with siltstone>, <Jingzhushan Formation, top, conglomerate>, etc.
[0130] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A document-level geological spatial relationship extraction method, characterized in that: The following steps are involved: S1. Acquire geological text data, define geological entity types and geological spatial relationship types, and annotate the geological text data according to the defined geological entity types and geological spatial relationship types; S2. Construct a document-level geological spatial relationship extraction model based on the RoBERTa pre-trained language model, convolutional neural network, and graph convolutional network; S3, inputting the annotated geological text data into the RoBERTa pre-trained language model to obtain semantic features with contextual semantic information; S4, inputting semantic features into convolutional neural network to obtain structural features of text context; S5, fusing the semantic features with the structural features to obtain fused features; S6. Based on the fusion features, a heterogeneous graph is constructed, and the heterogeneous graph is processed using a graph convolutional network to extract the node features of the heterogeneous graph; S7, according to the node features of the heterogeneous graph, converting the heterogeneous graph into an entity-level semantic hierarchy graph, and obtaining a geological entity node vector containing path reasoning information; S8. Predict the spatial relationship between geological entities based on the geological entity node vectors to obtain structured spatial relationship triples.
2. A document-level geological spatial relationship extraction method according to claim 1, characterized in that: The types of geological entities include rocks, place names, strata, and geological structures; The types of geological spatial relationships include topological relationships, absolute orientation relationships, and relative orientation relationships. Topological relationships are further divided into six types: inclusion, equality, connection, separation, coverage, and intersection. Absolute orientation relationships are further divided into nine types: east, west, south, north, southeast, northeast, southwest, northwest, and central. Relative orientation relationships are further divided into seven types: upper, lower, left, right, inside, top, and bottom.
3. A document-level geological spatial relationship extraction method according to claim 1, characterized in that: The annotation of geological text data is represented as follows: Entity_label<Pos,Type,Sent_id> Relation_label<Relation,Head,Tail,Evidence> Among them, Entity_label represents the geological entity label, Pos represents the head and tail position index of the geological entity in the document, Type represents the geological entity type, and Sent_id represents the position index of the sentence where the geological entity is located in the document; Relation_label represents the geological spatial relationship label, Relation represents the geological spatial relationship type, Head represents the head entity index corresponding to the geological spatial relationship, Tail represents the tail entity index corresponding to the geological spatial relationship, Evidence_id represents the geological spatial relationship type, and Evidence_id represents the geological spatial relationship type. e Represents the sentence index involved in inferring geological spatial relationships.
4. A document-level geological spatial relationship extraction method according to claim 1, characterized in that: S3 is represented by: G sem =[g1,g2,...,g n ]=RoBERTa([x1,x2,...,x n ]) Among them G sem represents semantic features, x i Represents the geological text data after the i-th annotation, i = 1, 2, ..., n, g i For x i Semantic features obtained after passing through the RoBERTa encoder.
5. A document-level geological spatial relationship extraction method according to claim 1, characterized in that: The fusion feature is expressed as: H=[h1,h2,...,h k ]=[(g1:C struct ),(g2:C struct ),...,(g n :C struct )]) Among them, H represents the fusion feature, h k represents the fusion feature of the kth character, g n represents the nth semantic feature, C struct Indicates structural features.
6. A document-level geological spatial relationship extraction method according to claim 1, characterized in that: The heterogeneous graph has three types of nodes: mention nodes, entity nodes, and sentence nodes; five types of edges: mention-mention edge, mention-entity edge, mention-sentence edge, entity-sentence edge, and sentence-sentence edge; Mention node m i Representation for: Among them, w j ∈m i Indicates the mention of node m i Contains the character w j ,h j Indicates w j Fusion features, avg means taking the average value; Entity Node e i Representation for: Among them, m j ∈e i Indicates m j Belongs to entity node e i The corresponding mentioned node; Sentence nodes i Representation for: Among them, w k ∈s i Represents sentence node s i Contains the character W k ,h k Indicates w k fusion characteristics.
7. A document-level geological spatial relationship extraction method according to claim 6, characterized in that: Using graph convolutional networks to process heterogeneous graphs is represented as: in, represents the i-th node feature output by the 1+1 layer of the graph convolutional network, σ(·) represents the activation function, X represents the edge type set, represents the set of neighbor nodes connected to node i through the x-th edge, is the trainable parameter matrix of the lth layer of the graph convolutional network, d n is the dimension of the node representation, represents the feature of the jth node output by the lth layer of the graph convolutional network, Represents the i-th node feature output by the l-th layer of the graph convolutional network.
8. A document-level geological spatial relationship extraction method according to claim 1, characterized in that: S7 is specifically: S71. Merge all the edges between different entities that connect the same two entities to obtain the edges in the entity-level graph. arrive The representation of a directed edge is defined as: Among them, e ij Represents the entity level graph arrive The representation of directed edges, Represents the entity e after graph convolution i The expression, e i represents the i-th entity, Represents the entity e after graph convolution j The expression, e j represents the jth entity, σ(·) represents the activation function, W q and b q is a trainable parameter, [;] is a concatenation operator; S72. According to the edge representation, the path of the head entity and the tail entity passing through another entity is obtained, which is represented as follows: in, Represents the head entity e h With the tail entity e t Through the entity o The i-th path of ho , e ot , e to , e oh They are connected entities e h and e o 、e o and e t 、e t and e o 、e o and e h The vector representation of the directed edges between ; S73, using the head entity and the tail entity to search for information of different paths between the fused head entity and the tail entity, expressed as: Among them, s i is the i-th path feature after merging the head and tail entities, [e h ;e i ] means e h and e i The concatenated vector, e h Indicates the head entity, e i represents the i-th entity, W1 is a trainable parameter, α i represents the normalized attention weight of the ith path, P h,t Represents the final path information used to infer spatial relationships. Both represent natural index, s j Represents the j-th path feature after fusing the head and tail entities.
9. A document-level geological spatial relationship extraction method according to claim 8, characterized in that: In S8, the spatial relationship between geological entities predicted based on the geological entity node vector is expressed as: P(r|e h ,e t )=sigmoid(W b σ(W a I h,t +b a )+b b ) Among them, P(r|e h , e t ) represents the geological entity e h and e t The spatial relationship between a , W b Represent different weight coefficients, b a , b b They represent different biases, σ(·) represents the activation function, I h,t represents the final vector representation used to predict the spatial relationship of geological entities, |e h -e t | means e h and e t The absolute value after subtraction, Indicates multiplication, m doc Represents a document node, which is obtained by taking the average of the vector representations of the sentence nodes; According to the results of spatial relationship prediction, the target spatial relationship triplet (e h , P(r|e h , e t ), e t ).
10. A document-level geological spatial relationship extraction system, characterized in that: include: A data acquisition module is used to acquire geological text data, define geological entity types and geological spatial relationship types, and annotate the geological text data according to the defined geological entity types and geological spatial relationship types; Model building module, used to build a document-level geological spatial relationship extraction model based on the RoBERTa pre-trained language model, convolutional neural network, and graph convolutional network; The semantic feature acquisition module is used to input the annotated geological text data into the RoBERTa pre-trained language model to obtain semantic features with contextual semantic information; The structural feature acquisition module is used to input the semantic features into the convolutional neural network to obtain the structural features of the text context; A feature fusion module is used to fuse semantic features with structural features to obtain fused features; The heterogeneous graph construction and processing module is used to construct a heterogeneous graph based on fusion features, process the heterogeneous graph using a graph convolutional network, and extract node features of the heterogeneous graph; A heterogeneous graph conversion module is used to convert the heterogeneous graph into an entity-level semantic hierarchical graph according to the node features of the heterogeneous graph, and obtain the geological entity node vector containing path reasoning information; The spatial relationship triplet acquisition module is used to predict the spatial relationship between geological entities based on the geological entity node vectors and obtain structured spatial relationship triples.
Citation Information
Patent Citations
Multi-task document-level relation extraction method and device based on support sentence prediction
CN114942977A
Induction relation prediction method fusing subgraph enhancement and relation semantics and application
CN116415661A
Chinese underground engineering field named entity identification method
CN116992877A
Column semantic recognition method and system based on context awareness of GCN and RoBERTa
CN117312989A
Multimodal document information extraction method based on graph neural network, device and medium
WO2023138023A1