Reservoir lithology identification method and device based on data balance

By using the SMOTE algorithm to generate a balanced sample training set in reservoir lithology recognition, and combining LightGBM and PSO algorithms to build and optimize the model, the problem of model overfitting and low sample utilization in traditional methods is solved, which significantly improves the number of cases Lithologic identification accuracy.

CN119441855APending Publication Date: 2025-02-14CHINA NAT PETROLEUM CORP +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310960264.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-01
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Traditional reservoir lithologic identification methods have problems such as model overfitting and low sample utilization, especially when processing data imbalance, which leads to low recognition accuracy of a few types of lithologic.

Method used

The data balance method based on the SMOTE algorithm is adopted, and the new sample data is added to a few class samples by synthesizing new sample data, a balanced sample training set is generated, and the reservoir lithology recognition model is constructed using the LightGBM classifier, and the model hyperparameters are optimized in combination with the PSO algorithm.

Benefits of technology

It effectively improves the classification model's identification effect on a few types of lithologies, improves the accuracy of reservoir lithologies, and overcomes the problems of model overfitting and low sample utilization in traditional data balance algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441855A_ABST
    Figure CN119441855A_ABST
Patent Text Reader

Abstract

The invention discloses a reservoir lithology identification method and device based on data balance. The method comprises the following steps: acquiring original logging data of a to-be-identified reservoir; inputting the original logging data of the to-be-identified reservoir into a pre-trained reservoir lithology identification model to obtain a reservoir lithology identification result; the reservoir lithology identification model is pre-trained and generated according to original logging data of historical oil wells and a training set of category labels of corresponding reservoir lithology, and the training set is a balanced sample training set obtained by analyzing features of minority class samples by using an SMOTE algorithm, synthesizing new sample data and adding the new sample data into the minority class. According to the method, the problems of model overfitting and low sample utilization rate in a traditional data balance algorithm can be solved, so that the identification effect of the model on minority class lithology is effectively improved, and the reservoir lithology identification precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of reservoir parameter prediction in petroleum engineering, and in particular to a reservoir lithology identification method and device based on data balance. Background Art

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

[0003] The geological structure of different layers in the oil field is complex. Rocks can be divided into different categories according to differences in physical properties such as color, structure, and composition. Each type of rock can reflect the energy storage situation in the nearby area to a certain extent. Considering that the current large-scale oil field exploitation is in the middle and late stages, and the newly discovered large oil fields are decreasing sharply, it is particularly important to improve the efficiency of the exploitation of the remaining oil and gas in the existing oil fields. Therefore, the rapid identification of reservoir lithology can help people evaluate the oil and gas situation and improve the ability to predict oil and gas production.

[0004] Reservoir lithology identification methods can be divided into three types: rock logging, drilling coring, and logging interpretation. The rock logging method is simple and timely, but it is subject to many external interference factors, there are depth deviations, and rock cuttings are easily distorted; the core data obtained by the drilling coring method is intuitive and reliable, and it is easy to identify lithology with high precision, but the cost is high and it will consume huge human and material resources; the logging interpretation method is based on the different trends of different lithologies on the logging curve to divide geological sections and identify reservoir lithology. The logging interpretation methods mainly include crossplot technology, probability statistics method, cluster analysis method, and machine learning method. Although these methods have been widely used in the field of lithology identification, they still have some limitations: 1) Crossplot technology must be judged manually, and when the logging data corresponding to different lithologies cannot be linearly divided, the lithology cannot be accurately identified; 2) Probabilistic statistics method and cluster analysis method often need to rely on a large amount of logging data to more accurately reflect the lithology; 3) Machine learning methods do not take into account the impact of data set imbalance on model classification performance, resulting in low reservoir lithology identification accuracy. Summary of the invention

[0005] The embodiment of the present invention provides a reservoir lithology identification method based on data balance, which is used to overcome the problems of model overfitting and low sample utilization in traditional data balance algorithms, thereby effectively improving the identification effect of the classification model on minority lithologies. The method includes:

[0006] Obtaining original logging data of the reservoir to be identified;

[0007] The original logging data of the reservoir to be identified is input into a pre-trained reservoir lithology identification model to obtain a reservoir lithology identification result; the reservoir lithology identification model is pre-trained and generated based on the original logging data of historical oil wells and a training set of corresponding reservoir lithology category labels, and the training set is a balanced sample training set obtained by synthesizing new sample data and adding them to a few classes after analyzing the characteristics of minority class samples using the SMOTE algorithm.

[0008] The embodiment of the present invention further provides a reservoir lithology identification device based on data balance, which is used to overcome the problems of model overfitting and low sample utilization in traditional data balance algorithms, thereby effectively improving the identification effect of the classification model on minority lithologies. The device includes:

[0009] An acquisition unit, used for acquiring original logging data of the reservoir to be identified;

[0010] The identification unit is used to input the original logging data of the reservoir to be identified into a pre-trained reservoir lithology identification model to obtain a reservoir lithology identification result; the reservoir lithology identification model is pre-trained and generated based on the original logging data of historical oil wells and a training set of corresponding reservoir lithology category labels, and the training set is a balanced sample training set obtained by adding new sample data synthesized from a few classes after analyzing the characteristics of minority class samples using the SMOTE algorithm.

[0011] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned reservoir lithology identification method based on data balance when executing the computer program.

[0012] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned reservoir lithology identification method based on data balance is implemented.

[0013] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned reservoir lithology identification method based on data balance is implemented.

[0014] In an embodiment of the present invention, a reservoir lithology identification scheme based on data balance is provided, by: acquiring original logging data of a reservoir to be identified; inputting the original logging data of the reservoir to be identified into a pre-trained reservoir lithology identification model to obtain a reservoir lithology identification result; the reservoir lithology identification model is pre-trained and generated based on a training set of original logging data of historical oil wells and corresponding reservoir lithology category labels, the training set being a balanced sample training set obtained by synthesizing new sample data and adding them to a few classes after analyzing the features of minority class samples using the SMOTE algorithm, thereby overcoming the problems of model overfitting and low sample utilization rate existing in traditional data balancing algorithms, thereby effectively improving the model's recognition effect on minority class lithologies and improving the accuracy of reservoir lithology identification. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0016] Figure 1 A flow chart of a reservoir lithology identification method based on data balance provided by the present invention;

[0017] Figure 2 Flow chart of the SMOTE algorithm provided by the present invention;

[0018] Figure 3 A schematic diagram of constructing a LightGBM model provided by the present invention;

[0019] Figure 4 A flow chart of the PSO algorithm provided by the present invention;

[0020] Figure 5 A schematic diagram of prediction results of different threshold factors in the nonlinear wavelet transform threshold method provided by an embodiment of the present invention;

[0021] Figure 6 A schematic diagram of the fitness change of the PSO algorithm provided in an embodiment of the present invention under multiple iterations;

[0022] Figure 7 A schematic diagram of prediction results of different parameter optimization methods provided by an embodiment of the present invention;

[0023] Figure 8 A schematic diagram of prediction results of different classification models provided by an embodiment of the present invention;

[0024] Fig. 9A schematic diagram of the prediction results of the optimal classification model provided by an embodiment of the present invention;

[0025] Fig.10 Schematic diagram of the process of a reservoir lithology identification method based on data balance in an embodiment of the present invention;

[0026] Fig.11 It is a schematic diagram of the structure of a reservoir lithology identification device based on data balance in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0028] The traditional lithology identification method has certain limitations: (1) the impact of data imbalance on the identification of a few types of lithology is ignored; (2) the efficiency of hyperparameter optimization in the lithology identification model of the conventional machine learning algorithm is low; (3) the error elimination is not thorough in the preprocessing stage of logging data, and the authenticity and validity of the data cannot be guaranteed. In order to solve the above shortcomings, the embodiment of the present invention uses machine learning technology from the perspective of data processing to systematically carry out lithology identification research from three aspects: well logging data preprocessing, well logging data balance, and well logging data classification. It focuses on solving the problems of well logging data imbalance, incomplete error elimination in the preprocessing stage of logging data, and low efficiency of model hyperparameter optimization, which greatly improves the lithology identification effect and provides reference for improving the level of geological feature description and reservoir quality assessment. Therefore, in order to solve the shortcomings of the above traditional lithology identification method, the embodiment of the present invention provides a reservoir lithology identification scheme, which is a reservoir lithology identification scheme based on data balance. The reservoir lithology identification scheme is introduced in detail below.

[0029] Fig.10 FIG. 1 is a flow chart of a reservoir lithology identification method based on data balance in an embodiment of the present invention. Fig.10 As shown, the method comprises the following steps:

[0030] Step 101: Acquire original logging data of a reservoir to be identified;

[0031] Step 102: Input the original logging data of the reservoir to be identified into a pre-trained reservoir lithology identification model to obtain a reservoir lithology identification result; the reservoir lithology identification model is pre-trained and generated based on the original logging data of historical oil wells and a training set of corresponding reservoir lithology category labels, and the training set is a balanced sample training set obtained by synthesizing new sample data and adding them to a few classes after analyzing the characteristics of minority class samples using the SMOTE algorithm.

[0032] The reservoir lithology identification method based on data balance provided in the embodiment of the present invention, when working: obtaining the original logging data of the reservoir to be identified; inputting the original logging data of the reservoir to be identified into a pre-trained reservoir lithology identification model to obtain a reservoir lithology identification result; the reservoir lithology identification model is pre-trained and generated based on the original logging data of historical oil wells and a training set of corresponding reservoir lithology category labels, the training set is a balanced sample training set obtained by synthesizing new sample data and adding them to a few classes after analyzing the characteristics of minority class samples using the SMOTE algorithm, overcoming the problems of model overfitting and low sample utilization rate existing in traditional data balancing algorithms, thereby effectively improving the model's recognition effect on minority class lithologies and improving the accuracy of reservoir lithology identification.

[0033] In order to solve the shortcomings of the above traditional lithology identification methods, Figure 1 As shown, an embodiment of the present invention provides a reservoir lithology identification method based on data balance, the method comprising the following steps:

[0034] S1: Obtain the original logging data of the oil well;

[0035] S2: Use the correlation function method to perform depth correction on the original logging data;

[0036] S3: De-noising the original logging data using the nonlinear wavelet transform threshold method;

[0037] S4: The original logging data is standardized using the minimum and maximum value normalization method;

[0038] S5: Split the preprocessed logging data and class labels into training set and test set in proportion;

[0039] S6: Use the SMOTE algorithm to process the training set data and synthesize new samples to add to the minority class samples;

[0040] S7: Building a lithology identification model through the LightGBM classifier;

[0041] S8: Use the training set as the input of the model and use the PSO algorithm to optimize the model;

[0042] S9: Input the test set into the lithology identification model, verify the model, and obtain the final reservoir lithology identification model.

[0043] After the above steps S1-S9, a reservoir lithology recognition model is established. When the lithology of the reservoir to be identified is to be identified, the original logging data of the reservoir to be identified is obtained, and the original logging data of the reservoir to be identified is input into the pre-trained reservoir lithology recognition model to obtain the reservoir lithology recognition result. The reservoir lithology recognition model is pre-trained and generated based on the original logging data of historical oil wells and the training set of the corresponding reservoir lithology category labels. The training set is a balanced sample training set obtained by synthesizing new sample data and adding them to at least a few classes after analyzing the characteristics of minority class samples using the SMOTE algorithm. This reservoir lithology recognition method overcomes the problems of model overfitting and low sample utilization in traditional data balancing algorithms, thereby effectively improving the model's recognition effect on minority class lithology and improving the accuracy of reservoir lithology recognition. The following is a detailed description of each step.

[0044] First, the steps of obtaining logging data are introduced, the following step S1.

[0045] S1: Get the original logging data of the oil well:

[0046] Among them, the embodiment includes 6 different logging curves (used to reflect the change curves of physical parameters in the formation with depth), namely borehole diameter logging curve (CAL), acoustic logging curve (AC), natural gamma ray logging curve (GR), radioactive potassium logging curve (K), deep investigation double lateral resistivity logging curve (RD) and spontaneous potential logging curve (SP), as well as 7 different lithologies including sandstone, mudstone, mud siltstone, silt mudstone, volcanic rock, granodiorite and tuff.

[0047] Next, the steps of preprocessing the logging data are introduced, the following steps S2-S4. The steps of preprocessing the logging data can be used in the scenario of establishing a reservoir lithology identification model, and can also be used in the scenario of actual reservoir lithology identification using the established model.

[0048] S2: Use the correlation function method to perform depth correction on the original logging data:

[0049] Specifically, the algorithm flow of the correlation function method is as follows:

[0050] Define a reference logging curve x, and the comparison logging curve that needs depth correction is recorded as y. First, fix a depth segment of length n on the reference logging curve as the comparison segment, then move the comparison logging curve within the set comparison range, and calculate the correlation coefficient C(t) between the comparison logging curve and the reference logging curve when the comparison logging curve moves by t points. The calculation formula is as follows:

[0051]

[0052]

[0053] Where k represents the starting comparison position on the reference logging curve, n represents the number of sampling points in the comparison length segment of the reference logging curve, t represents the number of moving points of the comparison logging curve relative to the reference logging curve, M represents the maximum number of points that the comparison logging curve can move in one direction, Z represents an integer, and x represents the maximum number of moving points of the comparison logging curve in one direction. i represents the i-th sampling value of the benchmark logging curve, It represents the average value of the benchmark logging curve over the comparison length section, y i+t represents the i+tth sampling value of the comparison logging curve, It represents the average value of the comparison logging curve over the comparison length section.

[0054] The approximate depth offset between the comparison logging curve and the reference logging curve is reflected by solving the number of moving points t corresponding to the maximum correlation coefficient. Finally, the depth correction can be completed by moving the comparison logging curve by t sampling points.

[0055] From the above, it can be seen that in one embodiment, the depth correction processing of the original logging data using the correlation function method may include:

[0056] A reference logging curve is defined, a depth segment of a preset length is fixed on the reference logging curve as a comparison segment, the comparison logging curve that needs depth correction is moved within the set comparison range, and the correlation coefficient between the comparison logging curve and the reference logging curve is calculated when the comparison logging curve is moved by a preset number of points;

[0057] The approximate depth offset between the comparison logging curve and the reference logging curve is reflected by solving the preset number of points corresponding to the maximum correlation coefficient, and the comparison logging curve is moved by the preset number of sampling points to complete the depth correction.

[0058] S3: Use nonlinear wavelet transform threshold method to denoise the original logging data:

[0059] Specifically, the algorithm flow of the nonlinear wavelet transform threshold method is as follows:

[0060] a. First determine the appropriate wavelet basis function The original signal (original logging data) f(t) is decomposed by wavelet using the following formula to obtain the jth scale a j The wavelet decomposition coefficient w(a j ,τ):

[0061]

[0062] Among them, a j represents the wavelet transform scale parameter, and τ represents the wavelet transform translation parameter.

[0063] The original signal is scaled to the same scale a j The wavelet decomposition coefficients calculated under different τ are represented by vector w j express.

[0064] b. Then choose a suitable threshold λ j For the wavelet coefficient w j Thresholding is performed on all elements in The embodiment of the present invention determines the quantization threshold λ at the jth scale by setting a threshold factor f (which can be determined by experiments): j , threshold λ j And the thresholding function is as follows:

[0065] λ j =f×max(w j ),f∈(0,1)

[0066] Among them, max(w j ) represents the wavelet coefficient w j The maximum value under the condition of soft threshold function is used to j Perform threshold processing as shown below:

[0067]

[0068] Among them, w jn is the wavelet coefficient w j The nth element in , sgn(·) is the sign function, Represents the wavelet coefficient w j The value of the nth element in after thresholding.

[0069] c. Finally, the processed wavelet coefficients Perform inverse wavelet transform to complete signal reconstruction and obtain denoised signal (denoised logging data)

[0070] From the above, it can be seen that in one embodiment, the nonlinear wavelet transform threshold method is used to perform denoising on the original logging data, which may include:

[0071] Using the predetermined optimal wavelet basis function and decomposition scale, the original logging data is subjected to wavelet decomposition to obtain the wavelet coefficients at the preset scale;

[0072] Select an optimal threshold value to perform threshold processing on all elements of the wavelet coefficients to obtain the wavelet coefficients after threshold processing;

[0073] The wavelet coefficients after thresholding are subjected to inverse wavelet transform to complete signal reconstruction and obtain denoised logging data.

[0074] S4: Use the minimum and maximum value normalization method to standardize the original logging data:

[0075] Specifically, the minimum and maximum value normalization algorithm flow is as follows:

[0076] a. First, for the i-th logging curve x i , calculate the minimum value x imin With the maximum value x imax :

[0077] x imin =MIN(x i )

[0078] x imax =MAX(x i )

[0079] Among them, MIN(x i ) and MAX(x i ) represent the i Take the minimum and maximum values.

[0080] b. Then all sample data under the i-th logging curve are normalized according to the following formula:

[0081]

[0082] Among them, x ij represents the value of the jth sample under the i-th logging curve, X ij Corresponding to the standardized data, M represents the number of samples in the data set.

[0083] In specific implementation, the above steps S2 to S4 embody a reservoir lithology identification method based on data preprocessing. This method uses the correlation function method to perform depth correction on the logging curve, thereby solving the problem of inconsistent depths between logging curves; uses the nonlinear wavelet transform threshold method to denoise the logging data, thereby filtering out the white noise signal introduced by the external environment to a certain extent; uses the minimum and maximum value normalization method to standardize the logging data, thereby solving the problem of large differences in numerical magnitudes between different logging curves.

[0084] Next, the steps of using the pre-processed logging data to train a reservoir lithology identification model are introduced, namely, steps S5 to S9.

[0085] In one embodiment, the reservoir lithology identification method may further include: training a reservoir lithology identification model according to the following method:

[0086] Obtain original logging data of historical oil wells;

[0087] The original logging data of historical oil wells and the corresponding category labels of reservoir lithology are used to form a sample set, and the sample set is divided into a training set and a test set;

[0088] The training set is divided into a majority class sample and multiple minority class samples, the SMOTE algorithm is used to process the training set, and new samples are synthesized and added to the minority class samples to obtain a balanced sample training set;

[0089] The reservoir lithology identification model was constructed through the LightGBM classifier;

[0090] The balanced sample training set is used as the input of the reservoir lithology identification model to train a preliminary reservoir lithology identification model;

[0091] The test set is input into the preliminary reservoir lithology identification model to obtain the final reservoir lithology identification model.

[0092] The steps for training the reservoir lithology identification model are described in detail below.

[0093] S5: Split the preprocessed logging data and the category labels into a training set and a test set according to a certain ratio (for details on the specific ratio, see the following embodiment).

[0094] S6: Use the SMOTE algorithm to process the training set data and synthesize new samples to add to the minority class samples:

[0095] Specifically, the specific implementation process of the SMOTE algorithm is as follows: Figure 2 As shown:

[0096] a. Read the training set data and divide it into m minority classes and 1 majority class, where the majority class is the lithology sample with the largest number of samples in the training set data, and the minority class is the other lithology samples. The number of samples in the i-th minority class is recorded as The number of majority class samples is denoted as N majority .

[0097] b. For each minority class, set the number of samples after balancing N balance , and then calculate the number of new samples N that need to be synthesized from each class sample for each minority class using the following formula: i :

[0098]

[0099] c. For each minority class sample x ij , by calculating the Euclidean distance between each minority class and other samples in the class, and screening out the k samples closest to the sample, and then randomly selecting a sample x from them n .

[0100] d. For each minority class sample x ij , synthesize new sample data x through the following formula new :

[0101] x new =x ij +rand(0,1)×(x n -x ij )

[0102] Among them, x n Indicates that from x ij A sample is randomly selected from the k nearest neighbor samples, and rand(0,1) represents a random number between (0,1).

[0103] e. Repeat step d N i times, at which point the number of samples in the i-th minority class is expanded to the balanced number N balance .

[0104] f. Repeat step d,em times until the number of m minority class samples is expanded to N balance .

[0105] From the above, we can know that the training set is divided into a majority class sample and multiple minority class samples, the SMOTE algorithm is used to process the training set, and new samples are synthesized and added to the minority class samples to obtain a balanced sample training set, which can include:

[0106] Read the training set data and divide the training set into 1 majority class and m minority classes; m is a positive integer greater than 1;

[0107] For each minority class, determine the number of new samples that need to be synthesized from the samples within the class based on the number of samples in the minority class and the preset target number of samples after balancing;

[0108] For each minority class sample, determine the Euclidean distance between the minority class sample and other samples in the class, and select the k samples closest to the minority class sample; k is a positive integer greater than 1;

[0109] Perform the following sample synthesis steps for each class:

[0110] For each minority class sample, randomly select a sample from k samples and synthesize a new sample based on the randomly selected sample;

[0111] For each minority class, the number of minority class samples is expanded to the target number of samples after repeating the step of synthesizing new samples a preset number of times; the preset number of times is the number of new samples that need to be synthesized from samples within the class;

[0112] Repeat the sample synthesis step for each class until the number of samples of the m minority classes is expanded to the target number of samples.

[0113] In specific implementation, the above step S6 embodies a reservoir lithology identification method based on data balance. This method uses the SMOTE algorithm to analyze the intrinsic characteristics of minority class samples to synthesize new sample data and add them to the minority classes, thereby overcoming the problems of model overfitting and low sample utilization in traditional data balancing algorithms, and effectively improving the classification model's recognition effect on minority class lithology.

[0114] S7: The lithology recognition model is constructed by LightGBM classifier. The LightGBM classifier construction process is as follows: Figure 3 As shown. The LightGBM classifier uses the CART tree as a weak learning machine and builds multiple CART trees in parallel based on the Bagging strategy to complete the model training. The LightGBM classifier recognizes samples by counting the recognition results of all CART trees. The specific recognition process is as follows:

[0115] a. Given the logging data x, set the root node of the tree as the current node.

[0116] b. According to the judgment feature (logging feature) N of the current node and the threshold th, x is divided into the left node (feature N in x is less than the threshold th) or the right node (feature N in x is greater than the threshold th), and the division is repeated until it falls into a leaf node. The category represented by the output leaf node is the classification result of the current CART tree.

[0117] c. Repeat steps a and b to obtain the classification results of all CART trees. The predicted category of the logging data x by the LightGBM classifier is the category that appears most frequently in the output results of all CART trees.

[0118] From the above, it can be known that in one embodiment, the reservoir lithology identification model is constructed by the LightGBM classifier, which may include: the LightGBM classifier uses the CART tree as a weak learning machine, and constructs multiple CART trees in parallel based on the Bagging strategy to complete the model training. The LightGBM classifier recognizes samples by statistics of all CART tree recognition results. The recognition process is as follows:

[0119] Setting steps: Given the well logging data, set the root node of the tree as the current node;

[0120] Division step: divide the logging data into left nodes or right nodes according to the logging characteristics of the current node and the preset threshold, repeat the division until it falls into a leaf node, and output the category represented by the leaf node as the classification result of the current CART tree;

[0121] Repeat the setting steps and the division steps to obtain the classification results of all CART trees. The prediction category of the logging data by the LightGBM classifier is the category that appears most frequently in the output results of all CART trees, and finally a reservoir lithology identification model is obtained.

[0122] S8: Use the training set as the input of the model and use the PSO algorithm to optimize the model:

[0123] Specifically, the PSO algorithm optimizes the LightGBM classifier as follows Figure 4 As shown, the implementation process is as follows:

[0124] a. First, define the particle position x in the PSO algorithm, define particle x, and initialize the particle swarm position vector x i With velocity vector v i As well as the local optimal solution pbest and the global optimal solution lbest for each particle. The LightGBM model has a total of 7 hyperparameters that need to be adjusted, including learning rate, number of decision trees, downsampling rate, maximum branch depth, maximum number of leaf nodes, L1 regularization weight and L2 regularization weight: the learning rate sets the learning rate of the algorithm; the number of decision trees sets the number of CART trees generated; the downsampling rate sets the sample ratio required for training a single CART tree; the maximum branch depth and the maximum number of leaf nodes set the growth depth and leaf nodes of a single CART tree; the L1 regularization weight and the L2 regularization weight set the weights of the algorithm L1 and L2 regularization. Particle x can be expressed as:

[0125]

[0126] b. Set the particle swarm size N and the maximum number of iterations iter max , minimum particle fitness th min ; Determine the fitness function:

[0127] f(x) = LightGBM solve (x)

[0128] Among them, LightGBM solve (x) represents the recognition error of the LightGBM model for the test set when the hyperparameter value is the particle value x. Set the particle activity range:

[0129]

[0130] Initialize particle swarm position vector x i , i∈[1,N] and velocity vector v i ,i∈[1,N]; calculate the current fitness of each particle and initialize the local optimal solution pbest of each particle i :

[0131] pbest i =f(x i )

[0132] Then determine the global optimal solution lbest in the entire population space:

[0133] lbest=min(pbest)

[0134] c. Then update the particle velocity attribute v and position attribute x by the following formula:

[0135] v i =v i +c 1 ×rand(0,1)×(pbest i -x i )+c 2 ×rand(0,1)×(lbest-x i ),

[0136] x i =x i +v i ,

[0137] x i =max(x i ,x lb ),

[0138] x i =min(x i ,x ub )

[0139] Among them, c 1 With c 2 represents the learning factor, and rand(0,1) represents a random number between (0,1).

[0140] d. Calculate the fitness of each particle and update the local optimal solution pbest of each particle during the iteration process:

[0141] pbest i =f(x i ),if f(x i )<pbest i

[0142] e. Update the global optimal solution lbest of the particle population during the iteration process:

[0143] lbest=min(pbest),if lbest>min(pbest)

[0144] f. Repeat the above steps until the number of iterations reaches the given value iter max Or the global optimal solution of the particle population is lower than the given value th min At this time, the particle value corresponding to the global optimal solution is the optimal hyperparameter of the model, and the model corresponding to the optimal hyperparameter is the optimized reservoir lithology identification model.

[0145] It can be seen from the above that, in one embodiment, the reservoir lithology identification method may further include: optimizing the reservoir lithology identification model using a PSO algorithm to obtain an optimized reservoir lithology identification model;

[0146] Inputting the test set into the preliminary reservoir lithology identification model to obtain the final reservoir lithology identification model includes: inputting the test set into the optimized reservoir lithology identification model to obtain the final reservoir lithology identification model.

[0147] From the above, it can be seen that in one embodiment, the PSO algorithm is used to optimize the reservoir lithology identification model to obtain an optimized reservoir lithology identification model, including:

[0148] Taking the initialized particle swarm position vector, velocity vector, and the local optimal solution and global optimal solution of each particle as initial values, the steps of optimizing the reservoir lithology identification model are iteratively performed. Each step performs the following operations:

[0149] According to the preset particle activity interval, the particle velocity vector and position vector are updated; the particles represent the hyperparameters of the reservoir lithology identification model;

[0150] Calculate the fitness of each particle, and update the local optimal solution of each particle in the iteration process according to the fitness of each particle to obtain the updated local optimal solution;

[0151] According to the updated local optimal solution, the global optimal solution of the particle population in the iteration process is updated to obtain the updated global optimal solution. The global optimal solution corresponding to the preset number of iterations or the global optimal solution of the particle population is lower than the preset minimum particle fitness is the optimal hyperparameter of the lithology identification model.

[0152] In specific implementation, the above step S8 embodies a lithology identification method based on PSO+LightGBM, which effectively solves the problems of time-consuming model construction and low identification accuracy of traditional lithology identification methods, and effectively overcomes the problem of low efficiency of hyperparameter optimization in conventional machine learning lithology identification models.

[0153] S9: Inputting the test set into the lithology identification model (optimized reservoir lithology identification model) to obtain lithology identification results, thereby verifying the optimized reservoir lithology identification model.

[0154] Specifically, the logging parameter vector of the sample to be tested is input into the trained lithology recognition model to obtain the lithology recognition result of the sample to be tested. 1 Scores are used to evaluate the prediction results.

[0155] In order to facilitate understanding of how to implement the present invention, the following examples are given for illustration.

[0156] Example 1: Validation

[0157] This example uses the logging data of an oil field in a certain sea area to verify the method. The data set consists of 10434 sets of logging data, including 7 different lithologies, including sandstone, mudstone, muddy siltstone, silty mudstone, volcanic rock, granodiorite, and tuff, and 6 different logging curves (used to reflect the change curve of physical parameters in the formation with depth), namely borehole diameter logging curve (CAL), acoustic logging curve (AC), natural gamma logging curve (GR), radioactive potassium logging curve (K), deep investigation double lateral resistivity logging curve (RD) and spontaneous potential logging curve (SP).

[0158] The effects of different data preprocessing methods, different data balancing methods, different parameter optimization methods, and different classification models on the classification results are specifically verified, as follows:

[0159] (1) Different data preprocessing methods

[0160] a. Depth correction

[0161] In order to verify the influence of depth correction of logging curves on model classification, 20% of the data were randomly selected from each type of lithology data as a training set, and the rest were used as a test set. The LightGBM model was used to test the data sets before and after depth correction.

[0162] Table 1 shows the classification accuracy of the classification model for the test set. The experimental results show that after the well logging curve is depth-corrected, the classification accuracy of the LightGBM model for the test set is improved, proving that depth correction of the well logging curve can reduce the deviation from the real data.

[0163] Table 1

[0164] Evaluation indicators No depth correction Perform depth correction Classification accuracy 84.06% 84.91%

[0165] b. Denoising

[0166] In order to verify the denoising effect of different data denoising algorithms, 20% of the data was randomly selected from the data set after deep correction as the training set, and the rest was used as the test set, and the classification model was constructed using the LightGBM algorithm. Figure 5 The classification accuracy of the LightGBM model on the test set is shown when the threshold factor f in the nonlinear wavelet transform threshold method takes different values. The experimental results show that when the threshold factor f takes a value of 0.89, the classification model can obtain the highest classification accuracy of 95.18%. The comparative experimental results are shown in Table 2. The comparative results show that the classification model can obtain a higher classification accuracy for the well logging data denoised using the nonlinear wavelet transform threshold method.

[0167] Table 2

[0168]

[0169] c. Standardization

[0170] In order to verify the impact of different standardization methods on the classification model, three algorithms were selected for experimental comparison. First, 20% of the data was randomly selected from the well logging data that had undergone the above-mentioned depth correction and data denoising as the training set, and the rest was used as the test set. Then, the LightGBM algorithm was used to build the classification model, and finally the test set was used for verification. The results of the comparative experiment are shown in Table 3. After the well logging data was processed using the minimum and maximum value standardization method, the LightGBM model was able to achieve a higher accuracy rate for the test set.

[0171] Table 3

[0172]

[0173] (2) Different data balancing methods

[0174] To prove that the SMOTE algorithm is superior to other traditional data balancing algorithms, an experimental comparison was conducted with the existing data balancing algorithms. First, 20% of the data samples were randomly divided from the preprocessed logging data for model training, and the rest were used for model testing. Then, four different data balancing algorithms (ROS, ADASYN, SVMSMOTE, and SMOTENC) were used to balance the training set. Then, the processed training set was used to build the LightGBM classification model, and finally the test set was used to verify the model performance.

[0175] Table 4 shows the recognition results of the LightGBM model on the test set after combining different data balancing algorithms. 1 The mean of the scores shows that, compared with other combination models, the LightGBM+SMOTE model can obtain higher overall lithology identification accuracy; by comparing the standard deviations of the two indicators, it can be found that, except for the LightGBM+ADASYN model, which has a lower standard deviation in accuracy than the LightGBM+SMOTE model, the accuracy of other combination models is similar to that of F 1 The standard deviation of the scores is higher than that of LightGBM+SMOTE, which shows that the new samples synthesized by the SMOTE algorithm have the least disturbance on the classification model training process. Based on the above results, it can be confirmed that the use of the SMOTE algorithm for well logging data balance research is better than other algorithms.

[0176] Table 4

[0177]

[0178] (3) Different parameter optimization methods

[0179] To verify the effectiveness of the PSO+LightGBM algorithm for lithology identification, this embodiment first cleans the original logging data according to the above logging data preprocessing process; secondly, randomly select 20% of the data from the entire data set as the training set, and the rest of the data as the test set; then use the SMOTE algorithm to balance the training set data. Finally, the training set is used as a learning sample, combined with the PSO algorithm to find the optimal hyperparameters of the LightGBM model. The PSO parameter settings in this embodiment are shown in Table 5. Figure 6 The fitness change curve of the PSO algorithm under 50 iterations is given. The experimental results show that when the PSO algorithm iterates to the 22nd time, the particle fitness has basically reached stability, from which the optimal hyperparameters of the LightGBM model can be determined, as shown in Table 6. The LightGBM model is loaded with the optimal hyperparameter values, the training set is re-trained, and the test set data is identified. Table 7 gives the average indicators and standard deviations under 20 repeated experiments. The results show that the model can achieve a classification accuracy of 95.94% and an F1 of 95.62%. The standard deviations of the two indicators are both around 0.1%, indicating that the model is less affected by random synthetic samples.

[0180] Table 5

[0181] PSO parameters value N 10 <![CDATA[th min ]]> 0.01 <![CDATA[iter max ]]> 50 <![CDATA[x lb ]]> [0.01 100 0.5 5] <![CDATA[x ub ]]> [0.3 800 1 20]

[0182] Table 6

[0183]

[0184] Table 7

[0185]

[0186] To verify that the hyperparameters determined by the PSO algorithm are closer to the optimal value than the grid search method, this embodiment is experimentally compared with the grid search method + LightGBM algorithm. Figure 7 The results show that the LightGBM model recognition result combined with the PSO algorithm is better than the grid search method, indicating that the model hyperparameters determined by the PSO algorithm are more accurate and effective.

[0187] (4) Different classification models

[0188] To prove that the PSO+LightGBM algorithm is superior to other mainstream machine learning algorithms, this embodiment conducts an experimental comparison with several typical machine learning algorithms, including SVM algorithm, PNN algorithm, RF algorithm, Xgboost algorithm, guided aggregation algorithm (Bagging) and Adaboost algorithm. This chapter will build six classification models through the above algorithms. Table 8 shows the optimal hyperparameters of different classification models determined by the grid search method. Figure 8 The accuracy and F1 distribution of different classification models are shown. The training time and test time of the model in the recognition process are shown in Table 9.

[0189] Table 8

[0190]

[0191] Table 9

[0192]

[0193] Example 2: Applicability Verification

[0194] In order to verify that the method proposed in the present invention is also applicable to other oilfield data, this embodiment selects a set of public logging data for model testing. The new data set consists of 6 logging curves (CAL, AC, GR, K, RD and SP) and 7 different lithologies (coarse sandstone, medium sandstone, fine sandstone, siltstone, dolomite, limestone and mudstone), containing a total of 3711 sets of logging data. First, the logging data is depth corrected, denoised and standardized according to the above process. In the data set division stage, since there are 3345 sets of data from 31 wells and 366 sets of data from the other 3 wells in the entire data set, this embodiment uses 3345 sets of data as training sets and the remaining data as test sets. Table 10 shows the sample size distribution of the training set and the test set. Then the SMOTE algorithm is used to balance the training set. Finally, the PSO+LightGBM classification model is constructed through the training set and verified using the test set.

[0195] Table 10

[0196] Lithology category Training set Proportion Test Set Proportion Coarse sandstone 194 5.80% 20 5.46% Medium sandstone 710 21.23% 80 21.86% Fine sandstone 751 22.45% 80 21.86% Siltstone 166 4.96% 20 5.46% Dolomite 482 14.41% 53 14.48% Limestone 114 3.41% 13 3.55% Mudstone 928 27.74% 100 27.32% total 3345 100.00% 366 100.00%

[0197] Fig. 9 The accuracy and F1 distribution of the PSO+LightGBM model under 20 repeated experiments are shown. Table 11 gives the average values ​​and standard deviations of different indicators under 20 repeated experiments. The experimental results show that the classification model can achieve a classification accuracy of 92.01% and an F1 of 92.44% for the test set, and the standard deviations of the two indicators are both less than 1%, which proves that the present invention is applicable to the oil field dataset. In addition, since the training set and the test set in the dataset come from different wells in the same oil field, it can be concluded that the present invention can show generalization to different oil well data.

[0198] Table 11

[0199] Model Mean accuracy (%) Accuracy standard deviation (%) F1 mean (%) F1 standard deviation (%) PSO+LightGBM 92.01 0.52 92.44 0.52

[0200] In general, the above technical solution conceived by the present invention has the following beneficial effects compared with the prior art:

[0201] (1) A reservoir lithology identification method and system based on data balance proposed in an embodiment of the present invention uses a correlation function method to perform depth correction on logging curves, thereby solving the problem of inconsistent depths between logging curves; uses a nonlinear wavelet transform threshold method to denoise logging data, thereby filtering out white noise signals introduced by the external environment to a certain extent; and uses a minimum and maximum value normalization method to standardize logging data, thereby solving the problem of large differences in numerical magnitudes between different logging curves.

[0202] (2) The embodiment of the present invention proposes a reservoir lithology identification method and system based on data balancing, which uses the SMOTE algorithm to analyze the intrinsic characteristics of minority class samples to synthesize new sample data and add them to the minority classes, thereby overcoming the problems of model overfitting and low sample utilization rate existing in traditional data balancing algorithms, and effectively improving the recognition effect of the classification model on minority class lithology.

[0203] (3) The embodiment of the present invention proposes a reservoir lithology identification method and system based on data balance, and designs a lithology identification algorithm based on PSO+LightGBM, which effectively solves the problems of time-consuming model construction and low identification accuracy of traditional lithology identification methods, and effectively overcomes the problem of low efficiency of hyperparameter optimization in conventional machine learning lithology identification models.

[0204] The present invention also provides a reservoir lithology identification device based on data balance, as described in the following embodiments. Since the principle of solving the problem by the device is similar to that of the reservoir lithology identification method, the implementation of the device can refer to the implementation of the reservoir lithology identification method, and the repeated parts will not be repeated.

[0205] Fig.11 FIG. 1 is a schematic diagram of the structure of a reservoir lithology identification device according to an embodiment of the present invention. Fig.11 As shown, the device comprises:

[0206] An acquisition unit 01 is used to acquire original logging data of the reservoir to be identified;

[0207] Identification unit 02 is used to input the original logging data of the reservoir to be identified into a pre-trained reservoir lithology identification model to obtain a reservoir lithology identification result; the reservoir lithology identification model is pre-trained and generated based on the original logging data of historical oil wells and a training set of corresponding reservoir lithology category labels, and the training set is a balanced sample training set obtained by synthesizing new sample data and adding them to a few classes after analyzing the characteristics of minority class samples using the SMOTE algorithm.

[0208] In one embodiment, the reservoir lithology identification device further includes: a training unit, which is used to train the reservoir lithology identification model according to the following method:

[0209] Obtain original logging data of historical oil wells;

[0210] The original logging data of historical oil wells and the corresponding category labels of reservoir lithology are used to form a sample set, and the sample set is divided into a training set and a test set;

[0211] The training set is divided into a majority class sample and multiple minority class samples, the SMOTE algorithm is used to process the training set, and new samples are synthesized and added to the minority class samples to obtain a balanced sample training set;

[0212] The reservoir lithology identification model was constructed through the LightGBM classifier;

[0213] The balanced sample training set is used as the input of the reservoir lithology identification model to train a preliminary reservoir lithology identification model;

[0214] The test set is input into the preliminary reservoir lithology identification model to obtain the final reservoir lithology identification model.

[0215] In one embodiment, the training set is divided into a majority class sample and a plurality of minority class samples, the SMOTE algorithm is used to process the training set, and new samples are synthesized and added to the minority class samples to obtain a balanced sample training set, including:

[0216] Read the training set data and divide the training set into 1 majority class and m minority classes; m is a positive integer greater than 1;

[0217] For each minority class, determine the number of new samples that need to be synthesized from the samples within the class based on the number of samples in the minority class and the preset target number of samples after balancing;

[0218] For each minority class sample, determine the Euclidean distance between the minority class sample and other samples in the class, and select the k samples closest to the minority class sample; k is a positive integer greater than 1;

[0219] Perform the following sample synthesis steps for each class:

[0220] For each minority class sample, randomly select a sample from k samples and synthesize a new sample based on the randomly selected sample;

[0221] For each minority class, the number of minority class samples is expanded to the target number of samples after repeating the step of synthesizing new samples a preset number of times; the preset number of times is the number of new samples that need to be synthesized from samples within the class;

[0222] Repeat the sample synthesis step for each class until the number of samples of the m minority classes is expanded to the target number of samples.

[0223] In one embodiment, a reservoir lithology identification model is constructed by a LightGBM classifier, including: the LightGBM classifier uses a CART tree as a weak learning machine, and constructs multiple CART trees in parallel based on a Bagging strategy to complete the training of the model. The LightGBM classifier identifies samples by statistics of all CART tree identification results. The identification process is as follows:

[0224] Setting steps: Given the well logging data, set the root node of the tree as the current node;

[0225] Division step: divide the logging data into left nodes or right nodes according to the logging characteristics of the current node and the preset threshold, repeat the division until it falls into a leaf node, and output the category represented by the leaf node as the classification result of the current CART tree;

[0226] Repeat the setting steps and the division steps to obtain the classification results of all CART trees. The prediction category of the logging data by the LightGBM classifier is the category that appears most frequently in the output results of all CART trees, and finally a reservoir lithology identification model is obtained.

[0227] In one embodiment, the training unit is further used to optimize the reservoir lithology identification model using a PSO algorithm to obtain an optimized reservoir lithology identification model;

[0228] Inputting the test set into the preliminary reservoir lithology identification model to obtain the final reservoir lithology identification model includes: inputting the test set into the optimized reservoir lithology identification model to obtain the final reservoir lithology identification model.

[0229] In one embodiment, the PSO algorithm is used to optimize the reservoir lithology identification model to obtain an optimized reservoir lithology identification model, including:

[0230] Taking the initialized particle swarm position vector, velocity vector, and the local optimal solution and global optimal solution of each particle as initial values, the steps of optimizing the reservoir lithology identification model are iteratively performed. Each step performs the following operations:

[0231] According to the preset particle activity interval, the particle velocity vector and position vector are updated; the particles represent the hyperparameters of the reservoir lithology identification model;

[0232] Calculate the fitness of each particle, and update the local optimal solution of each particle in the iteration process according to the fitness of each particle to obtain the updated local optimal solution;

[0233] According to the updated local optimal solution, the global optimal solution of the particle population in the iteration process is updated to obtain the updated global optimal solution. The global optimal solution corresponding to the preset number of iterations or the global optimal solution of the particle population is lower than the preset minimum particle fitness is the optimal hyperparameter of the lithology identification model.

[0234] In one embodiment, the reservoir lithology identification device based on data balance may further include a preprocessing unit for preprocessing the original logging data according to the following method to obtain preprocessed logging data:

[0235] The original logging data is depth-corrected using the correlation function method;

[0236] The original logging data is denoised using the nonlinear wavelet transform threshold method;

[0237] The minimum and maximum value normalization method is used to standardize the original logging data.

[0238] In one embodiment, the depth correction processing of the original well logging data using the correlation function method may include:

[0239] A reference logging curve is defined, a depth segment of a preset length is fixed on the reference logging curve as a comparison segment, the comparison logging curve that needs depth correction is moved within the set comparison range, and the correlation coefficient between the comparison logging curve and the reference logging curve is calculated when the comparison logging curve is moved by a preset number of points;

[0240] The approximate depth offset between the comparison logging curve and the reference logging curve is reflected by solving the preset number of points corresponding to the maximum correlation coefficient, and the comparison logging curve is moved by the preset number of sampling points to complete the depth correction.

[0241] In one embodiment, the denoising process of the original well logging data using the nonlinear wavelet transform threshold method may include:

[0242] Using the predetermined optimal wavelet basis function and decomposition scale, the original logging data is subjected to wavelet decomposition to obtain the wavelet coefficients at the preset scale;

[0243] Select an optimal threshold value to perform threshold processing on all elements of the wavelet coefficients to obtain the wavelet coefficients after threshold processing;

[0244] The wavelet coefficients after thresholding are subjected to inverse wavelet transform to complete signal reconstruction and obtain denoised logging data.

[0245] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned reservoir lithology identification method based on data balance when executing the computer program.

[0246] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned reservoir lithology identification method based on data balance is implemented.

[0247] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned reservoir lithology identification method based on data balance is implemented.

[0248] In an embodiment of the present invention, a reservoir lithology identification scheme based on data balance is provided, by: acquiring original logging data of a reservoir to be identified; inputting the original logging data of the reservoir to be identified into a pre-trained reservoir lithology identification model to obtain a reservoir lithology identification result; the reservoir lithology identification model is pre-trained and generated based on a training set of original logging data of historical oil wells and corresponding reservoir lithology category labels, the training set being a balanced sample training set obtained by synthesizing new sample data and adding them to a few classes after analyzing the features of minority class samples using the SMOTE algorithm, thereby overcoming the problems of model overfitting and low sample utilization rate existing in traditional data balancing algorithms, thereby effectively improving the model's recognition effect on minority class lithologies and improving the accuracy of reservoir lithology identification.

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

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

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

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

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

Claims

1. A reservoir lithology identification method based on data balance, characterized in that: include: Obtaining original logging data of the reservoir to be identified; Input the original logging data of the reservoir to be identified into the pre-trained reservoir lithology identification model to obtain the reservoir lithology identification result; The reservoir lithology identification model is pre-trained and generated based on the original logging data of historical oil wells and a training set of corresponding reservoir lithology category labels, wherein the training set is a balanced sample training set obtained by synthesizing new sample data and adding them to a few classes after analyzing the features of minority class samples using the SMOTE algorithm.

2. The method according to claim 1, characterized in that It also includes: training the reservoir lithology identification model according to the following method: Obtain original logging data of historical oil wells; The original logging data of historical oil wells and the corresponding category labels of reservoir lithology are used to form a sample set, and the sample set is divided into a training set and a test set; The training set is divided into a majority class sample and multiple minority class samples, the SMOTE algorithm is used to process the training set, and new samples are synthesized and added to the minority class samples to obtain a balanced sample training set; The reservoir lithology identification model was constructed through the LightGBM classifier; The balanced sample training set is used as the input of the reservoir lithology identification model to train a preliminary reservoir lithology identification model; The test set is input into the preliminary reservoir lithology identification model to obtain the final reservoir lithology identification model.

3. The method according to claim 2, characterized in that The training set is divided into a majority class sample and multiple minority class samples. The SMOTE algorithm is used to process the training set, and new samples are synthesized and added to the minority class samples to obtain a balanced sample training set, including: Read the training set data and divide the training set into 1 majority class and m minority classes; m is a positive integer greater than 1; For each minority class, determine the number of new samples that need to be synthesized from the samples within the class based on the number of samples in the minority class and the preset target number of samples after balancing; For each minority class sample, determine the Euclidean distance between the minority class sample and other samples in the class, and select the k samples closest to the minority class sample; k is a positive integer greater than 1; Perform the following sample synthesis steps for each class: For each minority class sample, randomly select a sample from k samples and synthesize a new sample based on the randomly selected sample; For each minority class, the number of minority class samples is expanded to the target number of samples after repeating the step of synthesizing new samples a preset number of times; the preset number of times is the number of new samples that need to be synthesized from samples within the class; Repeat the sample synthesis step for each class until the number of samples of the m minority classes is expanded to the target number of samples.

4. The method according to claim 2, characterized in that The reservoir lithology identification model is constructed by the LightGBM classifier, including: the LightGBM classifier uses the CART tree as a weak learning machine, and builds multiple CART trees in parallel based on the Bagging strategy to complete the model training. The LightGBM classifier recognizes samples by statistics of all CART tree recognition results. The recognition process is as follows: Setting steps: Given the well logging data, set the root node of the tree as the current node; Division step: divide the logging data into left nodes or right nodes according to the logging characteristics of the current node and the preset threshold, repeat the division until it falls into a leaf node, and output the category represented by the leaf node as the classification result of the current CART tree; Repeat the setting steps and the division steps to obtain the classification results of all CART trees. The prediction category of the logging data by the LightGBM classifier is the category that appears most frequently in the output results of all CART trees, and finally a reservoir lithology identification model is obtained.

5. The method according to claim 2, characterized in that Also includes: The PSO algorithm is used to optimize the reservoir lithology identification model to obtain an optimized reservoir lithology identification model; Inputting the test set into the preliminary reservoir lithology identification model to obtain the final reservoir lithology identification model includes: inputting the test set into the optimized reservoir lithology identification model to obtain the final reservoir lithology identification model.

6. The method according to claim 5, characterized in that The PSO algorithm is used to optimize the reservoir lithology identification model to obtain an optimized reservoir lithology identification model, including: Taking the initialized particle swarm position vector, velocity vector, and the local optimal solution and global optimal solution of each particle as initial values, the steps of optimizing the reservoir lithology identification model are iteratively performed. Each step performs the following operations: According to the preset particle activity interval, the particle velocity vector and position vector are updated; the particles represent the hyperparameters of the reservoir lithology identification model; Calculate the fitness of each particle, and update the local optimal solution of each particle in the iteration process according to the fitness of each particle to obtain the updated local optimal solution; According to the updated local optimal solution, the global optimal solution of the particle population in the iteration process is updated to obtain the updated global optimal solution. The global optimal solution corresponding to the preset number of iterations or the global optimal solution of the particle population is lower than the preset minimum particle fitness is the optimal hyperparameter of the lithology identification model.

7. The method according to claim 1 or 2, characterized in that: The method also includes preprocessing the original logging data to obtain preprocessed logging data: The original logging data is depth-corrected using the correlation function method; The original logging data is denoised using the nonlinear wavelet transform threshold method; The minimum and maximum value normalization method is used to standardize the original logging data.

8. The method according to claim 7, characterized in that The original logging data is depth corrected using the correlation function method, including: A reference logging curve is defined, a depth segment of a preset length is fixed on the reference logging curve as a comparison segment, the comparison logging curve that needs depth correction is moved within the set comparison range, and the correlation coefficient between the comparison logging curve and the reference logging curve is calculated when the comparison logging curve is moved by a preset number of points; The approximate depth offset between the comparison logging curve and the reference logging curve is reflected by solving the preset number of points corresponding to the maximum correlation coefficient, and the comparison logging curve is moved by the preset number of sampling points to complete the depth correction.

9. The method according to claim 7, characterized in that The original logging data is denoised using the nonlinear wavelet transform threshold method, including: Using the predetermined optimal wavelet basis function and decomposition scale, the original logging data is subjected to wavelet decomposition to obtain the wavelet coefficients at the preset scale; Select an optimal threshold value to perform threshold processing on all elements of the wavelet coefficients to obtain the wavelet coefficients after threshold processing; The wavelet coefficients after thresholding are subjected to inverse wavelet transform to complete signal reconstruction and obtain denoised logging data.

10. A reservoir lithology identification device based on data balance, characterized in that: include: An acquisition unit, used for acquiring original logging data of the reservoir to be identified; The identification unit is used to input the original logging data of the reservoir to be identified into a pre-trained reservoir lithology identification model to obtain a reservoir lithology identification result; the reservoir lithology identification model is pre-trained and generated based on the original logging data of historical oil wells and a training set of corresponding reservoir lithology category labels, and the training set is a balanced sample training set obtained by adding new sample data synthesized from a few classes after analyzing the characteristics of minority class samples using the SMOTE algorithm.

11. The device according to claim 10, characterized in that Also includes: The training unit is used to train the reservoir lithology identification model according to the following method: Obtain original logging data of historical oil wells; The original logging data of historical oil wells and the corresponding category labels of reservoir lithology are used to form a sample set, and the sample set is divided into a training set and a test set; The training set is divided into a majority class sample and multiple minority class samples, the SMOTE algorithm is used to process the training set, and new samples are synthesized and added to the minority class samples to obtain a balanced sample training set; The reservoir lithology identification model was constructed through the LightGBM classifier; The balanced sample training set is used as the input of the reservoir lithology identification model to train a preliminary reservoir lithology identification model; The test set is input into the preliminary reservoir lithology identification model to obtain the final reservoir lithology identification model.

12. The device according to claim 11, characterized in that The training set is divided into a majority class sample and multiple minority class samples. The SMOTE algorithm is used to process the training set, and new samples are synthesized and added to the minority class samples to obtain a balanced sample training set, including: Read the training set data and divide the training set into 1 majority class and m minority classes; m is a positive integer greater than 1; For each minority class, determine the number of new samples that need to be synthesized from the samples within the class based on the number of samples in the minority class and the preset target number of samples after balancing; For each minority class sample, determine the Euclidean distance between the minority class sample and other samples in the class, and select the k samples closest to the minority class sample; k is a positive integer greater than 1; Perform the following sample synthesis steps for each class: For each minority class sample, randomly select a sample from k samples and synthesize a new sample based on the randomly selected sample; For each minority class, the number of minority class samples is expanded to the target number of samples after repeating the step of synthesizing new samples a preset number of times; the preset number of times is the number of new samples that need to be synthesized from samples within the class; Repeat the sample synthesis step for each class until the number of samples of the m minority classes is expanded to the target number of samples.

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

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

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

Citation Information

Cited By

  • Model preprocessing method and system for lithology identification model

    CN120197520A