Drilling overflow early warning method and device

By establishing the difference between the BP-LSTM neural network model and calculating the pressure of the pressure at the bottom of the well, the problem of the lag of drilling overflow early warning and high alarm rate in existing technologies has been solved. Early warning accuracy.

CN114482990BActive Publication Date: 2025-01-28CHINA NAT PETROLEUM CORP +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111675565.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-01-28
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The existing drilling overflow warning methods have problems such as lag early warning and high false alarm rate, making it difficult to achieve fast and accurate overflow warning.

Method used

By establishing the BP-LSTM neural network model, combined with the logging data and engineering data, the establishment and training of the overflow data set is performed, and the difference between the pressure of the underlying pressure and the strata pressure is calculated to improve the accuracy of the overflow warning.

Benefits of technology

Early early warning based on a neural network was achieved, and the overflow warning can be quickly and accurate, and the accuracy and processing efficiency of the drill overflow warning can be improved through weighted calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114482990B_ABST
    Figure CN114482990B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for early warning of drilling overflow, which includes: establishing an overflow data set for neural network training and neural network input according to drilling logging data and drilling engineering data; establishing a BP-LSTM neural network model; training the BP-LSTM neural network model with a training sample data set to obtain an overflow early warning neural network model; inputting a test sample data set into the overflow early warning neural network model to obtain a first drilling overflow probability; calculating the pressure in the wellbore according to the drilling logging data and drilling engineering data to obtain a second drilling overflow probability; performing weighted calculation on the first drilling overflow probability and the second drilling overflow probability to obtain a weighted probability of drilling overflow; and issuing early warning information of drilling overflow when the weighted probability exceeds a preset value. The present invention can improve the accuracy and processing efficiency of drilling overflow early warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil and gas exploration and development, and in particular to a method and a device for early warning of drilling overflow. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.

[0003] With the continuous exploitation of crude oil, the field of oil and gas exploration and development is shifting from conventional oil and gas resources to deep, ultra-deep and deep ocean waters, facing challenges such as resource degradation and exploration diversification.

[0004] Overflows occur frequently due to factors such as inaccurate prediction of formation information and improper drilling operations.

[0005] When overflow occurs, if it is not discovered in time or too late, it will lead to serious downhole accidents, such as blowouts. Facts have proved that after overflow occurs, within 10 minutes at the fastest and within 10 to 30 minutes at the slowest, it will cause a more serious blowout accident, causing serious consequences such as equipment damage, casualties, environmental pollution, and scrapping of oil well projects. Therefore, overflow is also one of the high-frequency and high-hazard accidents in drilling. At present, overflow blowout accidents are generally taken very seriously, and various means are taken for early warning and control.

[0006] At present, the difference changes in inlet and outlet flow rates, changes in drilling fluid property parameters and changes in bottom hole parameters are mostly used as the basis for judging overflow warning. However, due to the many factors affecting overflow and the complex changing patterns, the current drilling overflow warning methods still have problems such as warning lag and high false alarm rate. Summary of the invention

[0007] An embodiment of the present invention provides a method for early warning of drilling overflow, which is used to improve the accuracy and processing efficiency of early warning of drilling overflow, and the method includes:

[0008] According to the logging data and drilling engineering data of the drilling, an overflow data set for neural network training and neural network input is established; the overflow data set includes a training sample data set and a test sample data set;

[0009] Establishing a BP-LSTM neural network model; the BP-LSTM neural network model is used to characterize the neural network structure after the fully connected neural network and the long short-term memory neural network are connected in series;

[0010] The BP-LSTM neural network model is trained with the training sample data set to obtain the overflow warning neural network model;

[0011] Input the test sample data set into the overflow warning neural network model to obtain the probability of overflow occurrence in the first drilling well;

[0012] Based on the logging data and drilling engineering data, the pressure inside the wellbore is calculated to obtain the difference between the bottom hole pressure and the formation pressure;

[0013] The probability of overflow in the second drilling well is calculated based on the difference between the bottom hole pressure and the formation pressure;

[0014] Performing weighted calculation on the first drilling overflow occurrence probability and the second drilling overflow occurrence probability to obtain a weighted probability of drilling overflow;

[0015] When the weighted probability exceeds a preset value, an early warning message of drilling overflow is issued.

[0016] The embodiment of the present invention further provides a drilling overflow warning device, which is used to improve the accuracy and processing efficiency of drilling overflow warning, and the device includes:

[0017] An overflow data set establishment module is used to establish an overflow data set for neural network training and neural network input according to the logging data and drilling engineering data of the drilling; the overflow data set includes a training sample data set and a test sample data set;

[0018] A BP-LSTM neural network model building module is used to build a BP-LSTM neural network model; the BP-LSTM neural network model is used to characterize the neural network structure after the fully connected neural network and the long short-term memory neural network are connected in series;

[0019] The overflow warning neural network model training module is used to train the BP-LSTM neural network model with the training sample data set to obtain the overflow warning neural network model;

[0020] A first drilling overflow occurrence probability calculation module is used to input the test sample data set into the overflow warning neural network model to obtain the first drilling overflow occurrence probability;

[0021] The module for calculating the difference between bottom hole pressure and formation pressure is used to calculate the pressure in the wellbore according to the logging data and drilling engineering data of the drilling, and obtain the difference between the bottom hole pressure and the formation pressure;

[0022] A second drilling overflow occurrence probability calculation module, used to calculate the second drilling overflow occurrence probability according to the difference between the bottom hole pressure and the formation pressure;

[0023] A weighted probability calculation module, used to perform weighted calculation on the first drilling overflow occurrence probability and the second drilling overflow occurrence probability to obtain a weighted probability of drilling overflow;

[0024] The early warning module is used to issue an early warning message of drilling overflow when the weighted probability exceeds a preset value.

[0025] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned drilling overflow warning method when executing the computer program.

[0026] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for early warning of drilling overflow is implemented.

[0027] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method for early warning of drilling overflow is implemented.

[0028] In an embodiment of the present invention, an overflow data set for neural network training and neural network input is established based on the logging data and drilling engineering data of the drilling; the overflow data set includes a training sample data set and a test sample data set; a BP-LSTM neural network model is established; the BP-LSTM neural network model is used to characterize the neural network structure after the full connection neural network and the long short-term memory neural network are connected in series; the BP-LSTM neural network model is trained with the training sample data set to obtain an overflow warning neural network model; the test sample data set is input into the overflow warning neural network model to obtain the first drilling overflow occurrence probability; the wellbore pressure is calculated based on the logging data and drilling engineering data of the drilling to obtain the difference between the bottom hole pressure and the formation pressure; according to the bottom hole pressure and the formation pressure The difference in pressure is used to calculate the probability of the second drilling overflow; the first drilling overflow probability and the second drilling overflow probability are weighted to obtain the weighted probability of drilling overflow; when the weighted probability exceeds the preset value, an early warning message of drilling overflow is issued. Compared with the technical solution in the prior art that uses the difference in inlet and outlet flow rates, the change in drilling fluid property parameters and the change in bottom hole parameters for overflow warning, an early warning of overflow based on a neural network is realized by establishing a BP-LSTM neural network model, which can achieve the purpose of rapid and accurate overflow warning. At the same time, the second drilling overflow probability is calculated according to the difference between the bottom hole pressure and the formation pressure, which realizes an early warning of overflow based on the overflow mechanism, and then through weighted calculation, the accuracy and processing efficiency of the drilling overflow warning are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0030] Figure 1 A schematic diagram of a flow chart of a method for early warning of drilling overflow in an embodiment of the present invention;

[0031] Figure 2 A specific example diagram of a method for early warning of drilling overflow in an embodiment of the present invention;

[0032] Figure 3 A specific example diagram of a method for early warning of drilling overflow in an embodiment of the present invention;

[0033] Figure 4 This is a specific example diagram of establishing a BP-LSTM neural network model in an embodiment of the present invention;

[0034] Figure 5 A specific example diagram of a method for early warning of drilling overflow in an embodiment of the present invention;

[0035] Figure 6 A specific example diagram of a method for early warning of drilling overflow in an embodiment of the present invention;

[0036] Figure 7 This is a schematic structural diagram of a device for early warning of drilling overflow in an embodiment of the present invention;

[0037] Figure 8 This is a specific example diagram of a device for early warning of drilling overflow in an embodiment of the present invention;

[0038] Fig. 9 This is a specific example diagram of a device for early warning of drilling overflow in an embodiment of the present invention;

[0039] Fig.10 Schematic diagram of computer equipment for executing a method for early warning of drilling overflow in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0041] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0042] In the description of this specification, the terms "include", "including", "have", "contain", etc. are all open terms, which mean including but not limited to. The descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. The order of steps involved in each embodiment is used to schematically illustrate the implementation of the present application, and the order of steps is not limited and can be appropriately adjusted as needed.

[0043] With the continuous exploitation of crude oil, the field of oil and gas exploration and development is shifting from conventional oil and gas resources to deep and ultra-deep layers and deep ocean waters, facing challenges such as resource degradation and exploration diversification. Overflows occur frequently due to factors such as inaccurate formation information prediction and improper drilling operations. When overflows occur, if they are not discovered in time or too late, they will lead to serious downhole accidents, such as blowouts. Facts have proved that after overflows occur, within 10 minutes at the fastest and within 10 to 30 minutes at the slowest, more serious blowout accidents will be caused, resulting in serious consequences such as equipment damage, casualties, environmental pollution, and scrapping of oil well projects. Therefore, overflows are also one of the high-frequency and high-hazard accidents in drilling. At this stage, overflow blowout accidents are generally taken very seriously, and various means are taken for early warning and regulation. The changes in the difference between the inlet and outlet flow rates, the changes in the properties of the drilling fluid, and the changes in the bottom hole parameters are often used as the basis for judging overflow warnings. However, due to the many factors affecting overflows and the complex laws of change, there are still problems such as delayed warnings and high false alarm rates.

[0044] With the development of informatization and the Internet of Things, intelligent models are determined by extracting characteristic parameters to train models and optimizing models. Using intelligent models and real-time data on site for real-time overflow warning is one of the emerging methods in recent years and has shown good development prospects.

[0045] In order to solve the above problems, an embodiment of the present invention provides a method for early warning of drilling overflow, which is used to improve the accuracy and processing efficiency of early warning of drilling overflow, see Figure 1 , the method may include:

[0046] Step 101: establishing an overflow data set for neural network training and neural network input according to the drilling logging data and drilling engineering data; the overflow data set includes a training sample data set and a test sample data set;

[0047] Step 102: Establish a BP-LSTM neural network model; the BP-LSTM neural network model is used to characterize the neural network structure after the fully connected neural network and the long short-term memory neural network are connected in series;

[0048] Step 103: training the BP-LSTM neural network model with the training sample data set to obtain an overflow warning neural network model;

[0049] Step 104: input the test sample data set into the overflow warning neural network model to obtain the probability of overflow occurrence of the first drilling well;

[0050] Step 105: Calculate the pressure in the wellbore according to the logging data and drilling engineering data, and obtain the difference between the bottom hole pressure and the formation pressure;

[0051] Step 106: Calculate the probability of the second well overflow according to the difference between the bottom hole pressure and the formation pressure;

[0052] Step 107: performing weighted calculation on the first drilling overflow occurrence probability and the second drilling overflow occurrence probability to obtain a weighted probability of drilling overflow;

[0053] Step 108: When the weighted probability exceeds a preset value, an early warning message of drilling overflow is issued.

[0054] In an embodiment of the present invention, an overflow data set for neural network training and neural network input is established based on the logging data and drilling engineering data of the drilling; the overflow data set includes a training sample data set and a test sample data set; a BP-LSTM neural network model is established; the BP-LSTM neural network model is used to characterize the neural network structure after the full connection neural network and the long short-term memory neural network are connected in series; the BP-LSTM neural network model is trained with the training sample data set to obtain an overflow warning neural network model; the test sample data set is input into the overflow warning neural network model to obtain the first drilling overflow occurrence probability; the wellbore pressure is calculated based on the logging data and drilling engineering data of the drilling to obtain the difference between the bottom hole pressure and the formation pressure; according to the bottom hole pressure and the formation pressure The difference in pressure is used to calculate the probability of the second drilling overflow; the first drilling overflow probability and the second drilling overflow probability are weighted to obtain the weighted probability of drilling overflow; when the weighted probability exceeds the preset value, an early warning message of drilling overflow is issued. Compared with the technical solution in the prior art that uses the difference in inlet and outlet flow rates, the change in drilling fluid property parameters and the change in bottom hole parameters for overflow warning, an early warning of overflow based on a neural network is realized by establishing a BP-LSTM neural network model, which can achieve the purpose of rapid and accurate overflow warning. At the same time, the second drilling overflow probability is calculated according to the difference between the bottom hole pressure and the formation pressure, which realizes an early warning of overflow based on the overflow mechanism, and then through weighted calculation, the accuracy and processing efficiency of the drilling overflow warning are improved.

[0055] In the specific implementation, firstly, an overflow data set for neural network training and neural network input is established based on the drilling logging data and drilling engineering data; the overflow data set includes a training sample data set and a test sample data set.

[0056] In the embodiment, the logging data and drilling engineering data of the drilling are preprocessed to obtain the processed drilling data; the preprocessing includes: data sorting and cleaning processing, data completion processing and data standardization processing;

[0057] Based on the logging data and drilling engineering data of the drilling, an overflow data set for neural network training and neural network input is established, which may include:

[0058] Based on the processed drilling data, an overflow dataset for neural network training and neural network input is established.

[0059] In one embodiment, an overflow data set for neural network training and neural network input is established based on the well logging data and drilling engineering data, such as Figure 2 As shown, it may include:

[0060] Step 201: using chi-square test, selecting logging feature data based on drilling logging data and drilling engineering data;

[0061] Step 202: Based on the selected logging feature data, an overflow data set for neural network training and neural network input is established.

[0062] In the above embodiment, the data set consisting of the on-site drilling pressure, rotation speed and other logging data and the drilling engineering data such as the wellbore structure and drilling fluid properties can be first sorted and cleaned, data completed, data standardized and feature selected, and a data preprocessing method and process can be established.

[0063] In a specific embodiment, various types of data collected on site may first be aligned according to the well depth sequence, and then for missing data, by analyzing the importance of some missing data, it is determined whether to delete a large number of missing features, and data completion is achieved through completion methods such as median and average.

[0064] Furthermore, the optimal data normalization method can be selected and determined, which may include: min-max normalization, log function conversion, z-score normalization, fuzzy quantization, mean normalization, etc.

[0065] Finally, a feature selection method is established for 51 logging data features such as drilling pressure, mainly including:

[0066] (1) Calculate the variance of each feature using variance selection, combine expert knowledge to determine the trend of feature changes, determine the minimum data variance as the threshold, and select features with variance greater than the threshold;

[0067] (2) The chi-square test measures the degree of deviation between the actual observed value of the statistical sample and the theoretical inference value, and the degree of deviation determines the size of the chi-square value.

[0068] In the above embodiment, the chi-square test can be used to conveniently and concisely test a large amount of data. The chi-square test is used to test the correlation of qualitative independent variables to qualitative dependent variables, and then finally determine the type of data to be used and the processing method, and finally establish an overflow data set that can be used for neural network training.

[0069] In the above embodiment, a drilling data set is used, which mainly includes ground drilling parameters, and has the advantages of less additional equipment required, low cost, and easy promotion and field testing.

[0070] In the specific implementation, after establishing the overflow data set for neural network training and neural network input based on the drilling logging data and drilling engineering data, a BP-LSTM neural network model is established; the above BP-LSTM neural network model is used to characterize the neural network structure after the fully connected neural network and the long short-term memory neural network are connected in series.

[0071] In the embodiment, the BP-LSTM neural network model is established as follows:

[0072] Use the cross entropy loss function as the loss function for fully connected neural networks and long short-term memory neural networks;

[0073] Add the loss functions of the fully connected neural network and the long short-term memory neural network to get the loss function of the BP-LSTM neural network model;

[0074] Perform parameter optimization on the hyperparameters in the BP-LSTM neural network; the above hyperparameters include the number of hidden layers, the number of neurons, the activation function, the loss function and the optimizer.

[0075] In the specific implementation, after the BP-LSTM neural network model is established, the BP-LSTM neural network model is trained with a training sample data set to obtain an overflow warning neural network model.

[0076] In the specific implementation, after the BP-LSTM neural network model is trained with the training sample data set to obtain the overflow warning neural network model, the test sample data set is input into the overflow warning neural network model to obtain the probability of overflow occurrence in the first drilling well.

[0077] In one embodiment, the overflow data set is also used for neural network verification; the overflow data set may also include a verification sample data set;

[0078] After obtaining the overflow warning neural network model, the above method may further include:

[0079] The orthogonal test method was used, with accuracy, precision, recall, missed alarm rate and false alarm rate as evaluation indicators, and a verification sample data set was used to verify the overflow warning neural network model, and a verified overflow warning neural network model was obtained.

[0080] In the above embodiment, firstly, according to the timing characteristics of the drilling process, neural networks such as BP and LSTM can be selected, and the finally selected BP neural network and LSTM network are connected in series to form a BP-LSTM series network structure.

[0081] On this basis, combined with the essential cause of overflow: the imbalance between bottomhole pressure and formation pressure, the loss function of the neural network is improved. For example, the output nodes of the fully connected neural network and the output nodes of the long short-term memory neural network can both use the cross entropy loss function, which is simpler and faster to derive for a large amount of data, and add the two together as the final loss function. In this way, the two output nodes of the fully connected neural network (ANNBP) can reflect the bottomhole pressure and formation pressure to a certain extent at the physical level, thereby achieving a higher precision model.

[0082] Finally, the hyperparameters in the neural network can be optimized. Parameter optimization mainly includes the selection of the number of hidden layers, the number of neurons, the activation function, the loss function and the optimizer. In the above parameter optimization operation, the orthogonal test method can be used to set the orthogonal test parameter combination, and the accuracy, precision, recall rate, missed alarm rate and false alarm rate are used as evaluation indicators, and the model effect is tested using the test data set.

[0083] For example, the final model provided by the embodiment of the present invention has an average accuracy rate of 95.8%, a missed alarm rate of 7.58%, and a false alarm rate of 0.05%. Therefore, it can effectively improve the accuracy of overflow warning and is expected to reduce drilling risks and economic losses.

[0084] When the model accuracy meets the requirements, the model is determined; if it does not meet the accuracy requirements, the model is adjusted and modified. The operation is repeated until the accuracy requirements are met. An overflow warning model based on a neural network is established, and finally the probability P1 of bottom well overflow is obtained.

[0085] In one embodiment, overflow warning based on neural network can facilitate subsequent model maintenance and later updates combining model and deep learning. At the same time, compared with other algorithms, the BP and LSTM network fusion model is adopted, and the model is physically constrained through the loss function, so that the robustness of the model is enhanced, the output is relatively stable, and overflow warning can be achieved quickly and accurately.

[0086] In specific implementation, after the test sample data set is input into the overflow warning neural network model to obtain the probability of the first drilling overflow, the wellbore pressure is calculated based on the drilling logging data and drilling engineering data to obtain the difference between the bottom hole pressure and the formation pressure.

[0087] In the embodiment, the pressure in the wellbore is calculated based on the logging data and the drilling engineering data to obtain the difference between the bottom hole pressure and the formation pressure, which may include:

[0088] Using the well logging data and the wellbore structure data and drilling fluid performance data in the drilling engineering data, the wellhead pressure is used as the boundary condition, and the mass conservation equation and energy conservation equation are used to calculate the pressure in the wellbore to obtain the difference between the bottom hole pressure and the formation pressure.

[0089] In one embodiment, the pressure in the wellbore is calculated according to the following formula to obtain the difference between the bottom hole pressure and the formation pressure:

[0090] ΔP=P p -P downhole

[0091] Wherein, ΔP is the difference between bottom hole pressure and formation pressure, in MPa; P p is the formation pressure, in MPa; P downhole is the bottom hole pressure in MPa.

[0092] In specific implementation, after calculating the wellbore pressure based on the drilling logging data and drilling engineering data and obtaining the difference between the bottom hole pressure and the formation pressure, the probability of the second drilling overflow is calculated based on the difference between the bottom hole pressure and the formation pressure.

[0093] In the embodiment, the probability of the second drilling overflow is calculated according to the difference between the bottom hole pressure and the formation pressure according to the following formula:

[0094]

[0095] Wherein, P2 is the probability of the second drilling overflow; ΔP is the difference between the bottom hole pressure and the formation pressure, in MPa; a is a preset constant.

[0096] In the above embodiment, drilling engineering parameters including wellbore structure and drilling fluid properties can be used, and the wellhead pressure can be used as a boundary condition to calculate the pressure in the wellbore through the mass conservation equation and the energy conservation equation according to the following formula:

[0097] The mass conservation equation:

[0098]

[0099]

[0100] Momentum equation:

[0101]

[0102] By finite differences, the above equation is solved implicitly discretized:

[0103]

[0104] Where: l , ρ g Represents the density of liquid and gas, kg / m 3 ; α l , α gRepresents liquid holdup and gas holdup, no unit; v l , v g Represents the flow rate of liquid and gas, m / s; P represents the pressure here, Pa; g represents the acceleration of gravity, m / s 3 ; F f Total external force, N; W j , F j , Q j represents the differential variable; Δt, Δz represent the time length and space length of the difference; n, i represent the time node and space node of the difference; j represents the node sequence number, which is 1, 2,…, j.

[0105] In the above steps, the well logging data and the wellbore structure data and drilling fluid performance data in the drilling engineering data can be used to construct a simplified model for calculating the full wellbore pressure, so as to determine the change and trend of the bottom hole pressure, judge the overflow situation by comparing it with the formation pressure, and calculate the difference between the bottom hole pressure and the formation pressure in real time. The calculation method is:

[0106] Bottom hole pressure difference = formation pressure - bottom hole pressure,

[0107] ΔP=P p -P downhole

[0108] Wherein, ΔP is the difference between bottom hole pressure and formation pressure, in MPa; P p is the formation pressure, in MPa; P downhole is the bottom hole pressure in MPa.

[0109] For example, when the bottom hole pressure difference is 0MPa, it can be considered that overflow will not occur. When the bottom hole pressure difference is greater than or equal to 2.0MPa (i.e., a preset constant that can be freely set by the staff according to the actual drilling situation), the possibility of overflow is greater. In this regard, the bottom hole pressure difference calculated in real time can be converted into the probability of overflow occurrence, that is, the bottom hole overflow evaluation index based on the overflow mechanism is:

[0110]

[0111] Wherein, P2 is the probability of the second drilling overflow; ΔP is the difference between the bottom hole pressure and the formation pressure, in MPa; a is a preset constant.

[0112] In the above embodiment, the intelligent neural network model and the traditional pressure model (i.e., the model that executes the above-mentioned step of calculating the probability of the second drilling overflow) can be combined to increase the generalization ability of the model, ensure that the model can maintain a certain accuracy under different conditions, and lay the foundation for the future development of intelligent drilling risk prediction.

[0113] In specific implementation, after calculating the second drilling overflow occurrence probability according to the difference between the bottom hole pressure and the formation pressure, the first drilling overflow occurrence probability and the second drilling overflow occurrence probability are weightedly calculated to obtain the weighted probability of drilling overflow.

[0114] In specific implementation, after weighted calculation is performed on the first drilling overflow occurrence probability and the second drilling overflow occurrence probability to obtain the weighted probability of drilling overflow, when the weighted probability exceeds a preset value, an early warning message of drilling overflow is issued.

[0115] In the embodiment, the first drilling overflow occurrence probability and the second drilling overflow occurrence probability are weightedly calculated according to the following formula to obtain the weighted probability of drilling overflow:

[0116] P=w1×P1+w2×P2

[0117] Among them, P is the weighted probability of drilling overflow; w1 and w2 are preset weighted weights; P1 is the probability of the first drilling overflow; P2 is the probability of the second drilling overflow.

[0118] In a specific embodiment, the final comprehensive evaluation index of overflow probability can be obtained by weighted averaging the overflow warning model based on a neural network and the model results based on the overflow mechanism. For example, w1 and w2 are preset weighted weights, which can be 0.5 and 0.5 respectively.

[0119] In a specific embodiment, the actual drilling situation can be combined, and the consequences of the overflow condition are more serious. A certain false alarm rate is allowed in engineering, but the missed alarm rate needs to be reduced to a minimum. For this purpose, the comprehensive evaluation threshold of the overflow probability (i.e., the preset value mentioned above) can be set to 0.4. That is, when the P calculated in real time is greater than 0.4, it is considered that overflow will occur and an overflow alarm will be issued. When it is less than 0.4, it is considered that overflow will not occur.

[0120] A specific embodiment is given below to illustrate the specific application of the method of the present invention.

[0121] In the example of the present invention, the parameters such as hook load, drilling pressure, drilling speed, torque, flow rate, etc. obtained during drilling construction can be pre-processed as input, so that the data is constrained once by the BP model, and then passed into the LSTM model for operation, and the output data is used for early warning of overflow. At the same time, some other data are used to calculate the bottom hole pressure through the mass and momentum equation, and then compared with the formation pressure to judge the overflow. Finally, the weighted evaluation of the results of the intelligent model and the mechanism model is used as the final warning result.

[0122] The application principle of the present invention is described in detail below in conjunction with the accompanying drawings.

[0123] like Figure 3As shown, the overflow early warning method based on neural network and overflow mechanism provided by the embodiment of the present invention includes the following steps:

[0124] Step 1: Obtain the drilling data set and preprocess the data.

[0125] The above data sets may include: logging data and drilling engineering data. The logging data include but are not limited to: hook load, drilling pressure, drilling speed, torque, flow rate, etc.; the drilling engineering data include but are not limited to: drilling fluid parameters, formation lithology, porosity and other parameters.

[0126] The above data are sorted and cleaned, data completed, data standardized and feature selected, and data preprocessing methods and processes are established. First, various types of data collected on site are aligned according to the well depth sequence. Then, for missing data, the importance of some missing data is analyzed to determine whether to delete a large number of missing features, and data completion is achieved through completion methods such as median and average. Further, the optimal data standardization method is selected and determined, which may include: min-max standardization, log function conversion, z-score standardization, fuzzy quantization, mean normalization, etc.

[0127] For the above standardized data, variance selection can be used to calculate the variance of each feature, and then select the features with variance greater than the threshold according to the threshold; among them, the chi-square test is to test the correlation of qualitative independent variables to qualitative dependent variables. Assuming that the independent variable has N values ​​and the dependent variable has M values, consider the difference between the observed value and the expected value of the sample frequency when the independent variable is equal to i (such as lithology) and the dependent variable is equal to j (such as overflow), and construct a statistic to judge the relationship between lithology and overflow:

[0128]

[0129] Among them, χ 2 represents the chi-square test, A represents the frequency of entering a small interval (such as a sandstone area composed of fine-grained sandstone, medium-grained sandstone, etc.; a carbonate rock area composed of dolomite, limestone, etc.), and E represents the theoretical frequency of entering a small interval (needs to be corrected).

[0130] Step 2: If Figure 4 As shown, the basic framework of the neural network is built.

[0131] The BP and LSTM networks are connected in series to form the basic framework of the BP-LSTM network. The parameter adjustment of the BP neural network mainly includes the number of hidden layers, the number of neurons, the activation function, the loss function and the selection of the optimizer.

[0132] For the number of neurons, combined with FangfaGorman and Kolmogorov theorems, three initial values ​​are preliminarily determined. The relationship between the number of hidden layer nodes s and the number of input layer N is:

[0133] s=log2Ns

[0134] s=2N+1s

[0135]

[0136] Among them, n is the number of output layers; N is the number of input layers; s is the number of hidden layer nodes.

[0137] For the activation function, the activation function is preferably used in networks of different levels through repeated experiments using sigmiod, tanh, ReLU and softmax activation functions. The four functional relationships are:

[0138]

[0139]

[0140]

[0141]

[0142] Where: f(x) represents the activation function; x represents the eigenvalue, unitless; e is a natural constant, unitless.

[0143] The embodiment of the present invention may use the following cross entropy loss function for classification problems:

[0144]

[0145] Where: C represents the binary cross entropy loss value; n is the number of samples; y represents the sample label, the positive class is 1 and the negative class is 0; a is the probability that the sample is predicted to be positive.

[0146] For the optimizer, the present invention can optimize different gradient descent methods for feature dimensions and sample numbers, which can include gradient descent (GD), stochastic gradient descent (SGD) and batch gradient descent (BGD):

[0147] W t+1 =W t -η t ΔJ(W t ),W t+1 =W t -η t ΔJ is (W t ,X (is) ,Y (is) )

[0148]

[0149] Where t represents the time, i represents the sample, is represents a gradient direction randomly selected from {1, 2, ···, n}, W represents the trained model parameters, J(W) represents the cost function, ΔJ(W) represents the partial derivative of the cost function with respect to the model parameters, that is, the relevant gradient is, η t Represents the learning rate, X (i) ,Y (i) Represents the samples of each input and output, ΔJ i (W t ,X (i) ,Y (i) ) represents the gradient of the cost function of sample i with respect to W.

[0150] The optimal hyperparameters of the fully connected neural network (BP) and the classic long short-term memory neural network (LSTM) models are determined in the above manner.

[0151] Step 3: If Figure 5 As shown, the physical constraints and outputs of the overflow warning model are constructed.

[0152] Combined with the essential cause of overflow, the bottom hole pressure and the formation pressure are unbalanced. The embodiment of the present invention implements physical constraints on the two output nodes of the fully connected neural network (BP): so that it can reflect the bottom hole pressure and the formation pressure to a certain extent at the physical level, thereby realizing a higher precision model, and the specific method is as follows.

[0153] The loss function is improved by using the cross entropy loss function for both the output nodes of the fully connected neural network and the output nodes of the long short-term memory neural network. The two are added together as the final loss function for gradient descent calculation:

[0154]

[0155]

[0156] C=C1+C2

[0157] The binary output is used to implement the early warning judgment of overflow through the softmax activation function. After using the divided training data set to train the model appropriately and the hyperparameter optimization of part S102 to determine the optimal model, it is used as the preliminary overflow warning model.

[0158] Step 4: Figure 5 As shown in Figure 2, an overflow warning model based on a neural network is formed.

[0159] The model effect is tested using the test data set, and evaluated by accuracy (A), precision (P), recall (R), missed alarm rate (F) and false alarm rate (M). The calculation method is as follows, overflow is the positive class

[0160]

[0161]

[0162]

[0163]

[0164]

[0165] Among them, A, P, R, F, and M represent accuracy, precision, recall, missed alarm rate, and false alarm rate, respectively; N TP Indicates the number of samples with positive label classified as positive; N TN Indicates the number of samples with negative labels that are classified as negative; N FP Indicates the number of samples labeled as negative class that are classified as positive class; N FN Indicates the number of samples labeled as positive that are classified as negative. Among them, the positive class represents overflow and the negative class represents non-overflow. When the model accuracy is above 80%, the model is determined. If it does not meet the accuracy requirements, the model is adjusted and modified, and the model is rebuilt in S102. The above operation is repeated until the accuracy requirements are met, and an overflow warning model based on a neural network is established, and finally the overflow probability P1 is obtained.

[0166] Step 5: Figure 5 As shown, for the above input engineering data set including wellbore structure and drilling fluid parameters, the suspended weight, drilling pressure, rotation speed, torque, vertical pressure, outlet flow, total pool volume, total hydrocarbon, well depth, and drill bit depth are used as neural network input parameters, and the determined wellhead pressure is used as the boundary condition. The mass conservation equation and momentum equation are as follows

[0167]

[0168]

[0169]

[0170] By finite differences, the above equation is solved implicitly discretized:

[0171]

[0172] Where: l , ρ g Represents the density of liquid and gas, kg / m 3; α l , α g Represents liquid holdup and gas holdup, no unit; v l , v g Represents the flow rate of liquid and gas, m / s; P represents the pressure here, Pa; g represents the acceleration of gravity, m / s 3 ; F f Total external force, N; W j , F j , Q j represents the differential variable; Δt, Δz represent the time length and space length of the difference; n, i represent the time node and space node of the difference; j represents the node sequence number, which is 1, 2,…j.

[0173] The above method combines the actual initialization conditions during the drilling process to calculate the pressure in the wellbore, determine the change and trend of the bottom hole pressure, judge the overflow situation by comparing it with the formation pressure, and calculate the difference between the bottom hole pressure and the formation pressure in real time (ΔP = P p -P downhole ), when the bottom hole pressure difference is 0MPa, it is believed that overflow will not occur, and when the bottom hole pressure difference is greater than or equal to 2.0MPa, the possibility of overflow is greater. In this regard, the bottom hole pressure difference calculated in real time can be converted into the probability of overflow occurrence, that is, the bottom hole overflow probability based on the overflow mechanism is P2.

[0174] Step 6: Figure 5 As shown, efficient, fast and accurate overflow warning is performed by weighted averaging the overflow warning model based on neural network and the model results based on overflow mechanism. Specifically, the final overflow probability comprehensive evaluation index is obtained by weighted averaging the overflow warning model based on neural network and the model results based on overflow mechanism, P = w1 × P1 + w2 × P2, where w1 and w2 are weighted weights, which can be 0.5 and 0.5 respectively.

[0175] like Figure 6 As shown, Figure 6 Schematic diagram of comprehensive evaluation index and threshold established in , the surface is the surface composed of evaluation index 1 (i.e. the first drilling overflow probability mentioned above), evaluation index 2 (i.e. the second drilling overflow probability mentioned above), and comprehensive evaluation index, and the plane is the threshold plane of the comprehensive evaluation index of 0.4. Figure 6 In the figure, evaluation index 1 is the first evaluation index, evaluation index 2 is the second evaluation index, and the comprehensive evaluation index is the final overflow evaluation index; the surface in the figure is a surface composed of the first and second evaluation indicators and the comprehensive evaluation index (a total of three indicators); the plane in the figure is a threshold plane with a value of 0.4, that is, the surface part located above the plane is considered to have overflow conditions, and the surface part located below the plane is considered to have no overflow conditions.

[0176] Since the consequences of overflow conditions are relatively serious, a certain false alarm rate is allowed in engineering, but the missed alarm rate needs to be minimized. For this purpose, the comprehensive evaluation threshold of the overflow probability can be set to 0.4, that is, when the P calculated in real time is greater than 0.4, it is considered that overflow will occur and an overflow alarm will be issued. When it is less than 0.4, it is considered that overflow will not occur.

[0177] Of course, it is understandable that the above detailed process may have other variations, and the relevant variations should all fall within the protection scope of the present invention.

[0178] In an embodiment of the present invention, an overflow data set for neural network training and neural network input is established based on the logging data and drilling engineering data of the drilling; the overflow data set includes a training sample data set and a test sample data set; a BP-LSTM neural network model is established; the BP-LSTM neural network model is used to characterize the neural network structure after the full connection neural network and the long short-term memory neural network are connected in series; the BP-LSTM neural network model is trained with the training sample data set to obtain an overflow warning neural network model; the test sample data set is input into the overflow warning neural network model to obtain the first drilling overflow occurrence probability; the wellbore pressure is calculated based on the logging data and drilling engineering data of the drilling to obtain the difference between the bottom hole pressure and the formation pressure; according to the bottom hole pressure and the formation pressure The difference in pressure is used to calculate the probability of the second drilling overflow; the first drilling overflow probability and the second drilling overflow probability are weighted to obtain the weighted probability of drilling overflow; when the weighted probability exceeds the preset value, an early warning message of drilling overflow is issued. Compared with the technical solution in the prior art that uses the difference in inlet and outlet flow rates, the change in drilling fluid property parameters and the change in bottom hole parameters for overflow warning, an early warning of overflow based on a neural network is realized by establishing a BP-LSTM neural network model, which can achieve the purpose of rapid and accurate overflow warning. At the same time, the second drilling overflow probability is calculated according to the difference between the bottom hole pressure and the formation pressure, which realizes an early warning of overflow based on the overflow mechanism, and then through weighted calculation, the accuracy and processing efficiency of the drilling overflow warning are improved.

[0179] As mentioned above, the overflow early warning method based on neural network and overflow mechanism provided by the present invention has the following beneficial effects compared with the prior art:

[0180] (1) Using drilling data sets, mainly ground drilling parameters, has the advantages of less additional equipment, low cost, and easy promotion and field testing;

[0181] (2) Overflow warning based on neural network, which is convenient for subsequent model maintenance and later update of the model combined with deep learning;

[0182] (3) Compared with other algorithms, the BP and LSTM network fusion model is adopted, and the model is physically constrained through the loss function, which enhances the robustness of the model, makes the output more stable, and can achieve rapid and accurate overflow warning;

[0183] (4) Combining the intelligent model with the traditional pressure model increases the generalization ability of the model and ensures that the model can maintain a certain accuracy under different conditions;

[0184] (5) Lay the foundation for future intelligent drilling risk prediction.

[0185] The present invention also provides a drilling overflow warning device, as described in the following embodiments. Since the principle of the device to solve the problem is similar to the drilling overflow warning method, the implementation of the device can refer to the implementation of the drilling overflow warning method, and the repeated parts will not be repeated.

[0186] The embodiment of the present invention also provides a drilling overflow warning device to improve the accuracy and processing efficiency of drilling overflow warning. Figure 7 As shown, the device comprises:

[0187] The overflow data set establishment module 701 is used to establish an overflow data set for neural network training and neural network input according to the drilling logging data and drilling engineering data; the overflow data set includes a training sample data set and a test sample data set;

[0188] BP-LSTM neural network model building module 702, used to build a BP-LSTM neural network model; the above BP-LSTM neural network model is used to characterize the neural network structure after the fully connected neural network and the long short-term memory neural network are connected in series;

[0189] Overflow warning neural network model training module 703, used to train the BP-LSTM neural network model with a training sample data set to obtain an overflow warning neural network model;

[0190] The first drilling overflow occurrence probability calculation module 704 is used to input the test sample data set into the overflow warning neural network model to obtain the first drilling overflow occurrence probability;

[0191] The bottom hole pressure and formation pressure difference calculation module 705 is used to calculate the pressure in the wellbore according to the drilling logging data and drilling engineering data to obtain the difference between the bottom hole pressure and the formation pressure;

[0192] A second drilling overflow occurrence probability calculation module 706, used to calculate the second drilling overflow occurrence probability according to the difference between the bottom hole pressure and the formation pressure;

[0193] The weighted probability calculation module 707 is used to perform weighted calculation on the first drilling overflow occurrence probability and the second drilling overflow occurrence probability to obtain the weighted probability of drilling overflow;

[0194] The early warning module 708 is used to issue an early warning message of drilling overflow when the weighted probability exceeds a preset value.

[0195] In one embodiment, Figure 8 As shown, it may also include:

[0196] The data preprocessing module 709 is used to:

[0197] Perform data preprocessing on the drilling logging data and drilling engineering data to obtain processed drilling data; the preprocessing includes: data sorting and cleaning, data completion and data standardization;

[0198] Overflow data set establishment module, specifically used for:

[0199] Based on the processed drilling data, an overflow dataset for neural network training and neural network input is established.

[0200] In one embodiment, the overflow data set establishment module is specifically used to:

[0201] Using the chi-square test, the logging feature data were selected based on the logging data and drilling engineering data of the well;

[0202] Based on the selected logging feature data, an overflow data set for neural network training and neural network input is established.

[0203] In one embodiment, the BP-LSTM neural network model building module is specifically used to:

[0204] The BP-LSTM neural network model is established as follows:

[0205] Use the cross entropy loss function as the loss function for fully connected neural networks and long short-term memory neural networks;

[0206] Add the loss functions of the fully connected neural network and the long short-term memory neural network to get the loss function of the BP-LSTM neural network model;

[0207] Perform parameter optimization on the hyperparameters in the BP-LSTM neural network; the above hyperparameters include the number of hidden layers, the number of neurons, the activation function, the loss function and the optimizer.

[0208] In one embodiment, the overflow data set is also used for neural network verification; the overflow data set may also include a verification sample data set;

[0209] After obtaining the overflow warning neural network model, Fig. 9 As shown, the above device may also include:

[0210] Overflow warning neural network model verification module 710 is used to:

[0211] The orthogonal test method was used, with accuracy, precision, recall, missed alarm rate and false alarm rate as evaluation indicators, and a verification sample data set was used to verify the overflow warning neural network model, and a verified overflow warning neural network model was obtained.

[0212] In one embodiment, the module for calculating the difference between bottom hole pressure and formation pressure is specifically used for:

[0213] Using the well logging data and the wellbore structure data and drilling fluid performance data in the drilling engineering data, the wellhead pressure is used as the boundary condition, and the mass conservation equation and energy conservation equation are used to calculate the pressure in the wellbore to obtain the difference between the bottom hole pressure and the formation pressure.

[0214] In one embodiment, the module for calculating the difference between bottom hole pressure and formation pressure is specifically used for:

[0215] The pressure in the wellbore is calculated according to the following formula to obtain the difference between the bottom hole pressure and the formation pressure:

[0216] ΔP=P p -P downhole

[0217] Wherein, ΔP is the difference between bottom hole pressure and formation pressure, in MPa; P p is the formation pressure, in MPa; P downhole is the bottom hole pressure in MPa.

[0218] In one embodiment, the second drilling overflow occurrence probability calculation module is specifically used to:

[0219] The probability of overflow in the second well is calculated based on the difference between bottom hole pressure and formation pressure according to the following formula:

[0220]

[0221] Wherein, P2 is the probability of the second drilling overflow; ΔP is the difference between the bottom hole pressure and the formation pressure, in MPa; a is a preset constant.

[0222] In one embodiment, the weighted probability calculation module is specifically used to:

[0223] The probability of the first well overflow and the probability of the second well overflow are weighted and calculated according to the following formula to obtain the weighted probability of the well overflow:

[0224] P=w1×P1+w2×P2

[0225] Among them, P is the weighted probability of drilling overflow; w1 and w2 are preset weighted weights; P1 is the probability of the first drilling overflow; P2 is the probability of the second drilling overflow.

[0226] The embodiment of the present invention provides an embodiment of a computer device for implementing all or part of the contents of the above-mentioned drilling overflow early warning method. The computer device specifically includes the following contents:

[0227] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between related devices; the computer device can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the computer device can be implemented with reference to the embodiment of the method for realizing drilling overflow warning and the embodiment of the device for realizing drilling overflow warning, and the contents thereof are incorporated herein and the repeated parts are not repeated.

[0228] Fig.10 FIG. 1 is a schematic block diagram of the system structure of the computer device 1000 according to an embodiment of the present application. Fig.10 As shown, the computer device 1000 may include a central processor 1001 and a memory 1002; the memory 1002 is coupled to the central processor 1001. It is worth noting that Fig.10 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0229] In one embodiment, the function of drilling overflow warning can be integrated into the central processor 1001. The central processor 1001 can be configured to perform the following control:

[0230] According to the logging data and drilling engineering data of the drilling, an overflow data set for neural network training and neural network input is established; the overflow data set includes a training sample data set and a test sample data set;

[0231] Establishing a BP-LSTM neural network model; the BP-LSTM neural network model is used to characterize the neural network structure after the fully connected neural network and the long short-term memory neural network are connected in series;

[0232] The BP-LSTM neural network model is trained with the training sample data set to obtain the overflow warning neural network model;

[0233] Input the test sample data set into the overflow warning neural network model to obtain the probability of overflow occurrence in the first drilling well;

[0234] Based on the logging data and drilling engineering data, the pressure inside the wellbore is calculated to obtain the difference between the bottom hole pressure and the formation pressure;

[0235] The probability of overflow in the second drilling well is calculated based on the difference between the bottom hole pressure and the formation pressure;

[0236] Performing weighted calculation on the first drilling overflow occurrence probability and the second drilling overflow occurrence probability to obtain a weighted probability of drilling overflow;

[0237] When the weighted probability exceeds a preset value, an early warning message of drilling overflow is issued.

[0238] In another embodiment, the drilling overflow warning device can be configured separately from the central processor 1001. For example, the drilling overflow warning device can be configured as a chip connected to the central processor 1001, and the drilling overflow warning function can be realized through the control of the central processor.

[0239] like Fig.10 As shown, the computer device 1000 may also include: a communication module 1003, an input unit 1004, an audio processor 1005, a display 1006, and a power supply 1007. It is worth noting that the computer device 1000 does not necessarily have to include Fig.10 In addition, the computer device 1000 may also include Fig.10 For components not shown, reference may be made to the prior art.

[0240] like Fig.10 As shown, the central processor 1001 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 1001 receives inputs and controls the operations of various components of the computer device 1000 .

[0241] The memory 1002 may be, for example, a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices, or one or more thereof. The above-mentioned information related to the failure may be stored, and a program for executing the related information may also be stored. The central processing unit 1001 may execute the program stored in the memory 1002 to implement information storage or processing, etc.

[0242] The input unit 1004 provides input to the CPU 1001. The input unit 1004 is, for example, a key or a touch input device. The power supply 1007 is used to provide power to the computer device 1000. The display 1006 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.

[0243] The memory 1002 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 1002 may also be some other type of device. The memory 1002 includes a buffer memory 1021 (sometimes referred to as a buffer). The memory 1002 may include an application / function storage unit 1022, which is used to store application programs and function programs or processes for executing the operation of the computer device 1000 through the central processor 1001.

[0244] The memory 1002 may also include a data storage unit 1023 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the computer device. The driver storage unit 1024 of the memory 1002 may include various drivers for the computer device for communication functions and / or for executing other functions of the computer device (such as messaging applications, address book applications, etc.).

[0245] The communication module 1003 is a transmitter / receiver 1003 that sends and receives signals via the antenna 1008. The communication module (transmitter / receiver) 1003 is coupled to the central processor 1001 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0246] Based on different communication technologies, multiple communication modules 1003 may be provided in the same computer device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) 1003 is also coupled to a speaker 1009 and a microphone 1010 via an audio processor 1005 to provide an audio output via the speaker 1009 and receive an audio input from the microphone 1010, thereby realizing a common telecommunication function. The audio processor 1005 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 1005 is also coupled to the central processor 1001, so that recording can be performed on the local machine through the microphone 1010, and the sound stored on the local machine can be played through the speaker 1009.

[0247] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for early warning of drilling overflow is implemented.

[0248] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method for early warning of drilling overflow is implemented.

[0249] In an embodiment of the present invention, an overflow data set for neural network training and neural network input is established based on the logging data and drilling engineering data of the drilling; the overflow data set includes a training sample data set and a test sample data set; a BP-LSTM neural network model is established; the BP-LSTM neural network model is used to characterize the neural network structure after the full connection neural network and the long short-term memory neural network are connected in series; the BP-LSTM neural network model is trained with the training sample data set to obtain an overflow warning neural network model; the test sample data set is input into the overflow warning neural network model to obtain the first drilling overflow occurrence probability; the wellbore pressure is calculated based on the logging data and drilling engineering data of the drilling to obtain the difference between the bottom hole pressure and the formation pressure; according to the bottom hole pressure and the formation pressure The difference in pressure is used to calculate the probability of the second drilling overflow; the first drilling overflow probability and the second drilling overflow probability are weighted to obtain the weighted probability of drilling overflow; when the weighted probability exceeds the preset value, an early warning message of drilling overflow is issued. Compared with the technical solution in the prior art that uses the difference in inlet and outlet flow rates, the change in drilling fluid property parameters and the change in bottom hole parameters for overflow warning, an early warning of overflow based on a neural network is realized by establishing a BP-LSTM neural network model, which can achieve the purpose of rapid and accurate overflow warning. At the same time, the second drilling overflow probability is calculated according to the difference between the bottom hole pressure and the formation pressure, which realizes an early warning of overflow based on the overflow mechanism, and then through weighted calculation, the accuracy and processing efficiency of the drilling overflow warning are improved.

[0250] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0251] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0252] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0253] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0254] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for early warning of drilling overflow, characterized in that: include: According to the logging data and drilling engineering data of the drilling, an overflow data set for neural network training and neural network input is established; the overflow data set includes a training sample data set and a test sample data set; Establishing a BP-LSTM neural network model; the BP-LSTM neural network model is used to characterize the neural network structure after the fully connected neural network and the long short-term memory neural network are connected in series; The BP-LSTM neural network model is trained with the training sample data set to obtain the overflow warning neural network model; Input the test sample data set into the overflow warning neural network model to obtain the probability of overflow occurrence in the first drilling well; Based on the logging data and drilling engineering data, the pressure inside the wellbore is calculated to obtain the difference between the bottom hole pressure and the formation pressure; The probability of overflow in the second drilling well is calculated based on the difference between the bottom hole pressure and the formation pressure; Performing weighted calculation on the first drilling overflow occurrence probability and the second drilling overflow occurrence probability to obtain a weighted probability of drilling overflow; When the weighted probability exceeds the preset value, an early warning message of drilling overflow is issued; The process also includes: preprocessing the well logging data and drilling engineering data to obtain processed drilling data; the preprocessing includes: data sorting and cleaning, data completion and data standardization; Establishing an overflow data set for neural network training and neural network input based on the well logging data and drilling engineering data, including: establishing an overflow data set for neural network training and neural network input based on the processed drilling data; Based on the logging data and drilling engineering data of the drilling, an overflow data set for neural network training and neural network input is established, including: using chi-square test, based on the logging data and drilling engineering data of the drilling, logging feature data is selected; based on the selected logging feature data, an overflow data set for neural network training and neural network input is established; A BP-LSTM neural network model is established as follows: a cross entropy loss function is used as a loss function of a fully connected neural network and a long short-term memory neural network; the loss functions of the fully connected neural network and the long short-term memory neural network are added together to obtain a loss function of the BP-LSTM neural network model; and a parameter optimization operation is performed on hyperparameters in the BP-LSTM neural network; the hyperparameters include the number of hidden layers, the number of neurons, an activation function, a loss function, and an optimizer; The overflow data set is also used for neural network verification; the overflow data set also includes a verification sample data set; after obtaining the overflow warning neural network model, the method also includes: using the orthogonal test method, with accuracy, precision, recall rate, missed alarm rate and false alarm rate as evaluation indicators, using the verification sample data set to verify the overflow warning neural network model, and obtain a verified overflow warning neural network model.

2. The method according to claim 1, characterized in that Based on the logging data and drilling engineering data, the borehole pressure is calculated to obtain the difference between the bottom hole pressure and the formation pressure, including: Using the well logging data and the wellbore structure data and drilling fluid performance data in the drilling engineering data, the wellhead pressure is used as the boundary condition, and the mass conservation equation and energy conservation equation are used to calculate the pressure in the wellbore to obtain the difference between the bottom hole pressure and the formation pressure.

3. The method according to claim 1, characterized in that The pressure in the wellbore is calculated according to the following formula to obtain the difference between the bottom hole pressure and the formation pressure: ΔP=P p -P downhole Wherein, ΔP is the difference between bottom hole pressure and formation pressure, in MPa; P p is the formation pressure, in MPa; P downhole is the bottom hole pressure in MPa.

4. The method according to claim 1, characterized in that The probability of overflow in the second well is calculated based on the difference between bottom hole pressure and formation pressure according to the following formula: Wherein, P2 is the probability of the second drilling overflow; ΔP is the difference between the bottom hole pressure and the formation pressure, in MPa; a is a preset constant.

5. The method according to claim 1, characterized in that The probability of the first well overflow and the probability of the second well overflow are weighted and calculated according to the following formula to obtain the weighted probability of the well overflow: P=w1×P1+w2×P2 Among them, P is the weighted probability of drilling overflow; w1 and w2 are preset weighted weights; P1 is the probability of the first drilling overflow; P2 is the probability of the second drilling overflow.

6. A drilling overflow warning device, characterized in that: include: An overflow data set establishment module is used to establish an overflow data set for neural network training and neural network input according to the logging data and drilling engineering data of the drilling; the overflow data set includes a training sample data set and a test sample data set; A BP-LSTM neural network model building module is used to build a BP-LSTM neural network model; the BP-LSTM neural network model is used to characterize the neural network structure after the fully connected neural network and the long short-term memory neural network are connected in series; The overflow warning neural network model training module is used to train the BP-LSTM neural network model with the training sample data set to obtain the overflow warning neural network model; A first drilling overflow occurrence probability calculation module is used to input the test sample data set into the overflow warning neural network model to obtain the first drilling overflow occurrence probability; The module for calculating the difference between bottom hole pressure and formation pressure is used to calculate the pressure in the wellbore according to the logging data and drilling engineering data of the drilling, and obtain the difference between the bottom hole pressure and the formation pressure; A second drilling overflow occurrence probability calculation module, used to calculate the second drilling overflow occurrence probability according to the difference between the bottom hole pressure and the formation pressure; A weighted probability calculation module, used to perform weighted calculation on the first drilling overflow occurrence probability and the second drilling overflow occurrence probability to obtain a weighted probability of drilling overflow; An early warning module is used to issue an early warning message of drilling overflow when the weighted probability exceeds a preset value; It also includes: a data preprocessing module, which is used to: perform data preprocessing on the logging data and drilling engineering data of the drilling to obtain processed drilling data; the preprocessing includes: data sorting and cleaning processing, data completion processing and data standardization processing; an overflow data set establishment module, which is specifically used to: establish an overflow data set for neural network training and neural network input according to the processed drilling data; The overflow data set establishment module is specifically used to: select logging feature data based on the logging data and drilling engineering data of the well using the chi-square test; establish an overflow data set for neural network training and neural network input based on the selected logging feature data; The BP-LSTM neural network model establishment module is specifically used to: establish the BP-LSTM neural network model in the following manner: use the cross entropy loss function as the loss function of the fully connected neural network and the long short-term memory neural network; add the loss functions of the fully connected neural network and the long short-term memory neural network to obtain the loss function of the BP-LSTM neural network model; perform parameter optimization operations on the hyperparameters in the BP-LSTM neural network; the hyperparameters include the number of hidden layers, the number of neurons, the activation function, the loss function and the optimizer; The overflow data set is also used for neural network verification; the overflow data set also includes a verification sample data set; after obtaining the overflow warning neural network model, the device also includes: an overflow warning neural network model verification module, which is used to: use the orthogonal test method, with accuracy, precision, recall rate, missed alarm rate and false alarm rate as evaluation indicators, use the verification sample data set to verify the overflow warning neural network model, and obtain a verified overflow warning neural network model.

7. The device according to claim 6, characterized in that The module for calculating the difference between bottom hole pressure and formation pressure is specifically used for: Using the well logging data and the wellbore structure data and drilling fluid performance data in the drilling engineering data, the wellhead pressure is used as the boundary condition, and the mass conservation equation and energy conservation equation are used to calculate the pressure in the wellbore to obtain the difference between the bottom hole pressure and the formation pressure.

8. The device according to claim 6, characterized in that The module for calculating the difference between bottom hole pressure and formation pressure is specifically used for: The pressure in the wellbore is calculated according to the following formula to obtain the difference between the bottom hole pressure and the formation pressure: ΔP=P p -P downhole Wherein, ΔP is the difference between bottom hole pressure and formation pressure, in MPa; P p is the formation pressure, in MPa; P downhole is the bottom hole pressure in MPa.

9. The device according to claim 6, characterized in that The second drilling overflow occurrence probability calculation module is specifically used for: The probability of overflow in the second well is calculated based on the difference between bottom hole pressure and formation pressure according to the following formula: Wherein, P2 is the probability of the second drilling overflow; ΔP is the difference between the bottom hole pressure and the formation pressure, in MPa; a is a preset constant.

10. The device according to claim 6, characterized in that The weighted probability calculation module is specifically used for: The probability of the first well overflow and the probability of the second well overflow are weighted and calculated according to the following formula to obtain the weighted probability of the well overflow: P=w1×P1+w2×P2 Among them, P is the weighted probability of drilling overflow; w1 and w2 are preset weighted weights; P1 is the probability of the first drilling overflow; P2 is the probability of the second drilling overflow.

11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

13. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Drilling spill risk identification method, system and device based on convolutional neural network

    CN110443488A

  • Intelligent identification method for complex working conditions under drilling well

    CN113062731A