Training method, device, electronic device and storage medium for lithology identification model

By performing feature selection and decision tree optimization on the logging while drilling data set, combined with Bayesian optimization to adjust the hyperparameters, the existing lithology identification model has solved the problems of difficulty in feature extraction and long training time, and achieved efficient and accurate Lithological identification.

CN118152937BActive Publication Date: 2024-08-30SANYA MARINE OIL & GAS RESEARCH INSTITUTE NORTHEAST PETROLEUM UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410564812.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-09
Publication Date
2024-08-30
Estimated Expiration
2044-05-09

AI Technical Summary

Technical Problem

During the drilling process, existing lithology identification models have difficulty in extracting feature information due to the wide variety of logging data and high data dimensions. Moreover, the model training time is long and the recognition accuracy is affected by the number of decision trees, making it difficult to find a balance between speed and accuracy.

Method used

By performing feature selection on the logging-while-drilling data set, an initial recognition model is generated and its decision tree is divided and felled. Weights are assigned based on out-of-bag data, and hyperparameters are adjusted through Bayesian optimization to generate a target recognition model.

Benefits of technology

It improves the model training speed and recognition accuracy, reduces the model size and computing overhead, and at the same time ensures the accuracy of lithology recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118152937B
    Figure CN118152937B
Patent Text Reader

Abstract

The present invention provides a training method, device, electronic device and storage medium for a lithology recognition model, and relates to the field of data processing technology. The method includes: obtaining a logging while drilling data set of several wells; performing feature selection on the logging while drilling data set to obtain a target feature data set; dividing the target feature data set to obtain a training data set; generating an initial recognition model based on a training data subset in the training data set; dividing the decision tree in the initial recognition model to obtain multiple sub-forests; chopping down the decision tree based on the chopping contribution of the decision tree in the sub-forest to obtain an intermediate recognition model; assigning weights to the decision tree in the intermediate recognition model according to the out-of-bag data set in the training data set to obtain an intermediate recognition model after assigning weights; adjusting the hyperparameters of the intermediate recognition model after assigning weights to meet preset conditions to obtain a target recognition model. The method ensures both training speed and recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a training method, device, electronic equipment and storage medium for a lithology identification model. Background Art

[0002] During the drilling process, real-time monitoring and analysis of logging data to obtain formation lithology in a timely manner is critical to the development of downhole closed-loop intelligent directional drilling technology. Timely and accurate formation lithology can provide a basis for intelligent decision-making in drilling operations, thereby improving drilling efficiency and success rate.

[0003] At present, the methods for obtaining formation lithology include using decision tree models and random forest models to identify well logging data. On the one hand, due to the large variety of well logging data, high data dimensions, and complex relationships with lithology categories, it is difficult to extract feature information during the identification process. On the other hand, these models often require a large number of decision trees as support, which will undoubtedly take up a lot of storage space. Although the accuracy of the model will be improved at this time, the computing capacity will also increase exponentially, resulting in a significant increase in training time. If the number of decision trees is reduced in order to speed up training, although space can be saved, the recognition accuracy of the model will also be affected. Summary of the invention

[0004] The present disclosure provides a training method, device, electronic device and storage medium for a lithology identification model to at least solve the above technical problems existing in the prior art.

[0005] According to a first aspect of the present disclosure, a training method for a lithology recognition model is provided, the method comprising: obtaining a logging while drilling data set of several wells; performing feature selection on the logging while drilling data set to obtain a target feature data set; dividing the target feature data set to obtain a training data set; generating an initial recognition model based on a training data subset in the training data set; dividing all decision trees in the initial recognition model to obtain a plurality of sub-forests; for each sub-forest, based on the cutting contribution of each decision tree in the sub-forest, cutting down the decision trees to obtain an intermediate recognition model; and The out-of-bag data set in the data set is used to assign weights to the decision tree in the intermediate recognition model to obtain the intermediate recognition model after the weights are assigned; the hyperparameters of the intermediate recognition model after the weights are assigned are adjusted to meet preset conditions to obtain a target recognition model; wherein, the feature selection of the LWD data set to obtain the target feature data set includes: determining the first mutual information between any two LWD data in the LWD data set; determining the second mutual information between each LWD data in the LWD data set and the lithology category; and determining the target feature data set based on the first mutual information and the second mutual information.

[0006] In one possible implementation, all decision trees in the initial recognition model are divided to obtain a plurality of sub-forests, including: determining the lithology recognition result of each decision tree in the initial recognition model; determining the recognition accuracy of each decision tree for each lithology based on the lithology recognition result; and dividing all decision trees based on the recognition accuracy of each decision tree for each lithology to obtain a plurality of sub-forests.

[0007] In one possible implementation, for each sub-forest, based on the felling contribution of each decision tree in the sub-forest, the decision trees are cut down to obtain an intermediate recognition model, including: determining the accuracy contribution and diversity contribution of the sub-forest after cutting down each decision tree; determining the felling contribution of each decision tree based on the accuracy contribution and the diversity contribution; if the felling contribution value of a decision tree is greater than a preset threshold, the decision tree is cut down; if the felling contribution value of a decision tree is not greater than the preset threshold, the decision tree is retained; and based on the retained decision trees, an intermediate recognition model is generated.

[0008] In one possible implementation, the hyperparameters of the intermediate recognition model after the weights are assigned are adjusted to meet preset conditions to obtain a target recognition model, including: iteratively updating the initial hyperparameters of the intermediate recognition model after the weights are assigned through a Bayesian optimization algorithm until the hyperparameters meet the preset conditions to obtain a target recognition model.

[0009] According to a second aspect of the present disclosure, a lithology identification method is provided, the method comprising: obtaining a logging while drilling data set of a well to be identified; inputting the logging while drilling data set of the well to be identified into a target identification model for identification, and obtaining the lithology category of the well to be identified; the target identification model is trained using the training method of the lithology identification model in the above-mentioned embodiment.

[0010] According to a third aspect of the present disclosure, a training device for a lithology recognition model is provided, the device comprising: a data acquisition module for acquiring a LWD data set of several wells; a feature selection module for performing feature selection on the LWD data set to obtain a target feature data set; a training data set acquisition module for dividing the target feature data set to obtain a training data set; an initial model generation module for generating an initial recognition model based on a training data subset in the training data set; a sub-forest generation module for dividing all decision trees in the initial recognition model to obtain a plurality of sub-forests; an intermediate model generation module for generating a model for each sub-forest based on each decision tree in the sub-forest; The decision tree is cut down according to the contribution of cutting down, and an intermediate recognition model is obtained; a weight assignment module is used to assign weights to the decision trees in the intermediate recognition model according to the out-of-bag data set in the training data set, and an intermediate recognition model after weight assignment is obtained; a hyperparameter optimization module is used to adjust the hyperparameters of the intermediate recognition model after weight assignment to meet preset conditions, and a target recognition model is obtained; wherein the feature selection module is also used to determine the first mutual information between any two LWD data in the LWD data set; determine the second mutual information between each LWD data in the LWD data set and the lithology category; and determine the target feature data set according to the first mutual information and the second mutual information.

[0011] According to a fourth aspect of the present disclosure, a lithology identification device is provided, the device comprising: a data acquisition module for obtaining a well-to-be-identified logging data set; an identification module for inputting the well-to-be-identified logging data set into a target identification model for identification, so as to obtain the lithology category of the well-to-be-identified; the target identification model is obtained by training using a lithology identification model training method as in any one of the above-mentioned embodiments.

[0012] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.

[0016] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the present disclosure.

[0017] The present invention discloses a training method, device, electronic device and storage medium for a lithology recognition model. On the one hand, the original logging while drilling data set is used for feature selection, which solves the problem of difficulty in extracting feature information due to the large variety and high dimension of logging data. On the other hand, the decision trees with poor recognition effect and redundancy in the sub-forest are cut down, weights are assigned to each decision tree according to the out-of-bag data set, and the hyperparameters of the model are tuned, which improves the speed of model training while ensuring the recognition accuracy of the model.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0020] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0021] Figure 1 The following is a schematic diagram showing the implementation process of a training method for a lithology identification model according to an embodiment of the present disclosure. Figure 1 ;

[0022] Figure 2 The following is a schematic diagram showing the implementation process of a training method for a lithology identification model according to an embodiment of the present disclosure. Figure 2 ;

[0023] Figure 3 A schematic diagram of the implementation process of a lithology identification method according to an embodiment of the present disclosure is shown;

[0024] Figure 4 A structural schematic diagram of a lithology identification model training device according to an embodiment of the present disclosure is shown;

[0025] Figure 5 A schematic structural diagram of a lithology identification device according to an embodiment of the present disclosure is shown;

[0026] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0027] In order to make the purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0028] Figure 1 The following is a schematic diagram showing the implementation process of a training method for a lithology identification model according to an embodiment of the present disclosure. Figure 1 According to the first aspect of the present disclosure, a method for training a lithology identification model is provided, such as Figure 1 As shown, the method includes:

[0029] Step 101: Obtain logging while drilling data sets of several wells.

[0030] In the designated work area, the LWD data of several wells are collected during the drilling process to form a LWD data set. The LWD data reflects the physical properties of underground rocks, including natural gamma, well diameter, 2MHz phase resistivity, 400KHz attenuation resistivity, neutron porosity, density, acoustic time difference, etc.

[0031] LWD data is acquired while drilling, and records the geological information when the drill bit just breaks through the formation. At this time, the wellbore has not collapsed significantly, and the mud invasion into the formation is very shallow or even negligible. Therefore, LWD data can better reflect the original formation information.

[0032] Step 102: performing feature selection on the logging while drilling data set to obtain a target feature data set.

[0033] From the large amount of LWD data contained in the LWD data set, the LWD data with the greatest correlation with the lithology category and the least redundancy between the LWD data are selected to form the target feature data set for subsequent model training. Specifically, the minimum redundancy maximum relevance algorithm (mRMR) can be used to mine the association between LWD data and lithology categories and other LWD data.

[0034] In one possible implementation mode, feature selection is performed on the LWD data set to obtain a target feature data set, which can be specifically achieved by the following technical means: determining the first mutual information between any two LWD data in the LWD data set; determining the second mutual information between each LWD data in the LWD data set and the lithology category; and determining the target feature data set based on the first mutual information and the second mutual information.

[0035] Calculate the mutual information between any two LWD data in the LWD data set as the first mutual information. Calculate the mutual information between each LWD data and the lithology category as the second mutual information. Mutual information is used to measure the amount of shared information between two data. The larger the value of mutual information, the stronger the correlation between the two variables. If the mutual information (first mutual information) value between two LWD data is high, then the information they carry has a large overlap, that is, the redundancy is high. If the mutual information (second mutual information) between the LWD data and the lithology category is high, it means that the correlation between the two is large.

[0036] Specifically, the first mutual information and the second mutual information can be calculated by the following formulas (1) and (2):

[0037] (1)

[0038] (2)

[0039] in, Characterizing LWD Data and LWD data The mutual information between them is the first mutual information; c is the lithology category; Characterizing LWD Data The mutual information between the lithology category c, i.e., the second mutual information; Characterizing LWD Data The probability density of Characterizing LWD Data The probability density of Characterizing LWD Data and LWD data The joint probability density of Characterizes the probability density of lithology category c; Characterizing LWD Data and the joint probability density of lithology category c.

[0040] Then, feature selection is performed using the following formula (3) to obtain the target feature data set:

[0041] (3)

[0042] Wherein, F represents the LWD data set; m represents the number of LWD data in the LWD data set.

[0043] Using feature selection technology to select features from LWD datasets can reduce the number of features, lower the difficulty of model learning and computational overhead, and improve the generalization ability of the model.

[0044] Step 103, divide the target feature data set to obtain a training data set.

[0045] In one possible implementation, before dividing the target feature data set, the method further includes: normalizing the data in the target feature data set to obtain normalized target feature data. The original target feature data is mapped to a new value range, such as [0, 1], by linear transformation. Specifically, this can be achieved by the following formula (4):

[0046] (4)

[0047] in, Characterize the original target feature data; Characterize the normalized target feature data; , Respectively represent the minimum and maximum values ​​in the target feature data set.

[0048] In model training, if the value range of some features is much larger than that of other features, these features may dominate the algorithm, causing the model to be unable to correctly learn the information of other features. Therefore, in this embodiment, by normalizing the data, all features are scaled to the same value range to ensure that each feature is treated equally during the model training process. This eliminates the problems caused by the difference in numerical dimensions and improves the performance and stability of the machine learning model.

[0049] Then the normalized target feature data is divided to determine the training data set and the test data set. The training data set is used to train the model, while the test data set is used to evaluate the performance of the model after the model training is completed.

[0050] For example, 70% of the target feature dataset is extracted as the training dataset through a stratified random method, and the remaining 30% is used as the test dataset.

[0051] Step 104: Generate an initial recognition model based on a training data subset in the training data set.

[0052] First, we randomly extract n training data subsets from the training data set with replacement using Bootstrap sampling (sampling with replacement). The data capacity of each training data subset is the same as that of the training data set. In each Bootstrap sampling process, some samples will not be extracted. These samples that are not extracted are recorded as Out-of-Bag (OOB) data.

[0053] Based on the extracted n training data subsets, n decision trees are generated, and then the n decision trees are combined into an initial recognition model through equal-weighted voting.

[0054] If each decision tree uses the same training data, the correlation between models will be too high, thereby reducing the diversity and generalization ability of the models. Therefore, in this embodiment, a training data subset is generated by randomly extracting samples with the same data capacity as the training data set with replacement. This randomness can increase the differences between models.

[0055] Step 105, partitioning all decision trees in the initial recognition model to obtain multiple sub-forests.

[0056] According to the accuracy of each decision tree in the initial recognition model for each type of lithology, all decision trees are divided to form multiple sub-forests. For example, if decision tree A has the highest recognition accuracy for lithology category 1, then it will be divided into sub-forests. If decision tree B has the highest recognition accuracy for lithology category 2, then it will be divided into sub-forests And so on.

[0057] Step 106, for each sub-forest, based on the felling contribution of each decision tree in the sub-forest, the decision trees are felled to obtain an intermediate recognition model.

[0058] The felling contribution is a measure of the decision tree, which is used to decide whether the decision tree should be retained or felled. The felling contribution quantifies the impact of each decision tree on the prediction accuracy of the model. If the existence of a decision tree contributes little to the improvement of model performance, then felling this decision tree may improve the overall performance of the model. On the contrary, if a decision tree has a significant positive contribution to the prediction accuracy of the model, it means that it helps to improve the performance of the entire recognition model and needs to be retained. Finally, the intermediate recognition model is generated based on the retained decision tree.

[0059] Step 107, assigning weights to the decision trees in the intermediate recognition model according to the out-of-bag data set in the training data set, to obtain the intermediate recognition model after the weights are assigned.

[0060] In step 104, while determining the training data subset, an OOB data set is also obtained. The weight of each decision tree is determined based on the OOB data set. The calculation formula is as follows:

[0061] (5)

[0062] in, Represents the weight of decision tree i in the intermediate recognition model; Represents the number of samples that the i-th decision tree predicts correctly in the out-of-bag data; The total number of samples representing the out-of-bag data. After assigning corresponding weights to each decision tree, the assigned intermediate recognition model is obtained.

[0063] Step 108, adjusting the hyperparameters of the intermediate recognition model after the weights are assigned to meet preset conditions, and obtaining a target recognition model.

[0064] Specifically, the hyperparameters of the intermediate recognition model after weight assignment are optimized through the Bayesian optimization algorithm. The hyperparameters of the model include: the number of features considered when finding the best split point, the number of trees in the forest, the maximum depth of the tree, the minimum number of samples that can be divided into leaf nodes, the minimum number of samples contained in leaf nodes, the maximum number of leaf nodes, the minimum impurity of node partitioning, etc.

[0065] The optimal combination of these hyperparameters is found through the Bayesian optimization algorithm. First, the initial hyperparameters of the intermediate recognition model after weight assignment are used for a priori inference. The hyperparameters of the model are adjusted based on the inference results, and the recognition results of the intermediate recognition model after weight assignment are updated. The hyperparameters of the model are adjusted by continuously iterating the above process. Until the obtained hyperparameters are considered to be the optimal solution, that is, they meet the preset conditions. The model under this hyperparameter setting is determined as the target recognition model.

[0066] The method disclosed in the present invention, on the one hand, adopts the minimum redundancy maximum correlation algorithm for feature selection, which solves the problem of difficulty in extracting feature information due to the large variety and high dimension of logging data. On the other hand, the decision trees with poor recognition effect and redundancy in the sub-forest are cut down, each decision tree is assigned a weight according to the OOB data, and the hyperparameters of the model are tuned, which improves the speed of model training while ensuring the recognition accuracy of the model.

[0067] In one possible implementation, all decision trees in the initial recognition model are divided to obtain multiple sub-forests, which can be specifically achieved through the following technical means: determining the lithology recognition result of each decision tree in the initial recognition model; determining the recognition accuracy of each decision tree for each lithology based on the lithology recognition result; and dividing all decision trees based on the recognition accuracy of each decision tree for each lithology to obtain multiple sub-forests.

[0068] First, according to the lithology recognition results of each decision tree in the initial recognition model, the recognition accuracy of each decision tree for each type of lithology is determined. , where i=1, 2, ..., n; c=1, 2, ..., z. n is the number of decision trees, and z is the number of lithology categories. The recognition accuracy can be calculated using the following formula (6): :

[0069] (6)

[0070] Where i represents any decision tree in the model, i=1, 2, ..., n; c represents the lithology category, c=1, 2, ..., z; It represents the number of sample points of type c lithology that decision tree i correctly identifies; Represents the number of sample points of type c lithology in the training set corresponding to decision tree i.

[0071] Then, according to the lithology category with the highest recognition accuracy of each decision tree, all decision trees in the initial model are divided into k sub-forests, denoted as .

[0072] If the decision tree is not classified and the decision tree is directly cut down in the subsequent steps, the recognition accuracy of a certain type of lithology may be low due to the small number of sample points of the lithology. Direct cutting may cut down the decision trees that have a good recognition effect on the lithology, thereby affecting the recognition ability of the entire recognition model for the lithology. The method of this embodiment can ensure the recognition effect of the recognition model for each type of lithology.

[0073] In one possible implementation, for each sub-forest, based on the felling contribution of each decision tree in the sub-forest, the decision trees are felled to obtain an intermediate recognition model. This can be achieved specifically by the following steps: determining the accuracy contribution and diversity contribution of the sub-forest after each decision tree is felled; determining the felling contribution of each decision tree based on the accuracy contribution and diversity contribution; if the felling contribution value of a decision tree is greater than a preset threshold, the decision tree is felled; if the felling contribution value of a decision tree is not greater than the preset threshold, the decision tree is retained; and generating an intermediate recognition model based on the retained decision trees.

[0074] Specifically, the felling contribution of each decision tree is determined by the following formula (7):

[0075] (7)

[0076] in, Characterizing subforests The felling contribution of any decision tree i in ; Represents the removal of decision tree i pairs of sub-forests Contribution to accuracy; Represents the removal of decision tree i pairs of sub-forests contribution to diversity.

[0077] In this embodiment, the threshold is preset to 0. When the felling contribution of a decision tree is greater than 0, the decision tree is felled. When the felling contribution of a decision tree is less than 0, the decision tree is retained. The retained decision trees are used to form an intermediate recognition model.

[0078] Among them, in formula (7), It can be determined by the following formula (8):

[0079] (8)

[0080] Characterizing subforests The average lithology identification accuracy rate; Characterizing subforests The average lithology recognition accuracy after cutting down decision tree i.

[0081] It can be determined by the following formula (9):

[0082] (9)

[0083] in, ; Characterizes the average lithology recognition accuracy of the recognition model; m is the number of decision trees in the recognition model; Characterizes the lithology identification accuracy of decision tree i in the identification model; Characterizes the number of lithology sample points that are correctly identified by decision tree i; N represents the total number of sample points in the training set.

[0084] It can be determined by the following formula (10):

[0085] (10)

[0086] in, Characterizing subforests Average diversity of Characterizing subforests The average diversity after chopping off decision tree i.

[0087] It can be determined by the following formula (11):

[0088] (11)

[0089] in, ; Represents the average diversity of the recognition model; m is the number of decision trees in the recognition model; Represents the diversity between any two decision trees in the recognition model, namely, decision tree i and decision tree j. This indicator uses the independent classification differences between the classifiers to evaluate the diversity of the model. The number of sample points that represent the different recognition results of decision tree i and decision tree j.

[0090] The recognition model in this embodiment belongs to a collection model composed of multiple decision tree base learners. For the collection model, the higher the accuracy of the base learner and the greater the diversity of the base learner, the better the overall performance of the collection model. At the same time, the accuracy and diversity of the model are a trade-off relationship and need to be considered simultaneously. By cutting down the decision trees by cutting down the contribution, some decision trees with low recognition accuracy and redundancy can be cut down. This can reduce the number of decision trees in the recognition model and reduce the similarity of the decision trees in the model, which is conducive to speeding up the training speed of the model and improving the accuracy of the lithology recognition model.

[0091] In order to better understand the above embodiment, the method of the present disclosure is specifically described below through a specific embodiment. Figure 2 The following is a schematic diagram showing the implementation process of a training method for a lithology identification model according to an embodiment of the present disclosure. Figure 2 ,like Figure 2 As shown:

[0092] First, the logging while drilling data is obtained to form a logging while drilling data set. Then, feature selection is performed on the logging while drilling data set to obtain a target feature data set. Data preprocessing is performed on the data in the target feature data set, such as data normalization. Then, the preprocessed data is divided into training data and test data to obtain a training data set and a test data set. The data in the training data set is divided into training data subsets and out-of-bag data by Bootstrap sampling. The training data subsets include training set 1, training set 2, ..., training set n. According to the training data subsets, n decision trees are generated, including decision tree 1, decision tree 2, ..., decision tree n. The recognition result of each decision tree for each type of lithology is determined, and recognition result 1, recognition result 2, ..., recognition result n are obtained respectively. Then, based on the recognition results, the decision trees are divided into sub-forest 1, sub-forest 2, ..., sub-forest k. The decision trees are cut down according to the contribution of each decision tree to the cutting of the sub-forest, and the retained decision trees form a new forest, that is, an intermediate recognition model. The out-of-bag data is input into the intermediate recognition model. According to the accuracy of the out-of-bag data recognition, the decision trees in the forest are weighted and voted to obtain the intermediate recognition model after the weights are assigned. Finally, the hyperparameter optimization of the intermediate recognition model after the weights are assigned is performed through the Bayesian optimization algorithm to obtain the target recognition model. The test data is input into the target recognition model, and the model is trained to obtain the lithology recognition results.

[0093] Figure 3 A schematic diagram of the implementation process of a lithology identification method according to an embodiment of the present disclosure is shown. According to a second aspect of the present disclosure, a lithology identification method is proposed, comprising:

[0094] Step 201: Acquire a logging while drilling data set of a well to be identified.

[0095] First, for the well that needs lithology identification, the LWD data set of the well is obtained during the drilling process.

[0096] Step 202, input the LWD data set of the well to be identified into the target identification model for identification, and obtain the lithology category of the well to be identified; the target identification model is trained using the training method of the lithology identification model in the above embodiment.

[0097] After the LWD data set of the well to be identified is input into the lithology identification model, the lithology results can be obtained, such as sandstone, dacite, limestone, mudstone, etc.

[0098] Figure 4 A structural schematic diagram of a lithology identification model training device according to an embodiment of the present disclosure is shown. According to a third aspect of the present disclosure, a lithology identification model training device is proposed, comprising:

[0099] The data acquisition module 301 is used to acquire the logging while drilling data set of several wells; the feature selection module 302 is used to perform feature selection on the logging while drilling data set to obtain a target feature data set; the training data set acquisition module 303 is used to divide the target feature data set to obtain a training data set; the initial model generation module 304 is used to generate an initial recognition model based on a training data subset in the training data set; the sub-forest generation module 305 is used to divide all decision trees in the initial recognition model to obtain multiple sub-forests; the intermediate model generation module 306 is used to cut down the decision trees in each sub-forest based on the cutting contribution of each decision tree in the sub-forest to obtain an intermediate recognition model; the weight assignment module 307 is used to assign weights to the decision trees in the intermediate recognition model according to the out-of-bag data set in the training data set to obtain the intermediate recognition model after the weights are assigned; the hyperparameter optimization module 308 is used to adjust the hyperparameters of the intermediate recognition model after the weights are assigned to meet preset conditions to obtain a target recognition model. Among them, the feature selection module 302 is also used to determine the first mutual information between any two LWD data in the LWD data set; determine the second mutual information between each LWD data in the LWD data set and the lithology category; and determine the target feature data set based on the first mutual information and the second mutual information.

[0100] In one embodiment, the sub-forest generation module 305 is also used to determine the lithology identification results of each decision tree in the initial identification model; based on the lithology identification results, determine the identification accuracy of each decision tree for each lithology; based on the identification accuracy of each decision tree for each lithology, divide all decision trees to obtain multiple sub-forests.

[0101] In one possible implementation, the intermediate model generation module 306 is also used to determine the accuracy contribution and diversity contribution of the sub-forest after each decision tree is cut down; based on the accuracy contribution and the diversity contribution, the cutting contribution of each decision tree is determined; if the cutting contribution value of the decision tree is greater than a preset threshold, the decision tree is cut down; if the cutting contribution value of the decision tree is not greater than the preset threshold, the decision tree is retained; based on the retained decision trees, an intermediate recognition model is generated.

[0102] In one possible implementation, the hyperparameter optimization module 308 is used to iteratively update the initial hyperparameters of the intermediate recognition model after the weights are assigned through a Bayesian optimization algorithm until the hyperparameters meet preset conditions to obtain a target recognition model.

[0103] Figure 5 The schematic diagram of the structure of a lithology identification device according to an embodiment of the present disclosure is shown. According to another four aspects of the present disclosure, a lithology identification device is proposed, including:

[0104] The module 401 for acquiring data to be identified is used to acquire the logging while drilling data set of the well to be identified;

[0105] The identification module 402 is used to input the LWD data set of the well to be identified into the target identification model for identification to obtain the lithology category of the well to be identified; the target identification model is trained using the training method of the lithology identification model in the above embodiment.

[0106] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.

[0107] Figure 6 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0108] like Figure 6As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0109] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0110] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a training method for a lithology identification model. For example, in some embodiments, a training method for a lithology identification model may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the training method for a lithology identification model described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute a lithology identification model training method in any other appropriate manner (for example, by means of firmware).

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

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

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

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

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

[0116] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

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

[0118] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0119] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for training a lithology recognition model, characterized in that: The method comprises: Obtaining LWD data sets for several wells; Performing feature selection on the logging while drilling data set to obtain a target feature data set; Dividing the target feature data set to obtain a training data set; Generating an initial recognition model based on a training data subset in the training data set; Dividing all decision trees in the initial recognition model to obtain multiple sub-forests; For each sub-forest, based on the felling contribution of each decision tree in the sub-forest, the decision trees are felled to obtain an intermediate recognition model; Assigning weights to the decision trees in the intermediate recognition model according to the out-of-bag data set in the training data set to obtain the intermediate recognition model after the weights are assigned; The hyper parameters of the intermediate recognition model after the weights are assigned are adjusted to meet preset conditions to obtain a target recognition model; The step of performing feature selection on the LWD data set to obtain a target feature data set includes: determining a first mutual information between any two LWD data in the LWD data set; determining a second mutual information between each LWD data in the LWD data set and a lithology category; and determining a target feature data set based on the first mutual information and the second mutual information. The step of dividing all decision trees in the initial recognition model to obtain a plurality of sub-forests includes: determining a lithology recognition result of each decision tree in the initial recognition model; determining the recognition accuracy of each decision tree for each lithology according to the lithology recognition result; and dividing all decision trees based on the recognition accuracy of each decision tree for each lithology to obtain a plurality of sub-forests; For each sub-forest, based on the felling contribution of each decision tree in the sub-forest, the decision trees are felled to obtain an intermediate recognition model, including: determining the accuracy contribution and diversity contribution of the sub-forest after each decision tree is felled; determining the felling contribution of each decision tree based on the accuracy contribution and the diversity contribution; if the felling contribution value of the decision tree is greater than a preset threshold, the decision tree is felled; if the felling contribution value of the decision tree is not greater than the preset threshold, the decision tree is retained; and based on the retained decision trees, an intermediate recognition model is generated.

2. The method according to claim 1, characterized in that The step of adjusting the hyperparameters of the intermediate recognition model after the weights are assigned to meet preset conditions to obtain a target recognition model comprises: The initial hyperparameters of the intermediate recognition model after the weights are assigned are iteratively updated through a Bayesian optimization algorithm until the hyperparameters meet preset conditions, thereby obtaining a target recognition model.

3. A lithology identification method, characterized in that: The method comprises: Obtaining a logging while drilling data set of the well to be identified; The LWD data set of the well to be identified is input into the target identification model for identification to obtain the lithology category of the well to be identified; the target identification model is trained using the lithology identification model training method as claimed in any one of claims 1-2.

4. A training device for a lithology identification model, characterized in that: The device comprises: A data acquisition module, used to acquire logging while drilling data sets of several wells; A feature selection module is used to perform feature selection on the logging while drilling data set to obtain a target feature data set; A training data set acquisition module is used to divide the target feature data set to obtain a training data set; An initial model generation module, used to generate an initial recognition model based on a training data subset in the training data set; A sub-forest generation module, used for dividing all decision trees in the initial recognition model to obtain multiple sub-forests; An intermediate model generation module is used to cut down the decision trees for each sub-forest based on the cutting contribution of each decision tree in the sub-forest to obtain an intermediate recognition model; A weight assignment module, used to assign weights to the decision trees in the intermediate recognition model according to the out-of-bag data set in the training data set, so as to obtain the intermediate recognition model after the weights are assigned; A hyperparameter optimization module, used to adjust the hyperparameters of the intermediate recognition model after the weights are assigned to meet preset conditions to obtain a target recognition model; The feature selection module is used to determine the first mutual information between any two LWD data in the LWD data set; determine the second mutual information between each LWD data in the LWD data set and the lithology category; and determine the target feature data set based on the first mutual information and the second mutual information; The sub-forest generation module is used to determine the lithology recognition result of each decision tree in the initial recognition model; determine the recognition accuracy of each decision tree for each lithology according to the lithology recognition result; and divide all decision trees based on the recognition accuracy of each decision tree for each lithology to obtain multiple sub-forests; The intermediate model generation module is used to determine the accuracy contribution and diversity contribution of the sub-forest after each decision tree is cut down; based on the accuracy contribution and the diversity contribution, the cutting contribution of each decision tree is determined; if the cutting contribution value of the decision tree is greater than a preset threshold, the decision tree is cut down; if the cutting contribution value of the decision tree is not greater than the preset threshold, the decision tree is retained; based on the retained decision tree, an intermediate recognition model is generated.

5. A lithology identification device, characterized in that: The device comprises: The module for acquiring data to be identified is used to acquire the logging while drilling data set of the well to be identified; An identification module is used to input the LWD data set of the well to be identified into a target identification model for identification, so as to obtain the lithology category of the well to be identified; the target identification model is obtained by training using the training method of the lithology identification model as claimed in any one of claims 1-2.

6. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 2.

7. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-2.