Downhole drilling risk prediction method and device based on natural language processing, electronic equipment and medium

By constructing a professional drilling vocabulary and a complex underground accident vocabulary, using natural language processing technology to analyze the drilling log data, automatically extract accident risk information and predict it, the problems of high difficulty in manual analysis and low information extraction efficiency in the existing technology are solved. , achieving efficient and accurate risk prediction and safety improvement.

CN119398047APending Publication Date: 2025-02-07CHINA NAT PETROLEUM CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410984302.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art is difficult to effectively use drilled data for risk prediction before drilling, and manually extracting information from various reports is time-consuming and labor-intensive and error-prone.

Method used

Using natural language processing methods, a professional drilling vocabulary and complex underground accident vocabulary are constructed. The drilling log data is processed through natural language analysis models, accident risk information is automatically extracted and complex underground accident database is constructed, combined with the engineering design of the well to be drilled. Information to predict risks.

Benefits of technology

It realizes automated risk information extraction and prediction, improves drilling safety and efficiency, and reduces the time and error rate of manual analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398047A_ABST
    Figure CN119398047A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a drilling downhole risk prediction method and device based on natural language processing, electronic equipment and a medium. The method comprises the following steps: constructing a drilling professional lexicon, an underground accident complex lexicon and a natural language analysis model; adopting a natural language analysis model to identify the accident complex named entity of the unlabeled target well drilling log data; matching the accident complex named entity recognition result with the accident complex in the underground accident complex word bank, and constructing an underground accident complex database according to the accident complex named entity recognition result after the occurrence of the accident complex is determined; and according to the engineering design information of the to-be-drilled well and the accident complex information of the adjacent well in the same block and the same stratum as the to-be-drilled well, predicting the underground accident complex risk of the to-be-drilled well. By means of the scheme, the problems that time and labor are wasted and errors are prone to occurring when effective information is manually extracted from a report are solved, and the problem that drilled data are not fully used for conducting accident complex risk prediction on the to-be-drilled well is also solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of drilling engineering technology, and in particular to a method, device, electronic device and medium for predicting downhole drilling risks based on natural language processing. Background Art

[0002] Drilling is an important means of exploring and developing oil and gas. During drilling operations, drilling complications and accidents threaten the entire drilling process from beginning to end, seriously affecting the drilling speed, well construction quality and exploration and development benefits. In the pre-drilling stage, if we can summarize the laws of accident complications based on the situation of nearby wells, combine the drilling design of the well to be drilled, predict possible risks early, adjust the design in time, and avoid risks, it will effectively improve drilling safety.

[0003] However, the complex situations of accidents in wells that have been drilled are often scattered in various document reports, such as drilling history and drilling logs. The current manual analysis and summary method is time-consuming and labor-intensive, and often leads to misanalysis and missed analysis. These factors restrict the guiding role of historical well data and experience in drilling. With the rapid development of artificial intelligence technology, especially the rapid progress of natural language processing technology, it has become possible to automatically extract and predict complex accidents. At present, research has been carried out on the use of natural language recognition technology to extract useful information from drilling documents for statistical analysis; however, the information extraction of drilling logs, well histories and other documents currently mostly uses keyword matching methods. When encountering synonyms and variant words, there are difficulties in recognition; and the existing scheme does not mention how to combine the extracted historical information with the drilling design to guide the optimization of the drilling design.

[0004] Therefore, how to extract and subsequently process drilling information is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, electronic device and storage medium for predicting downhole risks in drilling based on natural language processing, so as to realize automatic extraction of drilling accident risk information from drilling logs and well history data, and form a complex downhole accident database, thereby solving the problem that it is time-consuming, labor-intensive and error-prone to manually extract effective information from various reports; at the same time, based on the engineering design information of the well to be drilled, complex accident information of adjacent wells in the same formation is automatically extracted from the complex downhole accident database, and complex accident prompts of the well to be drilled are generated, thereby providing effective guidance for drilling construction, and solving the problem of insufficient utilization of the data of the wells that have been drilled to predict the complex accident risks of the wells to be drilled.

[0006] In a first aspect, an embodiment of the present invention provides a method for predicting downhole drilling risks based on natural language processing, comprising:

[0007] Constructing a drilling professional vocabulary and a downhole accident complex vocabulary, and integrating the drilling professional vocabulary and the downhole accident complex vocabulary into a general natural language analysis tool;

[0008] The natural language analysis model is trained using annotated drilling log data and a professional drilling vocabulary.

[0009] The natural language analysis model is used to perform sentence segmentation and word segmentation processing on the unlabeled target drilling log data, and to identify complex named entities of time and accidents;

[0010] According to the accident complex named entity recognition result, the accident complex is matched with the accident complex in the underground accident complex word library to determine whether the accident complex occurs, and after determining that the accident complex occurs, the underground accident complex database is constructed according to the accident complex named entity recognition result;

[0011] Based on the engineering design information of the well to be drilled and the accident complexity information of neighboring wells in the same block and formation as the well to be drilled obtained from the downhole accident complexity database, the downhole accident complexity risk of the well to be drilled is predicted.

[0012] In a second aspect, an embodiment of the present invention further provides a downhole drilling risk prediction device based on natural language processing, comprising:

[0013] A word library construction and integration module, used to construct a drilling professional word library and a downhole accident complex word library, and integrate the drilling professional word library and the downhole accident complex word library into a general natural language analysis tool;

[0014] A natural language analysis model training module is used to train a natural language analysis model using annotated drilling log data and a constructed drilling professional vocabulary;

[0015] A target drilling log data processing module is used to use the natural language analysis model to perform sentence segmentation and word segmentation processing on the unlabeled target drilling log data, and to identify time and accident complex named entities;

[0016] The underground accident complex database construction module is used to match the accident complex in the underground accident complex vocabulary according to the accident complex named entity recognition result, determine whether the accident complex occurs, and construct the underground accident complex database according to the accident complex named entity recognition result after determining that the accident complex occurs;

[0017] The complex risk prediction module for underground accidents of the wells to be drilled is used to predict the complex risks of underground accidents of the wells to be drilled based on the engineering design information of the wells to be drilled and the complex accident information of neighboring wells in the same block and formation as the wells to be drilled obtained from the complex underground accident database.

[0018] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0019] one or more processors;

[0020] A storage device for storing one or more programs;

[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the downhole drilling risk prediction method based on natural language processing described in any embodiment of the present invention.

[0022] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for predicting downhole drilling risks based on natural language processing as described in any embodiment of the present invention.

[0023] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the method for predicting downhole drilling risks based on natural language processing as described in any embodiment of the present invention.

[0024] The embodiment of the present invention provides a method, device, electronic device and storage medium for predicting downhole risk of drilling based on natural language processing, which constructs a drilling professional vocabulary, a downhole accident complex vocabulary and a natural language analysis model; uses the natural language analysis model to perform sentence segmentation processing on unlabeled target drilling log data, and identifies time and accident complex named entities; matches the accident complex named entity recognition result with the accident complex in the downhole accident complex vocabulary to determine whether the accident complex occurs, and constructs a downhole accident complex database based on the accident complex named entity recognition result after determining that the accident complex occurs; predicts the downhole accident complex risk of the drilling well based on the engineering design information of the well to be drilled and the accident complex information of adjacent wells in the same block and formation as the well to be drilled obtained from the downhole accident complex database. The technical solution of the embodiment of the present invention adopts natural language processing technology, supplemented by drilling professional data and knowledge, to automatically extract drilling accident risk information from drilling logs and well history data, and form a complex database of underground accidents, thereby solving the problem that it is time-consuming, labor-intensive, and error-prone to manually extract effective information from various reports; based on the engineering design information of the well to be drilled, the complex information of accidents in the same formation of adjacent wells is automatically extracted from the complex database of underground accidents, and complex prompts of accidents in the well to be drilled are generated, providing effective guidance for drilling construction, while also solving the problem of not fully utilizing the data of the wells that have been drilled to predict the complex risks of accidents in the wells to be drilled. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts. In the drawings:

[0026] Figure 1 This is a flowchart of a method for predicting downhole drilling risks based on natural language processing provided in Example 1 of the present invention;

[0027] Figure 2 This is a flow chart of a method for predicting downhole drilling risks based on natural language processing provided by Embodiment 2 of the present invention;

[0028] Figure 3 This is a schematic diagram of a method for storing drilling professional vocabulary and underground accident complex vocabulary provided by the second embodiment of the present invention;

[0029] Figure 4 This is a schematic diagram of a hierarchical structure of a complex vocabulary of underground accidents provided by the second embodiment of the present invention;

[0030] Figure 5 is a flow chart of another method for predicting downhole drilling risks based on natural language processing provided in the second embodiment of the present invention;

[0031] Figure 6 This is a schematic diagram of the result of pre-labeling raw corpus of drilling logs using a natural language processing tool, provided in the second embodiment of the present invention;

[0032] Figure 7 This is a schematic diagram of a manually corrected annotation result provided in the second embodiment of the present invention;

[0033] Figure 8 It is a schematic diagram of performing named entity recognition on unlabeled target drilling log data using a natural language analysis model provided by Embodiment 2 of the present invention;

[0034] Fig. 9 It is a schematic diagram of the structure of a downhole drilling risk prediction device based on natural language processing provided by the third embodiment of the present invention;

[0035] Fig.10 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0036] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0037] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0038] Among them, the acquisition, storage, use and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.

[0039] Embodiment 1

[0040] Figure 1 This is a flowchart of a method for predicting downhole drilling risks based on natural language processing provided in an embodiment of the present invention. This embodiment is applicable to the case of predicting downhole drilling risks based on natural language processing. The method of this embodiment can be executed by a downhole drilling risk prediction device based on natural language processing, and the device can be implemented in hardware and / or software. The device can be configured in a server for predicting downhole drilling risks based on natural language processing. The method specifically includes the following steps:

[0041] S110, constructing a drilling professional vocabulary and a downhole accident complex vocabulary, and integrating the drilling professional vocabulary and the downhole accident complex vocabulary into a general natural language analysis tool.

[0042] Among them, the drilling professional vocabulary may refer to a vocabulary composed of drilling professional vocabulary, and the drilling professional vocabulary includes but is not limited to shut-in, open well, oil pressure, pump pressure, drilling fluid, drilling, drilling, leakage, leakage rate and leakage. The underground accident complex vocabulary may refer to a vocabulary composed of underground accident complex vocabulary, and the accident complexity may refer to underground accidents and complex situations caused by various factors during the drilling process. These factors may cause underground accidents and complex situations to occur, bring great difficulties to the drilling project, reduce drilling efficiency, and increase drilling costs.

[0043] The complex vocabulary of downhole accidents includes but is not limited to overflow and well leakage. Among them, overflow refers to the phenomenon that during the drilling process, the oil, gas and water in the formation are pressed into the wellbore because the density of the drilling fluid cannot balance the pressure of the formation fluid, thereby causing the drilling fluid in the wellbore to overflow. Overflow is often a precursor to a blowout. If the amount of oil, gas and water entering the wellbore is small and can be discovered in time, the pressure balance can be re-established by increasing the density of the drilling fluid; however, if the overflow is not discovered in time, the wellbore pressure will become lower and lower, and the speed of oil, gas and water entering will become faster and faster, which will cause a blowout accident. Well leakage can refer to the phenomenon that during the drilling process, the drilling fluid or other media (such as cementing cement slurry) in the wellbore leaks into the pores or cracks of the formation. This is a common phenomenon. Most wellbores will have varying degrees of well leakage, but severe well leakage may cause the stability of the wellbore to decrease and affect the drilling speed.

[0044] Natural language processing is an important branch of artificial intelligence, dedicated to enabling computers to understand, interpret and generate human language. The natural language analysis tool may refer to word segmentation, part-of-speech tagging and named entity recognition of sentences; for example, word segmentation, part-of-speech tagging and named entity recognition of drilling log data. In an embodiment of the present invention, a drilling professional vocabulary and a complex vocabulary of underground accidents are integrated into a general natural language analysis tool, so that the drilling log data can be segmented, part-of-speech tagged and complex named entities of accidents in the drilling log data can be identified through the natural language analysis tool.

[0045] S120, using the annotated drilling log data and the constructed drilling professional vocabulary to train the natural language analysis model.

[0046] Among them, since the raw corpus of drilling logs is large in number, it is time-consuming and labor-intensive to annotate from scratch. Therefore, an embodiment of the present invention constructs a natural language analysis model, and the drilling log data is annotated by the natural language analysis model.

[0047] Optionally, the preset natural language analysis model is trained using annotated drilling log data and a drilling professional vocabulary to construct the natural language analysis model in the embodiment of the present invention.

[0048] S130, using the natural language analysis model to perform sentence segmentation and word segmentation processing on the unlabeled target drilling log data, and identifying complex named entities of time and accidents.

[0049] After the natural language analysis model is constructed, the natural language analysis model is used to perform sentence segmentation and word segmentation processing on the unlabeled drilling log data to obtain the named entities in the drilling log data. For example, the target drilling log data "During 7:20, drilling to a well depth of 6425.98m and leaking well" is processed by the natural language analysis model to determine the named entities in the target drilling log data; the identified named entities include 7:20, well depth, and leaking well; among which leaking well is the identified accident complex named entity.

[0050] S140, matching the accident complex named entity recognition result with the accident complex in the underground accident complex vocabulary to determine whether the accident complex has occurred, and after determining that the accident complex has occurred, constructing an underground accident complex database based on the accident complex named entity recognition result.

[0051] Among them, the identified accident complex named entity is matched with the accident complex in the underground accident complex word library to determine whether an accident complex has occurred; if it is determined that an accident complex has occurred, a underground accident complex database is constructed based on the accident complex named entity. For example, from the target drilling log data "drilling to a well depth of 6425.98m at 7:20 and leaking well found", the identified accident complex named entity is determined to be "well leaking", that is, it is determined that an accident complex has occurred, then the information related to the accident complex is obtained, and the underground accident complex database is constructed based on the identified accident complex and the information related to the accident complex.

[0052] S150, predicting the risk of downhole accident complexity of the well to be drilled based on the engineering design information of the well to be drilled and the accident complexity information of neighboring wells in the same block and formation as the well to be drilled obtained from the downhole accident complexity database.

[0053] The engineering design information may refer to engineering information designed before drilling the well, and the engineering design information includes but is not limited to well depths of different formations, pressure equivalent densities of different formations, and drilling fluid densities of different formations.

[0054] In the embodiment of the present invention, the accident complexity risk of the well to be drilled in different blocks and formations is predicted based on the engineering design information of the well to be drilled and the accident complexity information of the neighboring wells in the same block and formation. For example, to predict the accident complexity risk of the well to be drilled in formation B of block A, it is necessary to determine the engineering design information of the well to be drilled in formation B of block A, and select the accident complexity information of the neighboring wells in the same block A and formation B as the well to be drilled from the constructed downhole accident complexity database, so as to predict the downhole accident complexity risk of the well to be drilled.

[0055] The embodiment of the present invention provides a method for predicting downhole risk of drilling based on natural language processing, which comprises the following steps: constructing a drilling professional vocabulary and a downhole accident complex vocabulary, and integrating the drilling professional vocabulary and the downhole accident complex vocabulary into a general natural language analysis tool; using annotated drilling log data and the constructed drilling professional vocabulary to train a natural language analysis model; using the natural language analysis model to perform sentence segmentation and word segmentation processing on unlabeled target drilling log data, and identifying time and accident complex named entities; matching the accident complex named entity recognition result with the accident complex in the downhole accident complex vocabulary to determine whether the accident complex occurs, and constructing a downhole accident complex database based on the accident complex named entity recognition result after determining that the accident complex occurs; predicting the downhole accident complex risk of the drilling to be drilled based on the engineering design information of the well to be drilled and the accident complex information of neighboring wells in the same block and formation as the well to be drilled obtained from the downhole accident complex database. The technical solution of the embodiment of the present invention adopts natural language processing technology, supplemented by drilling professional data and knowledge, to automatically extract drilling accident risk information from drilling logs and well history data, and form a complex database of underground accidents, thereby solving the problem that it is time-consuming, labor-intensive, and error-prone to manually extract effective information from various reports; based on the engineering design information of the well to be drilled, the complex information of accidents in the same formation of adjacent wells is automatically extracted from the complex database of underground accidents, and complex prompts of accidents in the well to be drilled are generated, providing effective guidance for drilling construction, while also solving the problem of not fully utilizing the data of the wells that have been drilled to predict the complex risks of accidents in the wells to be drilled.

[0056] Embodiment 2

[0057] Figure 2 The flowchart of a method for predicting downhole drilling risks based on natural language processing provided in an embodiment of the present invention is shown in FIG. The embodiment of the present invention further optimizes the above embodiment on the basis of the above embodiment, and the embodiment of the present invention can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the method for predicting downhole drilling risks based on natural language processing provided in an embodiment of the present invention may include the following steps:

[0058] S210, constructing a drilling professional vocabulary and a downhole accident complex vocabulary, and integrating the drilling professional vocabulary and the downhole accident complex vocabulary into a general natural language analysis tool.

[0059] Among them, drilling professional vocabulary is collected through channels such as drilling professional books and various reports, and organized in a format that can be recognized by Chinese natural language processing tools to form a customized drilling professional vocabulary library. The formed drilling professional vocabulary library contains at least different types of expression vocabulary corresponding to the two complex accidents of overflow and well leakage; the interface provided by the Chinese language tool is used to integrate the customized vocabulary library into the natural language analysis tool of the tool.

[0060] As an optional but non-limiting implementation, the construction of a drilling professional vocabulary and a downhole accident complex vocabulary, and integrating the drilling professional vocabulary and the downhole accident complex vocabulary into a general natural language analysis tool, includes but is not limited to steps A1-A3:

[0061] Step A1: Obtain drilling professional vocabulary and underground accident complex vocabulary based on drilling professional books and historical data, and standardize the drilling professional vocabulary and underground accident complex vocabulary in a format recognizable by Chinese natural language processing tools.

[0062] Step A2: construct a drilling professional vocabulary based on the unified format drilling professional vocabulary, and construct a downhole accident complex vocabulary based on the unified format downhole accident complex vocabulary; the downhole accident complex vocabulary includes overflow and well leakage.

[0063] Step A3: Using the interface provided by the Chinese natural language processing tool, the drilling professional vocabulary and the underground accident complex vocabulary are integrated into the general natural language analysis tool.

[0064] Among them, drilling professional vocabulary and underground accident complex vocabulary are obtained based on drilling professional books and historical data, and the drilling professional vocabulary and underground accident complex vocabulary are formatted in a format that can be recognized by Chinese natural language processing tools; see Figure 3 , saved in txt file format, to build a drilling professional vocabulary and a complex vocabulary for underground accidents.

[0065] Optionally, the interface provided by the Chinese natural language processing tool is used to integrate the drilling professional vocabulary and the underground accident complex vocabulary into the general natural language analysis tool. The embodiment of the present invention takes the HanLP natural language processing toolkit as an example, calls the interface provided by the language package, and integrates the customized drilling professional vocabulary into the toolkit; the relevant code is as follows:

[0066] import com.hankcs.hanlp.HanLP;

[0067] import com.hankcs.hanlp.dictionary.CustomDictionary;

[0068] Public void LoadCustomDictionary()

[0069] {

[0070] String customDictionaryPath = "custom dictionary.txt";

[0071] CustomDictionary.addWordsFromFile(customDictionaryPath);

[0072] }

[0073] Optionally, the drilling professional word library includes a downhole accident complex word library, and the words in the downhole accident complex word library are all included in the drilling professional word library, but the accident complex word library is constructed in layers, the first layer is the accident complex category, and the second layer is the different expression words corresponding to each type of accident complex. Figure 4 Taking the "well leakage" accident as an example, "well leakage" is the first layer of complex accident categories; the second layer is the different expressions corresponding to "well leakage", including but not limited to leakage rate, leakage, well leakage, continued leakage and export loss.

[0074] S220. Use the annotated drilling log data and the constructed drilling professional vocabulary to train the natural language analysis model.

[0075] Among them, the general natural language analysis model in the prior art lacks a corpus in a professional field, and the accuracy of the analysis results of professional language needs to be improved. In the embodiment of the present invention, the drilling corpus with annotations and the newly constructed drilling professional vocabulary are used to train the named entity recognition model in the drilling field. Since the annotation workload of the drilling corpus is large, the present invention adopts a semi-automatic annotation method, that is, using a tool to annotate the raw corpus with named entities, and then manually modifying the annotation results according to professional knowledge to form a familiar drilling corpus; using the interface provided by the tool, the named entity recognition model in the drilling field is trained. Among them, the drilling corpus can refer to drilling log data.

[0076] As an optional but non-limiting implementation, the natural language analysis model is trained using the annotated drilling log data and the constructed drilling professional vocabulary, including but not limited to steps B1-B3:

[0077] Step B1: using a natural language analysis tool to annotate the drilling log data to obtain first drilling log data with annotations.

[0078] Step B2: manually correct the first drilling data with annotations according to professional knowledge to obtain second drilling log data.

[0079] Step B3: training a natural language analysis model based on the second drilling log data and the constructed drilling professional vocabulary; the natural language analysis model is used to identify named entities in the drilling log data.

[0080] Among them, see Figure 5, a general natural language analysis tool is used to annotate the drilling log data to obtain first annotated drilling log data; the annotated drilling log data is then manually corrected to obtain second drilling log data; the second drilling log data is used as an input of the model to train the natural language analysis model.

[0081] Optionally, taking the HanLP natural language processing tool as an example, the drilling log data is first pre-annotated using the named entity annotation function provided by the HanLP natural language processing tool; and then the pre-annotated drilling log data is manually modified to form word segmentation annotations corresponding to the drilling professional vocabulary. Figure 6 , when using the HanLP natural language processing tool for annotation, the drilling professional vocabulary was not accurately annotated; see Figure 7 ,After manual correction, drilling professional vocabulary can be accurately labeled to improve the recognition accuracy of the model when training the natural language analysis model.

[0082] Optionally, use the annotated drilling professional vocabulary to merge the general drilling professional vocabulary to train the natural language analysis model. The code example is as follows:

[0083] From pyhanlp import *

[0084] Import os

[0085] CRF_MODEL_PATH="models / my_crf_model.bin"

[0086] Train_Data_Path = "data / train_data.txt" / / General corpus + drilling professional corpus

[0087] Model_config_path="config / model_config.json"

[0088] CRFTrainer=JClass('com.hankcs.hanlp.model.crf.CRFTrainer')

[0089] Trainer = CRFTrainer()

[0090] Trainer.train(Train_data_path,CRF_MODEL_PATH,Model_config_path)

[0091] S230, using the natural language analysis model to perform sentence segmentation and word segmentation processing on the unlabeled target drilling log data, and identifying complex named entities of time and accidents.

[0092] The natural language analysis model is used to segment the drilling log data and the unstructured data in the well history, perform sentence segmentation, word segmentation and named entity recognition. For example, “During 07:20, the well was found to be leaking when the well depth was 6425.98m, and the drilling fluid loss was 0.6m 3 " is taken as an example, the natural language analysis model is used to identify the unstructured data in the drilling log. The results of sentence segmentation, word segmentation and named entity recognition are shown in Figure 8 ; Among them, "NN" is a proper noun; "NT" is a time noun; "VV" is a verb; and "PU" is a punctuation mark.

[0093] The embodiment of the present invention trains a natural language analysis model, which is used to segment the unlabeled target drilling log data and identify the time and accident complex named entities. This solves the problem that manual analysis of drilling history reports is time-consuming and laborious, and it is difficult to effectively extract complex accident information; it solves the problem that the general language model lacks drilling professional corpus and vocabulary training, and is difficult to be directly used for the analysis of drilling history reports.

[0094] S240, matching the accident complex named entity recognition result with the accident complex in the underground accident complex vocabulary to determine whether the accident complex has occurred, and after determining that the accident complex has occurred, constructing an underground accident complex database based on the accident complex named entity recognition result.

[0095] Among them, according to the recognition result of step S230, the recognized accident complex named entity is searched and matched with the downhole accident complex vocabulary to determine whether an accident complex has occurred and classify the accident complex; if an accident complex has occurred, the time entity and well depth entity that are earlier than and closest to the accident complex noun are extracted, and the time, well depth, formation and other basic information in the drilling log structured data are saved together in the downhole accident complex database; the other basic information includes but is not limited to the oil field to which the well belongs, the block, the wellbore trajectory, the wellbore structure, the drill bit assembly and the drilling fluid density.

[0096] As an optional but non-limiting implementation method, the accident complex named entity recognition result is matched with the accident complex in the underground accident complex word library to determine whether the accident complex occurs, and after determining that the accident complex occurs, the underground accident complex database is constructed according to the accident complex named entity recognition result, including but not limited to steps C1-C5:

[0097] Step C1: Determine the target accident complex named entity to be identified based on the accident complex named entity recognition result.

[0098] Step C2: Match the target accident complex named entity with the accident complex in the underground accident complex word library to determine whether an accident complex has occurred.

[0099] Step C3: If it is determined that a complex accident has occurred, a time entity and a target named entity that are located before and adjacent to the target complex accident named entity are determined from the target drilling log data.

[0100] Step C4: in the drilling log file, obtain structured information corresponding to the target drilling log data; the structured information includes date, formation level, drill bit size, drill bit model and drilling fluid density.

[0101] Step C5: construct an underground accident complex database by combining the structured information, target accident complex named entities, time entities and target named entities; the underground accident complex database includes at least two accident complex tables, each accident complex table corresponds to a well, and each record in the accident complex table corresponds to an accident complex.

[0102] Among them, taking the target drilling log data "During 07:20, drilling to a well depth of 6425.98m found leaking, 0.6m3 of drilling fluid lost" as an example, the identified named entities include: period / NN, 07:20 / NT time, well depth / NN, well leakage / NN, drilling fluid / NN. Using the identified named entities as indexes, matching with the vocabulary in the constructed underground accident complex database, it can be obtained that the named entity "well leakage" identified in the example sentence successfully matches the vocabulary under the "well leakage" category in the database. In the target drilling log data, search for the time entity and the "well depth" named entity that are closest to the "well leakage" entity and located before the "well leakage" entity, and the corresponding values ​​of the entities are 07:20 and 6425.98m respectively. In the drilling log file, obtain the structured information corresponding to the target drilling log data, the structured information includes but is not limited to date, stratigraphic layer, drill bit size, drill bit model and drilling fluid density. The structured information, target accident complex named entity, time entity and target named entity obtained by the above identification are saved in the underground accident complex database. In this database, each well with a complex accident has an accident complex table. The table structure is shown in Table 1. Each record in the table is an accident complex.

[0103] Table 1 Accident complexity table

[0104]

[0105]

[0106] Optionally, the underground accident complex database should also include at least a well and block information table, and the structure of the well and block information table is shown in Table 2.

[0107] Table 2 Well and block information

[0108] Block Name well name Block 1 Well 11 Block 1 Well 12 Block 1 Well 13 Block 1 Well 14 Block 1 Well 15 Block 2 Well 21 Block 2 Well 22 Block 2 Well 23 Block 2 Well 24 ... ... Block n Well n1 Block n Well n2

[0109] S250, predicting the risk of downhole accident complexity of the well to be drilled based on the engineering design information of the well to be drilled and the accident complexity information of neighboring wells in the same block and formation as the well to be drilled obtained from the downhole accident complexity database.

[0110] Among them, based on the engineering design information of the well to be drilled, the complex accident information of the neighboring wells in the same formation of the block is searched in the complex downhole accident database, and the complex risk of downhole accidents of the well to be drilled is predicted. Specifically, according to the geological stratification table in the engineering design of the well to be drilled, a statistical table of the complexity of accidents of neighboring wells in different formations is automatically generated to provide risk prompts for the drilling project; for the drilling fluid density design table in the engineering design of the well to be drilled, combined with the drilling fluid density information when overflow and well leakage occur in the same formation of the neighboring wells, the possibility of overflow or well leakage risk in the well to be drilled according to the current drilling fluid density design is calculated. The embodiment of the present invention predicts the complex risk of downhole accidents of the well to be drilled based on the complex downhole accident database constructed using historical data, which solves the problem that it is difficult to use historical complex drilling accident information to quantitatively guide the design and construction of the well to be drilled.

[0111] As an optional but non-limiting implementation method, the prediction of the complex risk of underground accidents of the well to be drilled is performed based on the engineering design information of the well to be drilled and the complex accident information of neighboring wells in the same block and formation as the well to be drilled obtained from the underground accident complex database, including but not limited to steps D1-D3:

[0112] Step D1: Determine the engineering design information of the well to be drilled; the engineering design information includes the drilling fluid density, formation pressure equivalent density, vertical depth section and inclined depth section of the formation.

[0113] Step D2: Using a matching algorithm, the complex accident information of neighboring wells in the same block and formation as the well to be drilled is obtained from the downhole accident complex database, and complex accident prompts are formed according to the formation and well depth; wherein, the complex accident information of neighboring wells includes the formation drilling fluid density during overflow of the neighboring well and the formation drilling fluid density during well leakage, and the well depth includes the vertical depth section of the formation and the inclined depth section of the formation.

[0114] Step D3: predict the risk of downhole accidents in the well to be drilled based on the drilling fluid density of the formation to be drilled and the complex accident information of the vicinity.

[0115] Among them, taking Well 15 to be drilled as an example, based on the engineering design information of Well 15 and combined with the accident complexity information of neighboring wells in the same block, the accident complexity risks of Well 15 at different well depths and different formations are predicted; Table 3 is the drilling fluid density design table of Well 15 in different formations.

[0116] Table 3 Drilling fluid density design table of Well 15 in different formations

[0117]

[0118] Using a matching algorithm, the accident complex information of the adjacent wells and the same formation in the same block as well 15 is extracted from the underground accident complex database, and accident complex prompts are formed according to the formation and well depth. Specifically, it can be seen from Table 2 that well 15 is located in block 1, and the adjacent wells in the same block as well 15 include wells 11, 12, 13 and 14; referring to Table 1, the accident complex corresponding to different formations is determined from the adjacent wells according to the different formation information of well 15, and an accident complex prompt table as shown in Table 4 is constructed. For example, well 15 formation 4, adjacent wells 12 and 13 have overflow and well leakage, then an overflow and well leakage accident complex prompt is issued for well 15 formation 4. According to the drilling fluid density design data of well 15 formation 4, combined with the drilling fluid density of adjacent wells 12 and 13 formation 4, the possibility of overflow and well leakage risk in well 15 formation 4 is predicted.

[0119] Table 4 Accident Complexity Prompt Table

[0120] Horizon Inclined well depth (m) Vertical depth section (m) Complex tips for accidents in neighboring wells Strata 1 0~500 0~500 Strata 2 500~1450 500~1450 Lost circulation risk Strata 3 1450~2935 1450~2935 Lost circulation risk Strata 4 2935~4405 2935~4405 Well leakage and overflow risk Stratum 5 4405~5048 4405~4985 Overflow risk Stratum 6 5048~5911 4985~5382 Overflow risk Strata 7 5911~6957 5382~5430 Lost circulation risk

[0121] As an optional but non-limiting implementation, the prediction of the risk of downhole accidents to be drilled based on the density of the drilling fluid in the formation to be drilled and the complex information of nearby accidents includes:

[0122] The complex risk of underground accidents in the well to be drilled can be predicted by using the overflow risk formula and the well leakage risk formula, which is expressed as:

[0123]

[0124]

[0125] Among them, MD Design Characterizes the density of the drilling fluid in the formation to be drilled, MD Kick Characterizes the formation drilling fluid density during overflow from adjacent wells; MD Loss It represents the density of the formation drilling fluid when there is leakage in adjacent wells; k1 and k2 represent the scaling coefficients.

[0126] Taking well 15 in formation 7 as an example, the overflow and well leakage risk coefficients are calculated: According to the accident complexity table, wells 11 and 12 in the same block as well 15 have experienced well leakage in formation 7. The well leakage risk calculation formula is used to calculate the possibility of well 15's well leakage in formation 7 under the designed drilling fluid density based on the well leakage of the adjacent wells; in this example, the scaling factor k2 is taken as 5.

[0127] The possibility of leakage in well 15 is predicted based on the leakage situation of well 11, where the drilling fluid density of formation 7 in well 15 is 1.08-1.25 g / cm 3 , then the corresponding lost circulation risk can be expressed as:

[0128]

[0129]

[0130] Based on the leakage situation of well 12, the possibility of leakage in well 15 is predicted as follows:

[0131]

[0132]

[0133] From the above calculation results, it can be obtained that the drilling fluid density of well 15 in formation 7 is 1.08g / cm 3 The probability of leakage is 0.15, and the drilling fluid density of well 15 in formation 7 is 1.25g / cm 3 The probability of well leakage is 0.81, and the probability of well leakage in formation 7 of well 15 is 0.15-0.81. According to this calculation process, the overflow and well leakage risk probability corresponding to all formations of well 15 are calculated, and the results are shown in Table 5.

[0134] Table 5 Comparison of overflow and leakage risk possibilities of Well 15

[0135]

[0136] From the overflow and well leakage risk calculation results in Table 5, it can be seen that well leakage is very likely to occur within the designed drilling fluid density range of Well 15 Formation 2, and the drilling fluid density of Well 15 Formation 2 should be readjusted; Formations 5 and 6 have a higher possibility of overflow, and precautions should be taken during construction.

[0137] The embodiment of the present invention provides a method for predicting downhole drilling risks based on natural language processing. By constructing a drilling professional vocabulary, a downhole accident complex vocabulary and a natural language analysis model, the automatic recognition of drilling history reports, the automatic extraction of accident complex information and the formation of a downhole accident complex database are realized. Based on the engineering design information of the well to be drilled, the complex accident information of the adjacent wells in the same block and formation is automatically extracted, and the complex accident prompts of the well to be drilled are generated to provide effective guidance for drilling construction; based on the drilling fluid density design of the well to be drilled and the overflow or well leakage of the adjacent wells, the overflow and well leakage possibilities of the well to be drilled in different formations are calculated to provide support for the rationality judgment of the drilling design; at the same time, it also solves the problem of not fully utilizing the data of the wells that have been drilled to predict the complex accident risks of the wells to be drilled.

[0138] Embodiment 3

[0139] Fig. 9 This is a schematic diagram of the structure of a drilling downhole risk prediction device based on natural language processing provided in an embodiment of the present invention. The technical solution of this embodiment can be applied to the case of drilling downhole risk prediction based on natural language processing. The device can be implemented by software and / or hardware and is generally integrated on any electronic device with network communication function, including but not limited to: servers, computers, personal digital assistants and other devices. Fig. 9 As shown, the drilling downhole risk prediction device based on natural language processing provided in this embodiment may include: a vocabulary building and integration module 910, a natural language analysis model training module 920, a target drilling log data processing module 930, a downhole accident complex database building module 940 and a downhole accident complex risk prediction module 950 to be drilled; wherein,

[0140] The word library construction and integration module 910 is used to construct a drilling professional word library and a downhole accident complex word library, and integrate the drilling professional word library and the downhole accident complex word library into a general natural language analysis tool;

[0141] A natural language analysis model training module 920 is used to train a natural language analysis model using the drilling log data with annotations and the constructed drilling professional vocabulary;

[0142] The target drilling log data processing module 930 is used to use the natural language analysis model to perform sentence segmentation and word segmentation processing on the unlabeled target drilling log data, and to identify time and accident complex named entities;

[0143] The underground accident complex database construction module 940 is used to match the accident complex in the underground accident complex word library according to the accident complex named entity recognition result, determine whether the accident complex occurs, and construct the underground accident complex database according to the accident complex named entity recognition result after determining that the accident complex occurs;

[0144] The downhole accident complex risk prediction module 950 for the well to be drilled is used to predict the downhole accident complex risk of the well to be drilled based on the engineering design information of the well to be drilled and the accident complex information of neighboring wells in the same block and formation as the well to be drilled obtained from the downhole accident complex database.

[0145] Based on the above embodiment, optionally, the vocabulary building and integration module is specifically used to:

[0146] Obtaining drilling professional vocabulary and underground accident complex vocabulary based on drilling professional books and historical data, and formatting the drilling professional vocabulary and underground accident complex vocabulary in a format recognizable by Chinese natural language processing tools;

[0147] A drilling professional vocabulary is constructed based on the unified format drilling professional vocabulary, and a downhole accident complex vocabulary is constructed based on the unified format downhole accident complex vocabulary; the downhole accident complex vocabulary includes overflow and well leakage;

[0148] Using the interface provided by the Chinese natural language processing tool, the drilling professional vocabulary and the complex vocabulary of underground accidents are integrated into the general natural language analysis tool.

[0149] Based on the above embodiment, optionally, the underground accident complex database construction module is specifically used for:

[0150] Using a natural language analysis tool to annotate the drilling log data to obtain first drilling log data with annotations;

[0151] Manually correcting the first drilling data with annotations according to professional knowledge to obtain second drilling log data;

[0152] A natural language analysis model is trained based on the second drilling log data and the constructed drilling professional vocabulary; the natural language analysis model is used to identify named entities in the drilling log data.

[0153] Based on the above embodiment, optionally, the natural language analysis model training module is specifically used to:

[0154] According to the accident complex named entity recognition result, determine the target accident complex named entity to be recognized;

[0155] Matching the target accident complex named entity with the accident complex in the underground accident complex word library to determine whether an accident complex has occurred;

[0156] If it is determined that the accident complex has occurred, then determine the time entity and the target named entity that are located before the target accident complex named entity and are adjacent to the target accident complex named entity from the target drilling log data;

[0157] In the drilling log file, structured information corresponding to the target drilling log data is obtained; the structured information includes date, stratigraphic level, drill bit size, drill bit model, and drilling fluid density;

[0158] The structured information, target accident complex named entity, time entity and target named entity are used to construct an underground accident complex database; the underground accident complex database includes at least two accident complex tables, each accident complex table corresponds to a well, and each record in the accident complex table corresponds to an accident complexity.

[0159] On the basis of the above embodiment, optionally, the complex risk prediction module for underground accidents in the well to be drilled is specifically used for:

[0160] Determine the engineering design information of the well to be drilled; the engineering design information includes the drilling fluid density, formation pressure equivalent density, vertical depth section and inclined depth section of the formation;

[0161] A matching algorithm is used to obtain accident complex information of neighboring wells in the same block and formation as the well to be drilled from the downhole accident complex database, and accident complex prompts are formed based on the formation and well depth; the accident complex information of neighboring wells includes the formation drilling fluid density during overflow of the neighboring well and the formation drilling fluid density during well leakage, and the well depth includes the vertical depth section of the formation and the inclined depth section of the formation;

[0162] According to the density of drilling fluid in the formation to be drilled and the complex information of nearby accidents, the complex risk of underground accidents in the well to be drilled is predicted.

[0163] On the basis of the above embodiment, optionally, the complex risk prediction module for underground accidents in the well to be drilled is further specifically used for:

[0164] The complex risk of underground accidents in the well to be drilled can be predicted by using the overflow risk formula and the well leakage risk formula, which is expressed as:

[0165]

[0166]

[0167] Among them, MD Design Characterizes the density of the drilling fluid in the formation to be drilled, MD Kick Characterizes the formation drilling fluid density during overflow from adjacent wells; MD Loss It represents the density of the formation drilling fluid when there is leakage in adjacent wells; k1 and k2 represent the scaling coefficients.

[0168] The downhole drilling risk prediction device based on natural language processing provided in the embodiments of the present invention can execute the downhole drilling risk prediction method based on natural language processing provided in any of the above embodiments of the present invention, and has the corresponding functions and beneficial effects of executing the downhole drilling risk prediction method based on natural language processing. For the detailed process, please refer to the relevant operations of the downhole drilling risk prediction method based on natural language processing in the above embodiments.

[0169] Embodiment 4

[0170] Fig.10 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0171] like Fig.10 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0172] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0173] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a drilling downhole risk prediction method based on natural language processing.

[0174] In some embodiments, the downhole drilling risk prediction method based on natural language processing may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the downhole drilling risk prediction method based on natural language processing described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the downhole drilling risk prediction method based on natural language processing in any other appropriate manner (e.g., by means of firmware).

[0175] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0176] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0177] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0178] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0179] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0180] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0181] Embodiment 5

[0182] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements a method for predicting downhole drilling risks based on natural language processing as provided in any embodiment of the present application.

[0183] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0184] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0185] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for predicting downhole drilling risks based on natural language processing, characterized in that: The method comprises: Constructing a drilling professional vocabulary and a downhole accident complex vocabulary, and integrating the drilling professional vocabulary and the downhole accident complex vocabulary into a general natural language analysis tool; The natural language analysis model is trained using annotated drilling log data and a professional drilling vocabulary. The natural language analysis model is used to perform sentence segmentation and word segmentation processing on the unlabeled target drilling log data, and to identify complex named entities of time and accidents; According to the accident complex named entity recognition result, the accident complex is matched with the accident complex in the underground accident complex word library to determine whether the accident complex occurs, and after determining that the accident complex occurs, the underground accident complex database is constructed according to the accident complex named entity recognition result; Based on the engineering design information of the well to be drilled and the accident complexity information of neighboring wells in the same block and formation as the well to be drilled obtained from the downhole accident complexity database, the downhole accident complexity risk of the well to be drilled is predicted.

2. The method according to claim 1, characterized in that The construction of a drilling professional vocabulary and a downhole accident complex vocabulary, and integrating the drilling professional vocabulary and the downhole accident complex vocabulary into a general natural language analysis tool, includes: Obtaining drilling professional vocabulary and underground accident complex vocabulary based on drilling professional books and historical data, and formatting the drilling professional vocabulary and underground accident complex vocabulary in a format recognizable by Chinese natural language processing tools; A drilling professional vocabulary is constructed based on the unified format drilling professional vocabulary, and a downhole accident complex vocabulary is constructed based on the unified format downhole accident complex vocabulary; the downhole accident complex vocabulary includes overflow and well leakage; Using the interface provided by the Chinese natural language processing tool, the drilling professional vocabulary and the complex vocabulary of underground accidents are integrated into the general natural language analysis tool.

3. The method according to claim 1, characterized in that The natural language analysis model is trained by using the annotated drilling log data and the constructed drilling professional vocabulary, including: Using a natural language analysis tool to annotate the drilling log data to obtain first drilling log data with annotations; Manually correcting the first drilling data with annotations according to professional knowledge to obtain second drilling log data; A natural language analysis model is trained based on the second drilling log data and the constructed drilling professional vocabulary; the natural language analysis model is used to identify named entities in the drilling log data.

4. The method according to claim 1, characterized in that: The method matches the accident complex named entity recognition result with the accident complex in the underground accident complex word library to determine whether the accident complex occurs, and after determining that the accident complex occurs, constructs an underground accident complex database based on the accident complex named entity recognition result, including: According to the accident complex named entity recognition result, determine the target accident complex named entity to be recognized; Matching the target accident complex named entity with the accident complex in the underground accident complex word library to determine whether an accident complex has occurred; If it is determined that the accident complex has occurred, then determine the time entity and the target named entity that are located before the target accident complex named entity and are adjacent to the target accident complex named entity from the target drilling log data; In the drilling log file, structured information corresponding to the target drilling log data is obtained; the structured information includes date, stratigraphic level, drill bit size, drill bit model, and drilling fluid density; The structured information, target accident complex named entity, time entity and target named entity are used to construct an underground accident complex database; the underground accident complex database includes at least two accident complex tables, each accident complex table corresponds to a well, and each record in the accident complex table corresponds to an accident complexity.

5. The method according to claim 1, characterized in that The method predicts the complex risk of underground accidents of the well to be drilled based on the engineering design information of the well to be drilled and the complex accident information of neighboring wells in the same block and formation as the well to be drilled obtained from the underground accident complex database, including: Determine the engineering design information of the well to be drilled; the engineering design information includes the drilling fluid density, formation pressure equivalent density, vertical depth section and inclined depth section of the formation; A matching algorithm is used to obtain accident complex information of neighboring wells in the same block and formation as the well to be drilled from the downhole accident complex database, and accident complex prompts are formed based on the formation and well depth; the accident complex information of neighboring wells includes the formation drilling fluid density during overflow of the neighboring well and the formation drilling fluid density during well leakage, and the well depth includes the vertical depth section of the formation and the inclined depth section of the formation; Based on the drilling fluid density of the formation to be drilled and the complex accident information of the adjacent wells, the complex risk of underground accidents in the well to be drilled is predicted.

6. The method according to claim 5, characterized in that The method predicts the risk of downhole accidents in the well to be drilled based on the density of the drilling fluid in the formation to be drilled and the complex accident information in the vicinity, including: The complex risk of underground accidents in the well to be drilled can be predicted by using the overflow risk formula and the well leakage risk formula, which is expressed as: Among them, MD Design Characterizes the density of the drilling fluid in the formation to be drilled, MD Kick Characterizes the formation drilling fluid density during overflow from adjacent wells; MD Loss It represents the density of the formation drilling fluid when there is leakage in adjacent wells; k1 and k2 represent the scaling coefficients.

7. A drilling downhole risk prediction device based on natural language processing, characterized in that: The device comprises: A word library construction and integration module, used to construct a drilling professional word library and a downhole accident complex word library, and integrate the drilling professional word library and the downhole accident complex word library into a general natural language analysis tool; A natural language analysis model training module is used to train the natural language analysis model using annotated drilling log data and a constructed drilling professional vocabulary; A target drilling log data processing module is used to use the natural language analysis model to perform sentence segmentation and word segmentation processing on the unlabeled target drilling log data, and to identify time and accident complex named entities; The underground accident complex database construction module is used to match the accident complex in the underground accident complex vocabulary according to the accident complex named entity recognition result, determine whether the accident complex occurs, and construct the underground accident complex database according to the accident complex named entity recognition result after determining that the accident complex occurs; The complex risk prediction module for underground accidents of the wells to be drilled is used to predict the complex risks of underground accidents of the wells to be drilled based on the engineering design information of the wells to be drilled and the complex accident information of neighboring wells in the same block and formation as the wells to be drilled obtained from the complex underground accident database.

8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the downhole drilling risk prediction method based on natural language processing as described in any one of claims 1-6.

9. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions, when executed by a computer processor, are used to execute the downhole drilling risk prediction method based on natural language processing as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for predicting downhole drilling risks based on natural language processing according to any one of claims 1 to 6 is implemented.