CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of Chinese Patent Application No. 201811542293.0, filed on Dec. 17, 2018, entitled “MODELING METHOD AND METHOD FOR DIAGNOSING LOST CIRCULATION”, which is incorporated by reference as if fully set forth herein.

TECHNICAL FIELD

The present invention relates to the technical field of oil and gas drilling engineering, and specifically relates to a modeling method and a method for diagnosing lost circulation.

BACKGROUND

Lost circulation is a common complex situation that may occur in a petroleum drilling process. Lost circulation may result in serious hazards: not only can the non-production time and operation cost be increased, but also other complex accidents such as well collapse, drilling tool jamming and even blowout can occur. Lost circulation frequently happens on a loosened, depleted and karst cave/fracture development stratum and particularly on a fracture-cave development carbonatite stratum, it is easy to result in serious lost circulation on the stratums, and the lost circulation mechanism is complex.

The complex condition of lost circulation may result from the combined effect of numerous factors. Accordingly, the occurance of lost circulation is fraught with randomness and uncertainty. Areas and positions, where lost circulation is more prone to occur, may be forecast to a certain extent by using a seismic and logging method, however, the forecasting precision is not high.

SUMMARY

The present invention aims at providing a modeling method and a method for diagnosing lost circulation, by which a plurality of corresponding relations between logging characteristic parameters and a lost circulation or non-lost circulation result may be obtained, so that a diagnosis model for diagnosing lost circulation is obtained, a to-be-diagnosed well in a drilling process may be diagnosed based on the diagnosis model, and furthermore, precise early-warning for underground loss is realized.

In order to achieve the above aim, on one hand, the present invention provides a modeling method for diagnosing lost circulation, and the modeling method comprises: extracting multiple pieces of logging data corresponding to a plurality of logging characteristic parameters at different drilling depths of a sample well, based on a logging information of the sample well; marking the different drilling depths based on a lost circulation information of the sample well, to distinguish lost circulation points and non-lost circulation points; and classifying the lost circulation points and the non-lost circulation points by adopting a random forest algorithm, based on the plurality of logging characteristic parameters and the multiple pieces of marked logging data at the different drilling depths, to establish a plurality of corresponding relations between the logging characteristic parameters and a lost circulation or non-lost circulation result by employing a plurality of decision-making trees, so as to obtain the diagnosis model for diagnosing lost circulation.

Optionally, wherein the classifying of the lost circulation points and the non-lost circulation points by adopting a random forest algorithm, based on the plurality of logging characteristic parameters and the multiple pieces of marked logging data at the different drilling depths comprises the following steps: randomly selecting multiple pieces of corresponding logging data at the same or different drilling depths, based on the multiple pieces of corresponding logging data at different drilling depths to form training sets, wherein a random selection frequency is same as a number of samples at different drilling depths; gradually segmenting the training sets by adopting the plurality of logging characteristic parameters, according to a preset order; and stopping executing a segmentation action under the condition that a segmentation stopping condition is met, to obtain the decision-making trees corresponding to the training sets and furthermore realize a classification of the lost circulation points and the non-lost circulation points.

In certain embodiments, the segmentation stopping condition is a preset segmentation frequency.

In certain embodiments, the preset order is decided by a size of a Gini index of the training set under the logging data corresponding to each of the logging characteristic parameters at the different drilling depths.

In certain embodiments, the Gini index of the training set under the logging data corresponding to each of the logging characteristic parameters at the different drilling depths is

Gini⁡(D,A)=D1D⁢Gini⁡(D1)+D2D⁢Gini⁡(D2),
wherein

Gini⁡(D)=1-∑k=1K⁢⁢(CkD)2,
K is equal to 2, C1is a sample subset belonging to the lost circulation points in a training set D, C2is a sample subset belonging to the non-lost circulation points in the training set D, and if a logging characteristic parameter is A and a logging data corresponding to the logging characteristic parameter A at a certain drilling depth is a, the sample set D is divided into D1and D2: D1={(x, y)ϵD|A(x)>a}, D2=D−D1by adopting the logging characteristic parameter A, wherein x is the logging characteristic parameter, and y is a mark for distinguishing the lost circulation points and the non-lost circulation points.

Optionally, further comprising: performing segmentation on the training set by adopting a logging characteristic parameter and a logging data corresponding to the logging characteristic parameter, under the condition that the Gini index of the training set under the logging data corresponding to the logging characteristic parameter at a certain drilling depth is minimum.

In certain embodiments, the ranking the importance of a plurality of logging characteristic parameters used for segmentation during establishment of the decision-making trees, based on all the training sets and the decision-making trees corresponding to the training sets.

In certain embodiments, the ranking the importance of a plurality of logging characteristic parameters used for segmentation during establishment of the decision-making trees, based on all the training sets and the decision-making trees corresponding to the training sets comprises the following steps: determining an out-of-bag error of the decision-making tree corresponding to each of the training sets, based on an out-of-bag data generated when forming each of the training sets; for each of the plurality of logging characteristic parameters for segmentation during an establishment of the decision-making tree corresponding to each of the training sets, randomly disrupting the logging data corresponding to the logging characteristic parameter in the out-of-bag data to reform a test set; redetermining a disrupted error corresponding to each of the plurality of logging characteristic parameters, based on the reformed test set corresponding to each of the plurality of logging characteristic parameters for segmentation during the establishment of the decision-making tree corresponding to each of the training sets and the decision-making tree; and determining the importance of each of the plurality of logging characteristic parameters for segmentation during the establishment of the decision-making tree, based on the disrupted error corresponding to each of the plurality of logging characteristic parameters for segmentation during the establishment of the decision-making tree corresponding to each of the training sets and the out-of-bag error of the decision-making tree, wherein the out-of-bag data are the multiple pieces of unselected logging data corresponding to each of the plurality of drilling depths.

In certain embodiments, the determining the importance of each of the plurality of logging characteristic parameters for segmentation during the establishment of the decision-making tree, based on the disrupted error corresponding to each of the plurality of logging characteristic parameters for segmentation during the establishment of the decision-making tree corresponding to each of the training sets and the out-of-bag error of the decision-making tree comprises: determining an average value of a difference value between the disrupted error corresponding to any one of logging characteristic parameters for segmentation during the establishment of the decision-making tree corresponding to each of the training sets and the out-of-bag error of the decision-making tree on all the decision-making trees; determining a standard deviation of the difference values between the disrupted errors corresponding to the logging characteristic parameters and the out-of-bag errors of all the decision-making trees, corresponding to the logging characteristic parameters on all the decision-making trees; and determining the importance of the logging characteristic parameter, based on the determined average value and standard deviation.

In certain embodiments, the processing the extracted multiple pieces of logging data to eliminate invalid data.

In certain embodiments, the logging characteristic parameters include drilling depth, drilling rate, rotating speed, hook load, weight on bit, pump pressure, torque, pump stroke, drilling fluid inflow density, drilling fluid outflow density, flow rate, outlet flow and total gas content.

Accordingly, a method for diagnosing lost circulation is also provided. The method for diagnosing lost circulation comprises: inputting logging characteristic parameters of a to-be-diagnosed well and logging data corresponding to the logging characteristic parameters into a diagnosis model established by using the above modeling method for diagnosing lost circulation; and determining a lost circulation result of the to-be-diagnosed well, according to a diagnosis result output by the diagnosis model.

Accordingly, a machine readable storage medium is also provided. An instruction is stored in the machine readable storage medium and is used for making a machine execute the above method for diagnosing lost circulation.

According to the technical scheme, the diagnosis model for diagnosing lost circulation is creatively obtained by the following steps: extracting the multiple pieces of logging data corresponding to the plurality of logging characteristic parameters at the different drilling depths of the sample well, then, marking the lost circulation points and the non-lost circulation points of the multiple pieces of logging data corresponding to each group of logging characteristic parameters including the drilling depths; and finally, classifying the lost circulation points and the non-lost circulation points of the marked logging data at the different drilling depths by adopting the random forest algorithm, to obtain the plurality of corresponding relations between the logging characteristic parameters and the lost circulation or non-lost circulation result. By using the diagnosis model, the to-be-diagnosed well in the drilling process may be diagnosed, so that the precise early-warning for underground loss is realized.

Other characteristics and advantages of the invention will be described in detail in the subsequent description.

