Geological named entity recognition method and device, equipment and medium

By constructing a geological text recognition model and combining OCR technology with the BERTwwm-BiLSTM-CRF model, the problems of inaccurate boundaries and long training time in named entity recognition in geological reports were solved, achieving high-precision and efficient named entity recognition.

CN121328537APending Publication Date: 2026-01-13CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410934933.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing named entity recognition technologies suffer from inaccurate identification boundaries and long model training times in geological reports, especially when using predefined rules and patterns to identify named entities.

Method used

A pre-built geological text recognition model, including a word vector masking layer, a word vector embedding layer, and a word vector decoding layer, is used. Geological text recognition is performed using OCR technology and data cleaning, BERT technology and data cleaning, and the BERTwwm-BiLSTM-CRF model.

Benefits of technology

It achieves high-precision named entity recognition of geological texts, reduces the impact of noise on model performance, improves recognition accuracy and efficiency, and covers multiple aspects of geological research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121328537A_ABST
    Figure CN121328537A_ABST
Patent Text Reader

Abstract

The invention provides a geological named entity recognition method, device and equipment and a medium, and belongs to the technical field of natural language processing. The method comprises the following steps: acquiring a to-be-analyzed geology text sequence; inputting the to-be-analyzed geology text sequence into the word vector mask layer to obtain word vectors of the to-be-analyzed geology text sequence; inputting word vectors of the to-be-analyzed geology text sequence into the word vector embedding layer to obtain sequence features of the to-be-analyzed geology text sequence; and inputting the sequence features of the to-be-analyzed geology text sequence into the word vector decoding layer to obtain a named entity of the to-be-analyzed geology text sequence. According to the method, the OCR technology and the BERTwwm-BiLSTM-CRF model are utilized to realize efficient and accurate geological text data processing and entity recognition, and the automatic processing capability is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, specifically to a geological named entity recognition method, a geological named entity recognition device, an electronic device, and a computer-readable storage medium. Background Technology

[0002] By accurately identifying geological concepts such as strata, reservoir types, and rock types in geological reports, geologists can better understand the reports and conduct more accurate geological analyses and predictions.

[0003] Currently, named entities are mainly identified by using predefined rules and patterns: (1) matching formatted entities such as dates and email addresses using regular expressions; (2) statistical NER methods are trained using large-scale corpora, which usually involve techniques such as part-of-speech tagging, chunking, and sequence labeling. Among them, Conditional Random Fields (CRF) and Hidden Markov Models (HMM) are commonly used statistical models; (3) with the development of deep learning, recurrent neural networks such as Recurrent Neural Networks (RNN) and Long Short-Term Memory Networks (LSTM), as well as variants such as Bidirectional LSTM and Gated Recurrent Units (GRU), have been widely used in NER tasks; (4) the introduction of pre-trained language models (such as BERT and GPT) has also significantly improved the performance of NER.

[0004] However, existing named entity recognition technologies suffer from inaccurate recognition boundaries and long model training times. Summary of the Invention

[0005] The purpose of this invention is to provide a method, apparatus, device, and medium for identifying geological named entities, in order to solve the above-mentioned problems.

[0006] To achieve the above objectives, embodiments of the present invention provide a geological named entity recognition method, characterized in that a geological text recognition model is pre-constructed, the geological text recognition model including a word vector masking layer, a word vector embedding layer, and a word vector decoding layer, the method comprising:

[0007] Obtain the sequence of geological texts to be analyzed;

[0008] The geological text sequence to be analyzed is input into the word vector mask layer to obtain the word vectors of the geological text sequence to be analyzed;

[0009] The word vectors of the geological text sequence to be analyzed are input into the word vector embedding layer to obtain the sequence features of the geological text sequence to be analyzed.

[0010] The sequence features of the geological text sequence to be analyzed are input into the word vector decoding layer to obtain the named entities of the geological text sequence to be analyzed.

[0011] Optionally, the geological text sequence to be analyzed is obtained in the following way:

[0012] Obtain geological textual data;

[0013] Geological text data is identified to obtain geological texts;

[0014] Data cleaning of geological texts yields a sequence of geological texts to be analyzed.

[0015] Optionally, the geological texts are cleaned to obtain a sequence of geological texts to be analyzed, including:

[0016] Remove irrelevant information from the geological text to obtain the geological text with irrelevant information removed; the irrelevant information includes: headers, footers, page numbers, and figure captions;

[0017] The geological text, after removing irrelevant information, is subjected to text normalization processing to obtain the normalized geological text; the text normalization processing includes: case unification, spell correction, and standardization of numbers and units;

[0018] The geological text, after removing irrelevant information, is subjected to text normalization processing to obtain the normalized geological text. The text normalization processing includes: case unification, spell correction and number correction, unit standardization, text encoding format unification, removal of line breaks, removal of tabs, and removal of spaces.

[0019] Stem extraction is performed on the geological text that has undergone text normalization to obtain the geological text sequence to be analyzed.

[0020] Optionally, the geological text recognition model is constructed in the following way:

[0021] Obtain training samples of geological text sequences;

[0022] Entity naming categories are labeled for geological text sequence training samples to determine entity names for the geological text sequence training samples; among which, entity naming types include: reservoir type, region, rock type, rock stratum, age stratum, sedimentary facies and basin structure;

[0023] Using geological text sequence training samples, a pre-constructed BERTwwm-BiLSTM-CRF model is trained until the predicted entity names of the output geological text sequence training samples are consistent with the entity names of the geological text sequence training samples, thus obtaining a geological text recognition model; wherein, the word vector masking layer corresponds to BERTwwm, the word vector embedding layer corresponds to BiLSTM, and the word vector decoding layer corresponds to CRF.

[0024] Optionally, before the step of obtaining the geological text recognition model, the following steps are included: Training a pre-built BERTwwm-BiLSTM-CRF model using geological text sequence training samples until the predicted entity names of the output geological text sequence training samples match the entity names of the geological text sequence training samples.

[0025] Data augmentation processing is performed on training samples of geological text sequences; the data augmentation processing includes synonym replacement, word concatenation, random word insertion, and random word swapping.

[0026] Alternatively, the rules for synonym substitution are as follows:

[0027] Multiple synonyms are obtained from training samples of geological text sequences; among them, different synonyms are used with different frequencies;

[0028] The synonyms of the training samples of geological text sequences whose usage frequency is less than the preset usage frequency are identified as the synonym replacement set.

[0029] The entity names of the training samples of the geological text sequence are used as entity names of the synonym replacement set.

[0030] Optionally, the rules for random word insertion are as follows:

[0031] Preset words are inserted into the geological text sequence training samples to obtain the inserted geological text sequence training samples; the word class attributes of the preset words include: classifiers, adjectives, adverbs and prepositions;

[0032] The entity names of the geological text sequence training samples are used as the entity names of the inserted geological text sequence training samples.

[0033] In a second aspect of the present invention, a geological named entity recognition device is provided, wherein a geological text recognition model is pre-constructed, the geological text recognition model including a word vector masking layer, a word vector embedding layer, and a word vector decoding layer, the device comprising:

[0034] The data acquisition module is used to acquire the geological text sequence to be analyzed;

[0035] The vector extraction module is used to input the geological text sequence to be analyzed into the word vector mask layer to obtain the word vectors of the geological text sequence to be analyzed;

[0036] The feature extraction module is used to input the word vectors of the geological text sequence to be analyzed into the word vector embedding layer to obtain the sequence features of the geological text sequence to be analyzed.

[0037] The naming recognition module is used to input the sequence features of the geological text sequence to be analyzed into the word vector decoding layer to obtain the named entities of the geological text sequence to be analyzed.

[0038] In a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the machine-readable instructions, when executed by the processor, perform the above-described geological named entity recognition method.

[0039] In a fourth aspect of the present invention, a computer-readable storage medium is provided, storing computer instructions that, when executed on a computer, cause the computer to perform the above-described geological named entity recognition method.

[0040] The beneficial effects of this invention are:

[0041] (1) Comprehensive data processing: Text is recognized by OCR technology and comprehensive data cleaning and standardization are performed to ensure the quality of text data input to the model and reduce the impact of noise on model performance.

[0042] (2) High-precision model: The BERTwwm-BiLSTM-CRF model is adopted, which combines the deep semantic understanding ability of the pre-trained language model BERT, the sequence modeling ability of BiLSTM, and the sequence annotation ability of CRF, and can effectively capture the complex relationships and contextual information in geological texts.

[0043] (3) Rich entity categories: The model can identify a variety of geologically related entity naming categories, such as reservoir type, region, rock type, etc., covering multiple aspects of geological research.

[0044] (4) Data augmentation improves generalization ability: Data augmentation technology increases the diversity of training samples, improves the model's generalization ability on unknown data, and enhances the model's robustness.

[0045] (5) High degree of automation: This method achieves a high degree of automation from text recognition to entity recognition, reduces manual intervention, and improves the efficiency of processing large-scale geological text data.

[0046] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0047] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:

[0048] Figure 1This is a flowchart illustrating the geological named entity recognition method provided in an embodiment of the present invention;

[0049] Figure 2 This is a schematic diagram illustrating the effect of the geological text recognition model provided in this embodiment of the invention in recognizing geological text.

[0050] Figure 3 This is a schematic diagram of the structure of the BERTwwm-BiLSTM-CRF model provided in this embodiment of the invention;

[0051] Figure 4 This is a schematic diagram illustrating the recognition accuracy of the geological text recognition model provided in this embodiment of the invention;

[0052] Figure 5 This is a schematic diagram of the geological named entity recognition device provided in an embodiment of the present invention. Detailed Implementation

[0053] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this application.

[0055] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0056] Example 1

[0057] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the geological named entity recognition method provided in this embodiment of the invention. A geological text recognition model is pre-constructed, comprising a word vector masking layer, a word vector embedding layer, and a word vector decoding layer. The method includes the following steps:

[0058] S100, Obtain the geological text sequence to be analyzed;

[0059] The geological text sequence to be analyzed refers to a series of textual materials related to the field of geology that have been processed to obtain a sequence of words. How to process the textual materials will be explained in detail later.

[0060] In one embodiment, step S100 may specifically include:

[0061] S110, Obtain geological textual data;

[0062] In one embodiment, web crawling technology is used to crawl geological text data from the Internet.

[0063] In one embodiment, to improve crawling efficiency, asynchronous web crawling technology is employed. This technology is based on an event loop mechanism and can perform other tasks while waiting for network responses, thereby avoiding wasted time due to waiting and reducing the possibility of network congestion.

[0064] In one embodiment, to ensure the accuracy and relevance of the acquired data, a novel URL scheduling strategy is designed to prioritize crawling URLs related to geology. This allows for a focus on collecting data within a specific field, thereby improving the professionalism and relevance of the data.

[0065] In one specific implementation, an asynchronous web crawler is implemented using the Python programming language and the asyncio library.

[0066] In one embodiment, to enhance the concurrency of the crawler and circumvent the anti-crawling mechanisms of the target website, a method of random user-agent and IP proxy pools is employed. By continuously changing the user agent and IP address, the crawler simulates the access behavior of different users, thereby improving its stability and data acquisition efficiency.

[0067] S120, Identify geological text data to obtain geological text;

[0068] Specifically, after obtaining the geology paper in PDF format, text conversion is performed using optical character recognition (OCR) technology. This OCR technology boasts high accuracy and efficiency, capable of handling multiple languages ​​and complex text layouts, enabling the accurate conversion of text, images, and tables in PDF files into electronic text.

[0069] S130, perform data cleaning on the geological text to obtain the sequence of geological texts to be analyzed.

[0070] Specifically, step S130 may include:

[0071] S131, Remove irrelevant information from the geological text to obtain the geological text with irrelevant information removed; the irrelevant information includes: headers, footers, page numbers, and figure / table captions;

[0072] Specifically, using regular expressions, these key information elements (position, font, and size) of headers, footers, page numbers, and chart descriptions are automatically identified and removed.

[0073] S132, perform text normalization processing on the geological text after removing irrelevant information to obtain normalized geological text; the text normalization processing includes: case unification, spelling correction and number correction, unit standardization, text encoding format unification, removal of line breaks, removal of tabs and removal of spaces.

[0074] Unify case: Convert all text to a uniform case format, such as lowercase.

[0075] Spell correction: Using specialized geology dictionaries, spelling errors in the text are identified and corrected. For errors that cannot be directly corrected, a fuzzy matching algorithm is used to find the closest correct spelling.

[0076] Number and unit standardization: Standardize the format of numbers and units in the text, converting all temperature values ​​to degrees Celsius. Perform unit conversions for values ​​with different units to facilitate subsequent analysis.

[0077] Standardized text encoding: Text encoding is the process of converting human-readable text into a format that computers can process. Different systems and applications may use different encoding formats, such as UTF-8, ASCII, and GBK. Standardizing text encoding ensures that text data can be correctly parsed and displayed across different systems or applications, avoiding problems such as garbled characters. For example, converting all text data to UTF-8 encoding format is a widely used encoding format that supports text in multiple languages.

[0078] Removing newline characters: A newline character is a control character that indicates a new line in text. The newline character may differ across operating systems, such as \n in Unix / Linux systems and \r\n in Windows systems. Removing newline characters is typically used to merge multiple lines of text into a single line for easier subsequent processing or analysis.

[0079] Removing Tabs: A tab is a control character used to align text, typically for indentation or column alignment. Removing tabs makes text data more consistent and facilitates unified processing. For example, in data analysis and text mining, tabs can cause column alignment issues, affecting the accuracy of data analysis.

[0080] Removing spaces: Space characters are used to separate words or symbols in text, but sometimes it's necessary to remove spaces for specific purposes. For example, in text analysis, it might be necessary to merge all words into a single string without spaces. Removing spaces can also reduce noise in text data, making it more concise.

[0081] S133, stemming is performed on the geological text after text normalization to obtain the geological text sequence to be analyzed.

[0082] Specifically, stemming algorithms are used. For example, the Porter stemming algorithm or the Lancaster stemming algorithm reduce the vocabulary to its basic form.

[0083] In addition, based on the characteristics of the field of geology, the word stemming algorithm was optimized and adjusted to improve the extraction accuracy.

[0084] S200: Input the geological text sequence to be analyzed into the word vector mask layer to obtain the word vector of the geological text sequence to be analyzed;

[0085] Understandably, the BERTwwm model is used for word embedding. BERTwwm is an improved version of BERT that employs a whole-word masking strategy, which can better handle languages ​​with complex word order structures, such as Chinese. In the word embedding stage, each input geological entity is transformed into a high-dimensional vector containing rich semantic information about that entity. The purpose of this step is to transform the geological entities from their original textual form into a numerical form that can be processed by the machine learning model.

[0086] Understandably, the BERTwwm model needs to perform word segmentation on the geological text sequence to be analyzed before converting it into word vectors.

[0087] In one implementation, the word segmentation process employs a word segmentation algorithm suitable for the geological field, such as rule-based segmentation or statistical segmentation.

[0088] In addition, a word segmentation dictionary was constructed based on specialized vocabulary and terminology in the field of geology to improve the accuracy of word segmentation. For newly emerging words or terms, online dictionaries or professional knowledge bases were used for searching and supplementation.

[0089] S300: Input the word vectors of the geological text sequence to be analyzed into the word vector embedding layer to obtain the sequence features of the geological text sequence to be analyzed;

[0090] Understandably, a Bidirectional Long Short-Term Memory (BiLSTM) network is used for sequence encoding. BiLSTM is an advanced recurrent neural network that processes the input sequence in two directions (forward and backward), thus capturing the contextual information of geological entities. In the sequence encoding stage, the model encodes the input sequence of geological entities, generating a new vector sequence that contains the contextual information of each entity. The purpose of this step is to extract the contextual features of the geological entities to enhance the model's semantic understanding capabilities.

[0091] To make it easier to understand, the following examples are provided:

[0092] Taking "carbonate rock" as an example, for LSTM (which is also RNN), the next output of a sequence is determined solely by the previous output and the sequence itself; hidden (x,y) The hidden layer feature vector represents the output, x represents the output of the previous hidden layer in the sequence, and y represents the input of the current hidden layer. For "carbon", it can only see itself, so the output is hidden. 碳 .

[0093] Correspondingly, when "acid" sees "carbon," its output is hidden. (foward,酸) Here, "forward" represents the hidden output corresponding to "carbon". 碳 .

[0094] Moving forward: "Salt" sees "Carbonated Carbonate", the output is hidden. (foward,盐) The "rock" saw the "carbonate", and the output was "hidden". (foward,岩) .

[0095] After feature extraction from the "forward sequence," the following text can see the preceding text, but the preceding text cannot see the following text. To solve this problem, it is necessary to perform LSTM feature extraction again from the reverse direction. This is the meaning of "Bi" in Bi-LSTM, which stands for "bidirectional".

[0096] Finally, the features extracted from the front and back are concatenated to obtain the output features. If the hidden layer dimension of the forward and backward LSTM is 384, then the final representation dimension of each word is 768.

[0097] S400: Input the sequence features of the geological text sequence to be analyzed into the word vector decoding layer to obtain the named entities of the geological text sequence to be analyzed.

[0098] Understandably, a Conditional Random Field (CRF) is used for feature extraction. CRF is a powerful sequence model that can consider information from the entire sequence for prediction. In the feature extraction stage, CRF processes the output of the BiLSTM to extract useful features. The purpose of this step is to extract the most useful features for geological entity identification from the contextual features. After feature extraction, this invention uses CRF for sequence decoding. In the sequence decoding stage, CRF labels each geological entity based on the extracted features, generating a label sequence. This label sequence represents the category of each geological entity, such as strata, minerals, fossils, etc. The purpose of this step is to predict the category of each geological entity based on the extracted features, such as... Figure 2 As shown.

[0099] To make it easier to understand, the following examples are provided:

[0100] For "carbonate rock", assuming it is followed by a classifier, the resulting classification matrix is ​​as follows, where the three dimensions of the vector represent the probabilities that the word type is "B-rock", "I-rock", and "O":

[0101] Carbon [0.7, 0.1, 0.2]

[0102] Acid[0.1,0.5,0.4]

[0103] Salt [0.2, 0.5, 0.3]

[0104] Rock [0.3, 0.4, 0.3]

[0105] Suppose that the transition matrix of the CRF after learning is as follows:

[0106] B-rock I-rock O B-rock 0.1 0.8 0.1 I-rock 0.1 0.6 0.3 O 0.5 0 0.5

[0107] The Viterbi algorithm is used to calculate the globally optimal sequence [B-rock, I-rock, I-rock, I-rock] using the transition matrix. This result is the final output.

[0108] The granularity of entity recognition lies in each "word". By learning the context, one or more sub-sequences are identified, and finally the geological entity is obtained.

[0109] In one embodiment, the geological text recognition model is constructed in the following manner:

[0110] Step 1: Obtain training samples of geological text sequences;

[0111] Understandably, a portion of the geological text sequence training samples can be used as a validation set.

[0112] Step 2: Label the entity naming categories of the geological text sequence training samples to determine the entity names of the geological text sequence training samples; among which, the entity naming types include: reservoir type, region, rock type, rock stratum, age stratum, sedimentary facies and basin structure;

[0113] Specifically, through in-depth research in the field of geology, seven categories of geological nominal entities have been meticulously classified, including reservoir type, region, rock type, rock stratum, age stratum, sedimentary facies, and basin structure.

[0114] Specifically, a pre-trained small model is used to perform weakly supervised initial annotation on the dataset, which is then reviewed and corrected by professional human reviewers. This small model is trained on a subset of existing geological texts. While its performance may not be sufficient to handle all geological entity annotation tasks, it is adequate to generate an initial, roughly accurate annotation result. The human reviewers then refine this initial annotation result to ensure its accuracy, and finally use the small model to perform entity naming and category annotation on training samples of geological text sequences.

[0115] Step 3: Use geological text sequence training samples to train the pre-built BERTwwm-BiLSTM-CRF model until the predicted entity names of the output geological text sequence training samples are consistent with the entity names of the geological text sequence training samples, thus obtaining the geological text recognition model; where the word vector masking layer corresponds to BERTwwm, the word vector embedding layer corresponds to BiLSTM, and the word vector decoding layer corresponds to CRF.

[0116] Specifically, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the BERTwwm-BiLSTM-CRF model.

[0117] The following combination Figure 3 A detailed explanation of the BERTwwm-BiLSTM-CRF model is provided below:

[0118] Text Input: This is the foundation of the entire model, containing the raw data used for prediction. As shown in the figure, the text input consists of a series of characters, such as "porosity carbonate rock," etc. These characters may be part of a sentence or document, used for subsequent processing and analysis.

[0119] Sentence Embedding Layer: These texts are processed using a pre-trained model of BERTwwm (Bidirectional Encoder Representations from Transformers Whole Word Masking). BERTwwm can segment "porosity carbonate rock" into two texts: "porosity" and "carbonate rock," and then convert these two texts into vector representations. At this stage, BERTwwm learns information such as words, sentence structure, and context within the text.

[0120] Forward LSTM layer: This is a variant of a recurrent neural network (RNN) primarily used for processing sequential data. In a forward LSTM, each unit depends on the states of all the units preceding it, but not on the states of the units following it. This structure allows it to capture longer sequence patterns.

[0121] Backward LSTM layer: Similar to forward LSTM, backward LSTM is also used to process sequential data. The difference is that each unit depends only on the state of the preceding unit, not on the state of the following units. This structure allows it to capture shorter sequence patterns.

[0122] Label Results: This is the model's final output, showing the results after a series of processing steps. As seen in the figure, the label results consist of combinations of letters and numbers, such as "B", "I", "I", "I", "I". These labels may refer to some kind of classification or label used to evaluate the model's performance and accuracy.

[0123] In one embodiment, after obtaining the geological text model, it is evaluated and optimized using a validation set. During the model evaluation phase, the geological text model calculates three metrics: precision, recall, and F1 score, based on the entity names corresponding to the validation set and the entity names output by the geological text model. During the model optimization phase, the geological text model adjusts its parameters based on the calculated metrics to improve model performance. For example, Figure 4 As shown, Figure 4 Predict the recognition accuracy of naming seven types of geological entities for geological text models.

[0124] In one embodiment, the third step described above may be preceded by:

[0125] Data augmentation processing was performed on the training samples of geological text sequences; the data augmentation processing included synonym replacement, word concatenation, random word insertion, and random word swapping.

[0126] In one embodiment, the geological text sequence training samples are augmented using an improved EDA (Easy Data Augmentation).

[0127] Data augmentation is a common learning technique that generates new training samples by performing various operations on the original data, thereby increasing the diversity and quantity of the data and improving the model's performance and generalization ability. In other words, after an entity naming and categorization label is applied to a geological text sequence, the geological text sequence obtained after data augmentation will also be labeled with the same entity naming and categorization as the original geological text sequence.

[0128] Synonym substitution refers to replacing certain words in geological entities with their synonyms. For example, replacing "quartzite" with "quartz stone". This operation can increase the ways entities can be represented, allowing the model to adapt to different representations.

[0129] Lexical splicing refers to combining multiple geological entities together to form a new entity. For example, combining "quartz" and "rock" to form "quartz rock". This operation can increase the complexity of entities, enabling the model to handle more complex entities.

[0130] Random insertion refers to inserting irrelevant words into text at random. For example, inserting "yesterday" into "This is a piece of quartzite" will result in "This was a piece of quartzite yesterday".

[0131] Random swapping refers to exchanging the positions of two words in a text. For example, swapping "a piece" and "quartzite" in "This is a piece of quartzite" results in "This is a piece of quartzite". These operations can increase the diversity of the text, enabling the model to adapt to different word orders and contexts.

[0132] In one embodiment, the rules for synonym substitution are as follows:

[0133] Multiple synonyms are obtained from training samples of geological text sequences; among them, different synonyms are used with different frequencies;

[0134] The synonyms of the training samples of geological text sequences whose usage frequency is less than the preset usage frequency are identified as the synonym replacement set.

[0135] The entity names of the training samples of the geological text sequence are used as entity names of the synonym replacement set.

[0136] In this embodiment, using a synonym replacement set to replace geological text sequences can improve text diversity, reduce the risk of overfitting, and thus improve the model's generalization ability and performance. Simultaneously, since the synonym replacement set includes synonyms with usage frequencies lower than a preset frequency, it can effectively reduce the model's over-reliance on common words and improve the model's ability to recognize rare words.

[0137] In one embodiment, the rules for random word insertion are as follows:

[0138] Preset words are inserted into the geological text sequence training samples to obtain the inserted geological text sequence training samples; the word class attributes of the preset words include: classifiers, adjectives, adverbs and prepositions;

[0139] The entity names of the geological text sequence training samples are used as the entity names of the inserted geological text sequence training samples.

[0140] In this embodiment, by inserting predefined vocabulary into the training samples of geological text sequences, the semantic information of the text can be enriched, and the expressive power of the text can be enhanced. This approach improves the model's understanding and representation of geological text, thereby achieving better performance in geological-related tasks. Specifically, the word class attributes of the predefined vocabulary include quantifiers, adjectives, adverbs, and prepositions. The inclusion of these word classes enables the model to better capture key information in geological texts, such as the scale, characteristics, degree, and relationships of geological phenomena. Simultaneously, using the entity names of the geological text sequence training samples as the entity names of the inserted geological text sequence training samples maintains entity consistency, helping the model to identify and distinguish different entities within the geological text.

[0141] In this embodiment, data augmentation processing is performed on the training samples of geological text sequences to expand the size of the dataset, thereby enhancing the model's generalization ability and robustness.

[0142] In one or more of the above embodiments, the geological named entity recognition method further includes: displaying the named entities of the geological text sequence to be analyzed.

[0143] The beneficial effects of this invention are:

[0144] (1) Comprehensive data processing: Text is recognized by OCR technology and comprehensive data cleaning and standardization are performed to ensure the quality of text data input to the model and reduce the impact of noise on model performance.

[0145] (2) High-precision model: The BERTwwm-BiLSTM-CRF model is adopted, which combines the deep semantic understanding ability of the pre-trained language model BERT, the sequence modeling ability of BiLSTM, and the sequence annotation ability of CRF, and can effectively capture the complex relationships and contextual information in geological texts.

[0146] (3) Rich entity categories: The model can identify a variety of geologically related entity naming categories, such as reservoir type, region, rock type, etc., covering multiple aspects of geological research.

[0147] (4) Data augmentation improves generalization ability: Data augmentation technology increases the diversity of training samples, improves the model's generalization ability on unknown data, and enhances the model's robustness.

[0148] (5) High degree of automation: This method achieves a high degree of automation from text recognition to entity recognition, reduces manual intervention, and improves the efficiency of processing large-scale geological text data.

[0149] Example 2

[0150] Based on the same inventive concept, such as Figure 5 As shown, this embodiment of the invention also provides a geological named entity recognition device 200, which pre-constructs a geological text recognition model. The geological text recognition model includes a word vector masking layer, a word vector embedding layer, and a word vector decoding layer, including:

[0151] Data acquisition module 210 is used to acquire the geological text sequence to be analyzed;

[0152] The vector extraction module 220 is used to input the geological text sequence to be analyzed into the word vector mask layer to obtain the word vectors of the geological text sequence to be analyzed.

[0153] The feature extraction module 230 is used to input the word vectors of the geological text sequence to be analyzed into the word vector embedding layer to obtain the sequence features of the geological text sequence to be analyzed.

[0154] The naming recognition module 240 is used to input the sequence features of the geological text sequence to be analyzed into the word vector decoding layer to obtain the named entities of the geological text sequence to be analyzed.

[0155] It should be understood that this device corresponds to the above-described embodiment of the geological named entity identification method and is capable of performing the various steps involved in the above-described method embodiment. The specific functions of this device can be found in the description above, and detailed descriptions are omitted here to avoid repetition. The device includes at least one software functional module that can be stored in memory or embedded in the device's operating system (OS) in the form of software or firmware.

[0156] Example 3

[0157] Based on the same inventive concept, embodiments of the present invention also provide an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the above-described geological named entity recognition method is performed.

[0158] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0159] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0160] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0161] Example 4

[0162] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the above-described geological named entity recognition method.

[0163] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0164] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0165] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0166] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0167] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not describe the various possible combinations separately.

[0168] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0169] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0170] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for identifying geological named entities, characterized in that, A geological text recognition model is pre-constructed, comprising a word vector masking layer, a word vector embedding layer, and a word vector decoding layer. The method includes: Obtain the sequence of geological texts to be analyzed; The geological text sequence to be analyzed is input into the word vector mask layer to obtain the word vectors of the geological text sequence to be analyzed; The word vectors of the geological text sequence to be analyzed are input into the word vector embedding layer to obtain the sequence features of the geological text sequence to be analyzed. The sequence features of the geological text sequence to be analyzed are input into the word vector decoding layer to obtain the named entities of the geological text sequence to be analyzed.

2. The geological named entity recognition method according to claim 1, characterized in that, The geological text sequence to be analyzed was obtained in the following way: Obtain geological textual data; Geological text data is identified to obtain geological texts; Data cleaning of geological texts yields a sequence of geological texts to be analyzed.

3. The geological named entity recognition method according to claim 2, characterized in that, Data cleaning of geological texts yields a sequence of geological texts to be analyzed, including: Remove irrelevant information from the geological text to obtain the geological text with irrelevant information removed; the irrelevant information includes: headers, footers, page numbers, and figure captions; The geological text, after removing irrelevant information, is subjected to text normalization processing to obtain the normalized geological text. The text normalization processing includes: case unification, spell correction and number correction, unit standardization, text encoding format unification, removal of line breaks, removal of tabs, and removal of spaces. Stem extraction is performed on the geological text that has undergone text normalization to obtain the geological text sequence to be analyzed.

4. The geological named entity recognition method according to claim 1, characterized in that, The geological text recognition model was constructed in the following way: Obtain training samples of geological text sequences; Entity naming categories are labeled for geological text sequence training samples to determine entity names for the geological text sequence training samples; among which, entity naming types include: reservoir type, region, rock type, rock stratum, age stratum, sedimentary facies and basin structure; Using geological text sequence training samples, a pre-constructed BERTwwm-BiLSTM-CRF model is trained until the predicted entity names of the output geological text sequence training samples are consistent with the entity names of the geological text sequence training samples, thus obtaining a geological text recognition model; wherein, the word vector masking layer corresponds to BERTwwm, the word vector embedding layer corresponds to BiLSTM, and the word vector decoding layer corresponds to CRF.

5. The geological named entity recognition method according to claim 4, characterized in that, Before the step of obtaining the geological text recognition model, which involves training a pre-built BERTwwm-BiLSTM-CRF model using geological text sequence training samples until the predicted entity names of the output geological text sequence training samples match the entity names of the geological text sequence training samples, the following steps are also included: Data augmentation processing is performed on training samples of geological text sequences; the data augmentation processing includes synonym replacement, word concatenation, random word insertion, and random word swapping.

6. The geological named entity recognition method according to claim 5, characterized in that, The rules for synonym substitution are as follows: Multiple synonyms are obtained from training samples of geological text sequences; among them, different synonyms are used with different frequencies; The synonyms of the training samples of geological text sequences whose usage frequency is less than the preset usage frequency are identified as the synonym replacement set. The entity names of the training samples of the geological text sequence are used as entity names of the synonym replacement set.

7. The geological named entity recognition method according to claim 5, characterized in that, The rules for random word insertion are as follows: Preset words are inserted into the geological text sequence training samples to obtain the inserted geological text sequence training samples; the word class attributes of the preset words include: classifiers, adjectives, adverbs and prepositions; The entity names of the geological text sequence training samples are used as the entity names of the inserted geological text sequence training samples.

8. A geological named entity recognition device, characterized in that, A geological text recognition model is pre-constructed, comprising a word vector masking layer, a word vector embedding layer, and a word vector decoding layer. The device includes: The data acquisition module is used to acquire the geological text sequence to be analyzed; The vector extraction module is used to input the geological text sequence to be analyzed into the word vector mask layer to obtain the word vectors of the geological text sequence to be analyzed; The feature extraction module is used to input the word vectors of the geological text sequence to be analyzed into the word vector embedding layer to obtain the sequence features of the geological text sequence to be analyzed. The naming recognition module is used to input the sequence features of the geological text sequence to be analyzed into the word vector decoding layer to obtain the named entities of the geological text sequence to be analyzed.

9. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when executed by the processor, perform the geological named entity recognition method according to any one of claims 1-7.

10. A computer-readable storage medium storing computer instructions, characterized in that, When the computer instructions are executed on a computer, the computer performs the geological named entity recognition method according to any one of claims 1-7.