Fine-grained Chinese geological entity spatial relationship joint extraction method and system
By establishing a fine-grained geological entity and spatial relationship classification system and ERNIE-BIGRU model in the Chinese geology field, the accuracy of the spatial relationship extraction of entities in the Chinese geology field is solved, and efficient spatial relationship extraction and knowledge graph construction are achieved.
Patent Information
- Application Number
- CN202411438976.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-18
AI Technical Summary
The existing technology is difficult to achieve accurate extraction of physical spatial relationships in the field of Chinese geology, and faces the problems of low information coverage and high complexity of characteristic engineering.
A fine-grained Chinese geological entity spatial relationship joint extraction method is proposed. By establishing a classification system for geological entities and spatial relationships, collecting geological corpus data for annotation, and building an ERNIE-BIGRU model for training, to achieve accurate extraction of spatial relationships.
It realizes the precise extraction of entities and spatial relationships in the geological field, improves the model's memory and reasoning ability of knowledge, and provides important value for geoscience tasks.
Smart Images

Figure CN119474248A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of integrated transportation technology, and in particular to a method and system for jointly extracting fine-grained Chinese geological entity spatial relations. Background Art
[0002] Information extraction is the process of obtaining unstructured data from unstructured information. Relation extraction is the core content of information extraction, which aims to extract the relationship between entity pairs in the text, and provide rich data support for the construction of knowledge graphs and downstream applications of knowledge graphs, such as knowledge question and answer, semantic search, intelligent recommendation and other natural language processing tasks. Relation extraction in the field of geology is to extract important geological entities and the relationships between entities from geological texts, such as stratigraphic entities and the contact relationship, spatial relationship, and affiliation between stratigraphic entities. This step is also the basis of various tasks such as geological knowledge graphs and knowledge question and answer. It is an important means to achieve structural reconstruction of unstructured geological data in texts, and can obtain valuable information from text data.
[0003] At present, there are many types of relationship extraction methods, including rule-based and dictionary-based methods and traditional machine learning-based methods. Rule-based and dictionary-based methods identify semantic relationships between entities in texts by pre-defining rules and dictionaries, but they require high manpower costs, and the rules themselves may not be complete enough to cover all situations, and the information coverage rate is low. Traditional machine learning-based methods rely on large-scale annotated corpora. Although there is no need to manually write rules, the complexity of feature engineering is high. In recent years, with the development of artificial intelligence, more efficient and accurate deep learning methods have emerged. They automatically learn sentence features by building neural network models without complex feature engineering, but there are few studies on entity relationship extraction in the field of Chinese geology. Summary of the invention
[0004] The present application provides a method and system for joint extraction of fine-grained Chinese geological entity spatial relationships to solve the problem of accurate extraction of entity spatial relationships in the field of Chinese geology.
[0005] According to the first aspect, an embodiment provides a method for joint extraction of fine-grained Chinese geological entity spatial relationships, the method comprising:
[0006] Step S1, establishing a fine-grained Chinese geological entity and spatial relationship classification system, wherein the classification system includes geological entity classification and spatial relationship classification;
[0007] Step S2, collecting geological corpus data, and annotating the data based on the classification system to obtain a geological entity spatial relationship corpus;
[0008] Step S3, constructing an ERNIE-BIGRU model for joint extraction of spatial relations, the ERNIE-BIGRU model comprising an ERNIE layer and a bidirectional GRU layer, the ERNIE layer being used to obtain a vector representation of each word based on context calculation according to an input sentence, and the bidirectional GRU layer being used to obtain a non-normalized probability distribution of each word for each label according to the vector of the input word, thereby obtaining a relation classification result;
[0009] Step S4, dividing the obtained geological entity spatial relationship corpus into a training set and a test set, and using the training set and the test set to train and test the constructed ERNIE-BIGRU model to obtain the best model performance.
[0010] Furthermore, the step S1 specifically includes:
[0011] The geological entity classification includes stratigraphic entity, geological structure entity, rock entity and place name entity;
[0012] The spatial relationship classification includes two categories: topological relationship and directional relationship. The topological relationship is divided into inclusion relationship, intersection relationship and stratigraphic contact relationship. The directional relationship describes the spatial order relationship between two entities, including relative spatial relationship and absolute spatial relationship.
[0013] Furthermore, the step S2 specifically includes:
[0014] Step S21, collecting geological report corpus data and preprocessing to obtain pre-labeled data;
[0015] Step S22, creating labels for each category in the established classification system, and labeling the pre-labeled data based on the created labels to obtain a geological entity spatial relationship corpus.
[0016] Furthermore, step S21 specifically includes:
[0017] Obtain geological report data, clean the report, delete web page tags, tables, special characters, and noisy text information not related to geology, deduplicate and segment the cleaned text corpus, and store it to obtain pre-annotated data with unified standards.
[0018] Furthermore, step S22 specifically includes:
[0019] Based on the open source text annotation tool Doccano platform, create a sequence annotation project, create two types of labels: entity and spatial relationship according to the established classification system, import the pre-annotated data into the project to annotate entities and spatial relationships, and export the annotated project as a corpus.
[0020] Furthermore, the step S3 specifically includes:
[0021] The ERNIE layer adopts the ERNIE 3.0 model; the BIGRU layer includes a reset gate and an update gate, the reset gate controls the extent to which the state information of the hidden layer at the previous moment is accepted into the current candidate hidden layer; the update gate controls the extent to which the state information of the hidden layer at the previous moment is written into the current hidden layer.
[0022] Furthermore, the step S4 specifically includes:
[0023] The Bootstrapping method is used to divide the training and test data sets, and the training and test data sets are divided according to the preset ratio; the optimal parameters of the ERNIE-BIGRU model are configured, and the set parameters include sequence length, batch size and learning rate.
[0024] According to the second aspect, an embodiment provides a fine-grained Chinese geological entity spatial relationship joint extraction system, the system comprising:
[0025] A classification system construction module is used to establish a fine-grained Chinese geological entity and spatial relationship classification system, wherein the classification system includes geological entity classification and spatial relationship classification;
[0026] A corpus construction module is used to collect geological corpus data and annotate the data based on the classification system to obtain a geological entity spatial relationship corpus;
[0027] An extraction model construction module, used to construct an ERNIE-BIGRU model for joint extraction of spatial relations, wherein the ERNIE-BIGRU model includes an ERNIE layer and a bidirectional GRU layer, wherein the ERNIE layer is used to obtain a vector representation of each word based on context calculation according to an input sentence, and the bidirectional GRU layer is used to obtain a non-normalized probability distribution of each word for each label according to the vector of the input word, thereby obtaining a relationship classification result;
[0028] The model training module is extracted to divide the training set and the test set based on the obtained geological entity spatial relationship corpus, and use the training set and the test set to train and test the constructed ERNIE-BIGRU model to obtain the best model performance.
[0029] According to the third aspect, an embodiment provides an electronic device, the device comprising: a processor and a memory;
[0030] The memory is used to store one or more program instructions;
[0031] The processor is used to run one or more program instructions to execute the steps of a method for jointly extracting fine-grained Chinese geological entity spatial relationships as described in any of the above items.
[0032] According to the fourth aspect, an embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a method for jointly extracting fine-grained Chinese geological entity spatial relationships as described in any one of the above items are implemented.
[0033] This application provides a fine-grained Chinese geological entity spatial relationship joint extraction method and system, which has the following beneficial effects:
[0034] (1) The fine-grained Chinese geological entity spatial relationship joint extraction method based on the ERNIE-BIGRU model proposed in this paper can achieve accurate extraction of geological entities and spatial relationships, providing important value for earth science tasks;
[0035] (2) Based on the fine-grained problem of general relationship classification methods, the present invention studies the classification standard of spatial relationships in the geological field, integrates literature knowledge to perform fine-grained division of spatial relationships between geological entities and formulates a standardized relationship annotation system;
[0036] (3) The JSON format geological entity spatial relationship corpus constructed by the present invention has a hierarchical structure and can clearly represent the relationship between text and annotations. Each text paragraph can contain multiple annotations, and each annotation contains its starting position and ending position in the text, as well as the category of the annotation. It is easy to understand and parse, and can be interacted and shared between different platforms and programming languages.
[0037] (4) ERNIE 3.0 used in the present invention is the first to introduce large-scale knowledge graphs into the tens of billions of pre-trained models, and proposes a parallel pre-training model method for massive unsupervised texts and large-scale knowledge graphs. The entities and relationships in the knowledge graph are embedded into the pre-trained language model, enabling it to learn the semantic relationships in the real world, greatly improving the model's ability to remember and reason about knowledge, and achieving the best results on a large number of Chinese tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A flowchart of a method for joint extraction of fine-grained Chinese geological entity spatial relations provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of a Doccano platform annotation example in a fine-grained Chinese geological entity spatial relationship joint extraction method provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the corpus format in a corpus in a fine-grained Chinese geological entity spatial relationship joint extraction method provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of the working principle of the ERNIE layer in a fine-grained Chinese geological entity spatial relationship joint extraction method provided by an embodiment of the present invention;
[0042] Figure 5 An overall framework diagram of an ERNIE-BIGRU model for a spatial relationship example sentence in a fine-grained Chinese geological entity spatial relationship joint extraction method provided by an embodiment of the present invention;
[0043] Figure 6 A schematic diagram of the logical structure of a fine-grained Chinese geological entity spatial relationship joint extraction system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0045] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0046] The first embodiment of the present invention provides a fine-grained Chinese geological entity spatial relationship joint extraction method, which is combined with Figure 1 Provide detailed explanation.
[0047] like Figure 1 As shown, in step S1, a fine-grained Chinese geological entity and spatial relationship classification system is established, and the classification system includes geological entity classification and spatial relationship classification.
[0048] In this embodiment, according to the fine-grained problem of general relationship classification methods, the spatial relationship classification standard in the geological field is studied, and the spatial relationship between geological entities is fine-grainedly divided based on literature knowledge and a standardized relationship annotation system is established.
[0049] Geological entities are the core elements in geological texts and the basis for describing the relationships between geological entities. Entities are divided into four categories: geological structure entities, stratigraphic entities, rock entities, and place name entities. Formulating a relationship classification system is the premise and key to relationship extraction. The spatial relationships of geological entities are divided into two categories: topological relationships and directional relationships, which are further subdivided into 22 categories. Topological relationships are divided into inclusion relationships, intersection relationships, and stratigraphic contact relationships. Directional relationships describe the spatial order relationship between two entities, including relative spatial relationships and absolute spatial relationships.
[0050] The inclusion relationship includes "inclusion"; the intersection relationship includes "intersection"; the stratigraphic contact relationship includes "conformity", "unconformity", "parallel unconformity", "angular unconformity", "intrusive contact", "sedimentary contact", and "fault contact"; the relative spatial relationship includes "middle", "upper", "lower", "top", and "bottom"; the absolute spatial relationship includes "east", "west", "south", "north", "southeast", "northeast", "northwest", and "southwest". The specific classifications are shown in Tables 1 and 2.
[0051] Table 1
[0052]
[0053] Table 2
[0054]
[0055]
[0056] like Figure 1 As shown, in step S2, geological corpus data is collected, and data annotation is performed based on the classification system to obtain a geological entity spatial relationship corpus.
[0057] The above steps specifically include:
[0058] Step S21, collecting geological report corpus data and preprocessing to obtain pre-labeled data;
[0059] Step S22, creating labels for each category in the established classification system, and labeling the pre-labeled data based on the created labels to obtain a geological entity spatial relationship corpus.
[0060] In this embodiment, the selected geological report comes from the China National Geological Information Center. The report is cleaned to delete web page tags, tables, special characters, noise text unrelated to geology and other information. The cleaned text corpus is deduplicated and sentence-separated and stored in a TXT file to obtain pre-annotated data with unified standards.
[0061] The corpus in this embodiment takes into account the particularity of the geological field, covering the unique spatial relationships in geological texts such as "intrusion", "integration", and "pseudo-integration". The present invention uses a document-level corpus for pre-training, extracting only text paragraphs and ignoring lists, tables, and titles. The document-level corpus is used instead of a shuffled sentence-level corpus in order to extract sentences in long continuous sequences, and the quality of the selected sentences is largely determined by the effect of the pre-training process.
[0062] This embodiment is based on the open source text annotation tool Doccano platform, adopts a joint annotation method, annotates the preprocessed text data according to the established fine-grained geological spatial relationship type system, and exports the annotation results to form a corpus. The corpus format is as follows: Figure 3 .
[0063] Specifically, data annotation of the preprocessed text includes the following steps:
[0064] (1) Determine the annotation scheme for joint extraction. Since geological entities in geological texts are long, spatial relationships are complex, and sentences are long, joint extraction is achieved by predicting multiple sequences in the sequence annotation method.
[0065] As a preferred solution, this embodiment uses the sequence labeling method to achieve joint extraction by predicting multiple sequences. Create a sequence for each head entity and tail entity of each spatial relationship, record the starting position of the entity, and then create two sequences, one to record the non-entity position of the sentence (0), and the other to record the remaining position of the entity (I). The sequence size is the length of the sentence. There is an example sentence "The Gushan Formation is in the north of Wang'an and is intruded by granite". The entities that need to be identified in this sentence are Gushan Formation, Wang'an and Huanggangyan. Therefore, in the first sequence 0, except for the positions of these three entities, the remaining positions of the sentence are marked as 1; the second sequence I records the positions of these three entities except the head, and the positions of the other parts of the entity are marked as 1. After the entity sequence is created, the relationship triples are labeled. It is necessary to identify the starting positions of all entities in the sequence and mark them as 1 at the corresponding positions. The remaining positions of the entities can refer to sequence I. Examples of specific labeling situations are as follows. Figure 5 shown.
[0066] (2) Create a sequence annotation project on the Doccano platform. Based on this project, create four categories of entity labels, namely strata, geological structure, rock and place name. The 22 categories of spatial relationship labels are shown in Tables 1 and 2. Import the preprocessed TXT text into the project for annotation. The specific example is as follows: Figure 2 As shown, export the annotated project to json format, and export the annotation results to form a corpus. The corpus format is as follows Figure 3 As shown, each <"subject", "object"> entity has a corresponding "predicate" relationship type, and each sentence is not limited to a pair of triples.
[0067] As a preferred solution, the project export format in this embodiment is json, which has a hierarchical structure and can clearly represent the relationship between text and annotations. Each text paragraph can contain multiple annotations, and each annotation contains its starting and ending positions in the text, as well as the category of the annotation. It is easy to understand and parse, and can be interacted and shared between different platforms and programming languages. Almost all programming languages support the parsing and generation of json, so data transmission, data processing and analysis can be easily performed between different systems and applications.
[0068] like Figure 1 As shown, in step S3, an ERNIE-BIGRU model for joint extraction of spatial relations is constructed, and the ERNIE-BIGRU model includes an ERNIE layer and a bidirectional GRU layer. The ERNIE layer is used to obtain a vector representation of each word based on context calculation according to the input sentence, and the bidirectional GRU layer is used to obtain a non-normalized probability distribution of each word for each label according to the vector of the input word, thereby obtaining a relationship classification result.
[0069] In this embodiment, the ERNIE-BIGRU model is constructed as a framework for joint extraction of spatial relations, and the overall structure includes two parts: the ERNIE layer and the bidirectional GRU layer. The sentence is input into the ERNIE pre-trained language model layer, and after obtaining the vector representation of each word based on context calculation, the vector of the word is input into the BIGRU layer to obtain the non-normalized probability distribution of each word for each label, which means that for each word, the model will give the probability distribution of its belonging to various relationship labels, rather than just a classification probability value. The final relationship classification is usually obtained by jointly inferring the probability distribution of all words in the entire sentence, and finally obtaining the optimal relationship classification.
[0070] The ERNIE model improves the masking mechanism and adds two new masking strategies, one is the phrase-level strategy and the other is the entity-level strategy. ERNIE treats a phrase or entity as a unit, and all characters in the same unit are masked at the same time during the pre-training stage. This method implicitly learns the prior semantic knowledge and long semantic dependencies of the entity, helping the model to learn richer semantic information. In addition, when learning new tasks, it ensures that the model does not forget the previously learned knowledge; ERNIE embeds the entities and relations in the knowledge graph into the language model by introducing a large-scale knowledge graph and using a parallel pre-training model method. This enables ERNIE to learn real-world semantic relationships, thereby improving the model's memory and reasoning ability for knowledge.
[0071] ERNIE 3.0 used in this embodiment first introduced a large-scale knowledge graph into the tens of billions of pre-trained models, proposed a parallel pre-training model method for massive unsupervised text and large-scale knowledge graphs, embedded entities and relationships in the knowledge graph into the pre-trained language model, and enabled it to learn the semantic relationships of the real world, greatly improving the model's ability to remember and reason about knowledge, and achieved the best results on a large number of Chinese tasks. Its specific structure is as follows: Figure 4 shown.
[0072] The GRU described in this embodiment only includes two control gates: a reset gate and an update gate, which has a simpler structure, fewer parameters, and faster network training and convergence. The reset gate controls the extent to which the state information of the previous hidden layer is accepted into the current candidate hidden layer; the update gate controls the extent to which the state information of the previous hidden layer is written into the current hidden layer.
[0073] like Figure 1 As shown, in step S4, a training set and a test set are divided based on the obtained geological entity spatial relationship corpus, and the constructed ERNIE-BIGRU model is trained and tested using the training set and the test set to obtain the best model performance.
[0074] In this embodiment, in order to ensure that the evaluation of the model is accurate and reliable, the Bootstrapping method is used to divide the data set. The Bootstrapping method is a random repeated sampling method with replacement. The data set is repeatedly extracted the same number of times as the size of the data set to construct a new sample that can represent the distribution of the parent sample as the training data set, and the remaining unsampled samples are used as the test data set, which ensures the consistency of the original data set and the training data set, and greatly utilizes the valuable data resources.
[0075] Set appropriate sequence length, batch size, and learning rate for the ERNIE-BIGRU model to obtain the best model performance. Set the parameters of the ERNIE-BIGRU model, where the learning rate determines the update amplitude of the model parameters in each iteration; when processing text data, the text needs to be converted into a fixed-length sequence, the sequence length parameter determines the length of each sequence, and the batch size determines the number of samples used to update the model parameters in each iteration. Conduct multiple sets of experiments for the ERNIE-BIGRU model, try different parameter configurations, and select the configuration with the best performance.
[0076] In this embodiment, the Bootstrapping method is used to divide the training and test data sets, and the training and test data sets are divided in a ratio of 0.632:0.368, which greatly utilizes the valuable corpus resources; the parameters of the ERNIE-BIGRU model are configured. In this embodiment, the optimal parameters are set to a sequence length of 400, a batch size of 32, and a learning rate of 2e-5.
[0077] The embodiment of the present invention provides a method for joint extraction of fine-grained Chinese geological entity spatial relations, establishes a fine-grained Chinese geological entity and spatial relationship classification system, wherein the classification system includes geological entity classification and spatial relationship classification; collects geological corpus data, and annotates the data based on the classification system to obtain a geological entity spatial relationship corpus; constructs an ERNIE-BIGRU model for joint extraction of spatial relations, wherein the ERNIE-BIGRU model includes an ERNIE layer and a bidirectional GRU layer, wherein the ERNIE layer is used to obtain a context-based vector representation of each word according to an input sentence, and the bidirectional GRU layer is used to obtain a non-normalized probability distribution of each word for each label according to the vector of the input word, thereby obtaining a relationship classification result; divides the obtained geological entity spatial relationship corpus into a training set and a test set, and uses the training set and the test set to train and test the constructed ERNIE-BIGRU model to obtain the best model performance. The fine-grained Chinese geological entity spatial relationship joint extraction method based on the ERNIE-BIGRU model proposed in this paper can realize the accurate extraction of geological entities and spatial relationships, and provide important value for earth science tasks.
[0078] Corresponding to the above-disclosed method for joint extraction of fine-grained Chinese geological entity spatial relationships, the embodiment of the present invention also discloses a joint extraction system for fine-grained Chinese geological entity spatial relationships, such as Figure 6 As shown, it specifically includes:
[0079] A classification system construction module is used to establish a fine-grained Chinese geological entity and spatial relationship classification system, wherein the classification system includes geological entity classification and spatial relationship classification;
[0080] A corpus construction module is used to collect geological corpus data and annotate the data based on the classification system to obtain a geological entity spatial relationship corpus;
[0081] An extraction model construction module, used to construct an ERNIE-BIGRU model for joint extraction of spatial relations, wherein the ERNIE-BIGRU model includes an ERNIE layer and a bidirectional GRU layer, wherein the ERNIE layer is used to obtain a vector representation of each word based on context calculation according to an input sentence, and the bidirectional GRU layer is used to obtain a non-normalized probability distribution of each word for each label according to the vector of the input word, thereby obtaining a relationship classification result;
[0082] The model training module is extracted to divide the training set and the test set based on the obtained geological entity spatial relationship corpus, and use the training set and the test set to train and test the constructed ERNIE-BIGRU model to obtain the best model performance.
[0083] It should be noted that for the detailed description of a fine-grained Chinese geological entity spatial relationship joint extraction system provided in an embodiment of the present invention, reference can be made to the relevant description of a fine-grained Chinese geological entity spatial relationship joint extraction method provided in an embodiment of the present application, which will not be repeated here.
[0084] In addition, an embodiment of the present invention also provides an electronic device, which includes: a processor and a memory; the memory is used to store one or more program instructions; the processor is used to run one or more program instructions to execute the steps of a fine-grained Chinese geological entity spatial relationship joint extraction method as described in any of the above items.
[0085] It should be noted that for the detailed description of an electronic device provided in an embodiment of the present invention, reference can be made to the relevant description of a fine-grained Chinese geological entity spatial relationship joint extraction method provided in an embodiment of the present application, which will not be repeated here.
[0086] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for jointly extracting fine-grained Chinese geological entity spatial relationships as described in any of the above items are implemented.
[0087] It should be noted that, for the detailed description of a computer-readable storage medium provided in an embodiment of the present invention, reference can be made to the relevant description of a fine-grained Chinese geological entity spatial relationship joint extraction method provided in an embodiment of the present application, which will not be repeated here.
[0088] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0089] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. A fine-grained Chinese geological entity spatial relationship joint extraction method, characterized in that: The method comprises: Step S1, establishing a fine-grained Chinese geological entity and spatial relationship classification system, wherein the classification system includes geological entity classification and spatial relationship classification; Step S2, collecting geological corpus data, and annotating the data based on the classification system to obtain a geological entity spatial relationship corpus; Step S3, constructing an ERNIE-BIGRU model for joint extraction of spatial relations, the ERNIE-BIGRU model comprising an ERNIE layer and a bidirectional GRU layer, the ERNIE layer being used to obtain a vector representation of each word based on context calculation according to an input sentence, and the bidirectional GRU layer being used to obtain a non-normalized probability distribution of each word for each label according to the vector of the input word, thereby obtaining a relation classification result; Step S4, dividing the obtained geological entity spatial relationship corpus into a training set and a test set, and using the training set and the test set to train and test the constructed ERNIE-BIGRU model to obtain the best model performance.
2. A fine-grained Chinese geological entity spatial relationship joint extraction method as claimed in claim 1, characterized in that: The step S1 specifically includes: The geological entity classification includes stratigraphic entity, geological structure entity, rock entity and place name entity; The spatial relationship classification includes two categories: topological relationship and directional relationship. The topological relationship is divided into inclusion relationship, intersection relationship and stratigraphic contact relationship. The directional relationship describes the spatial order relationship between two entities, including relative spatial relationship and absolute spatial relationship.
3. A fine-grained Chinese geological entity spatial relationship joint extraction method as claimed in claim 1, characterized in that: The step S2 specifically includes: Step S21, collecting geological report corpus data and preprocessing to obtain pre-labeled data; Step S22, creating labels for each category in the established classification system, and labeling the pre-labeled data based on the created labels to obtain a geological entity spatial relationship corpus.
4. A fine-grained Chinese geological entity spatial relationship joint extraction method as claimed in claim 3, characterized in that: The step S21 specifically includes: Obtain geological report data, clean the report, delete web page tags, tables, special characters, and noisy text information not related to geology, deduplicate and segment the cleaned text corpus, and store it to obtain pre-annotated data with unified standards.
5. A fine-grained Chinese geological entity spatial relationship joint extraction method as claimed in claim 3, characterized in that: The step S22 specifically includes: Based on the open source text annotation tool Doccano platform, create a sequence annotation project, create two types of labels: entity and spatial relationship according to the established classification system, import the pre-annotated data into the project to annotate entities and spatial relationships, and export the annotated project as a corpus.
6. A fine-grained Chinese geological entity spatial relationship joint extraction method as claimed in claim 1, characterized in that: The step S3 specifically includes: The ERNIE layer adopts the ERNIE 3.0 model; the BIGRU layer includes a reset gate and an update gate, the reset gate controls the extent to which the state information of the hidden layer at the previous moment is accepted into the current candidate hidden layer; the update gate controls the extent to which the state information of the hidden layer at the previous moment is written into the current hidden layer.
7. A fine-grained Chinese geological entity spatial relationship joint extraction method as claimed in claim 6, characterized in that: The step S4 specifically includes: The Bootstrapping method is used to divide the training and test data sets, and the training and test data sets are divided according to the preset ratio; the optimal parameters of the ERNIE-BIGRU model are configured, and the set parameters include sequence length, batch size and learning rate.
8. A fine-grained Chinese geological entity spatial relationship joint extraction system, characterized in that: The system comprises: A classification system construction module is used to establish a fine-grained Chinese geological entity and spatial relationship classification system, wherein the classification system includes geological entity classification and spatial relationship classification; A corpus construction module is used to collect geological corpus data and annotate the data based on the classification system to obtain a geological entity spatial relationship corpus; An extraction model construction module, used to construct an ERNIE-BIGRU model for joint extraction of spatial relations, wherein the ERNIE-BIGRU model includes an ERNIE layer and a bidirectional GRU layer, wherein the ERNIE layer is used to obtain a vector representation of each word based on context calculation according to an input sentence, and the bidirectional GRU layer is used to obtain a non-normalized probability distribution of each word for each label according to the vector of the input word, thereby obtaining a relationship classification result; The model training module is extracted to divide the training set and the test set based on the obtained geological entity spatial relationship corpus, and use the training set and the test set to train and test the constructed ERNIE-BIGRU model to obtain the best model performance.
9. An electronic device, characterized in that: The device comprises: a processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the steps of a method for jointly extracting fine-grained Chinese geological entity spatial relationships as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for jointly extracting fine-grained Chinese geological entity spatial relationships as described in any one of claims 1 to 7.
Citation Information
Cited By
Earth science geological entity relation extraction method, medium and equipment
CN120354909A
A method, medium and device for extracting geological entity relationships in earth science
CN120354909B