Firefly algorithm based optimization of GBDT for predicting organic matter enrichment regularity of deep hydrocarbon source rock and system

By optimizing the GBDT algorithm using the firefly algorithm and combining it with well logging data to establish a TOC prediction model, the accuracy and precision of predicting the enrichment patterns of organic matter in deep source rocks have been improved, reducing exploration costs and increasing the efficiency and accuracy of oil and gas exploration.

CN122266547APending Publication Date: 2026-06-23PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PETROCHINA CO LTD
Filing Date
2024-12-23
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In the prediction of organic matter enrichment patterns in deep source rocks, existing technologies have limited application of machine learning and intelligent optimization algorithms, resulting in low prediction accuracy and precision, which increases exploration costs and risks.

Method used

The gradient boosting decision tree (GBDT) algorithm was optimized using the firefly algorithm. Combined with well logging data, a machine learning model was established based on the total organic carbon (TOC) content, and the hyperparameters were optimized to predict the enrichment pattern of organic matter in deep source rocks.

Benefits of technology

It has improved the accuracy and precision of forecasts, reduced exploration costs and risks, provided a more scientific basis for oil and gas exploration, and promoted the sustainable development of the energy industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122266547A_ABST
    Figure CN122266547A_ABST
Patent Text Reader

Abstract

The application discloses a method and system for predicting deep hydrocarbon source rock organic matter enrichment law based on glowworm algorithm optimized GBDT, and belongs to the field of hydrocarbon source rock TOC prediction. Specifically, the method comprises the following steps: obtaining logging curve data; preprocessing the obtained logging curve data; based on the preprocessed data, establishing a machine learning model (the core lies in the hyperparameter optimization of the model, and the glowworm algorithm is particularly used in the optimization process); and using the established TOC prediction model to predict the total organic carbon content. The application combines machine learning and intelligent optimization algorithm and predicts the organic matter enrichment law of deep hydrocarbon source rock, which can greatly improve the prediction accuracy and precision, and reduce the exploration cost and risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and system for predicting the organic matter enrichment pattern of deep source rocks based on the firefly algorithm-optimized GBDT, belonging to the field of source rock TOC prediction. Background Technology

[0002] With the continuous growth of global energy demand, oil and gas exploration has become a focus of attention. Understanding the patterns of organic matter enrichment is crucial for predicting the direction of oil and gas exploration. The conditions for oil and gas accumulation are important factors in organic matter enrichment. Generally, conditions for oil and gas formation include high organic matter content in the parent material, suitable paleogeographic temperature and stratigraphic depth, good organic matter type and quality, and convenient sedimentary pathways. The presence of these factors enables the formation and enrichment of organic matter, which is conducive to the generation and preservation of oil and gas. To accurately analyze the patterns of organic matter enrichment, methods such as organic matter content testing, thin section analysis, and rock pyrolysis are mainly used. These methods provide information on the content, type, and distribution of organic matter, providing important evidence for oil and gas exploration.

[0003] By analyzing factors such as the formation and distribution of organic matter and hydrocarbon accumulation conditions, the patterns of hydrocarbon enrichment can be revealed. Meanwhile, methods such as paleotemperature field evolution prediction, organic matter abundance assessment, seismic exploration techniques, and geochemical marker analysis also provide effective means for predicting the direction of hydrocarbon exploration. The comprehensive use of these methods can improve the success rate of hydrocarbon exploration and contribute to energy supply.

[0004] With the continuous development of geological exploration technology and the increasing sophistication of geochemical analysis methods, some progress has been made in predicting the enrichment patterns of organic matter in deep source rocks. Numerical simulation software, combined with data from multiple disciplines such as geology and geochemistry, can be used to simulate and predict the formation process and organic matter enrichment patterns of source rocks. This method can, to some extent, compensate for the inadequacy of actual observation data, providing a more comprehensive understanding of deep source rocks. For example, by establishing geological models of sedimentary basins, changes in sedimentary environments, paleoclimate, and paleoproductivity during different geological periods can be simulated, thereby predicting the enrichment areas and degrees of organic matter. However, prediction techniques employing machine learning and intelligent optimization algorithms are relatively limited, or the accuracy and precision of the established prediction models are low. Summary of the Invention

[0005] To overcome the shortcomings of existing technologies, a method and system for predicting the organic matter enrichment patterns of deep source rocks based on the firefly algorithm-optimized GBDT is provided. This technical solution integrates machine learning technology and intelligent optimization algorithms into the prediction of organic matter enrichment patterns. A machine learning model is established to predict the TOC (Total Organic Carbon) parameter, a key oil-bearing parameter, and the hyperparameters are optimized using intelligent optimization algorithms. This approach can better assess and predict the potential and distribution of resources such as oil and natural gas stored in underground rocks, thereby enabling better development and utilization of oil and natural gas resources and promoting the sustainable development of the energy industry.

[0006] Combining machine learning and intelligent optimization algorithms to predict the organic matter enrichment patterns of deep source rocks can not only greatly improve the accuracy and precision of predictions, but also reduce exploration costs and risks.

[0007] To achieve the above technical objectives, the following technical solution is proposed:

[0008] The primary objective of this technical solution is to provide a method for predicting the organic matter enrichment patterns of deep source rocks based on GBDT optimized by the firefly algorithm, comprising the following steps:

[0009] S1 acquires logging curve data of the well to be predicted: it acquires depth data, lithology data, natural gamma data, spontaneous potential data, formation true resistivity data, flushed zone resistivity data, compensated neutron data, and density data of the well to be predicted as input features; it acquires total organic carbon content data (measured data) as output features.

[0010] S2 Preprocesses the data of the well to be predicted: Import logging curves and lithological data, and preprocess the data of the well to be predicted obtained in step S1, that is, process the missing value data and / or outlier values.

[0011] Since lithological data are categorical variables, they need to be converted into numerical variables using coding. That is, the preprocessed lithological data is converted into numerical variables using coding, and the explanatory variables of the well to be predicted are normalized. Then, correlation analysis is performed on the data to calculate the correlation coefficient matrix and obtain the relationship between the variables.

[0012] S3 Model Building: Based on the data preprocessed in step S2, the training set and test set are divided; the GBDT algorithm is used, combined with the input and output features in step S1, and the hyperparameters are optimized using the Firefly algorithm to obtain the TOC prediction model;

[0013] In this process, a machine learning model is established based on the data preprocessed in step S2. The core of establishing the model lies in the hyperparameter tuning, and the Firefly algorithm was selected as the optimal choice.

[0014] S4: Based on the TOC prediction model obtained in step S3, the total organic carbon content of the well to be predicted is predicted according to the logging curve of the well to be predicted, and the predicted TOC value is obtained.

[0015] Furthermore, in step S2, the methods for processing missing value data and / or outlier data include: filling with the mean and mode, filling with cubic spline interpolation function, or deleting.

[0016] Furthermore, in step S2, the methods for encoding lithological data include: unique thermal encoding, tag encoding, and hash encoding.

[0017] Label encoding is only applicable when there is a clear order relationship between categories. If there is no order between categories, using label encoding may introduce unnecessary order relationships and affect the model performance.

[0018] Hash encoding may have hash collision problems, and for some machine learning algorithms, hash encoding may not be the best choice.

[0019] One-hot encoding is an effective method for converting categorical data into numerical data, widely used in machine learning and data preprocessing. It converts a categorical variable with N distinct values ​​into a binary vector of length N, where only one element is 1 and the rest are 0; the element with 1 represents the categorical value of that sample. Since lithological data lacks sequential relationships, label encoding can negatively impact model prediction. For the GBDT algorithm used in this invention, hash encoding might lead to hash collisions; therefore, one-hot encoding is employed to address this issue.

[0020] The second objective of this technical solution is to provide a prediction system for the enrichment pattern of organic matter in deep source rocks based on the firefly algorithm-optimized GBDT, including a data acquisition module, a data preprocessing module, a model training-optimization module, and a prediction module.

[0021] Data acquisition module: including sensors, geophysical instruments and chemical analyzers, used to collect geological, geochemical and geophysical data on deep source rocks, specifically including depth (DEPTH) data, lithological data, natural gamma (GR) data, spontaneous potential (AC) data, formation true resistivity (RT) data, flushed zone resistivity (RXO) data, compensated neutron (CNL) data, density (DEN) data and total organic carbon (TOC) content data of the well to be predicted;

[0022] The data preprocessing module is used to import well logging curves and lithological data, and to process missing and / or outlier data to ensure data quality and consistency. Specifically, it can use methods such as mean and mode filling, cubic spline interpolation function filling, or deletion.

[0023] Subsequently, the lithological data was encoded using One-hot Encoding, a method for converting categorical data into a format easily used by machine learning algorithms. In One-hot Encoding, each feature state or category is converted into a new binary column. If there are N states or N categories, there will be N binary columns, with each state or category marked as 1 in its corresponding column and 0 in the other columns.

[0024] Secondly, explanatory variables corresponding to each well were selected, and the explanatory variables were normalized. Data normalization was performed according to the following formula (1):

[0025]

[0026] Then, correlation analysis is performed on the data, that is, the corresponding Spearman correlation coefficient is calculated, which is often used to describe the correlation between high-dimensional data. It is calculated according to the following formula (2):

[0027]

[0028]

[0029] Where Cov(X,Y) represents the covariance between X and Y, D(X) and D(Y) represent the variances of X and Y respectively, and r(X,Y) represents the correlation coefficient between variables X and Y, where r∈[-1.1];

[0030] |r|>0.8 indicates a very strong correlation, 0.61<|r|<0.8 indicates a strong correlation, 0.41<|r|<0.6 indicates a moderate correlation, 0.21<|r|<0.4 indicates a weak correlation, and 0<|r|<0.2 indicates a very weak correlation or no correlation.

[0031] Model Training-Optimization Module: This module is used to divide the training and test sets. It employs the Gradient Boosting Decision Tree (GBDT) algorithm, combined with data acquired by the data acquisition module, and optimizes hyperparameters using the Firefly algorithm.

[0032] Prediction module: Based on the TOC prediction model established by the model training-optimization module, the TOC is predicted using the well logging curves of the well location.

[0033] The GBDT algorithm involved in this technical solution is as follows:

[0034] GBDT is an ensemble machine learning method widely used in data mining and recommender systems. The objective function of GBDT consists of a loss function and a penalty function. Given a training set T = {(x1,y1),(x2,y2),...,(x...}... n ,y n loss function penalty function Ω(f) k The objective function can be expressed in the following form:

[0035]

[0036] Where i represents the i-th sample, and k represents the k-th tree. Let x represent the i-th sample. i The predicted value;

[0037] GBDT is a high-efficiency ensemble learning algorithm based on decision trees. It improves upon existing decision tree models, significantly enhancing model performance. Its core principle is ensemble learning, combining multiple weak learners into a single strong learner. By progressively optimizing the loss function, it enhances the overall model's performance and predictive accuracy. Furthermore, it incorporates regularization methods, including L1 and L2 regularization, to prevent overfitting. In each iteration, GBDT calculates the gradient and Jacobian matrix for each sample, used to construct the decision tree.

[0038] The advantages of the GBDT algorithm are mainly reflected in the following aspects:

[0039] (1) High accuracy: The GBDT algorithm performs well on both the training and test sets, and is particularly good at handling complex problems such as high-dimensional, sparse features and nonlinear relationships;

[0040] (2) Strong generalization ability: The GBDT algorithm combines multiple weak classifiers to form a strong classifier. This ensemble method helps to reduce the risk of overfitting, thereby enhancing the generalization ability of the model.

[0041] (3) Flexible loss function: The GBDT algorithm can flexibly support various loss functions, making it applicable not only to regression problems, but also to various problems such as binary classification and multi-class classification;

[0042] (4) Feature selection: By analyzing the decision order of each feature in the final model, GBDT can perform simple feature selection, which helps to understand which features contribute the most to the prediction results;

[0043] (5) Strong robustness: The GBDT algorithm has strong stability against outliers and noise values, and is also very robust against feature loss and outliers.

[0044] (6) Good interpretability: The use of decision trees as weak classifiers makes the GBDT model more interpretable and can automatically discover higher-order relationships between features.

[0045] The GBDT algorithm has a wide range of applications and strong performance, especially in handling complex problems and scenarios requiring high accuracy.

[0046] The firefly algorithm involved in this technical solution is as follows:

[0047] The Firefly Algorithm (FA) is a metaheuristic algorithm that achieves optimization by simulating the idealized behavior of mutual attraction between individual fireflies in nature. The algorithm is simple to operate, requires few parameters to be adjusted, and has excellent performance. Since its introduction, it has attracted the attention of researchers at home and abroad and has been widely used in computer science, solving complex equations, and structural and engineering optimization.

[0048] In nature, fireflies use their own light as a signal to attract other individuals, and they will only fly towards those brighter than themselves. The Firefly Algorithm is a swarm intelligence algorithm that simulates this behavior of fireflies. FA (Firefly Algorithm) includes two important factors: brightness and attraction. Brightness reflects the firefly's position and determines the direction of its movement. Attraction determines the distance the firefly moves. Optimization can be achieved by continuously updating brightness and attraction. Its core idea is that low-brightness fireflies are attracted to brighter fireflies, and then they move towards the brighter fireflies to update their positions. The brightness of the fireflies depends on the fitness value of the objective function; the higher the brightness, the better the fitness value. If two adjacent fireflies have the same brightness, the fireflies will move randomly.

[0049] The mathematical model of the firefly algorithm is described as follows: brightness can be represented as:

[0050]

[0051] I0 is the initial brightness, parameter γ represents the brightness loss factor, and r represents the distance between the two fireflies;

[0052] Attraction can be expressed as:

[0053]

[0054] Attraction is an important factor in the individual movement mechanism, where β0 is the maximum attraction between two fireflies, that is, the attraction between two fireflies when the distance r = 0;

[0055] Distance can be expressed as:

[0056] r ij =||x i -x j || (7);

[0057] r ij Let x represent the distance between fireflies i and j in the solution space. i x j It represents the position of the two fireflies in the solution space;

[0058] Movement can be represented as:

[0059]

[0060] During the algorithm iteration process, when firefly x i Its brightness is less than that of a firefly. j At that time, fireflies x i Then move according to the above formula. t is the number of iterations in the algorithm, x... i x j denoted as , where is the position of the two fireflies in the solution space. 'a' is the step size factor, which has a significant impact on algorithm performance and is generally set in the interval (0,1). '∈' represents the perturbation term, which can prevent getting trapped in local optima; '∈' is in the range [-0.5, 0.5].

[0061] The third objective of this technical solution is to provide: a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described prediction method.

[0062] The fourth objective of this technical solution is to provide an information data processing terminal for the above-mentioned prediction method.

[0063] The beneficial technical effects of adopting this technical solution are as follows:

[0064] The prediction of organic matter enrichment patterns in deep source rocks based on the firefly algorithm-optimized GBDT proposed in this invention has significant application value in the field of oil and gas exploration. It not only improves the efficiency and accuracy of resource exploration but also has positive implications for the rational utilization of resources and environmental protection. Furthermore, with the continuous development and application of artificial intelligence in the future, this system will be further improved and optimized, making a greater contribution to the sustainable development of the oil and gas industry.

[0065] This invention combines well logging response data with machine learning and intelligent optimization algorithms to provide new ideas and technical support for oil and gas exploration. By predicting the TOC (Total Organic Carbon) parameter, a key parameter for oil-bearing properties, it accurately assesses and predicts the potential and distribution of organic matter resources in underground rocks, thereby enabling better development and utilization of oil and gas resources, promoting the sustainable development of the energy industry, and contributing to the prosperity of human society.

[0066] Among them, the trained and optimized model was used to predict new data samples, and the prediction results, namely the prediction results of the key parameter TOC of oil content, were obtained. The GBDT model based on the Firefly algorithm optimized with high prediction accuracy and a coefficient of determination R. 2 It can reach over 90%, which meets the requirements of the prediction model for the enrichment pattern of organic matter in deep source rocks. Attached Figure Description

[0067] Figure 1 This is a flowchart of the firefly algorithm in Example 2;

[0068] Figure 2 This is a flowchart of the machine learning model training set optimization module based on the firefly algorithm in Example 2;

[0069] Figure 3 This is a correlation analysis diagram of various features in the well logging dataset from the Shunan region in Example 5;

[0070] Figure 4 This is a correlation analysis chart between logging parameters and measured TOC in Example 6;

[0071] Figure 5 This is an intersection map of measured TOC and predicted TOC in the Changchang-Beijiao Depression of the Qiongdongnan Basin in Example 6. Detailed Implementation

[0072] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0073] Through in-depth research and analysis, this invention integrates machine learning technology and intelligent optimization algorithms into the prediction of organic matter enrichment patterns. By establishing a machine learning model for predicting the key oil-bearing parameter TOC, and optimizing the hyperparameters through intelligent optimization algorithms, this invention can better assess and predict the potential and distribution of resources such as oil and natural gas stored in underground rocks. It combines machine learning and intelligent optimization algorithms to predict the organic matter enrichment patterns of deep source rocks.

[0074] This prediction model for the organic matter enrichment patterns of deep source rocks, based on the firefly algorithm-optimized GBDT, can significantly improve the accuracy and precision of predictions while reducing exploration costs and risks. The core of the system is to utilize machine learning and intelligent optimization algorithms to establish a prediction model for the organic matter enrichment patterns of deep source rocks. First, through a data acquisition module, combined with sensors, geophysical instruments, and chemical analyzers, well logging curves and lithology-related data are collected and integrated, including depth, lithology, natural gamma (GR), spontaneous potential (AC), density (DEN), compensated neutron (CNL), formation true resistivity (RT), and RXO.

[0075] The data preprocessing module cleans and preprocesses the data, including handling missing and outlier values ​​to ensure data quality and consistency. Then, the data is normalized. Normalization ensures that features across different dimensions have similar scales, allowing the optimizer to find the optimal solution more quickly during model training, thus accelerating the model's convergence. After normalization, scale differences between different features are eliminated, helping the model better adapt to scale variations across different datasets, thereby improving its generalization ability and enabling it to perform well on new datasets. Finally, correlation analysis is performed to calculate the correlation coefficient matrix, studying the relationships between multiple variables, determining their degree of correlation, and understanding the potential connections between variables.

[0076] Then, a predictive model for the enrichment pattern of organic matter in deep source rocks is established using machine learning methods. The extracted features are modeled and trained. Commonly used machine learning algorithms include Support Vector Machine, Random Forest, Ridge Regression, and Lasso Regression. These algorithms can build regression models by learning data features. This invention uses the GBDT algorithm and optimizes the parameters using intelligent optimization algorithms to improve the model's predictive performance. This invention employs the Firefly optimization algorithm. This results in a more accurate and generalized predictive model, thus establishing a more accurate and reliable predictive model for the enrichment pattern of organic matter in deep source rocks.

[0077] Finally, the prediction module will input new data and make predictions through a trained machine learning model. The prediction results of the key oil-bearing parameter TOC will be presented in tabular form, revealing the organic matter enrichment pattern of deep source rocks, providing scientific basis for decision-makers, and guiding oil exploration and development.

[0078] The following example illustrates this.

[0079] Example 1

[0080] This embodiment provides a method for predicting the organic matter enrichment patterns of deep source rocks based on the firefly algorithm optimized GBDT, including the following steps:

[0081] S1 acquires logging curve data of the well to be predicted: it acquires depth data, lithology data, natural gamma data, spontaneous potential data, formation true resistivity data, flushed zone resistivity data, compensated neutron data, and density data of the well to be predicted as input features; it acquires total organic carbon content data (measured data) as output features.

[0082] Among them, these nine data points are indicators that are most correlated with or have a causal relationship with organic carbon content based on geological theory. Therefore, using these nine indicators can effectively ensure the prediction accuracy of the subsequent prediction model.

[0083] S2 Preprocesses the data of the well to be predicted: Import logging curves and lithological data, and preprocess the data of the well to be predicted obtained in step S1, that is, process the missing value data and / or outlier values.

[0084] Since lithological data are categorical variables, coding (e.g., preferred unique thermal coding) is required to transform these categorical variables into numerical variables. That is, coding is used to transform the preprocessed lithological data into numerical variables, and the explanatory variables of the well to be predicted are normalized. Then, correlation analysis is performed on the data to calculate the correlation coefficient matrix and obtain the relationship between the variables.

[0085] More specifically, methods for processing missing / outlier data include: filling with the mean and mode, filling with cubic spline interpolation functions, or deleting outlier data;

[0086] More specifically, the explanatory variables for the wells to be predicted are normalized according to the following formula (1):

[0087]

[0088] More specifically, correlation analysis is performed on the data to calculate the correlation coefficient matrix and obtain the relationship between variables, which is calculated according to the following formula (2):

[0089]

[0090]

[0091] Where Cov(X,Y) represents the covariance between X and Y, D(X) and D(Y) represent the variances of X and Y respectively, and r(X,Y) represents the correlation coefficient between variables X and Y, where r∈[-1.1];

[0092] |r|>0.8 indicates a very strong correlation, 0.61<|r|<0.8 indicates a strong correlation, 0.41<|r|<0.6 indicates a moderate correlation, 0.21<|r|<0.4 indicates a weak correlation, and 0<|r|<0.2 indicates a very weak correlation or no correlation.

[0093] S3 Model Building: Based on the data preprocessed in step S2, the training set and test set are divided; the GBDT algorithm is used, combined with the input and output features in step S1, and the hyperparameters are optimized using the Firefly algorithm to obtain the TOC prediction model;

[0094] In this process, a machine learning model is established based on the data preprocessed in step S2. The core of establishing the model lies in the hyperparameter tuning, and the Firefly algorithm was selected as the optimal choice.

[0095] More specifically, the objective function of the GBDT algorithm consists of two parts: a loss function and a penalty function. Given the training set T = {(x1,y1),(x2,y2),...,(x...}... n ,y n loss function penalty function Ω(f) k The objective function is expressed in the following form:

[0096]

[0097] Where i represents the i-th sample, and k represents the k-th tree. Let x represent the i-th sample. i Predicted value

[0098] More specifically, the mathematical model of the Firefly algorithm is described as follows:

[0099] Brightness can be expressed as:

[0100]

[0101] I0 is the initial brightness, parameter γ represents the brightness loss factor, and r represents the distance between the two fireflies;

[0102] Attraction can be expressed as:

[0103]

[0104] Attraction is an important factor in the individual movement mechanism, where β0 is the maximum attraction between two fireflies, that is, the attraction between two fireflies when the distance r = 0;

[0105] Distance can be expressed as:

[0106] r ij =||x i-x j || (7);

[0107] r ij Let x represent the distance between fireflies i and j in the solution space. i x j It represents the position of the two fireflies in the solution space;

[0108] Movement can be represented as:

[0109]

[0110] During the algorithm iteration process, when firefly x i Its brightness is less than that of a firefly. j At that time, fireflies x i The movement is then performed according to the above formula; t is the number of iterations of the algorithm, x i x j denoted by , where is the position of the two fireflies in the solution space; 'a' is the step size factor, which has a significant impact on the algorithm's performance and is set in the interval (0,1); '∈' is the perturbation term, which can prevent getting trapped in local optima, and '∈' is set in the interval [-0.5, 0.5].

[0111] S4: Based on the TOC prediction model obtained in step S3, the total organic carbon content of the well to be predicted is predicted according to the logging curve of the well to be predicted, and the predicted TOC value is obtained.

[0112] Example 2

[0113] This embodiment provides a prediction system for the enrichment pattern of organic matter in deep source rocks based on the firefly algorithm optimized GBDT, including a data acquisition module, a data preprocessing module, a model training-optimization module, and a prediction module;

[0114] Data acquisition module: including sensors, geophysical instruments and chemical analyzers, used to collect geological, geochemical and geophysical data on deep source rocks, specifically including depth (DEPTH) data, lithological data, natural gamma (GR) data, spontaneous potential (AC) data, formation true resistivity (RT) data, flushed zone resistivity (RXO) data, compensated neutron (CNL) data, density (DEN) data and total organic carbon (TOC) content data of the well to be predicted;

[0115] The data preprocessing module is used to import well logging curves and lithological data, and to process missing and / or outlier data to ensure data quality and consistency. Specifically, it can use methods such as mean and mode filling, cubic spline interpolation function filling, or deletion.

[0116] Subsequently, the lithological data was encoded using One-hot Encoding, a method for converting categorical data into a format easily used by machine learning algorithms. In One-hot Encoding, each feature state or category is converted into a new binary column. If there are N states or N categories, there will be N binary columns, with each state or category marked as 1 in its corresponding column and 0 in the other columns.

[0117] Secondly, explanatory variables corresponding to each well were selected, and the explanatory variables were normalized. Data normalization was performed according to the following formula (1):

[0118]

[0119] Then, correlation analysis is performed on the data, that is, the corresponding Spearman correlation coefficient is calculated, which is often used to describe the correlation between high-dimensional data. It is calculated according to the following formula (2):

[0120]

[0121]

[0122] Where Cov(X,Y) represents the covariance between X and Y, D(X) and D(Y) represent the variances of X and Y respectively, and r(X,Y) represents the correlation coefficient between variables X and Y, where r∈[-1.1];

[0123] |r|>0.8 indicates a very strong correlation, 0.61<|r|<0.8 indicates a strong correlation, 0.41<|r|<0.6 indicates a moderate correlation, 0.21<|r|<0.4 indicates a weak correlation, and 0<|r|<0.2 indicates a very weak correlation or no correlation.

[0124] Model Training-Optimization Module: This module is used to divide the training and test sets. It employs the Gradient Boosting Decision Tree (GBDT) algorithm, combined with data acquired by the data acquisition module, and optimizes hyperparameters using the Firefly algorithm.

[0125] Prediction module: Based on the TOC prediction model established by the model training-optimization module, the TOC is predicted using the well logging curves of the well location.

[0126] The GBDT algorithm involved is as follows:

[0127] GBDT is an ensemble machine learning method widely used in data mining and recommender systems. The objective function of GBDT consists of a loss function and a penalty function. Given the training set...

[0128] T = {(x1,y1),(x2,y2),...,(x n ,y n loss function penalty function Ω(f) k The objective function can be expressed in the following form:

[0129]

[0130] Where i represents the i-th sample, and k represents the k-th tree. Let x represent the i-th sample. i The predicted value;

[0131] GBDT is a high-efficiency ensemble learning algorithm based on decision trees. It improves upon existing decision tree models, significantly enhancing model performance. Its core principle is ensemble learning, combining multiple weak learners into a single strong learner. By progressively optimizing the loss function, it enhances the overall model's performance and predictive accuracy. Furthermore, it incorporates regularization methods, including L1 and L2 regularization, to prevent overfitting. In each iteration, GBDT calculates the gradient and Jacobian matrix for each sample, used to construct the decision tree.

[0132] The advantages of the GBDT algorithm are mainly reflected in the following aspects:

[0133] (1) High accuracy: The GBDT algorithm performs well on both the training and test sets, and is particularly good at handling complex problems such as high-dimensional, sparse features and nonlinear relationships;

[0134] (2) Strong generalization ability: The GBDT algorithm combines multiple weak classifiers to form a strong classifier. This ensemble method helps to reduce the risk of overfitting, thereby enhancing the generalization ability of the model.

[0135] (3) Flexible loss function: The GBDT algorithm can flexibly support various loss functions, making it applicable not only to regression problems, but also to various problems such as binary classification and multi-class classification;

[0136] (4) Feature selection: By analyzing the decision order of each feature in the final model, GBDT can perform simple feature selection, which helps to understand which features contribute the most to the prediction results;

[0137] (5) Strong robustness: The GBDT algorithm has strong stability against outliers and noise values, and is also very robust against feature loss and outliers.

[0138] (6) Good interpretability: The use of decision trees as weak classifiers makes the GBDT model more interpretable and can automatically discover higher-order relationships between features.

[0139] The GBDT algorithm has a wide range of applications and strong performance, especially in handling complex problems and scenarios requiring high accuracy.

[0140] The firefly algorithm involved is as follows:

[0141] The Firefly Algorithm (FA) is a metaheuristic algorithm that achieves optimization by simulating the idealized behavior of mutual attraction between individual fireflies in nature. The algorithm is simple to operate, requires few parameters to be adjusted, and has excellent performance. Since its introduction, it has attracted the attention of researchers at home and abroad and has been widely used in computer science, solving complex equations, and structural and engineering optimization.

[0142] In nature, fireflies use their own light as a signal to attract other individuals, and they will only fly towards those brighter than themselves. The Firefly Algorithm is a swarm intelligence algorithm that simulates this behavior of fireflies. FA (Firefly Algorithm) includes two important factors: brightness and attraction. Brightness reflects the firefly's position and determines the direction of its movement. Attraction determines the distance the firefly moves. Optimization can be achieved by continuously updating brightness and attraction. Its core idea is that low-brightness fireflies are attracted to brighter fireflies, and then they move towards the brighter fireflies to update their positions. The brightness of the fireflies depends on the fitness value of the objective function; the higher the brightness, the better the fitness value. If two adjacent fireflies have the same brightness, the fireflies will move randomly.

[0143] The mathematical model of the firefly algorithm is described as follows: brightness can be represented as:

[0144]

[0145] I0 is the initial brightness, parameter γ represents the brightness loss factor, and r represents the distance between the two fireflies;

[0146] Attraction can be expressed as:

[0147]

[0148] Attraction is an important factor in the individual movement mechanism, where β0 is the maximum attraction between two fireflies, that is, the attraction between two fireflies when the distance r = 0;

[0149] Distance can be expressed as:

[0150] rij =||x i -x j || (7);

[0151] r ij Let x represent the distance between fireflies i and j in the solution space. i x j It represents the position of the two fireflies in the solution space;

[0152] Movement can be represented as:

[0153]

[0154] During the algorithm iteration process, when firefly x i Its brightness is less than that of a firefly. j At that time, fireflies x i Then move according to the above formula. t is the number of iterations in the algorithm, x... i x j The positions of the two fireflies in the solution space are denoted by , 'a' is the step size factor, which has a significant impact on algorithm performance and is generally set in the interval (0,1); ∈ represents the perturbation term, which can prevent getting trapped in local optima, and ∈ ∈ [-0.5, 0.5]. The specific process of the firefly algorithm is as follows: Figure 1 As shown, the process of the machine learning model training set optimization module is as follows: Figure 2 As shown.

[0155] Example 3

[0156] Based on embodiments 1-2, this embodiment provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned prediction method.

[0157] Example 4

[0158] Based on Examples 1-2, this example provides an information data processing terminal for the aforementioned prediction method.

[0159] Example 5

[0160] This embodiment predicts the organic matter abundance of the Qiongzhusi Formation source rocks in the Shunan region in order to explore the huge resource potential of the Qiongzhusi Formation source rocks in the Shunan region. Specifically, a TOC prediction model is constructed using six well logging curves (GR, AC, RT, RXO, CNL and DEN) and measured TOC data from the Shunan region.

[0161] The above six logging curves show a good correlation with TOC, such as... Figure 3 As shown;

[0162] Table 1

[0163]

[0164]

[0165] Based on the TOC prediction model obtained in Example 1, the TOC value corresponding to each data point was predicted using the TOC prediction model. The trained and optimized model was used to predict the new data samples, that is, the prediction results of the key parameter TOC of oil content, and the corresponding data are shown in Table 2 below.

[0166] Table 2

[0167]

[0168]

[0169] Table 2 shows that the prediction accuracy of the GBDT model optimized based on the firefly algorithm is high, with a high coefficient of determination R0. 2 It can reach over 90%, which meets the requirements of the prediction model for the enrichment pattern of organic matter in deep source rocks.

[0170] In addition, the coefficient of determination (R²) was chosen. 2 The variance, mean squared error, mean absolute error, and median absolute error were used as evaluation metrics for this TOC prediction model, and the results are shown in Table 3.

[0171] Table 3

[0172] Model evaluation metrics result Coefficient of determination 0.933 Explaining variance 0.929 Mean Absolute Error 0.012 Mean Square Error 0.036 Median absolute error 0.029

[0173] Table 3 shows the calculation results of the model evaluation indicators, indicating that the model's prediction results have high accuracy.

[0174] The prediction results and model performance evaluation indicators of the five models are shown in Table 2-3 above, with the horizontal and vertical axes representing the actual values ​​and predicted values, respectively.

[0175] Coefficient of determination (R) 2 It is calculated using the following formula;

[0176]

[0177] Explained variance: The model's ability to explain variations in the dataset. The closer the explained variance is to 1, the stronger the explanatory power and the better the performance; the closer it is to 0, the weaker the model's ability to explain data variations. It is calculated using the following formula, where var() represents variance;

[0178]

[0179] Mean Absolute Error: Represents the average absolute error between predicted and observed values. It is calculated using the following formula;

[0180]

[0181] Mean squared error: Represents the average of the sum of squares of the errors between predicted and observed values. It is calculated using the following formula;

[0182]

[0183] Median absolute error: The deviation between the data and the median of the data; it is the median of the absolute values ​​of the deviations. It is calculated using the following formula;

[0184]

[0185] Example 6

[0186] This embodiment predicts hydrocarbon source rocks in the Changchang-Beijiao Depression of the Qiongdongnan Basin to illustrate in detail the prediction method of organic matter enrichment patterns in deep source rocks based on the firefly algorithm optimized GBDT, further explaining the technical solution. Specifically, as follows:

[0187] I. The GBDT machine learning model and the firefly-based optimization method were selected;

[0188] II. Acquisition of logging curve data: natural gamma rays (GR), acoustic waves (AC), compensated neutrons (CNL), density (DEN), resistivity (R2M1, R2MX) and TOC experimental data;

[0189] Third, the well logging data were preprocessed, with missing values ​​filled with the mean of the column containing the well logging curve. Then, the original geological data were normalized using the Gaussian initialization method to establish a dataset. Six conventional well logging curves were collected from the Changchang-Beijiao Depression, including natural gamma ray (GR), acoustic (AC), neutron (CNL), density (DEN), resistivity (R2M1, R2MX), and TOC experimental data.

[0190] IV. Observing the relationship between single well logging data and TOC, it was found that the linear correlation between TOC content and single well logging curves in this area was poor. Figure 4 When creating a prediction model, it is impossible to accurately predict TOC content using only any single logging parameter. To accurately predict TOC content and explore the nonlinear mapping relationship between TOC content and various logging curves, all logging curves sensitive to organic matter should be integrated. Therefore, this study selected six logging curves—GR, AC, CNL, DEN, R2M1, and R2MX—as input features.

[0191] In addition, in order to achieve better results from the prediction model, the hyperparameters of the model were optimized based on the firefly algorithm before the model was built. The parameter selection results are shown in Table 4.

[0192] Table 4 shows the optimal hyperparameters of the model selected based on the firefly algorithm.

[0193]

[0194] 5. After determining the model hyperparameters, divide the dataset into 80% training set and 20% test set for training.

[0195] The results show that in the training set, GBDT's R 2 The R value in the test set is 0.98. 2 It is 0.82 ( Figure 5 The test set MSE and MAE were 0.036 and 0.143, respectively (Table 5).

[0196] Table 5. Prediction results of GBDT model in Changchang-Beijiao Depression, Qiongdongnan Basin.

[0197]

[0198]

[0199]

[0200] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for predicting the enrichment pattern of organic matter in deep source rocks based on the firefly algorithm optimized by GBDT, characterized in that, Includes the following steps: S1: Obtain the depth data, lithology data, natural gamma data, spontaneous potential data, formation true resistivity data, flushed zone resistivity data, compensated neutron data, and density data of the well to be predicted as input features; Obtain total organic carbon content data as an output feature; S2: Import logging curves and lithological data, and preprocess the data of the well to be predicted obtained in step S1; Handling missing values ​​and / or outliers; The lithological data were converted into numerical variables by coding, and the explanatory variables of the well to be predicted were normalized. Then, correlation analysis was performed on the data to calculate the correlation coefficient matrix and obtain the relationship between the variables. S3: Based on the data preprocessed in step S2, divide the data into training and test sets; use the GBDT algorithm, combine the input and output features from step S1, and optimize the hyperparameters using the Firefly algorithm to obtain the TOC prediction model. S4: Based on the TOC prediction model obtained in step S3, the total organic carbon content of the well to be predicted is predicted according to the logging curve of the well to be predicted, and the predicted TOC value is obtained.

2. The prediction method according to claim 1, characterized in that, In step S2, the methods for processing missing value data and / or outlier data include: filling with the mean and mode, filling with cubic spline interpolation function, or deleting.

3. The prediction method according to claim 2, characterized in that, In step S2, the methods for encoding lithological data include: unique thermal encoding, tag encoding, and hash encoding.

4. The prediction method according to claim 3, characterized in that, In step S2, the explanatory variables of the well to be predicted are normalized according to the following formula (1):

5. The prediction method according to claim 4, characterized in that, In step S2, correlation analysis is performed on the data, the correlation coefficient matrix is ​​calculated, and the relationship between variables is obtained, calculated according to the following formula (2): Where Cov(X,Y) represents the covariance between X and Y, and D(X) and D(Y) represent the variances of X and Y, respectively. r(X,Y) represents the correlation coefficient between variables X and Y, where r∈[-1.1]; |r|>0.8 indicates a very strong correlation, 0.61<|r|<0.8 indicates a strong correlation, 0.41<|r|<0.6 indicates a moderate correlation, 0.21<|r|<0.4 indicates a weak correlation, and 0<|r|<0.2 indicates a very weak correlation or no correlation.

6. The prediction method according to claim 5, characterized in that, In step S3, the objective function of the GBDT algorithm consists of two parts: a loss function and a penalty function. The training set T = {(x1,y1),(x2,y2),...,(x...} is known. n ,y n loss function penalty function Ω(f) k The objective function is expressed in the following form: Where i represents the i-th sample, and k represents the k-th tree. Let x represent the i-th sample. i The predicted value.

7. The prediction method according to claim 5, characterized in that, In step S3, the optimization is performed using the firefly algorithm. The mathematical model of the firefly algorithm is described as follows: Brightness can be expressed as: I0 is the initial brightness, parameter γ represents the brightness loss factor, and r represents the distance between the two fireflies; Attraction can be expressed as: Attraction is an important factor in the individual movement mechanism, where β0 is the maximum attraction between two fireflies, that is, the attraction between two fireflies when the distance r = 0; Distance can be expressed as: r ij =||x i -x j || (7); r ij Let x represent the distance between fireflies i and j in the solution space. i x j It represents the position of the two fireflies in the solution space; Movement can be represented as: During the algorithm iteration process, when firefly x i Its brightness is less than that of a firefly. j At that time, fireflies x i The movement is then performed according to the above formula; t is the number of iterations of the algorithm, x i x j is the position of the two fireflies in the solution space, a is the step size factor, which has a significant impact on the algorithm performance and is set in the interval (0,1); ∈ is the perturbation term, which can avoid getting trapped in local optima, ∈∈[-0.5, 0.5].

8. A prediction system for the enrichment pattern of organic matter in deep source rocks based on the firefly algorithm optimized by GBDT, characterized in that, The prediction system used by the prediction method according to any one of claims 1-7, the prediction system comprising a data acquisition module, a data preprocessing module, a model training-optimization module and a prediction module; Data acquisition module: used to collect depth data, lithological data, natural gamma data, spontaneous potential data, formation true resistivity data, flushed zone resistivity data, compensated neutron data, density data, and total organic carbon content data of the well to be predicted; Data preprocessing module: Used to import well logging curves and lithological data, process missing values ​​and / or outliers; after encoding the lithological data, normalize the explanatory variables of the well to be predicted; then, perform correlation analysis on the data, calculate the correlation coefficient matrix, and obtain the relationship between variables; Model Training-Optimization Module: This module is used to divide the training and test sets, employs the GBDT algorithm, combines data acquired by the data acquisition module, and optimizes hyperparameters using the Firefly algorithm. Prediction module: Based on the TOC prediction model established by the model training-optimization module, the TOC is predicted using the well logging curves of the well location.

9. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the prediction method according to any one of claims 1-7.

10. An information data processing terminal for the prediction method according to any one of claims 1-7.