A multi-level feature entity extraction method and system for digital reservoirs

Through multi-level feature entity extraction methods and systems, combined with BERT, BiLSTM, CNN and multi-layer perceptron modules, the problems of low efficiency and insufficient accuracy of entity extraction in the reservoir field are solved, and efficient and accurate entity extraction is achieved.

CN118504572BActive Publication Date: 2024-10-18XIDIAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410954133.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-18
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

Existing named entity recognition methods are inefficient in the oil reservoir field and are affected by manual annotation, and feature extraction and recognition models in other fields are not suitable for text semantics in the oil reservoir field, resulting in insufficient entity extraction efficiency and accuracy.

Method used

A multi-level feature entity extraction method is adopted, through preprocessing of unlabeled reservoir text, multi-type entity annotation, model training and fine-tuning, combined with BERT, BiLSTM, CNN and multi-layer perceptron modules, using prompt templates and binary cross-entropy loss function to achieve efficient prediction of entity locations.

Benefits of technology

In the case of a small number of manually labeled training samples, the efficiency and accuracy of the entity extraction model are improved through semi-automatic expansion of the training samples, and efficient entity extraction of reservoir text is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118504572B_ABST
    Figure CN118504572B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-level feature entity extraction method and system for digital reservoirs, which relates to the field of natural language processing and is used to efficiently and accurately extract entities from reservoir texts. The present invention first performs different types of annotations on part of the acquired reservoir texts, converts the annotated texts into input samples using a prompt template, and obtains corresponding real labels indicating the entity locations; fine-tunes the entity extraction model using paired training samples under each type, and the entity extraction model performs multi-level feature extraction on the training samples and outputs predicted labels indicating the entity locations; after each round of fine-tuning training, the unlabeled reservoir texts are predicted, and the wrong predicted labels are manually corrected to expand the training samples, and the entity extraction model is trained using all the training samples; the reservoir texts to be predicted are predicted and decoded using the finally trained entity extraction model. The model training efficiency of the present invention is high and the prediction accuracy is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of natural language processing, and in particular to a multi-level feature entity extraction method and system for digital oil reservoirs. Background Art

[0002] Traditional oil reservoir exploration and development often rely on manual interpretation of geological data, analysis of geological models and decision-making. However, with the development of digital technology, the oil reservoir industry has ushered in an era of data explosion. Massive amounts of data continue to emerge, bringing challenges to traditional exploration and development methods. Extracting useful information quickly and accurately from these massive amounts of data is of great significance to text digitization and information extraction in the oil reservoir field. Named entity recognition is a commonly used method, and named entity recognition has the following characteristics:

[0003] Automated data processing: The oil reservoir field involves a large amount of text and data, including geological exploration reports, drilling logs, production data, etc. The named entity recognition method can automatically identify and extract important entities in the text, such as geological structures, strata, oil field names, etc., thereby accelerating the data processing process.

[0004] Effective information extraction: Named entity recognition methods help extract key information from massive text and data, such as reservoir location, reserve information, production well names, etc. This information is of great significance for oilfield management and exploration and development decisions.

[0005] Data mining and analysis: Entity information extracted by named entity recognition can be used for further data mining and analysis. For example, statistical analysis can be performed on geological structures, oil well names, etc., to gain insights into the geological characteristics and production conditions of oil reservoirs and guide subsequent exploration and development activities.

[0006] Systematic knowledge management: Knowledge management in the oil reservoir field is very important. Named entity recognition methods can help structure and integrate knowledge scattered in various texts and data, establish a knowledge base or knowledge graph, and facilitate knowledge sharing and query between oilfield engineers and geologists.

[0007] Improve efficiency and accuracy: Traditional manual processing of large amounts of text and data is often time-consuming, labor-intensive, and prone to errors. Using named entity recognition methods can automate this process, improve processing efficiency and accuracy, and reduce labor costs and error rates.

[0008] There are already applications of named entity recognition in other fields, such as a complex heavy equipment entity extraction method based on ALBert proposed in a Chinese patent document with publication number CN113326700A, which uses the ALBert-BGRU-Attention-CRF model to extract entities in the field of complex heavy equipment. However, this method requires a manually annotated corpus. Since the number of samples for model training is usually large, its efficiency in performing entity extraction tasks is low. In addition, the method of using only manual annotation is affected by human subjectivity, and the annotation quality is difficult to guarantee, which affects the prediction effect of the model. In addition, due to the particularity of the field text, the text semantics in the field of heavy equipment is not similar to the text semantics in the field of oil reservoirs, and the text semantics in other fields are also very different from the text semantics in the field of oil reservoirs. Although they belong to the field of named entity recognition, due to the differences in semantics, length, contextual relevance, etc. of entity names, the feature extraction and recognition models of the above-mentioned documents are not applicable to the field of oil reservoirs. Summary of the invention

[0009] The object of the present invention is to provide a multi-level feature entity extraction method and system for digital reservoirs to efficiently and accurately extract entities from reservoir texts in order to solve all or part of the above-mentioned problems.

[0010] The technical solution adopted by the present invention is as follows:

[0011] A multi-level feature entity extraction method for digital reservoirs, comprising:

[0012] S1, obtaining unlabeled reservoir text, and preprocessing the reservoir text, wherein the preprocessing includes sentence segmentation;

[0013] S2. Perform multi-type entity annotation on the preprocessed part of the reservoir text; process the annotated reservoir text into input samples of each type of entity using the prompt template, and generate corresponding real labels of the entity locations;

[0014] S3, using the input samples of each type of entity and the corresponding true labels as training samples, respectively, to train the pre-built entity extraction model; the entity extraction model uses the reservoir text as input, and after multi-level feature extraction, outputs a predicted label indicating the entity location;

[0015] S4. After training the entity extraction model with the training samples of each type of entity, the trained entity extraction model is used to predict the entity of the type in the unlabeled reservoir text, and the wrong prediction labels are corrected;

[0016] S5, constructing all unlabeled reservoir texts and corresponding prediction labels after step S4 as training samples, and training the entity extraction model with all training samples;

[0017] S6. Use the entity extraction model trained in step S5 to predict the reservoir text to be predicted, and extract entities according to the entity positions indicated by the prediction labels.

[0018] Furthermore, the prompt template is in the form of:

[0019] [CLS] Entity Type [SEP] Reservoir Text [SEP];

[0020] [CLS] is the start tag and [SEP] is the separation tag.

[0021] Furthermore, the entity extraction model is constructed as follows:

[0022] Use the BERT (Bidirectional Encoder Representation from Transformers) module to extract word vectors for the input samples.

[0023] Use the BiLSTM (Bi-directional Long Short-Term Memory) module to extract contextual features of the BERT model output vector;

[0024] Use the CNN (Convolutional Neural Network) module to enhance the features output by the BiLSTM module;

[0025] The outputs of the BERT module, the BiLSTM module, and the CNN module are fused to obtain multi-level features;

[0026] Two-layer multi-layer perceptron modules are used to predict the entity start position and the entity end position according to the multi-level features.

[0027] Furthermore, extracting the entity according to the entity position indicated by the predicted label includes:

[0028] Determine the entity type of the current prediction;

[0029] Locate all entity start and entity end positions from the predicted labels;

[0030] Associate each located entity start position with the nearest entity end position in the form of a two-tuple;

[0031] The text between each bigram is extracted from the reservoir text, which is the current predicted entity.

[0032] Furthermore, the predicted label includes an entity start position vector and an entity end position vector with the same length as the input reservoir text; the position with a value of 1 in the entity start position vector represents the entity start position, and the position with a value of 0 represents the non-entity start position; the position with a value of 1 in the entity end position vector represents the entity end position, and the position with a value of 0 represents the non-entity end position.

[0033] Furthermore, the entity extraction model is trained using a binary cross entropy loss function.

[0034] Furthermore, the training loss of the entity extraction model includes the sum of the loss of the entity start position of the predicted label and the entity start position indicated by the true label, and the loss of the entity end position of the predicted label and the entity end position indicated by the true label; each round of training of the entity extraction model aims to minimize the training loss.

[0035] Furthermore, the sentence segmentation ends with a period.

[0036] Furthermore, the obtaining of unlabeled reservoir text includes:

[0037] Perform OCR (Optical Character Recognition) on paper reservoir documents:

[0038] Correct the recognition results.

[0039] To solve the above problems, the present invention also provides a multi-level feature entity extraction system for digital reservoirs, which includes:

[0040] The data acquisition module is configured to: obtain unlabeled reservoir text, and preprocess the reservoir text, wherein the preprocessing includes sentence segmentation;

[0041] The data annotation module is configured to: annotate part of the reservoir text output by the data acquisition module with multiple types of entities; process the annotated reservoir text into input samples of each type of entity using a prompt template, and generate corresponding real labels for the entity locations;

[0042] The model fine-tuning module is configured to: use the input samples of each type of entity and the corresponding true labels as training samples to train the pre-built entity extraction model; the entity extraction model uses the reservoir text as input, and outputs the predicted label of the entity location after multi-level feature extraction;

[0043] The sample expansion module is configured to: after training the entity extraction model with the training samples of each type of entity, use the trained entity extraction model to predict the entity of the type on the unlabeled reservoir text output by the data acquisition module, and correct the wrong prediction label;

[0044] The model training module is configured to: construct all unlabeled reservoir texts and corresponding prediction labels output by the sample expansion module as training samples, and train the entity extraction model with all the training samples;

[0045] The entity extraction module is configured to: predict the reservoir text to be predicted using the entity extraction model trained by the model training module, and extract entities according to the entity positions indicated by the prediction labels.

[0046] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0047] 1. In the case of a small amount of manually annotated training samples, the present invention semi-automatically expands the training samples by fine-tuning the training entity extraction model, thereby achieving efficient training of the entity extraction model.

[0048] 2. The present invention adopts multi-level feature extraction and feature fusion recognition to predict the entity position, conducts in-depth feature mining from multiple dimensions, and improves the accuracy of entity extraction in the reservoir field.

[0049] 3. The present invention uses two layers of multi-layer perceptrons to predict the start position and end position of the entity respectively, and trains the model parameters in conjunction with the binary cross entropy loss function, thereby improving the accuracy of entity position prediction and further improving the accuracy of entity extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The present invention will now be described by way of example with reference to the accompanying drawings, in which:

[0051] Figure 1 It is a flow chart of a multi-level feature entity extraction method for digital reservoirs.

[0052] Figure 2 It is a hierarchical structure diagram of the entity extraction model. DETAILED DESCRIPTION

[0053] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any manner.

[0054] Any feature disclosed in this specification (including any additional claims and abstract), unless otherwise stated, may be replaced by other alternative features that are equivalent or have similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

[0055] Example 1

[0056] This embodiment introduces a multi-level feature entity extraction method for digital reservoirs. Figure 1 As shown, the method comprises the following steps:

[0057] S100. Use OCR, crawler and other technologies to obtain unlabeled reservoir text and perform preprocessing.

[0058] The purpose of this step is to obtain basic training data. Reservoir texts can be roughly divided into two forms: paper documents and electronic documents. For paper reservoir documents, sample OCR for recognition, and then organize the recognition results, such as correcting page numbers, misrecognized texts, and garbled characters, and finally obtain reservoir texts that can be used directly. For electronic documents, they can be used as reservoir texts that can be used directly.

[0059] The preprocessing of reservoir text mainly includes the task of sentence segmentation of reservoir text. In order to retain the semantics of the original text to the greatest extent, the sentence segmentation is required to end with a period. In addition, the size of the input vector supported by the entity extraction model needs to be considered. For example, for the BERT model, it only supports inputs with a length of less than 512, and it is often necessary to attach template prompt information to the input. For this type of model, the length of all segmented sentences needs to be further less than 512, for example, all segmented sentences are texts with a length of less than 480. Unless otherwise specified, the reservoir text mentioned (such as the reservoir text when training the model) is the segmented reservoir text.

[0060] S200, annotate the text, and process the annotated text in the form of a prompt template.

[0061] In this embodiment, the entities of the reservoir text still need to be manually annotated, but not all of them. Only some of the preprocessed reservoir texts are annotated with multiple types of entities, and the rest are completed by subsequent semi-automatic annotation. The annotated text needs to meet the input format requirements of the model. In this embodiment, the annotated reservoir text is processed into input samples of each type of entity using the prompt template, and the real labels of the entity locations are generated accordingly.

[0062] The prompt template is a property that adds additional code to the text to facilitate the model to distinguish between the various parts of the input data. In some embodiments, the prompt template is in the form of:

[0063] [CLS] Entity Type [SEP] Reservoir Text [SEP];

[0064] [CLS] is the start mark, and [SEP] is the separation mark. The entity type is the marked entity, which belongs to the target object set by oneself. In some embodiments, the entity types in the reservoir field are divided into 6 types: 1. location, 2. production, 3. pressure, 4. gas content, 5. water injection volume, and 6. remaining oil volume.

[0065] Location: The geographical location of a reservoir, geological structural features, or other entities related to a geographical location. This includes, but is not limited to, geological blocks, oil fields, oil wells, strata, faults, structures, etc.

[0066] Production: The amount of oil or gas produced by a field, well or geological block. Production is usually measured in daily units, such as barrels / day or cubic meters / day.

[0067] Pressure: refers to the pressure level in the reservoir. Reservoir pressure refers to the pressure exerted on the formation by the oil, gas and water in the reservoir. Understanding reservoir pressure is crucial to determining production plans, predicting production, and maintaining production stability.

[0068] Gas content: refers to the content of natural gas in the oil reservoir. When there is both oil and natural gas in the oil reservoir, the gas content refers to the volume of natural gas contained in a unit volume of the oil reservoir.

[0069] Water injection volume: In the process of oil production, in order to improve the oil recovery rate, water is usually injected to increase the pressure in the oil reservoir and drive the oil to the oil well. The water injection volume refers to the amount of water injected into the oil reservoir every day.

[0070] Remaining oil volume: refers to the remaining oil volume in the reservoir that has not yet been extracted. Remaining oil volume is usually estimated through geological exploration and evaluation, and is an important basis for evaluating the remaining potential of the oil field and formulating development plans.

[0071] Then, six types of entities are annotated for the preprocessed part of the reservoir text. Correspondingly, for each type of entity, the annotated reservoir text is processed as an input sample with the prompt target. For example, for the "location" entity, the input sample of "[CLS]location[SEP]reservoir text[SEP]" is obtained, and for the "yield" entity, the input sample of "[CLS]yield[SEP]reservoir text[SEP]" is obtained. In addition, when annotating each type of entity, a true label of the entity position is also generated accordingly. The true label indicates the true position of the entity. For example, the input sample of "[CLS]yield[SEP]reservoir text[SEP]" mentioned above corresponds to the position indicating "yield" in the reservoir text. In some embodiments, the true label indicates the entity position from two dimensions: the entity start position and the entity end position. For example, two sets of entity start position vectors and entity end position vectors with the same length as the reservoir text are used to indicate the entity start position and the entity end position, respectively. The position with a value of 1 in the entity start position vector represents the entity start position, and the position with a value of 0 represents the non-entity start position; the position with a value of 1 in the entity end position vector represents the entity end position, and the position with a value of 0 represents the non-entity end position. Let start_idx represent the entity start position vector, and end_idx represent the entity end position vector. Assuming that the real start position and end position of the entity are x and y respectively, then start_idx[x]=1, end_idx[y]=1, and the other positions of the two vectors are all 0.

[0072] In this way, a labeled reservoir text obtains a pair of input sample and true label.

[0073] S300. The text processed by the prompt template is input into the entity extraction model, and the entity extraction model is fine-tuned and trained.

[0074] The so-called fine-tuning training is not to use the result of this training (model parameters) as the final result, but only belongs to the training process of adjusting the model parameters with a small amount of training data. The number of training samples input in each batch of the training entity extraction model does not exceed 8. In this embodiment, each pair of input samples and true labels obtained in step S200 is used as a training sample to train the entity extraction model.

[0075] As mentioned above, there are 6 types of entities annotated in reservoir texts. Assuming that a reservoir text contains these 6 types of entities, this reservoir text can obtain 6 pairs of input samples and true labels. Therefore, after step S200, a set of 6 training samples corresponding to the 6 types of entities will be obtained. The pre-built entity extraction model is trained using the input samples of each type of entity and the corresponding true labels as training samples (i.e., the set of each type of training samples).

[0076] The entity extraction model takes reservoir text as input and outputs a predicted label indicating the location of the entity after multi-level feature extraction. Figure 2 As shown, the entity extraction model is constructed as:

[0077] Use the BERT module to extract word vectors for input samples;

[0078] Use the BiLSTM module to extract contextual features of the BERT model output vector;

[0079] Use the CNN module to enhance the features output by the BiLSTM module;

[0080] The outputs of the BERT module, the BiLSTM module, and the CNN module are fused to obtain multi-level features;

[0081] Two layers of multi-layer perceptron modules are used to predict the entity start position and entity end position according to the multi-level features. That is, the predicted label indicates the predicted entity start position and entity end position. In some embodiments, the predicted label contains an entity start position vector start_idx and an entity end position vector end_idx with the same length as the input reservoir text, which are the same as the structure of the above-mentioned real label; the position with a value of 1 in the entity start position vector represents the entity start position, and the position with a value of 0 represents the non-entity start position; the position with a value of 1 in the entity end position vector represents the entity end position, and the position with a value of 0 represents the non-entity end position.

[0082] Since the entity extraction model uses the BERT module for word vector embedding, the input samples need to be Use the word segmenter of the BERT model to convert to the input format required by the BERT module, namely:

[0083] ;

[0084] in Represents the entity type, Represents the reservoir text.

[0085] Then use the word segmenter of the BERT model Convert the input sample format:

[0086] ;

[0087] in represents the input vector of the BERT module, Represents a tokenizer For input samples The i-th word obtained by word segmentation, , n represents the input sample The number of word segmentations to be performed.

[0088] The entity extraction model includes the BERT module, BiLSTM module and CNN module designed layer by layer. The calling relationship of the three modules is expressed as follows:

[0089] ;

[0090] ;

[0091] ;

[0092] in Represents the word vector extraction process of the BERT module, Represents the output of the BERT module; Represents the context feature extraction processing of the BiLSTM module, Represents the output of the BiLSTM module; Represents the feature enhancement processing of the CNN module, Represents the output of the CNN module.

[0093] In addition, in some embodiments, the CNN module uses an asymmetric convolution kernel to enhance the features output by the BiLSTM module. The convolution kernel size is, for example, (3, reservoir text length). This not only strengthens the correlation between word vectors and the short entity extraction capability of the model, but also avoids destroying the semantic expression capability of the complete word vector.

[0094] For the fusion and prediction of multi-level features, a dual pointer network is used in the above embodiment to predict the start and end positions of each entity. The prediction process of two multi-layer perceptrons is expressed as:

[0095] ;

[0096] ;

[0097] in Represents the prediction processing of the first multi-layer perceptron on the entity's starting position vector, represents the prediction processing of the entity end position vector by the second multi-layer perceptron; and It represents the fusion of the outputs of the BERT module, BiLSTM module, and CNN module, that is, multi-level feature fusion.

[0098] Since two dimensions, the entity start position and the entity end position, are designed to indicate the entity position, that is, the entity extraction model uses a dual pointer network to predict the start position and the end position of the entity during prediction. Each prediction is a binary classification task, predicting whether the position is the start position or the end position of the entity. Therefore, in this embodiment, the training of the entity extraction model uses a binary classification cross entropy function as the loss function.

[0099] In addition, the training loss of the entity extraction model includes the sum of the loss of the entity start position of the predicted label and the entity start position indicated by the true label, and the loss of the entity end position of the predicted label and the entity end position indicated by the true label; each round of training of the entity extraction model aims to minimize the training loss.

[0100] The calculation formula of the loss function is expressed as:

[0101] ;

[0102] in, represents the entity start position vector or entity end position vector in the true label, Represents the entity start position vector or entity end position vector in the predicted label, that is, the loss of the entity start position of the predicted label and the entity start position indicated by the true label, as well as the loss of the entity end position of the predicted label and the entity end position indicated by the true label are calculated by the above formula. Indicates the length of the reservoir text, Represents the i-th element in the entity start position vector or entity end position vector in the real label, Represents the i-th element in the entity start position vector or entity end position vector in the predicted label.

[0103] S400, predicting the unlabeled text, correcting the wrong prediction results manually, and performing semi-automatic labeling.

[0104] The semi-automatic labeling step is performed after each round of training. That is, after the entity extraction model is trained with the training samples of each type of entity, the entity extraction model after this round of training is used to predict the entity of this type for the unlabeled reservoir text, and the wrong prediction labels are corrected.

[0105] The examples corresponding to the annotations of the above six types of entities are, for example, after fine-tuning the entity extraction model with the training sample set of the "location" entity, the entity extraction model obtained in this round of training is used to predict the "location" entity for the unlabeled reservoir text obtained in step S100, and the prediction labels indicating the location of the "location" entity in these unlabeled reservoir texts are obtained respectively, and then the wrong prediction labels are corrected to obtain the prediction labels indicating the correct entity location. After that, the entity extraction model is fine-tuned with the training sample set of the "production" entity, and so on, and finally the entity extraction model is fine-tuned with the training sample set of the "remaining oil volume" entity, and the location of the "remaining oil volume" entity is predicted for the unlabeled reservoir data, and the wrong prediction labels are corrected.

[0106] In addition, after each round of fine-tuning training, the prediction ability of the entity extraction model is evaluated to confirm the final performance and generalization ability of the model. In this embodiment, the F1 value (F1score) is used as the evaluation indicator of the prediction ability of the entity extraction model. The F1 value comprehensively considers the accuracy Precision and recall Recall of the model. The calculation formula of the F1 value is as follows:

[0107] .

[0108] S500: After semi-automatically annotating all unlabeled texts, they are constructed into training samples, and all training samples are used to train the model.

[0109] After predicting and correcting all unlabeled reservoir texts according to each type of entity, the entity types of these reservoir texts and the corresponding correct prediction labels are obtained. According to the format of the prompt template, these reservoir texts and the corresponding entity types are converted into input samples, and together with the corresponding prediction labels, they form training samples to expand the set of training samples obtained in step S200. All training samples are then used to train the entity extraction model, and this training is the final training.

[0110] After the final training of the entity extraction model, save the parameters of the final entity extraction model, that is, the model weight file, in the format of a pt binary file.

[0111] S600, entity recognition of the oil reservoir text to be predicted can be directly predicted using the model weights saved in the previous step (step S500), and the result is decoded after prediction to be the entity name in the oil reservoir field. That is, the entity of the type to be extracted is extracted from the oil reservoir text to be predicted according to the entity position indicated by the prediction label output by the entity extraction model.

[0112] In some embodiments, decoding is performed according to the following rules (i.e., entities are extracted according to the entity positions indicated by the predicted tags):

[0113] First, determine which type of entity is predicted in this round (one of the six types), find all coordinates with element values ​​of 1 in the entity start position vector of the predicted label as the entity start position, for each entity start position, find the coordinate with the element value of 1 closest to the entity start position in the entity end position vector as the corresponding entity end position, associate and store each pair of entity start position and entity end position in the form of a tuple, and finally find all (entity start position, entity end position) tuples that meet the rules, extract the text between each tuple from the reservoir text, and the text is the currently predicted entity. For example, if the "location" entity is to be predicted, the final decoded text is the extracted "location" type entity.

[0114] Example 2

[0115] This embodiment introduces a multi-level feature entity extraction system for digital reservoirs, which includes:

[0116] The data acquisition module is configured to: obtain unlabeled reservoir text, and preprocess the reservoir text, wherein the preprocessing includes sentence segmentation.

[0117] The data annotation module is configured to: perform multi-type entity annotation on part of the reservoir text output by the data acquisition module; process the annotated reservoir text into input samples of each type of entity using the prompt template, and generate corresponding real labels for the entity locations.

[0118] The model fine-tuning module is configured to: use the input samples of each type of entity and the corresponding true labels as training samples to train the pre-built entity extraction model; the entity extraction model uses reservoir text as input, and after multi-level feature extraction, outputs the predicted label of the entity location.

[0119] The sample expansion module is configured as follows: after training the entity extraction model with the training samples of each type of entity, the trained entity extraction model is used to predict the unlabeled reservoir text output by the data acquisition module for the type of entity, and the wrong prediction labels are corrected.

[0120] The model training module is configured to: construct all unlabeled reservoir texts and corresponding prediction labels output by the sample expansion module as training samples, and train the entity extraction model with all the training samples.

[0121] The entity extraction module is configured to: predict the reservoir text to be predicted using the entity extraction model trained by the model training module, and extract entities according to the entity positions indicated by the prediction labels.

[0122] The above-mentioned 6 system modules correspond to the 6 steps (S100-S600) in Example 1 respectively, that is, the detailed configuration of the 6 system modules can refer to the features defined for the 6 steps in Example 1, and will not be described in detail here.

[0123] The present invention is not limited to the above-mentioned specific embodiments, but extends to any new features or any new combination disclosed in this specification, as well as any new method or process steps or any new combination disclosed.

Claims

1. A multi-level feature entity extraction method for digital reservoirs, characterized in that: include: S1, obtaining unlabeled reservoir text, and preprocessing the reservoir text, wherein the preprocessing includes sentence segmentation; S2. Perform multi-type entity annotation on the preprocessed part of the reservoir text; process the annotated reservoir text into input samples of each type of entity using the prompt template, and generate corresponding real labels of the entity locations; S3, using the input samples of each type of entity and the corresponding true labels as training samples, respectively, to train the pre-built entity extraction model; the entity extraction model uses the reservoir text as input, and after multi-level feature extraction, outputs a predicted label indicating the entity location; The entity extraction model is constructed as follows: using the BERT module to extract the word vector of the input sample; using the BiLSTM module to extract the contextual features of the BERT model output vector; using the CNN module to enhance the features output by the BiLSTM module; The outputs of the BERT module, the BiLSTM module, and the CNN module are fused to obtain multi-level features; Using two multi-layer perceptron modules to respectively predict the entity start position and the entity end position according to the multi-level features, wherein the first multi-layer perceptron module predicts the entity start position and the second multi-layer perceptron module predicts the entity end position; S4. After training the entity extraction model with the training samples of each type of entity, the trained entity extraction model is used to predict the entity of the type in the unlabeled reservoir text, and the wrong prediction labels are corrected; S5, constructing all unlabeled reservoir texts and corresponding prediction labels after step S4 as training samples, and training the entity extraction model with all training samples; S6. Use the entity extraction model trained in step S5 to predict the reservoir text to be predicted, and extract entities according to the entity positions indicated by the prediction labels.

2. The multi-level feature entity extraction method for digital reservoirs according to claim 1, characterized in that: The prompt template is in the form of: [CLS] Entity Type [SEP] Reservoir Text [SEP]; [CLS] is the start tag and [SEP] is the separation tag.

3. The multi-level feature entity extraction method for digital reservoirs according to claim 1, characterized in that: The extracting the entity according to the entity position indicated by the predicted label includes: Determine the entity type of the current prediction; Locate all entity start positions and entity end positions from the predicted labels; Associate each located entity start position with the nearest entity end position in the form of a two-tuple; The text between each bigram is extracted from the reservoir text, which is the current predicted entity.

4. The multi-level feature entity extraction method for digital reservoirs according to claim 3, characterized in that: The predicted label includes an entity start position vector and an entity end position vector with the same length as the input reservoir text; the position with a value of 1 in the entity start position vector represents the entity start position, and the position with a value of 0 represents the non-entity start position; the position with a value of 1 in the entity end position vector represents the entity end position, and the position with a value of 0 represents the non-entity end position.

5. The multi-level feature entity extraction method for digital reservoirs according to any one of claims 1 to 4, characterized in that: The entity extraction model is trained using a binary cross entropy loss function.

6. The multi-level feature entity extraction method for digital reservoirs according to claim 5, characterized in that: The training loss of the entity extraction model includes the sum of the loss of the entity start position of the predicted label and the entity start position indicated by the true label, and the loss of the entity end position of the predicted label and the entity end position indicated by the true label; each round of training of the entity extraction model aims to minimize the training loss.

7. The multi-level feature entity extraction method for digital reservoirs according to claim 1, characterized in that: The sentence segment ends with a period.

8. The multi-level feature entity extraction method for digital reservoirs according to claim 1, characterized in that: The obtaining of unlabeled reservoir text comprises: Perform OCR recognition on paper reservoir documents: Correct the recognition results.

9. A multi-level feature entity extraction system for digital reservoirs, characterized in that: include: The data acquisition module is configured to: obtain unlabeled reservoir text, and preprocess the reservoir text, wherein the preprocessing includes sentence segmentation; The data annotation module is configured to: annotate part of the reservoir text output by the data acquisition module with multiple types of entities; process the annotated reservoir text into input samples of each type of entity using a prompt template, and generate corresponding real labels for the entity locations; The model fine-tuning module is configured to: use the input samples of each type of entity and the corresponding true labels as training samples to train the pre-built entity extraction model; the entity extraction model uses the reservoir text as input, and outputs the predicted label of the entity location after multi-level feature extraction; The entity extraction model is constructed as follows: using the BERT module to extract the word vector of the input sample; using the BiLSTM module to extract the contextual features of the BERT model output vector; using the CNN module to enhance the features output by the BiLSTM module; The outputs of the BERT module, the BiLSTM module, and the CNN module are fused to obtain multi-level features; Using two multi-layer perceptron modules to respectively predict the entity start position and the entity end position according to the multi-level features, wherein the first multi-layer perceptron module predicts the entity start position and the second multi-layer perceptron module predicts the entity end position; The sample expansion module is configured to: after training the entity extraction model with the training samples of each type of entity, use the trained entity extraction model to predict the entity of the type on the unlabeled reservoir text output by the data acquisition module, and correct the wrong prediction label; The model training module is configured to: construct all unlabeled reservoir texts and corresponding prediction labels output by the sample expansion module as training samples, and train the entity extraction model with all the training samples; The entity extraction module is configured to: predict the reservoir text to be predicted using the entity extraction model trained by the model training module, and extract entities according to the entity positions indicated by the prediction labels.

Citation Information

Patent Citations

  • Complex heavy equipment entity extraction method based on ALBert

    CN113326700A

  • Named entity recognition method based on pre-training language model

    CN113806494A

  • Named entity identification method and system

    CN117933258A