A classification method for marine oil and gas field hazards based on large model data enhancement

Through large-scale model data enhancement and keyword fusion feature representation, the problem of data imbalance in the classification of marine oil and gas field hazards is solved and the classification accuracy is improved.

CN117235268BActive Publication Date: 2025-09-26CNOOC SAFETY & TECH SERVICES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311279085.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-07
Publication Date
2025-09-26
Estimated Expiration
2043-10-07

AI Technical Summary

Technical Problem

There are problems of data category imbalance and small number of samples in the classification of hidden dangers in marine oil and gas fields, which lead to overfitting of text classification models and feature confusion.

Method used

A large-model data enhancement method is used to generate new data with high confidence and integrate keyword information for feature representation and classification.

Benefits of technology

It effectively alleviates the problem of data category imbalance and improves the accuracy of classification of hidden dangers in marine oil and gas fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117235268B_ABST
    Figure CN117235268B_ABST
Patent Text Reader

Abstract

The present invention provides a method for classifying marine oil and gas field hazards based on large-scale model data augmentation, comprising the following steps: screening marine oil and gas field hazard categories for data augmentation; constructing prompts to guide the large-scale model to generate data based on the hazard categories and the corresponding data; filtering and evaluating the generated data; constructing a marine oil and gas field hazard keyword table based on the original data and the generated data; utilizing an attention mechanism to fuse hazard text and hazard keyword features; and employing softmax to distinguish hazard categories. By performing data augmentation on a small number of hazard categories, the present invention can effectively alleviate the imbalanced data category distribution problem in existing marine oil and gas field production and operation hazard text, thereby improving the accuracy of marine oil and gas field hazard text classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a method for classifying marine oil and gas field hidden dangers based on large model data enhancement. Background Art

[0002] Offshore oil and gas field hazard classification is a type of text classification task. Specifically, the task is to classify the hazard description data generated during the production and operation of offshore oil and gas fields into different hazard categories, such as safety and environmental protection, and management defects. This classification task presents numerous challenges. For example, existing offshore oil and gas field production and operation hazard text suffers from an imbalanced distribution of data categories. The sample size of some categories is relatively small, leading to overfitting when training text classification models. Therefore, data augmentation for categories with fewer samples can effectively alleviate this imbalanced distribution of the original data.

[0003] At the same time, data on hidden dangers in offshore oil and gas fields also present the following problem: texts with similar descriptions between categories with a large number of samples may also belong to different hidden danger categories. For example, "The pressure gauge valve of the hot oil circulation heater is leaking. Leakage of thermal medium oil poses a risk of environmental pollution and scalding personnel, posing a safety hazard" and "There is leakage at a flexible joint in the outlet pipeline of the demulsifier dosing pump. The leaked demulsifier may cause environmental pollution and pose a safety hazard." Both describe the risk of environmental pollution caused by equipment damage, but these two texts are respectively classified as safety and environmental protection and facilities and equipment. In this case, if only the original text is feature extracted, the extracted features are easily confused during classification. Therefore, before performing text feature extraction, keyword extraction is first performed. The keyword information is fused with the original text to obtain fused features, and then the offshore oil and gas field hidden danger classification is performed.

[0004] Text data augmentation is a common technique in natural language processing. It aims to increase the quantity and diversity of training data by performing various transformations and expansions on raw text. Data augmentation can effectively alleviate data scarcity and class imbalance, helping to improve model generalization and performance, and mitigate overfitting. Large models currently have an outstanding performance in natural language processing. Inspired by their success in text generation, this paper applies large models to enhance data on potential hazards in offshore oil and gas fields. Summary of the Invention

[0005] The problem to be solved by the present invention is to provide a marine oil and gas field hidden danger classification method based on large model data enhancement, which solves the problem of imbalance in existing data categories and improves the accuracy of marine oil and gas field hidden danger classification.

[0006] The present invention provides a method for classifying marine oil and gas field hazards based on large model data enhancement, comprising the following steps:

[0007] S1: Generate data using a large model and perform data enhancement;

[0008] S2: Aiming at marine oil and gas field hidden danger data, by integrating keyword information, enhancing the feature representation of text and performing classification.

[0009] Furthermore, the S1 includes the following steps:

[0010] S11: Screening the categories of marine oil and gas field hidden danger data to be enhanced;

[0011] S12: Generate the category label data using the large model T5 based on the data category label to be generated and the existing data of the category;

[0012] S13: Filter the generated marine oil and gas field hidden danger data, select high-confidence data and add them to the data set.

[0013] Furthermore, in S11, the number of hidden danger description samples corresponding to different hidden danger categories is calculated based on the existing data. The categories of marine oil and gas field hidden danger data with a number of samples lower than a threshold are to be enhanced.

[0014] Furthermore, the S12 includes the following steps:

[0015] S121: Using the data category label y to be generated i And the existing data x for this category i,i=1,...,n , construct the following prompt through the instruction, p = {The following is the hidden danger category y generated during the production and operation of offshore oil and gas fields i The hidden danger description x1,...,x n , generate m labels similar to the above example as y i Example};

[0016] S122: Input the prompt p into the large model T5 to generate the hidden danger category y i Data g1, ..., g m .

[0017] Furthermore, the S13 includes the following steps:

[0018] S131: Generate the generated marine oil and gas field hidden danger data g1, ..., g m , use ROUGE-L for filtering, the ROUGE-L of the generated data and any existing data must be less than the threshold. The ROUGE-L calculation formula is as follows:

[0019]

[0020] Where: LCS(x, g) represents the length of the longest common substring between the existing text and the generated text, and m represents the length of the existing text;

[0021] S132: Generated data g1, ..., g after filtering t We further evaluate g1, ..., g using the large model ChatGPT. t Belong to the field of hidden dangers in marine oil and gas fields and the category of hidden dangers y i The confidence level is set, and the data with confidence level higher than the threshold is selected and added to the dataset.

[0022] Furthermore, the S2 includes the following steps:

[0023] S21: obtaining a keyword list of marine oil and gas hidden dangers based on existing marine oil and gas field hidden danger description texts;

[0024] S22: Combining the hidden danger keyword table obtained above, obtain the keyword w in the hidden danger text s, obtain the embedded representation x of the offshore oil and gas field hidden danger text containing the keyword information, and use position encoding to add the order information of the words to the embedded representation x;

[0025] S23: Use the attention mechanism to fuse the text information and keyword information to obtain the fused feature representation;

[0026] S24: The obtained feature representation is subjected to softmax to obtain the corresponding hidden danger category.

[0027] Furthermore, in S23, three different linear transformations are performed on the embedded representation x: Q = W Q x;K=W K x; V = W V x obtains the query, key, and value of the attention mechanism and calculates the attention score using the following formula:

[0028]

[0029] In this way, a fusion feature representation of text information and keyword information is obtained.

[0030] Furthermore, the present invention also provides a device for running the above-mentioned data processing method.

[0031] Furthermore, the present invention also provides a device comprising a memory, a processor, and an algorithm stored in the memory and executable on the processor, wherein the processor implements the data processing method when executing the computer program.

[0032] Furthermore, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer algorithm, and the computer algorithm implements the data processing method when executed by a processor.

[0033] The advantages and positive effects of the present invention are:

[0034] By performing data enhancement on the categories of hidden dangers with few samples, the present invention can effectively alleviate the problem of uneven data category distribution in the existing texts on hidden dangers in marine oil and gas field production and operation, thereby improving the accuracy of text classification of hidden dangers in marine oil and gas fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is an overall flow chart of an embodiment of the present invention.

[0036] Figure 2 This is a model architecture diagram used for classifying hidden dangers in marine oil and gas fields according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0038] The embodiments of the present invention are further described below with reference to the accompanying drawings:

[0039] like Figure 1 As shown, the present invention provides a method for classifying hidden dangers in marine oil and gas fields based on large model data enhancement, comprising the following steps:

[0040] S1: Generate data using the large model and perform data augmentation. Specifically, S1 includes the following steps.

[0041] S11: Screening the categories of offshore oil and gas field hidden danger data to be enhanced. Specifically, based on the existing data, the number of hidden danger description samples corresponding to different hidden danger categories is calculated. The categories of offshore oil and gas field hidden danger data with a sample number below a threshold are selected for data enhancement.

[0042] Taking the current 2190 marine oil and gas field hidden danger data as an example, the hidden danger categories can be divided into safety and environmental protection, process, management defects, wellbore, others, human unsafe behavior, and equipment and facilities. The number of samples is 203, 163, 20, 13, 584, 4, and 1203 respectively. If the threshold is set to 100, the categories to be enhanced are management defects, wellbore, and human unsafe behavior.

[0043] S12: Based on the category label of the data to be generated and the existing data of the category, use the large model T5 to generate the data of the category label. Specifically, use the category label y of the data to be generated i And the existing data x for this category i,i=1,...,n , construct the following prompt through the instruction, p = {The following is the hidden danger category y generated during the production and operation of offshore oil and gas fields i The hidden danger description x1,...,x n , generate m labels similar to the above example as y i For example, the prompt p is input into the large model T5 to generate the hidden danger category y i Data g1, ..., g m .

[0044] Taking the wellbore category as an example, first construct a prompt p = {The following is a description of the hidden dangers of the wellbore category generated during the production and operation of offshore oil and gas fields:

[0045] 1. The internal actuator of the ball valve behind the constant pressure relief valve of the casing gas line of A26 well was damaged.

[0046] 2. ...,

[0047] Generate 100 examples similar to the above example with the label of wellbore class}, input the prompt p into the T5 model, and the output is the data to be generated with the label of wellbore class.

[0048] S13: Filter the generated marine oil and gas field hidden danger data, select high confidence data and add them to the data set. Specifically, for a certain type of generated marine oil and gas field hidden danger data g1, ..., g m In order to avoid duplication with existing data, ROUGE-L is used for filtering. The ROUGE-L between the generated data and any existing data needs to be less than the threshold. The ROUGE-L calculation formula is as follows:

[0049]

[0050] Where LCS(x, g) represents the length of the longest common substring between the existing text and the generated text, and m represents the length of the existing text. The filtered generated data is further evaluated using the large model ChatGPT to assess the confidence level of the generated data in the marine oil and gas field hazard category and the hazard classification. Data with a confidence level above a threshold is selected and added to the dataset.

[0051] S2: For offshore oil and gas field hidden danger data, by integrating keyword information, enhancing the feature representation of text and performing classification, such as Figure 2 Specifically, S2 includes the following steps.

[0052] S21: Segment and filter stop words on the existing text describing offshore oil and gas field hazards, and use the TF-IDF model to generate a keyword list for offshore oil and gas hazard. Based on the existing data, keywords such as bleed valve, injection well, Christmas tree, and high-pressure gas well can be extracted.

[0053] S22: For the hidden danger text s, obtain the keyword w in s according to the aforementioned hidden danger keyword table. Concatenate the embeddings of the hidden danger text and the hidden danger keyword to obtain an embedded representation x. Positional encoding is used to incorporate the word order information into the embedded representation x. For example, consider the hidden danger text "High-pressure gas well W-G1: Downhole safety valve internal leakage, main valve external leakage, and surface safety valve external leakage." The keywords are high-pressure gas well and safety valve. Concatenate the keywords with the hidden danger text, and use positional encoding to incorporate the word order information into the embedded representation, thereby obtaining a text embedding that includes the keyword information.

[0054] S23: Perform three different linear transformations on the embedded representation x: Q = W Q x;K=W K x;V=W V x obtains the query, key, and value of the attention mechanism and calculates the attention score using the following formula:

[0055]

[0056] In this way, a fusion feature representation of text information and keyword information is obtained.

[0057] S24: The obtained feature representation is classified into its corresponding hidden danger category through softmax classification.

[0058] In summary, the present invention can effectively alleviate the problem of uneven data category distribution in existing marine oil and gas field production and operation hidden danger texts by performing data enhancement on small-sample hidden danger categories, thereby improving the accuracy of marine oil and gas field hidden danger text classification.

[0059] The above is a detailed description of an embodiment of the present invention. However, the content described is only a preferred embodiment of the present invention and should not be considered to limit the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A method for classifying hidden dangers in marine oil and gas fields based on large model data enhancement, characterized by: The following steps are included: S1: Generate data using a large model and perform data enhancement. S1 includes the following steps: S11: Screening the categories of marine oil and gas field hidden danger data to be enhanced; S12: Based on the data category label to be generated and the existing data of the category, the large model T5 is used to generate the category label data. The S12 includes the following steps: S121: Using the data category label y to be generated i And the existing data x for this category i,i=1,…,n , construct the following prompt through the instruction, p = {The following is the hidden danger category y generated during the production and operation of offshore oil and gas fields i The hidden danger description x1,…,x n , generate m labels similar to the above example as y i Example}; S122: Input the prompt p into the large model T5 to generate the hidden danger category y i Data g1,…,g m ; S13: filtering the generated marine oil and gas field hidden danger data, selecting high-confidence data and adding it to the data set; S2: Aiming at marine oil and gas field hidden danger data, by integrating keyword information, enhancing the feature representation of text and performing classification.

2. The method for classifying marine oil and gas field hazards based on large model data enhancement according to claim 1 is characterized by: In S11, the number of hidden danger description samples corresponding to different hidden danger categories is calculated based on the existing data. The categories of hidden danger data in which the number of samples is lower than the threshold are the categories for which data enhancement is to be performed on the marine oil and gas field hidden danger data.

3. The method for classifying marine oil and gas field hazards based on large model data enhancement according to claim 1 or 2, characterized in that: Said S13 comprises the following steps, S131: Generate the generated marine oil and gas field hidden danger data g1,…,g m , use ROUGE-L for filtering, the ROUGE-L of the generated data and any existing data must be less than the threshold. The ROUGE-L calculation formula is as follows: Where: LCS(x,g) represents the length of the longest common substring between the existing text and the generated text, and m represents the length of the existing text; S132: Generated data g1,…,g after filtering t Use the large model ChatGPT to further evaluate and evaluate g1,…,g t Belong to the field of hidden dangers in marine oil and gas fields and the category of hidden dangers y i The confidence level is set, and the data with confidence level higher than the threshold is selected and added to the dataset.

4. The method for classifying marine oil and gas field hazards based on large model data enhancement according to claim 1 or 2, characterized in that: Said S2 comprises the following steps, S21: obtaining a keyword list of marine oil and gas hidden dangers based on existing marine oil and gas field hidden danger description texts; S22: Combining the hidden danger keyword table obtained above, obtain the keyword w in the hidden danger text s, obtain the embedded representation x of the offshore oil and gas field hidden danger text containing the keyword information, and use position encoding to add the order information of the words to the embedded representation x; S23: Use the attention mechanism to fuse the text information and keyword information to obtain the fused feature representation; S24: The obtained feature representation is subjected to softmax to obtain the corresponding hidden danger category.

5. The method for classifying marine oil and gas field hazards based on large model data enhancement according to claim 4 is characterized by: In S23, three different linear transformations are performed on the embedded representation x: Q = W Q x;K=W K x; V = W V x obtains the query, key, and value of the attention mechanism and calculates the attention score using the following formula: In this way, a fusion feature representation of text information and keyword information is obtained.

6. A device for classifying hidden dangers in marine oil and gas fields based on large-scale model data enhancement, characterized by: Run the data processing method according to any one of claims 1 to 5.

7. An electronic device comprising a memory, a processor, and an algorithm stored in the memory and executable on the processor, wherein: The processor executes the data processing method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer algorithm, characterized in that: When the computer algorithm is executed by a processor, the data processing method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • MRI brain tumor classification method and system based on semi-supervised learning

    CN116385809A

  • Named entity recognition method fusing entity types and keyword features

    CN116822513A