Method and device for identifying formation lithology change in drilling while drilling process

By preprocessing and model training on drilling site well logging data, real-time identification and change judgment of formation lithology are achieved, and the problems of difficulty in identifying lithology changes and decision-making lag in drilling are solved, and the efficiency and accuracy of on-site decision-making are improved.

CN119848672APending Publication Date: 2025-04-18CHONGQING UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510035809.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

During drilling construction, it is difficult to identify real-time lithologic changes in formations, resulting in limited equipment selection, drilling parameter optimization and drilling safety, and the existing technology is costly and decision-making is lagging.

Method used

By collecting well-measuring data under different well-measuring conditions, performing data preprocessing and outlier filling, training the target lithology recognition model while drilling is performed, real-time lithology recognition and change judgment are achieved.

Benefits of technology

It improves the real-time decision-making efficiency at the drilling site, enhances the accuracy and real-time nature of lithologic changes, and reduces the cost and decision-making lag risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848672A_ABST
    Figure CN119848672A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a formation lithology change identification method and device in a well drilling while-drilling process. The method comprises the following steps: acquiring well logging data under different well logging working conditions; performing data preprocessing on the logging data to obtain target logging data; training based on the target logging data to obtain a target while-drilling formation lithology identification model; performing stratum lithology real-time identification on a target drilling well which is currently drilled on site through the target while-drilling stratum lithology identification model; and judging whether the stratum lithology is changed based on the real-time identification result. Big data and a machine learning algorithm are fused, preprocessing and intelligent real-time lithologic change identification are carried out on logging data, higher accuracy and real-time performance are achieved, and the real-time decision-making efficiency of field drilling can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of geological exploration technology, and in particular to a method and device for identifying lithology changes in a formation during drilling. Background Art

[0002] During the drilling process, a large amount of real-time logging data will be obtained from the ground, such as logging while drilling, measurement while drilling, and comprehensive logging, and then professionals will process and analyze the data to obtain lithological information. Due to inherent errors in logging data acquisition devices, signal fluctuations during data transmission, shutdowns, equipment failures, and other reasons, these real-time data may contain some abnormal values ​​and default values, which will affect the reliability and accuracy of subsequent analysis results by professionals.

[0003] During the on-site drilling process, changes in lithology greatly affect the equipment selection, drilling parameter optimization and drilling safety in the drilling operation, so the detection of lithology changes while drilling is of great significance. At present, the cost of measurement while drilling and logging while drilling is relatively high. For cost considerations, on-site professionals generally obtain lithology information by comprehensively analyzing the logging data after drilling and some lagging logging data, which is not conducive to timely decision-making in on-site operations. Summary of the invention

[0004] In view of this, in order to solve the above technical problems or part of the technical problems, an embodiment of the present invention provides a method and device for identifying formation lithology changes during drilling.

[0005] In a first aspect, an embodiment of the present invention provides a method for identifying formation lithology changes during drilling, comprising:

[0006] Collect mud logging data under different mud logging conditions;

[0007] Performing data preprocessing on the well logging data to obtain target well logging data;

[0008] A target formation lithology identification model while drilling is obtained based on the target logging data training;

[0009] Real-time identification of the formation lithology of the target well currently being drilled on site is performed using the target formation lithology identification model while drilling;

[0010] Determine whether the lithology of the formation has changed based on the real-time identification results.

[0011] In a possible implementation, the method further includes:

[0012] Performing normal transformation on the logging data by Box-Cox transformation method;

[0013] The logging data after normal transformation are standardized by RobustScaler standardization method;

[0014] The standardized logging data are stored in the database and the Birch-KNN algorithm is used to filter and fill in the abnormal values ​​and default values ​​in the logging data to obtain the target logging data.

[0015] In a possible implementation, the method further includes:

[0016] Calculate the Spearman correlation coefficient corresponding to the formation lithology correlation characteristic parameters in the target logging data under different logging conditions;

[0017] Optimize the target lithology correlation characteristic parameters whose Spearman correlation coefficient is greater than a preset coefficient threshold;

[0018] Based on the bacterial foraging algorithm, the structure of the initial neural network model is designed, and the parameters of the initial neural network model are initialized and assigned values;

[0019] The target logging data is used to train the initial neural network model through ten-fold cross validation to obtain a target while-drilling formation lithology recognition model.

[0020] In a possible implementation, the method further includes:

[0021] When the amount of real-time logging data of the current drilling on site reaches a preset data amount threshold, the real-time logging data is input into the target formation lithology identification model while drilling to obtain different lithology prediction probability values;

[0022] The lithology category corresponding to the maximum value among the different lithology prediction probability values ​​is used as the stratum lithology category corresponding to the current moment.

[0023] In a possible implementation, the method further includes:

[0024] The formation lithology category corresponding to the current moment is saved in the short-term memory unit of the target formation lithology identification model while drilling;

[0025] Compare the stratum lithology category corresponding to the current moment with the stratum lithology category corresponding to the previous moment to determine whether the stratum lithology has changed.

[0026] In a possible implementation, the method further includes:

[0027] Dividing the target well logging data into a plurality of sample data sets;

[0028] Dividing the multiple sample data sets into a model training set and a model validation set;

[0029] Repeating cross-validation of the initial neural network model by using the model training set and the model validation set for a preset number of times;

[0030] Based on the lithology change prediction accuracy of the model output after each training, the network structure of the initial neural network model is adjusted and optimized;

[0031] The generalization error corresponding to the prediction result of each adjusted and optimized model is calculated, and the model with the smallest generalization error is used as the target while-drilling formation lithology identification model.

[0032] In a possible implementation, the method further includes:

[0033] Based on the prediction accuracy of lithology changes output by the model after each training, the learning rate hyperparameter in the model is optimized through the BFO algorithm, and other hyperparameters are adjusted until the generalization error corresponding to the prediction result of the model is less than the preset generalization error threshold.

[0034] In a second aspect, an embodiment of the present invention provides a device for identifying formation lithology changes during drilling, including:

[0035] The acquisition module is used to collect the logging data under different logging conditions;

[0036] A processing module, used for performing data preprocessing on the well logging data to obtain target well logging data;

[0037] A training module, used for training a target formation lithology recognition model while drilling based on the target logging data;

[0038] An identification module, used for real-time identification of the formation lithology of the target well currently being drilled on site by using the target formation lithology identification model while drilling;

[0039] The identification module is also used to determine whether the lithology of the formation has changed based on the real-time identification results.

[0040] In a third aspect, an embodiment of the present invention provides a computer device comprising: a processor and a memory, wherein the processor is used to execute a program for identifying formation lithology changes during drilling while drilling stored in the memory, so as to implement the method for identifying formation lithology changes during drilling while drilling described in the first aspect above.

[0041] In a fourth aspect, an embodiment of the present invention provides a storage medium, including: the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method for identifying formation lithology changes during drilling as described in the first aspect above.

[0042] The embodiment of the present invention provides a solution for identifying formation lithology changes during drilling, by collecting logging data under different logging conditions; preprocessing the logging data to obtain target logging data; training a target logging data-while-drilling formation lithology identification model; using the target logging data-while-drilling formation lithology identification model to identify the formation lithology of the target well currently being drilled on site in real time; and judging whether the formation lithology has changed based on the real-time identification result. Compared with the existing method of obtaining lithology information through comprehensive analysis of logging data after drilling and some logging data with lag by professionals, it is not conducive to timely decision-making in field operations. This solution uses a fusion of big data and machine learning algorithms to preprocess logging data and intelligently identify lithology changes in real time, which has higher accuracy and real-time performance, and can improve the efficiency of real-time decision-making in field drilling. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A schematic flow chart of a method for identifying formation lithology changes during drilling while drilling provided by an embodiment of the present invention;

[0044] Figure 2 A schematic flow chart of another method for identifying formation lithology changes during drilling provided by an embodiment of the present invention;

[0045] Figure 3 A structural schematic diagram of a formation lithology identification model while drilling provided by an embodiment of the present invention;

[0046] Figure 4 A schematic diagram of the structure of a device for identifying formation lithology changes during drilling provided by an embodiment of the present invention;

[0047] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.

[0050] The purpose of this method is to provide a method for identifying lithologic changes in the drilling process and preprocessing data based on three different working conditions: comprehensive logging, comprehensive logging and measurement while drilling, and comprehensive logging and logging while drilling, so as to establish an intelligent identification model for lithologic changes in the drilling process based on comprehensive logging data and supplemented by measurement while drilling and logging while drilling data. This method mainly solves the problem that the preprocessing of field downhole logging data in the prior art is relatively simple and time-consuming, and the problem that the traditional method for detecting lithologic changes in the drilling process is inefficient, greatly affected by subjective factors, and has strong lag. The following is a detailed description.

[0051] Figure 1 A flow chart of a method for identifying formation lithology changes during drilling provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method specifically includes:

[0052] S11. Collecting the well logging data under different well logging conditions.

[0053] The well logging data under different well logging conditions are collected according to the data acquisition equipment equipped on site under three different well logging conditions: comprehensive logging, comprehensive logging and measurement while drilling, and comprehensive logging and logging while drilling.

[0054] S12, performing data preprocessing on the well logging data to obtain target well logging data.

[0055] The collected well logging data are stored in the MYSQL database, and then the well logging data are normally transformed by the Box-Cox transformation method. The well logging data after normal transformation are standardized by the RobustScaler standardization method. The standardized well logging data are stored in the database and the Birch-KNN algorithm is used to filter and fill in the abnormal values ​​and default values ​​in the well logging data to obtain the target well logging data.

[0056] S13, obtaining a target formation lithology identification model while drilling based on the target logging data training.

[0057] The Spearman correlation coefficient corresponding to the formation lithology correlation characteristic parameters in the target logging data under different logging conditions is calculated, and the target lithology correlation characteristic parameters with a Spearman correlation coefficient greater than a preset coefficient threshold (for example, 0.4) are selected. Based on the bacterial foraging algorithm, the structure of the initial neural network model is designed, and the parameters of the initial neural network model are initialized and assigned. The initial neural network model is trained using the target logging data through ten-fold cross validation to obtain the target while-drilling formation lithology recognition model.

[0058] S14, performing real-time identification of the formation lithology of the target well currently being drilled on site through the target formation lithology identification model while drilling.

[0059] When the amount of real-time logging data of the current drilling on site reaches a preset data volume threshold (for example, 3000 records), the real-time logging data is input into the target while-drilling formation lithology identification model to obtain different lithology prediction probability values.

[0060] Furthermore, the lithology category corresponding to the maximum value among the different lithology prediction probability values ​​is taken as the lithology category of the formation corresponding to the current moment.

[0061] S15. Determine whether the lithology of the formation has changed based on the real-time identification result.

[0062] The formation lithology category corresponding to the current moment is saved to the short-term memory unit of the target while-drilling formation lithology identification model, and the formation lithology category corresponding to the current moment is compared with the formation lithology category corresponding to the previous moment to determine whether the formation lithology has changed.

[0063] The embodiment of the present invention realizes the standardization of the logging data under three different logging conditions on site through Box-Cox transformation, and screens and fills the data with abnormal points through the Birch-KNN algorithm, which effectively solves the problem that the data stored in the database has abnormal values ​​and default values ​​that occupy a large amount of storage space, and the problem that the abnormal values ​​and default values ​​on site are relatively simple and time-consuming, thereby improving the efficiency of timely decision-making by on-site personnel. The parameters with strong correlation with the underlying lithology under three different logging conditions are calculated through Spearman correlation, and the parameters with strong correlation are input into the BFO-LSTM model as characteristic parameters. The model can identify the results of lithology changes of the drilled strata in real time according to the different working conditions adopted on site. In addition, the data is stored in the MySQL database, and the relationship between the tables in the data refers to the PCEDM database, which can quickly add, delete, check and modify. Remote transmission and real-time sharing of real-time data while drilling can be achieved.

[0064] The method for identifying formation lithology changes during drilling provided by the embodiment of the present invention collects logging data under different logging conditions; performs data preprocessing on the logging data to obtain target logging data; obtains a target logging data identification model based on the target logging data; performs real-time identification of the formation lithology of the target well currently being drilled on site through the target logging data identification model; and determines whether the formation lithology has changed based on the real-time identification result. Compared with the existing method of obtaining lithology information through comprehensive analysis of logging data after drilling and some logging data with lag by professionals, it is not conducive to timely decision-making in field operations. This method uses a fusion of big data and machine learning algorithms to preprocess logging data and intelligently identify lithology changes in real time, which has higher accuracy and real-time performance, and can improve the efficiency of real-time decision-making in field drilling.

[0065] Figure 2 A flow chart of another method for identifying formation lithology changes during drilling provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method specifically includes:

[0066] S21. Collecting the well logging data under different well logging conditions.

[0067] The embodiment of the present invention collects the mud logging data under different mud logging conditions according to the data acquisition equipment equipped on site under three different mud logging conditions: comprehensive mud logging, comprehensive mud logging and measurement while drilling, and comprehensive mud logging and logging while drilling.

[0068] The data of the embodiment of the present invention comes from the real-time data of comprehensive logging of XX block 2xx-7, as shown in Table 1:

[0069] Table 1: Partial real-time data of comprehensive logging of well 2xx-7 in block XX

[0070]

[0071] S22. Performing normal transformation on the logging data by Box-Cox transformation method.

[0072] The collected logging data are stored in a MYSQL database. When the data stored in the database reaches a manually set data volume threshold (for example, 3000 records), the logging data are normally transformed by the Box-Cox transformation method.

[0073] First, estimate the parameter λ and calculate it through maximum likelihood estimation. The maximum likelihood formula is as follows:

[0074]

[0075] Where: n represents the number of transformed data; is the average value of the transformed data; y corresponding to each transformation parameter λ (λ) The corresponding L (λ) By performing transformation fitting optimization from λ = -2 to 2 (increment of 0.2), we can obtain (λ) Take the maximum transformation parameter λ*, which is the final transformation parameter of Box-Cox transformation.

[0076] The formula for the Box-Cox transformation is as follows:

[0077]

[0078] Where: When λ = 0, the transformation is a logarithmic change, requiring that for any value of yi, yi + c > 0, c is a constant. λ = -1: reciprocal transformation; λ = 0.5: square root transformation.

[0079] For example, read in the feature data set Through program iteration, calculate λ that makes L(λ) take the maximum value. At this time, n = 3000, and λ takes values in the interval [0, 1]. Substitute it into the formula in the above steps to obtain an approximate value of λ = 0.5, then the transformation formula Next, perform a normal transformation on the data set D

[0080] The data set after normal transformation

[0081] S23. Standardize the logging data after the normal transformation through the RobustScaler standardization method

[0082] Perform RobustScaler standardization on the transformed data

[0083]

[0084] In the formula: v i is a certain value in the sample; m is the second quartile of the sample, representing the value in the middle position after sorting the data set from small to large; IQR is the interquartile range of the sample, and IQR is obtained by subtracting the value at the 25% percentile from the value at the 75% percentile extracted from the data set sorted from small to large

[0085] S24. Store the standardized logging data in the database and use the Birch-KNN algorithm to screen and fill the outliers and missing values in the logging data to obtain the target logging data

[0086] Store the standardized logging data in the Mysql database and use the Birch-KNN algorithm to screen and fill the outliers and missing values in the data

[0087] Specifically, read a column of field data values from the database to obtain the data set D = {d1, d2,..., dn}. Among them, the data set D is a column of data fields such as the weight on bit or the rotary speed collected on site. The steps for establishing the characteristic tree (CF Tree) of Birch clustering are as follows

[0088] (1) Set three CF Tree parameters: the maximum number of non-leaf nodes B (branch balance factor), the maximum number of CFs L (leaf balance factor) contained in each leaf node, and the maximum radius threshold Q (spatial distance between the sample point and the CF) of each CF in the leaf node. For the data set D, read the p-th group of data dp (0 < p ≤ n) and incorporate it into the triple LN'. The spatial distance calculation formula and the triple expression are as follows

[0089]

[0090] In the formula: n represents the number of sample data.

[0091] LN′ = (N, LS, SS)

[0092] In the formula: where N represents the number of sample points in this CF; LS represents the sum vector of the feature dimensions of the sample points in this CF represents the sum of the squares of the feature dimensions of the sample points in this CF

[0093] (2) Read the next set of data dp+1 (0 < p + 1 ≤ n). If the distance of this CF node is still less than the threshold T, update all the CF triples on the path, classify them into the same triple, and the insertion ends. Go to (5), otherwise go to (3).

[0094] (3) If the number of CF nodes in this leaf node is less than the threshold T, create a new CF node, put the (p + 1)-th set of data dp+1 into it. This leaf node is used to store the new CF node, update all the CF triples on the path, generate a new triple LNp+1, and the insertion ends. Go to (5), otherwise go to (4).

[0095] (4) Divide the current leaf node to get two new leaf nodes. Among all the CF tuples in the old leaf node, select the two CF tuples with the farthest hyper-sphere distance as the first CF nodes of the two new leaf nodes respectively. Then, according to the principle of distance, put the new sample tuples and other tuples into the corresponding leaf nodes. Check the parent node upward in turn to determine whether it also needs to be split. If so, its splitting method is the same as that of the leaf node. If not, go to (5).

[0096] (5) Read the data of the remaining groups dt (p + 1 < t ≤ n), and repeat (2) to (4). Complete the establishment of the clustering feature tree CF Tree for all the data. The dense data is divided into clusters (dense data refers to the data that aggregates into one type of data), and the sparse data is regarded as isolated points (sparse data refers to independent data points), that is, outliers.

[0097] (6) Regard the outliers as default values and fill the default values through the KNN algorithm.

[0098] (7) Manually set the KNN hyperparameter similarity constant P. (This value does not exceed 20)

[0099] (8) Calculate the distance between the outlier and other data points according to the Euclidean distance. The formula is as follows:

[0100]

[0101] Where: L represents the Euclidean distance between (x2, y2) and (x1, y1); |X| represents the Euclidean distance from (x2, y2) to the origin.

[0102] (9) Sort the distances in ascending order.

[0103] (10) Select the first P points with the smallest distance, determine the frequency of occurrence of the category to which the first P points belong, and then use the point with the highest frequency among the first P points as the abnormal point and the filling point of the default value.

[0104] Taking drilling time as an example, the data is calculated according to the RobustScaler standardization formula, where m = 1.56, IQR = 1.23, and the standardized data of drilling time is:

[0105] The data after normal transformation and standardization are input into the BIRCH algorithm, and the Birch-KNN algorithm is used to filter and fill the abnormal values ​​and default values ​​in the data. B=0.6, L=1.2, T=3 are taken, and all data are traversed to finally obtain a CF Tree. The number of nodes that are not clustered is recorded and counted, that is, the number of abnormal points and the number of default values ​​are counted. According to the above well data, the number of abnormal data counted is 167, and the number of default values ​​is 65.

[0106] Initialize the hyperparameter P=18 in the KNN algorithm, and take a normalized drilling pressure outlier point (1.65, -3.2), where x represents the well depth and y represents the drilling pressure. Calculate the distance from the outlier to other data points using the Euclidean distance, and sort in ascending order to get the result. Select the first 18 points with the smallest distance, determine that the point with the highest frequency is 0.98, and fill the outlier with (1.65, 0.98).

[0107] S25. Calculate the Spearman correlation coefficient corresponding to the formation lithology correlation characteristic parameters in the target logging data under different logging conditions.

[0108] In the embodiment of the present invention, combined with Figure 3 The structural diagram of the formation lithology identification model while drilling is shown as follows:

[0109] The Spearman calculation is used to calculate the correlation strength between the comprehensive logging, measurement while drilling and logging while drilling data and the underlying lithology. The calculation formula is as follows:

[0110]

[0111] In the formula: di----the difference in order; n----the number of data.

[0112] S26. Optimize target lithology correlation characteristic parameters whose Spearman correlation coefficient is greater than a preset coefficient threshold.

[0113] Through calculation, the parameters with Spearman correlation coefficient greater than 0.4 under three different logging and logging conditions are selected, including comprehensive logging, comprehensive logging and measurement while drilling, and comprehensive logging and logging while drilling. Among them, the characteristic parameters selected only by comprehensive logging are: drilling time, drilling pressure, DC index, rotation speed, torque. There is one characteristic parameter for measurement while drilling: natural gamma, and five characteristic parameters for logging while drilling: natural gamma, nuclear magnetic resonance porosity, lithology density, photoelectric cross-section absorption index, and acoustic time difference.

[0114] S27. Based on the bacterial foraging algorithm, the structure of the initial neural network model is designed, and the parameters of the initial neural network model are initialized and assigned values.

[0115] The structure of the long-term and short-term neural network model (BFO-LSTM) based on the bacterial foraging algorithm is designed as follows: the default initial number of input layer neurons is 5 (to judge the three different working conditions adopted on site, the input layer can be changed to 6 and 10), the hidden layer neurons are initialized to 20, the number of hidden layers is 6, the number of LSTM stacking layers, and the output layer neurons are initialized to 6 (which can be adjusted according to the type of lithology that needs to be identified on site).

[0116] Furthermore, the model parameters are initialized, and the number of input layer neurons, the number of hidden layer layers, the number of hidden layer neurons, the number of LSTM stacking layers, and the number of output neurons are initialized. The random normal distribution weight value between neurons is:

[0117]

[0118] Where: x represents the data value.

[0119] For example, randomly initialize the weight values ​​of each layer of the neural network. Here, the input neurons are initialized to 5, the number of hidden layer neurons is 10, the first 9 hidden layer neurons are initialized to 12, and the last hidden layer neurons are initialized to 5. Substitute the randomly initialized weight values ​​into the normal distribution function:

[0120]

[0121] The weights are calculated as:

[0122] Next, the data set is divided into 10 groups through ten-fold cross validation, with 3,000 data in each group, and they are input into the model.

[0123] S28, using the target logging data, training the initial neural network model through ten-fold cross validation to obtain a target while-drilling formation lithology recognition model.

[0124] The target logging data is divided into multiple sample data sets, and the multiple sample data sets are divided into a model training set and a model verification set. The initial neural network model is cross-validated repeatedly for a preset number of times through the model training set and the model verification set. Based on the lithology change prediction accuracy of the model output after each training, the network structure of the initial neural network model is adjusted and optimized, the generalization error corresponding to the prediction result of each adjusted and optimized model is calculated, and the model with the smallest generalization error is used as the target while-drilling formation lithology identification model.

[0125] Specifically, step 1: read the target logging data collected and processed on-site in the MySQL database, and train the initial neural network model through ten-fold cross validation. Divide the data set containing N samples into 10 parts, each containing Samples. One of them is selected as the validation set and the other 9 are selected as the training set. The validation set has 9 cases.

[0126] Step 2: Repeat the cross validation 10 times and proceed as in step 3.

[0127] Step 3: Adjustment and optimization of network structure: Based on the real-time prediction accuracy of rock property changes obtained through training, the most important learning rate hyperparameter lr is optimized through the BFO algorithm, and other hyperparameters such as the number of hidden layer neurons are manually adjusted until the generalization error is less than 0.1.

[0128] The optimization steps of the bacterial foraging algorithm (the bacterial foraging optimization algorithm achieves optimization through competition and cooperation between bacterial groups and is a search technology based on bacterial groups) are as follows:

[0129] (1) Initialize the important parameters of the BFO algorithm: initialize the learning rate lr, the learning rate step size s, the initial number of bacteria M, the bacterial migration probability F, the bacterial x-axis migration intensity qd, the bacterial y-axis migration intensity qs, the swimming step size b, the balance factor αt, the adjustment factor γ, the maximum number of iterations eh, and the required fitness U.

[0130] (2) Bacterial position generation: Bacteria and other organisms instinctively migrate to an environment that is conducive to their survival. According to the learning rate lr, M (M = 1, 2, ..., m) bacteria at different positions are randomly generated, where the i-th bacterial position can be represented as P i (j, d) = (px, py), the learning rate and the y value of the bacterial position are calculated as follows:

[0131] py=lr+n*s

[0132] Where: lr represents the current learning rate; py represents the found learning rate, which is also the y-axis value of the bacterial position; n represents a random non-zero integer; s represents the learning rate step.

[0133] The x-axis value of the bacterial position is expressed as follows:

[0134] px=m+n*lr

[0135] Where: lr represents the current learning rate; n represents a random non-zero integer; m represents the mth bacterium.

[0136] (3) Bacterial movement: The movement patterns of bacteria include rotation with changing direction and moving along the path. The formula and calculation process for bacterial position are as follows:

[0137] P i (j+1, d)=P i (j,d)+b*φ

[0138] Where: b----when its value is greater than 0, it represents the step length of forward swimming; when its value is less than 0, it represents the step length of backward swimming; φ----represents a unit direction vector of random rotation; Pi(j, d)----represents the new position reached by bacteria i after the jth tending movement and the dth migration.

[0139] (4) Fitness calculation: The fitness is calculated based on the error between the predicted value and the true value. When the fitness meets the artificially set requirements, the algorithm optimization ends. The formula is as follows:

[0140] FL=-α t (1-p t ) γ log2(p t )

[0141] In the formula: pt is the probability of correct prediction by the model; αt is the balancing factor, which adjusts the weight value between samples that are easy to classify and samples that are not easy to classify; γ is the adjustment factor, which reduces the weight of samples that are easy to classify.

[0142] (5) Elimination: When the number of algorithm iterations exceeds eh, but the required fitness U has not been reached, the algorithm will perform elimination and migration. Eliminate half of the bacteria, that is, Sr = M / 2, sort the bacteria from high to low according to their fitness, and then eliminate the Sr bacteria with the lowest ranking. Then, regenerate Sr new bacteria according to step (2), and continue with steps (3) and (4) until the required fitness is reached.

[0143] (6) Migration (Migration enables some bacterial individuals to have different locations from before and the ability to find ideal environments, which helps to solve the problem of local suboptimal solutions.): The remaining bacterial individuals that have not been eliminated will migrate, and a specific probability F is set as the probability of occurrence of migration behavior. When a bacterium meets this probability condition, it will migrate. The bacterial migration position can be expressed as (qd*px, qs*py), where qd and qs are both random values, ranging from [1,2]. Continue steps (3) and (4) until the required fitness is reached.

[0144] Furthermore, the 10 model prediction results are used as the final generalization error of each model. The error calculation formula is as follows:

[0145]

[0146] Where: yk is the true value; ok is the output value.

[0147] The model with the smallest generalization error is selected as the target while-drilling formation lithology identification model.

[0148] For example, the parameters of the bacterial foraging algorithm are initialized and optimized: Here, the learning rate lr is initialized to 0.5, the learning rate step size s is initialized to 0.01, the initial number of bacteria M is initialized to 30, the bacterial migration probability F is initialized to 0.4, the bacterial x-axis migration intensity qd is initialized to 1.2, the bacterial y-axis migration intensity qs is initialized to 1.4, the swimming step size b is initialized to 2, and the balance factor α is initialized to t =0.5, adjustment factor γ=1.2, artificially required fitness 0.9, algorithm iteration times are set to 100, and when the iteration times reach 100 and the artificially required fitness is not reached, replication and migration operations are performed.

[0149] Randomly generate 30 bacterial positions according to the initial learning rate According to the current position of the first bacterium, the bacterial fitness LF=0.032 is calculated, which is less than the artificial requirement. According to the bacterial position swimming calculation formula, the position of the first bacterium after the next movement is calculated to be p1=(0.84, 0.426). According to the y-axis value of the bacterial position, the current learning rate lr is 0.426. The swimming positions of other bacteria are calculated again, and the fitness is calculated until the fitness of a certain bacterium reaches the artificial requirement fitness, and the optimal learning rate can be obtained.

[0150] If the algorithm still fails to reach the required fitness after 100 iterations, the fitness of all bacteria will be sorted in descending order, 15 bacteria with poor fitness will be removed, 15 new bacterial positions will be generated, and the remaining 15 bacteria with good fitness will be migrated with probability F = 0.4. The positions after migration are still calculated according to the swimming formula. The optimization process ends when the fitness reaches or is very close to the artificial requirement. The final lr after optimization is 0.042, and the fitness reaches about 0.89.

[0151] Furthermore, the model with the smallest generalization error is selected: 10 models will be obtained under the ten-fold difference validation, and the generalization error is Model 9 with the smallest generalization error is selected as the model for subsequent predictions.

[0152] S29. When the amount of real-time logging data of the current drilling on site reaches a preset data amount threshold, the real-time logging data is input into the target while-drilling formation lithology identification model to obtain different lithology prediction probability values.

[0153] S210: taking the lithology category corresponding to the maximum value among the different lithology prediction probability values ​​as the stratum lithology category corresponding to the current moment.

[0154] S211. Save the formation lithology category corresponding to the current moment to the short-term memory unit of the target while-drilling formation lithology identification model.

[0155] S212: Compare the formation lithology category corresponding to the current moment with the formation lithology category corresponding to the previous moment to determine whether the formation lithology has changed.

[0156] The following is a unified description of S29-S212:

[0157] (1) Calculation from model input layer to hidden layer and from hidden layer to hidden layer

[0158] When the amount of real-time logging data of the current drilling on site reaches the preset data volume threshold, the program reads the preprocessed Xn×p (representing an n-row and p-column sample matrix) indicator and inputs it into the input layer neurons of the LSTM. The data is transmitted to the sample layer through the input layer neurons, and the two are connected through the activation function. The Gaussian activation function calculates the input data. The activation function formula is as follows:

[0159]

[0160] Where: Lg represents the number of categories; n represents the number of features (here n = 6); sigma represents the smoothing parameter, which is the only adjustable quantity, generally between 0 and 1, and the accuracy can be improved by adjustment; Xij represents the jth data of the i-th neuron of class g.

[0161] Hidden layers are mapped to hidden layers through another activation function to ensure fast convergence of the model:

[0162]

[0163] Where: x represents the data value.

[0164] (2) Weighted calculation from the last hidden layer to the output layer

[0165] The data calculated by the ReLU activation function is then passed to the output layer for weighted calculation of the data. The formula is as follows:

[0166]

[0167] Where: vi represents the output of the i-th category; L represents the number of neurons in the i-th category;

[0168] (3) Find the maximum value in the output layer

[0169] The output layer then classifies the lithology through the softmax activation function. When the input value is small, the output is close to 0, and when the input value is large, the output is close to 1, thereby effectively mapping the probability distribution of different categories. The calculation formula is as follows:

[0170]

[0171] Where: x represents the data value.

[0172] Finally, the output layer calculates the predicted probability values ​​of different lithologies and takes the maximum value as the output category at the current moment, and saves its current lithology information to the short-term memory unit of the LSTM model. Then, the predicted lithology information of the previous moment in the long-term memory unit is read to determine whether the lithology has changed:

[0173]

[0174] Where: vi represents the output of the lithology category at the current moment; v′ i The output representing the lithology category of the previous moment saved by the long-term memory unit;

[0175] Finally, real-time lithology change results are obtained.

[0176] For example, when the data volume reaches the set data volume threshold, here it is 3000, taking the comprehensive logging data as an example, there are 4 types of lithology to be identified: mudstone, gypsum layer, dolomite, limestone, the program starts to read five lithology-related characteristic parameters from the database. Characteristic parameter matrix M6x6= Enter the LSTM model input layer.

[0177] (1) Input layer to hidden layer

[0178] First, the input matrix M5x6 is multiplied by the W weight matrix, and then the Gaussian activation function is used to calculate

[0179] (2) The last hidden layer

[0180] When the data reaches the last hidden layer, it will be weighted and summed to calculate the probability prediction results of encountering different lithologies at the current drilling.

[0181] (3) Hidden layer to output layer

[0182] The maximum value of the last input of the hidden layer is taken, and the output layer outputs 0.38, which is judged as mudstone. The lithology information at the current moment is stored in the short-term memory unit. At the same time, the data of the long-term memory unit at the previous moment in the model is read for comparison. The lithology at the previous moment is also mudstone, and the model judges that the lithology has not changed.

[0183] The embodiment of the present invention first stores the original data in the database for preservation, and then reads the required data according to the field conditions for preprocessing and then stores it again in the database for subsequent analysis and decision-making by field personnel. The data is stored using MySQL database technology, and the database design meets the three major paradigms. The table structure is based on the exploration and development comprehensive database (PCEDM database) as a reference. The embodiment of the present invention designs 12 important data tables, which are roughly divided into: company business, wells, measurement while drilling, cable logging, cuttings logging, fluorescence logging, drilling fluid logging, engineering logging, gas logging, logging while drilling, etc.

[0184] The embodiment of the present invention realizes the standardization of the logging data under three different logging conditions on site through Box-Cox transformation, and screens and fills the data with abnormal points through the Birch-KNN algorithm, which effectively solves the problem that the data stored in the database has abnormal values ​​and default values ​​that occupy a large amount of storage space, and the problem that the abnormal values ​​and default values ​​on site are relatively simple and time-consuming, thereby improving the efficiency of timely decision-making by on-site personnel. The parameters with strong correlation with the underlying lithology under three different logging conditions are calculated through Spearman correlation, and the parameters with strong correlation are input into the BFO-LSTM model as characteristic parameters. The model can identify the results of lithology changes of the drilled strata in real time according to the different working conditions adopted on site. In addition, the data is stored in the MySQL database, and the relationship between the tables in the data refers to the PCEDM database, which can quickly add, delete, check and modify. Remote transmission and real-time sharing of real-time data while drilling can be achieved.

[0185] The method for identifying formation lithology changes during drilling provided by the embodiment of the present invention collects logging data under different logging conditions; performs data preprocessing on the logging data to obtain target logging data; obtains a target logging data while drilling formation lithology identification model based on the target logging data; performs real-time identification of the formation lithology of the target well currently being drilled on site through the target logging data while drilling formation lithology identification model; and determines whether the formation lithology has changed based on the real-time identification result. This method uses a fusion of big data and machine learning algorithms to preprocess logging data and intelligently identify lithology changes in real time, which has higher accuracy and real-time performance, and can improve the efficiency of real-time decision-making for on-site drilling.

[0186] Figure 4 A schematic diagram of a structure of a device for identifying formation lithology changes during drilling provided by an embodiment of the present invention, the device comprising:

[0187] The acquisition module 401 is used to acquire the well logging data under different well logging conditions. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.

[0188] The processing module 402 is used to perform data preprocessing on the logging data to obtain target logging data. For detailed description, please refer to the relevant description of the above method embodiment, which will not be repeated here.

[0189] The training module 403 is used to train the target while-drilling formation lithology identification model based on the target logging data. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.

[0190] The identification module 404 is used to identify the formation lithology of the target well currently being drilled on site in real time by using the target formation lithology identification model while drilling. Detailed descriptions refer to the relevant descriptions corresponding to the above method embodiments, which will not be repeated here.

[0191] The identification module 404 is also used to determine whether the lithology of the formation has changed based on the real-time identification result. For detailed description, please refer to the relevant description of the above method embodiment, which will not be repeated here.

[0192] The device for identifying lithology changes during drilling provided by an embodiment of the present invention is used to execute the method for identifying lithology changes during drilling provided by the above embodiment. Its implementation method and principle are the same. For details, please refer to the relevant description of the above method embodiment and will not be repeated here.

[0193] Figure 5 A computer device according to an embodiment of the present invention is shown. Figure 5As shown, the computer device may include a processor 501 and a memory 502, wherein the processor 501 and the memory 502 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0194] The processor 501 may be a central processing unit (CPU). The processor 501 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0195] The memory 502 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method provided in the embodiment of the present invention. The processor 501 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 502, that is, implements the method in the above method embodiment.

[0196] The memory 502 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor 501, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 502 may optionally include a memory remotely arranged relative to the processor 501, and these remote memories may be connected to the processor 501 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0197] One or more modules are stored in the memory 502 , and when executed by the processor 501 , the method in the above method embodiment is executed.

[0198] The specific details of the above-mentioned computer device can be understood by referring to the corresponding related descriptions and effects in the above-mentioned method embodiment, and will not be repeated here.

[0199] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by hardware related to computer program instructions, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0200] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for identifying formation lithology changes during drilling, characterized in that: include: Collect mud logging data under different mud logging conditions; Performing data preprocessing on the well logging data to obtain target well logging data; A target formation lithology identification model while drilling is obtained based on the target logging data training; Real-time identification of the formation lithology of the target well currently being drilled on site is performed using the target formation lithology identification model while drilling; Determine whether the lithology of the formation has changed based on the real-time identification results.

2. The method according to claim 1, characterized in that: The step of preprocessing the well logging data to obtain target well logging data includes: Performing normal transformation on the logging data by Box-Cox transformation method; The logging data after normal transformation are standardized by RobustScaler standardization method; The standardized logging data are stored in the database, and the Birch-KNN algorithm is used to filter and fill in the abnormal values ​​and default values ​​in the logging data to obtain the target logging data.

3. The method according to claim 2, characterized in that The target formation lithology identification model obtained by training based on the target logging data includes: Calculate the Spearman correlation coefficient corresponding to the formation lithology correlation characteristic parameters in the target logging data under different logging conditions; Optimize the target lithology correlation characteristic parameters whose Spearman correlation coefficient is greater than a preset coefficient threshold; Based on the bacterial foraging algorithm, the structure of the initial neural network model is designed, and the parameters of the initial neural network model are initialized and assigned; The target logging data is used to train the initial neural network model through ten-fold cross validation to obtain a target while-drilling formation lithology recognition model.

4. The method according to claim 3, characterized in that The real-time identification of the formation lithology of the target well currently being drilled on site by using the target formation lithology identification model while drilling includes: When the amount of real-time logging data of the current drilling on site reaches a preset data amount threshold, the real-time logging data is input into the target formation lithology identification model while drilling to obtain different lithology prediction probability values; The lithology category corresponding to the maximum value among the different lithology prediction probability values ​​is used as the stratum lithology category corresponding to the current moment.

5. The method according to claim 4, characterized in that The determining whether the lithology of the formation has changed based on the real-time identification result includes: The formation lithology category corresponding to the current moment is saved in the short-term memory unit of the target formation lithology identification model while drilling; Compare the stratum lithology category corresponding to the current moment with the stratum lithology category corresponding to the previous moment to determine whether the stratum lithology has changed.

6. The method according to claim 3, characterized in that The target logging data is used to train the initial neural network model through ten-fold cross validation to obtain a target formation lithology recognition model while drilling, including: Dividing the target well logging data into a plurality of sample data sets; Dividing the multiple sample data sets into a model training set and a model validation set; Repeating cross-validation of the initial neural network model by using the model training set and the model validation set for a preset number of times; Based on the lithology change prediction accuracy of the model output after each training, the network structure of the initial neural network model is adjusted and optimized; The generalization error corresponding to the prediction result of each adjusted and optimized model is calculated, and the model with the smallest generalization error is used as the target while-drilling formation lithology identification model.

7. The method according to claim 6, characterized in that The network structure of the initial neural network model is adjusted and optimized based on the lithology change prediction accuracy of the model output after each training, including: Based on the prediction accuracy of lithology changes output by the model after each training, the learning rate hyperparameter in the model is optimized through the BFO algorithm, and other hyperparameters are adjusted until the generalization error corresponding to the prediction result of the model is less than the preset generalization error threshold.

8. A device for identifying formation lithology changes during drilling, characterized in that: include: The acquisition module is used to collect the logging data under different logging conditions; A processing module, used for performing data preprocessing on the well logging data to obtain target well logging data; A training module, used for training a target formation lithology recognition model while drilling based on the target logging data; An identification module, used for real-time identification of the formation lithology of the target well currently being drilled on site by using the target formation lithology identification model while drilling; The identification module is also used to determine whether the lithology of the formation has changed based on the real-time identification results.

9. A computer device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a formation lithology change identification program during drilling stored in the memory, so as to implement a formation lithology change identification method during drilling according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method for identifying formation lithology changes during drilling according to any one of claims 1 to 7.

Citation Information

Cited By

  • Lithology identification method based on conventional logging information

    CN121115165A

  • Lithology identification method based on conventional logging information

    CN122194335A